diff --git a/lib/listeners/http_com.py b/lib/listeners/http_com.py index 0db86ca..1ddeccd 100644 --- a/lib/listeners/http_com.py +++ b/lib/listeners/http_com.py @@ -7,7 +7,7 @@ import time import copy import sys from pydispatch import dispatcher -from flask import Flask, request, make_response +from flask import Flask, request, make_response, send_from_directory # Empire imports from lib.common import helpers @@ -137,17 +137,86 @@ class Listener: # set the default staging key to the controller db default self.options['StagingKey']['Value'] = str(helpers.get_config('staging_key')[0]) + # randomize the length of the default_response and index_page headers to evade signature based scans + self.header_offset = random.randint(0,64) def default_response(self): + """ + Returns an IIS 7.5 404 not found page. + """ + + return '\n'.join([ + '', + '', + '
', + '', + 'This is the default web page for this server.
" - page += "The web server software is running but no content has been added, yet.
" - page += "" - return page + return '\n'.join([ + '', + '', + '', + '', + '