mirror of
https://github.com/byt3bl33d3r/MITMf.git
synced 2025-07-06 21:12:16 -07:00
added option to filepwn plugin
This commit is contained in:
parent
0f3a721d4a
commit
26a15602b2
2 changed files with 10 additions and 3 deletions
0
config_files/replace.cfg
Normal file
0
config_files/replace.cfg
Normal file
|
@ -22,7 +22,7 @@ class FilePwn(Plugin):
|
||||||
name = "FilePwn"
|
name = "FilePwn"
|
||||||
optname = "filepwn"
|
optname = "filepwn"
|
||||||
implements = ["handleResponse"]
|
implements = ["handleResponse"]
|
||||||
has_opts = False
|
has_opts = True
|
||||||
desc = "Backdoor executables being sent over http using bdfactory"
|
desc = "Backdoor executables being sent over http using bdfactory"
|
||||||
|
|
||||||
def convert_to_Bool(self, aString):
|
def convert_to_Bool(self, aString):
|
||||||
|
@ -36,6 +36,10 @@ class FilePwn(Plugin):
|
||||||
def initialize(self,options):
|
def initialize(self,options):
|
||||||
'''Called if plugin is enabled, passed the options namespace'''
|
'''Called if plugin is enabled, passed the options namespace'''
|
||||||
self.options = options
|
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',
|
self.binaryMimeTypes = ["application/octet-stream", 'application/x-msdownload',
|
||||||
'application/x-msdos-program', 'binary/octet-stream']
|
'application/x-msdos-program', 'binary/octet-stream']
|
||||||
|
@ -45,7 +49,7 @@ class FilePwn(Plugin):
|
||||||
#NOT USED NOW
|
#NOT USED NOW
|
||||||
#self.supportedBins = ('MZ', '7f454c46'.decode('hex'))
|
#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.FileSizeMax = self.userConfig['targets']['ALL']['FileSizeMax']
|
||||||
self.WindowsIntelx86 = self.userConfig['targets']['ALL']['WindowsIntelx86']
|
self.WindowsIntelx86 = self.userConfig['targets']['ALL']['WindowsIntelx86']
|
||||||
self.WindowsIntelx64 = self.userConfig['targets']['ALL']['WindowsIntelx64']
|
self.WindowsIntelx64 = self.userConfig['targets']['ALL']['WindowsIntelx64']
|
||||||
|
@ -286,4 +290,7 @@ class FilePwn(Plugin):
|
||||||
|
|
||||||
else:
|
else:
|
||||||
logging.debug("%s File is not of supported Content-Type: %s" % (request.client.getClientIP(), content_header))
|
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")
|
Loading…
Add table
Add a link
Reference in a new issue