mirror of
https://github.com/byt3bl33d3r/MITMf.git
synced 2025-07-16 10:03:52 -07:00
added DHCP spoofing with shellshock options
This commit is contained in:
parent
ff235e3e90
commit
43c7974d4c
7 changed files with 155 additions and 69 deletions
43
mitmf.py
43
mitmf.py
|
@ -21,18 +21,19 @@ sergio_version = "0.2.1"
|
|||
|
||||
if __name__ == "__main__":
|
||||
|
||||
parser = argparse.ArgumentParser(description="MITMf v%s - Framework for MITM attacks" % mitmf_version,epilog="Use wisely, young Padawan.",fromfile_prefix_chars='@')
|
||||
parser = argparse.ArgumentParser(description="MITMf v%s - Framework for MITM attacks" % mitmf_version, epilog="Use wisely, young Padawan.",fromfile_prefix_chars='@')
|
||||
#add sslstrip options
|
||||
sgroup = parser.add_argument_group("sslstrip","Options for sslstrip library")
|
||||
sgroup = parser.add_argument_group("sslstrip", "Options for sslstrip library")
|
||||
sgroup.add_argument("-w", "--write", type=argparse.FileType('w'), metavar="filename", default=sys.stdout, help="Specify file to log to (stdout by default).")
|
||||
sgroup.add_argument("--log-level", type=str,choices=['debug','info'], default="info", help="Specify a log level [default: info]")
|
||||
slogopts = sgroup.add_mutually_exclusive_group()
|
||||
sgroup.add_argument("--log-level", type=str,choices=['debug', 'info'], default="info", help="Specify a log level [default: info]")
|
||||
slogopts = sgroup.add_mutually_exclusive_group()
|
||||
slogopts.add_argument("-p", "--post", action="store_true",help="Log only SSL POSTs. (default)")
|
||||
slogopts.add_argument("-s", "--ssl", action="store_true", help="Log all SSL traffic to and from server.")
|
||||
slogopts.add_argument("-a", "--all", action="store_true", help="Log all SSL and HTTP traffic to and from server.")
|
||||
sgroup.add_argument("-l", "--listen", type=int, metavar="port", default=10000, help="Port to listen on (default 10000)")
|
||||
sgroup.add_argument("-f", "--favicon", action="store_true", help="Substitute a lock favicon on secure requests.")
|
||||
sgroup.add_argument("-k", "--killsessions", action="store_true", help="Kill sessions in progress.")
|
||||
sgroup.add_argument('-d', '--disable-proxy', dest='disproxy', action='store_true', default=False, help='Disable the SSLstrip Proxy')
|
||||
|
||||
#Initialize plugins
|
||||
plugins = []
|
||||
|
@ -49,7 +50,7 @@ if __name__ == "__main__":
|
|||
sgroup = parser.add_argument_group("%s" % p.name,"Options for %s." % p.name)
|
||||
else:
|
||||
sgroup = parser.add_argument_group("%s" % p.name,p.desc)
|
||||
|
||||
|
||||
sgroup.add_argument("--%s" % p.optname, action="store_true",help="Load plugin %s" % p.name)
|
||||
if p.has_opts:
|
||||
p.add_options(sgroup)
|
||||
|
@ -59,10 +60,10 @@ if __name__ == "__main__":
|
|||
args = parser.parse_args()
|
||||
|
||||
log_level = logging.__dict__[args.log_level.upper()]
|
||||
|
||||
|
||||
#Start logging
|
||||
logging.basicConfig(level=log_level, format="%(asctime)s %(message)s", datefmt="%Y-%m-%d %H:%M:%S", stream=args.write)
|
||||
|
||||
|
||||
#All our options should be loaded now, pass them onto plugins
|
||||
print "[*] MITMf v%s started... initializing plugins and modules" % mitmf_version
|
||||
load = []
|
||||
|
@ -75,20 +76,24 @@ if __name__ == "__main__":
|
|||
print "Plugin %s lacked initialize function." % p.name
|
||||
|
||||
#Plugins are ready to go, start MITMf
|
||||
URLMonitor.getInstance().setFaviconSpoofing(args.favicon)
|
||||
CookieCleaner.getInstance().setEnabled(args.killsessions)
|
||||
ProxyPlugins.getInstance().setPlugins(load)
|
||||
if args.disproxy:
|
||||
ProxyPlugins.getInstance().setPlugins(load)
|
||||
reactor.run()
|
||||
else:
|
||||
URLMonitor.getInstance().setFaviconSpoofing(args.favicon)
|
||||
CookieCleaner.getInstance().setEnabled(args.killsessions)
|
||||
ProxyPlugins.getInstance().setPlugins(load)
|
||||
|
||||
strippingFactory = http.HTTPFactory(timeout=10)
|
||||
strippingFactory.protocol = StrippingProxy
|
||||
strippingFactory = http.HTTPFactory(timeout=10)
|
||||
strippingFactory.protocol = StrippingProxy
|
||||
|
||||
reactor.listenTCP(args.listen, strippingFactory)
|
||||
|
||||
print "\n[*] sslstrip v%s by Moxie Marlinspike running..." % sslstrip_version
|
||||
print "[*] sergio-proxy v%s online" % sergio_version
|
||||
|
||||
reactor.run()
|
||||
|
||||
reactor.listenTCP(args.listen, strippingFactory)
|
||||
|
||||
print "\n[*] sslstrip v%s by Moxie Marlinspike running..." % sslstrip_version
|
||||
print "[*] sergio-proxy v%s online" % sergio_version
|
||||
|
||||
reactor.run()
|
||||
|
||||
#cleanup on exit
|
||||
for p in load:
|
||||
p.finish()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue