mirror of
https://github.com/byt3bl33d3r/MITMf.git
synced 2025-07-11 15:47:10 -07:00
changed tree output loading method
This commit is contained in:
parent
d4c6b7d5b6
commit
c8732d60eb
12 changed files with 67 additions and 68 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit 88a9c08a9be5ee921d3d8eeeb16d421c9b5df0af
|
Subproject commit fbc5ec324b6045db2f6cc62662ab51d3ff979ec8
|
14
mitmf.py
14
mitmf.py
|
@ -163,17 +163,21 @@ load = []
|
||||||
for p in plugins:
|
for p in plugins:
|
||||||
try:
|
try:
|
||||||
|
|
||||||
|
if vars(args)[p.optname] is True:
|
||||||
|
print "|_ %s v%s" % (p.name, p.version)
|
||||||
|
if hasattr(p, 'tree_output') and p.tree_output:
|
||||||
|
for line in p.tree_output:
|
||||||
|
print "| |_ %s" % line
|
||||||
|
p.tree_output.remove(line)
|
||||||
|
|
||||||
if getattr(args, p.optname):
|
if getattr(args, p.optname):
|
||||||
p.initialize(args)
|
p.initialize(args)
|
||||||
load.append(p)
|
load.append(p)
|
||||||
|
|
||||||
if vars(args)[p.optname] is True:
|
if vars(args)[p.optname] is True:
|
||||||
print "|_ %s v%s" % (p.name, p.version)
|
if hasattr(p, 'tree_output') and p.tree_output:
|
||||||
|
for line in p.tree_output:
|
||||||
if p.output:
|
|
||||||
for line in p.output:
|
|
||||||
print "| |_ %s" % line
|
print "| |_ %s" % line
|
||||||
p.output.remove(line)
|
|
||||||
|
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
print "[-] Error loading plugin %s: %s" % (p.name, str(e))
|
print "[-] Error loading plugin %s: %s" % (p.name, str(e))
|
||||||
|
|
|
@ -37,6 +37,7 @@ class BeefAutorun(Inject, Plugin):
|
||||||
name = "BeEFAutorun"
|
name = "BeEFAutorun"
|
||||||
optname = "beefauto"
|
optname = "beefauto"
|
||||||
desc = "Injects BeEF hooks & autoruns modules based on Browser and/or OS type"
|
desc = "Injects BeEF hooks & autoruns modules based on Browser and/or OS type"
|
||||||
|
tree_output = []
|
||||||
depends = ["Inject"]
|
depends = ["Inject"]
|
||||||
version = "0.3"
|
version = "0.3"
|
||||||
req_root = False
|
req_root = False
|
||||||
|
@ -68,7 +69,7 @@ class BeefAutorun(Inject, Plugin):
|
||||||
if not beef.login(beefconfig['user'], beefconfig['pass']):
|
if not beef.login(beefconfig['user'], beefconfig['pass']):
|
||||||
sys.exit("[-] Error logging in to BeEF!")
|
sys.exit("[-] Error logging in to BeEF!")
|
||||||
|
|
||||||
self.output.append("Mode: %s" % self.Mode)
|
self.tree_output.append("Mode: %s" % self.Mode)
|
||||||
|
|
||||||
t = threading.Thread(name="autorun", target=self.autorun, args=(beef,))
|
t = threading.Thread(name="autorun", target=self.autorun, args=(beef,))
|
||||||
t.setDaemon(True)
|
t.setDaemon(True)
|
||||||
|
|
|
@ -78,6 +78,7 @@ class FilePwn(Plugin):
|
||||||
optname = "filepwn"
|
optname = "filepwn"
|
||||||
desc = "Backdoor executables being sent over http using bdfactory"
|
desc = "Backdoor executables being sent over http using bdfactory"
|
||||||
implements = ["handleResponse"]
|
implements = ["handleResponse"]
|
||||||
|
tree_output = ["BDFProxy v0.2 online"]
|
||||||
version = "0.2"
|
version = "0.2"
|
||||||
has_opts = False
|
has_opts = False
|
||||||
req_root = False
|
req_root = False
|
||||||
|
|
|
@ -41,6 +41,7 @@ class JavaPwn(BrowserProfiler, Plugin):
|
||||||
name = "JavaPwn"
|
name = "JavaPwn"
|
||||||
optname = "javapwn"
|
optname = "javapwn"
|
||||||
desc = "Performs drive-by attacks on clients with out-of-date java browser plugins"
|
desc = "Performs drive-by attacks on clients with out-of-date java browser plugins"
|
||||||
|
tree_output = []
|
||||||
depends = ["Browserprofiler"]
|
depends = ["Browserprofiler"]
|
||||||
version = "0.3"
|
version = "0.3"
|
||||||
has_opts = False
|
has_opts = False
|
||||||
|
@ -73,7 +74,7 @@ class JavaPwn(BrowserProfiler, Plugin):
|
||||||
msf = msfrpc.Msfrpc({"host": self.rpcip}) #create an instance of msfrpc libarary
|
msf = msfrpc.Msfrpc({"host": self.rpcip}) #create an instance of msfrpc libarary
|
||||||
msf.login('msf', self.rpcpass)
|
msf.login('msf', self.rpcpass)
|
||||||
version = msf.call('core.version')['version']
|
version = msf.call('core.version')['version']
|
||||||
self.output.append("Connected to Metasploit v%s" % version)
|
self.tree_output.append("Connected to Metasploit v%s" % version)
|
||||||
except Exception:
|
except Exception:
|
||||||
sys.exit("[-] Error connecting to MSF! Make sure you started Metasploit and its MSGRPC server")
|
sys.exit("[-] Error connecting to MSF! Make sure you started Metasploit and its MSGRPC server")
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@ class Responder(Plugin):
|
||||||
name = "Responder"
|
name = "Responder"
|
||||||
optname = "responder"
|
optname = "responder"
|
||||||
desc = "Poison LLMNR, NBT-NS and MDNS requests"
|
desc = "Poison LLMNR, NBT-NS and MDNS requests"
|
||||||
|
tree_output = ["NBT-NS, LLMNR & MDNS Responder v2.1.2 by Laurent Gaffie online"]
|
||||||
version = "0.2"
|
version = "0.2"
|
||||||
has_opts = True
|
has_opts = True
|
||||||
req_root = True
|
req_root = True
|
||||||
|
@ -40,17 +41,13 @@ class Responder(Plugin):
|
||||||
self.options = options
|
self.options = options
|
||||||
self.interface = options.interface
|
self.interface = options.interface
|
||||||
|
|
||||||
RESP_VERSION = "2.1.2"
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
config = options.configfile['Responder']
|
config = options.configfile['Responder']
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
sys.exit('[-] Error parsing config for Responder: ' + str(e))
|
sys.exit('[-] Error parsing config for Responder: ' + str(e))
|
||||||
|
|
||||||
self.output.append("NBT-NS, LLMNR & MDNS Responder v%s by Laurent Gaffie online" % RESP_VERSION)
|
|
||||||
|
|
||||||
if options.Analyse:
|
if options.Analyse:
|
||||||
self.output.append("Responder is in analyze mode. No NBT-NS, LLMNR, MDNS requests will be poisoned")
|
self.tree_output.append("Responder is in analyze mode. No NBT-NS, LLMNR, MDNS requests will be poisoned")
|
||||||
|
|
||||||
start_responder(options, config)
|
start_responder(options, config)
|
||||||
|
|
||||||
|
|
|
@ -25,12 +25,14 @@ import logging
|
||||||
from plugins.plugin import Plugin
|
from plugins.plugin import Plugin
|
||||||
from core.utils import SystemConfig
|
from core.utils import SystemConfig
|
||||||
from core.sslstrip.URLMonitor import URLMonitor
|
from core.sslstrip.URLMonitor import URLMonitor
|
||||||
|
from libs.dnschef.dnschef import start_dnschef
|
||||||
|
|
||||||
class HSTSbypass(Plugin):
|
class HSTSbypass(Plugin):
|
||||||
name = 'SSLstrip+'
|
name = 'SSLstrip+'
|
||||||
optname = 'hsts'
|
optname = 'hsts'
|
||||||
desc = 'Enables SSLstrip+ for partial HSTS bypass'
|
desc = 'Enables SSLstrip+ for partial HSTS bypass'
|
||||||
version = "0.4"
|
version = "0.4"
|
||||||
|
tree_output = ["SSLstrip+ by Leonardo Nve running", "DNSChef v0.3 online"]
|
||||||
has_opts = False
|
has_opts = False
|
||||||
req_root = True
|
req_root = True
|
||||||
|
|
||||||
|
@ -39,17 +41,11 @@ class HSTSbypass(Plugin):
|
||||||
self.manualiptables = options.manualiptables
|
self.manualiptables = options.manualiptables
|
||||||
|
|
||||||
try:
|
try:
|
||||||
config = options.configfile['SSLstrip+']
|
hstsconfig = options.configfile['SSLstrip+']
|
||||||
|
dnsconfig = options.configfile['Spoof']['DNS']
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
sys.exit("[-] Error parsing config for SSLstrip+: " + str(e))
|
sys.exit("[-] Error parsing config for SSLstrip+: " + str(e))
|
||||||
|
|
||||||
self.output.append("SSLstrip+ by Leonardo Nve running")
|
URLMonitor.getInstance().setHstsBypass(hstsconfig)
|
||||||
|
|
||||||
URLMonitor.getInstance().setHstsBypass(config)
|
start_dnschef(options, dnsconfig, hstsconfig)
|
||||||
|
|
||||||
#def finish(self):
|
|
||||||
# if _DNS.checkInstance() is True:
|
|
||||||
# _DNS.getInstance().stop()
|
|
||||||
|
|
||||||
# if not self.manualiptables:
|
|
||||||
# SystemConfig.iptables.Flush()
|
|
||||||
|
|
|
@ -41,6 +41,7 @@ class Sniffer(Plugin):
|
||||||
name = "Sniffer"
|
name = "Sniffer"
|
||||||
optname = "sniffer"
|
optname = "sniffer"
|
||||||
desc = "Sniffs for various protocol login and auth attempts"
|
desc = "Sniffs for various protocol login and auth attempts"
|
||||||
|
tree_output = ["Net-Creds online"]
|
||||||
implements = ["sendRequest"]
|
implements = ["sendRequest"]
|
||||||
version = "0.1"
|
version = "0.1"
|
||||||
has_opts = False
|
has_opts = False
|
||||||
|
@ -66,9 +67,7 @@ class Sniffer(Plugin):
|
||||||
sys.exit("[-] Sniffer plugin requires root privileges")
|
sys.exit("[-] Sniffer plugin requires root privileges")
|
||||||
|
|
||||||
n = NetCreds()
|
n = NetCreds()
|
||||||
|
|
||||||
#if not self.parse:
|
#if not self.parse:
|
||||||
self.output.append("Net-Creds online")
|
|
||||||
t = threading.Thread(name="sniffer", target=n.start, args=(self.interface,))
|
t = threading.Thread(name="sniffer", target=n.start, args=(self.interface,))
|
||||||
t.setDaemon(True)
|
t.setDaemon(True)
|
||||||
t.start()
|
t.start()
|
||||||
|
|
|
@ -35,6 +35,7 @@ class Spoof(Plugin):
|
||||||
optname = "spoof"
|
optname = "spoof"
|
||||||
desc = "Redirect/Modify traffic using ICMP, ARP, DHCP or DNS"
|
desc = "Redirect/Modify traffic using ICMP, ARP, DHCP or DNS"
|
||||||
version = "0.6"
|
version = "0.6"
|
||||||
|
tree_output = []
|
||||||
has_opts = True
|
has_opts = True
|
||||||
req_root = True
|
req_root = True
|
||||||
|
|
||||||
|
@ -92,8 +93,8 @@ class Spoof(Plugin):
|
||||||
if not options.manualiptables:
|
if not options.manualiptables:
|
||||||
SystemConfig.iptables.DNS(options.ip_address, self.dnscfg['port'])
|
SystemConfig.iptables.DNS(options.ip_address, self.dnscfg['port'])
|
||||||
|
|
||||||
|
self.tree_output.append("DNSChef v0.3 online")
|
||||||
start_dnschef(options, self.dnscfg)
|
start_dnschef(options, self.dnscfg)
|
||||||
self.output.append("DNSChef v0.3 online")
|
|
||||||
|
|
||||||
if not options.arp and not options.icmp and not options.dhcp and not options.dns:
|
if not options.arp and not options.icmp and not options.dhcp and not options.dns:
|
||||||
sys.exit("[-] Spoof plugin requires --arp, --icmp, --dhcp or --dns")
|
sys.exit("[-] Spoof plugin requires --arp, --icmp, --dhcp or --dns")
|
||||||
|
|
|
@ -9,7 +9,6 @@ class Plugin(object):
|
||||||
optname = "generic"
|
optname = "generic"
|
||||||
desc = ""
|
desc = ""
|
||||||
implements = []
|
implements = []
|
||||||
output = []
|
|
||||||
has_opts = False
|
has_opts = False
|
||||||
req_root = False
|
req_root = False
|
||||||
|
|
||||||
|
|
|
@ -9,4 +9,4 @@ pyyaml
|
||||||
ua-parser
|
ua-parser
|
||||||
Pillow
|
Pillow
|
||||||
pefile
|
pefile
|
||||||
capstone
|
dnslib
|
Loading…
Add table
Add a link
Reference in a new issue