Code:
# autor: EBFE
# mail: ebfe@inbox.ru
# python 2.6/2.7
import sys, urllib, time
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
import urlparse
class SimpleServer(BaseHTTPRequestHandler):
def log(self, msg):
print (msg)# self.log_message
def do_GET(self):
self.http_ok("<html>EBFE's simple n0ise 'Black Box' auth-server</html>")
def do_POST(self):
self.log("HTTP POST %s\n" % self.path)
form = None
if "content-length" in self.headers:
length = int(self.headers["content-length"])
form = urlparse.parse_qs(self.rfile.read(length),
keep_blank_values = 1)
self.log("POST values:")
for key, value in form.items():
self.log("%s: %s" % (key, value[0]))
if form and "/login.php" in self.path:
self.log("\nlogin request(hwid) %s" % form['hardwareid'][0])
self.http_ok("1-1-1-1-1-1")
elif form and "/tools.php" in self.path:
self.log("\ntool stub request:\nhardwareid: %s\ntool: %s" %
(form['hardwareid'][0], form['tool'][0]))
try:
f = open("dumps/"+form['tool'][0], "r")
self.http_ok(f.read())
self.log("OK")
except IOError:
self.log(("\nunknown tool '%s' " +
"request from n0ise Black Box :( \n") % form['tool'][0])
self.http_ok("")
else:
f.close()
else:
self.log("\nunknown http-request from n0ise Black Box :( \n")
self.http_ok("")
def http_ok(self, msg, content_type = "text/html"):
self.send_response(200)
self.send_header("Content-type", content_type)
self.send_header("Content-length", str(len(msg)))
self.end_headers()
self.wfile.write(msg)
def main():
try:
server = HTTPServer(('', 80), SimpleServer)
print('starting auth-server')
server.serve_forever()
except KeyboardInterrupt:
server.socket.close()
if __name__ == '__main__':
main()
Code:
# autor: EBFE
# mail: ebfe@inbox.ru
# python 2.7
import sys, urllib, time
tools = ['Crypter', 'Binder', 'Downloader', 'Keylogger', 'Bot']
myurl = "http://localhost"#"http://www.fuckddoskiddies.com"
dumpdir = "dumps"
def dump(url, hwid, tool, dumpfile):
# POST: export_all=Export+All+Logs
print ("dumping '%s' to: '%s'" % (tool, dumpfile.name))
post = urllib.urlencode({'hardwareid':hwid, 'tool':tool,
'firstsurprise':'explorer', 'secondsurprise':'0'})
page = urllib.urlopen(url, post)
print ("HTTP %d" % page.getcode())
data = page.read()
dumpfile.write(data)
page.close()
def main():
date = time.gmtime()
url = myurl + "/tools.php"
hwid = sys.argv[1]
for tool in tools:
try:
filename = dumpdir + "/" + tool + \
"__%02d%02d%02d_%02d%02d%02d" % (date.tm_mday,
date.tm_mon, date.tm_year, date.tm_hour,
date.tm_min, date.tm_sec)
with open(filename, "w") as f:
dump(url, hwid, tool, f)
except IOError:
print("error while dumping '%s' :(" % tool)
main()