added option to filepwn plugin

This commit is contained in:
byt3bl33d3r 2014-07-24 22:03:55 +02:00
parent 0f3a721d4a
commit 26a15602b2
2 changed files with 10 additions and 3 deletions

0
config_files/replace.cfg Normal file
View file

View file

@ -22,7 +22,7 @@ class FilePwn(Plugin):
name = "FilePwn"
optname = "filepwn"
implements = ["handleResponse"]
has_opts = False
has_opts = True
desc = "Backdoor executables being sent over http using bdfactory"
def convert_to_Bool(self, aString):
@ -36,6 +36,10 @@ class FilePwn(Plugin):
def initialize(self,options):
'''Called if plugin is enabled, passed the options namespace'''
self.options = options
self.filepwncfg = options.filepwncfg
if self.filepwncfg == None:
self.filepwncfg = "./config_files/filepwn.cfg"
self.binaryMimeTypes = ["application/octet-stream", 'application/x-msdownload',
'application/x-msdos-program', 'binary/octet-stream']
@ -45,7 +49,7 @@ class FilePwn(Plugin):
#NOT USED NOW
#self.supportedBins = ('MZ', '7f454c46'.decode('hex'))
self.userConfig = ConfigObj('./config_files/filepwn.cfg')
self.userConfig = ConfigObj(self.filepwncfg)
self.FileSizeMax = self.userConfig['targets']['ALL']['FileSizeMax']
self.WindowsIntelx86 = self.userConfig['targets']['ALL']['WindowsIntelx86']
self.WindowsIntelx64 = self.userConfig['targets']['ALL']['WindowsIntelx64']
@ -286,4 +290,7 @@ class FilePwn(Plugin):
else:
logging.debug("%s File is not of supported Content-Type: %s" % (request.client.getClientIP(), content_header))
return {'request':request,'data':data}
return {'request':request,'data':data}
def add_options(self, options):
options.add_argument("--filepwncfg", type=file, help="Specify a config file")