mirror of
https://github.com/byt3bl33d3r/MITMf.git
synced 2025-07-11 15:47:10 -07:00
added banners and tree visual of loaded plugins
This commit is contained in:
parent
ad6c3d8ed3
commit
fcdbe49df9
7 changed files with 107 additions and 5 deletions
79
libs/banners.py
Normal file
79
libs/banners.py
Normal file
|
@ -0,0 +1,79 @@
|
||||||
|
#! /usr/bin/env python2.7
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import random
|
||||||
|
|
||||||
|
banner1 = """
|
||||||
|
__ __ ___ .--. __ __ ___
|
||||||
|
| |/ `.' `. |__| | |/ `.' `. _.._
|
||||||
|
| .-. .-. '.--. .| | .-. .-. ' .' .._|
|
||||||
|
| | | | | || | .' |_ | | | | | | | '
|
||||||
|
| | | | | || | .' || | | | | | __| |__
|
||||||
|
| | | | | || |'--. .-'| | | | | ||__ __|
|
||||||
|
| | | | | || | | | | | | | | | | |
|
||||||
|
|__| |__| |__||__| | | |__| |__| |__| | |
|
||||||
|
| '.' | |
|
||||||
|
| / | |
|
||||||
|
`'-' |_|
|
||||||
|
"""
|
||||||
|
|
||||||
|
banner2= """
|
||||||
|
███▄ ▄███▓ ██▓▄▄▄█████▓ ███▄ ▄███▓ █████▒
|
||||||
|
▓██▒▀█▀ ██▒▓██▒▓ ██▒ ▓▒▓██▒▀█▀ ██▒▓██ ▒
|
||||||
|
▓██ ▓██░▒██▒▒ ▓██░ ▒░▓██ ▓██░▒████ ░
|
||||||
|
▒██ ▒██ ░██░░ ▓██▓ ░ ▒██ ▒██ ░▓█▒ ░
|
||||||
|
▒██▒ ░██▒░██░ ▒██▒ ░ ▒██▒ ░██▒░▒█░
|
||||||
|
░ ▒░ ░ ░░▓ ▒ ░░ ░ ▒░ ░ ░ ▒ ░
|
||||||
|
░ ░ ░ ▒ ░ ░ ░ ░ ░ ░
|
||||||
|
░ ░ ▒ ░ ░ ░ ░ ░ ░
|
||||||
|
░ ░ ░
|
||||||
|
"""
|
||||||
|
|
||||||
|
banner3 = """
|
||||||
|
▄▄▄▄███▄▄▄▄ ▄█ ███ ▄▄▄▄███▄▄▄▄ ▄████████
|
||||||
|
▄██▀▀▀███▀▀▀██▄ ███ ▀█████████▄ ▄██▀▀▀███▀▀▀██▄ ███ ███
|
||||||
|
███ ███ ███ ███▌ ▀███▀▀██ ███ ███ ███ ███ █▀
|
||||||
|
███ ███ ███ ███▌ ███ ▀ ███ ███ ███ ▄███▄▄▄
|
||||||
|
███ ███ ███ ███▌ ███ ███ ███ ███ ▀▀███▀▀▀
|
||||||
|
███ ███ ███ ███ ███ ███ ███ ███ ███
|
||||||
|
███ ███ ███ ███ ███ ███ ███ ███ ███
|
||||||
|
▀█ ███ █▀ █▀ ▄████▀ ▀█ ███ █▀ ███
|
||||||
|
"""
|
||||||
|
|
||||||
|
banner4 = """
|
||||||
|
MMMMMMMM MMMMMMMMIIIIIIIIIITTTTTTTTTTTTTTTTTTTTTTTMMMMMMMM MMMMMMMM ffffffffffffffff
|
||||||
|
M:::::::M M:::::::MI::::::::IT:::::::::::::::::::::TM:::::::M M:::::::M f::::::::::::::::f
|
||||||
|
M::::::::M M::::::::MI::::::::IT:::::::::::::::::::::TM::::::::M M::::::::M f::::::::::::::::::f
|
||||||
|
M:::::::::M M:::::::::MII::::::IIT:::::TT:::::::TT:::::TM:::::::::M M:::::::::M f::::::fffffff:::::f
|
||||||
|
M::::::::::M M::::::::::M I::::I TTTTTT T:::::T TTTTTTM::::::::::M M::::::::::M f:::::f ffffff
|
||||||
|
M:::::::::::M M:::::::::::M I::::I T:::::T M:::::::::::M M:::::::::::M f:::::f
|
||||||
|
M:::::::M::::M M::::M:::::::M I::::I T:::::T M:::::::M::::M M::::M:::::::Mf:::::::ffffff
|
||||||
|
M::::::M M::::M M::::M M::::::M I::::I T:::::T M::::::M M::::M M::::M M::::::Mf::::::::::::f
|
||||||
|
M::::::M M::::M::::M M::::::M I::::I T:::::T M::::::M M::::M::::M M::::::Mf::::::::::::f
|
||||||
|
M::::::M M:::::::M M::::::M I::::I T:::::T M::::::M M:::::::M M::::::Mf:::::::ffffff
|
||||||
|
M::::::M M:::::M M::::::M I::::I T:::::T M::::::M M:::::M M::::::M f:::::f
|
||||||
|
M::::::M MMMMM M::::::M I::::I T:::::T M::::::M MMMMM M::::::M f:::::f
|
||||||
|
M::::::M M::::::MII::::::II TT:::::::TT M::::::M M::::::Mf:::::::f
|
||||||
|
M::::::M M::::::MI::::::::I T:::::::::T M::::::M M::::::Mf:::::::f
|
||||||
|
M::::::M M::::::MI::::::::I T:::::::::T M::::::M M::::::Mf:::::::f
|
||||||
|
MMMMMMMM MMMMMMMMIIIIIIIIII TTTTTTTTTTT MMMMMMMM MMMMMMMMfffffffff
|
||||||
|
"""
|
||||||
|
|
||||||
|
banner5 = """
|
||||||
|
___ ___ ___
|
||||||
|
/\ \ /\ \ /\__\
|
||||||
|
|::\ \ ___ ___ |::\ \ /:/ _/_
|
||||||
|
|:|:\ \ /\__\ /\__\ |:|:\ \ /:/ /\__\
|
||||||
|
__|:|\:\ \ /:/__/ /:/ / __|:|\:\ \ /:/ /:/ /
|
||||||
|
/::::|_\:\__\ /::\ \ /:/__/ /::::|_\:\__\ /:/_/:/ /
|
||||||
|
\:\~~\ \/__/ \/\:\ \__ /::\ \ \:\~~\ \/__/ \:\/:/ /
|
||||||
|
\:\ \ ~~\:\/\__\ /:/\:\ \ \:\ \ \::/__/
|
||||||
|
\:\ \ \::/ / \/__\:\ \ \:\ \ \:\ \
|
||||||
|
\:\__\ /:/ / \:\__\ \:\__\ \:\__\
|
||||||
|
\/__/ \/__/ \/__/ \/__/ \/__/
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
def get():
|
||||||
|
banners = [banner1, banner2, banner3, banner4, banner5]
|
||||||
|
return random.choice(banners)
|
|
@ -125,6 +125,10 @@ class ClientRequest(Request):
|
||||||
|
|
||||||
if self.hsts:
|
if self.hsts:
|
||||||
|
|
||||||
|
#Original code from SSLstrip+
|
||||||
|
#Saying that this is unreadible is an understatement
|
||||||
|
#KILL IT WITH FIRE!!
|
||||||
|
|
||||||
real = self.urlMonitor.real
|
real = self.urlMonitor.real
|
||||||
patchDict = self.urlMonitor.patchDict
|
patchDict = self.urlMonitor.patchDict
|
||||||
|
|
||||||
|
|
|
@ -185,6 +185,10 @@ class ServerConnection(HTTPClient):
|
||||||
def replaceSecureLinks(self, data):
|
def replaceSecureLinks(self, data):
|
||||||
if self.hsts:
|
if self.hsts:
|
||||||
|
|
||||||
|
#Original code from SSLstrip+
|
||||||
|
#Saying that this is unreadible is an understatement
|
||||||
|
#KILL IT WITH FIRE!!
|
||||||
|
|
||||||
sustitucion = {}
|
sustitucion = {}
|
||||||
patchDict = self.urlMonitor.patchDict
|
patchDict = self.urlMonitor.patchDict
|
||||||
if len(patchDict)>0:
|
if len(patchDict)>0:
|
||||||
|
|
|
@ -53,6 +53,13 @@ class URLMonitor:
|
||||||
return (client,url) in self.strippedURLs
|
return (client,url) in self.strippedURLs
|
||||||
|
|
||||||
def writeClientLog(self, client, headers, message):
|
def writeClientLog(self, client, headers, message):
|
||||||
|
'''
|
||||||
|
This isn't used for now.. the point was to log every clients
|
||||||
|
data to a seperate file
|
||||||
|
|
||||||
|
Don't see how useful it could be though
|
||||||
|
'''
|
||||||
|
|
||||||
if not os.path.exists("./logs"):
|
if not os.path.exists("./logs"):
|
||||||
os.makedirs("./logs")
|
os.makedirs("./logs")
|
||||||
|
|
||||||
|
|
15
mitmf.py
15
mitmf.py
|
@ -5,6 +5,7 @@ from twisted.internet import reactor
|
||||||
|
|
||||||
from libs.sslstrip.CookieCleaner import CookieCleaner
|
from libs.sslstrip.CookieCleaner import CookieCleaner
|
||||||
from libs.sergioproxy.ProxyPlugins import ProxyPlugins
|
from libs.sergioproxy.ProxyPlugins import ProxyPlugins
|
||||||
|
from libs.banners import get
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
@ -25,11 +26,14 @@ try:
|
||||||
except:
|
except:
|
||||||
print "[-] user_agents library missing! User-Agent parsing will be disabled!"
|
print "[-] user_agents library missing! User-Agent parsing will be disabled!"
|
||||||
|
|
||||||
mitmf_version = "0.9"
|
mitmf_version = "0.9.5"
|
||||||
sslstrip_version = "0.9"
|
sslstrip_version = "0.9"
|
||||||
sergio_version = "0.2.1"
|
sergio_version = "0.2.1"
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description="MITMf v%s - Framework for MITM attacks" % mitmf_version, epilog="Use wisely, young Padawan.",fromfile_prefix_chars='@')
|
banner = get()
|
||||||
|
print banner
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser(description="MITMf v%s - Framework for MITM attacks" % mitmf_version, version=mitmf_version, usage='', epilog="Use wisely, young Padawan.",fromfile_prefix_chars='@')
|
||||||
#add MITMf options
|
#add MITMf options
|
||||||
mgroup = parser.add_argument_group("MITMf", "Options for MITMf")
|
mgroup = parser.add_argument_group("MITMf", "Options for MITMf")
|
||||||
mgroup.add_argument("--log-level", type=str,choices=['debug', 'info'], default="info", help="Specify a log level [default: info]")
|
mgroup.add_argument("--log-level", type=str,choices=['debug', 'info'], default="info", help="Specify a log level [default: info]")
|
||||||
|
@ -137,8 +141,11 @@ for p in plugins:
|
||||||
if getattr(args, p.optname):
|
if getattr(args, p.optname):
|
||||||
p.initialize(args)
|
p.initialize(args)
|
||||||
load.append(p)
|
load.append(p)
|
||||||
except NotImplementedError:
|
|
||||||
print "Plugin %s lacked initialize function." % p.name
|
if vars(args)[p.optname] is True:
|
||||||
|
print "|_ %s v%s" % (p.name, p.version)
|
||||||
|
except Exception, e:
|
||||||
|
print "[-] Error loading plugin: " + str(e)
|
||||||
|
|
||||||
#Plugins are ready to go, start MITMf
|
#Plugins are ready to go, start MITMf
|
||||||
if args.disproxy:
|
if args.disproxy:
|
||||||
|
|
|
@ -20,7 +20,7 @@ import random
|
||||||
class Spoof(Plugin):
|
class Spoof(Plugin):
|
||||||
name = "Spoof"
|
name = "Spoof"
|
||||||
optname = "spoof"
|
optname = "spoof"
|
||||||
desc = 'Redirect/Modify traffic using ICMP, ARP or DHCP'
|
desc = "Redirect/Modify traffic using ICMP, ARP or DHCP"
|
||||||
version = "0.4"
|
version = "0.4"
|
||||||
has_opts = True
|
has_opts = True
|
||||||
req_root = True
|
req_root = True
|
||||||
|
|
|
@ -6,6 +6,7 @@ dnspython
|
||||||
user-agents
|
user-agents
|
||||||
configobj
|
configobj
|
||||||
pyyaml
|
pyyaml
|
||||||
|
NetfilterQueue >= 0.6
|
||||||
ua-parser
|
ua-parser
|
||||||
Pillow
|
Pillow
|
||||||
pefile
|
pefile
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue