Beispiel #1
0
def main(argv):
    (logFile, logLevel, listenPort, spoofFavicon, killSessions, tamperConfigFile, injectFile) = parseOptions(argv)

    logging.basicConfig(level=logLevel, format='%(asctime)s %(message)s',
                        filename=logFile, filemode='w')

    # Verify is inject option is enabled
    if (injectFile != False):
        try:
            with open(injectFile, 'r') as f:
                HTMLInjector.getInstance().setInjectionCode(f.read())
        except IOError as e:
            logging.warning("Couldn't read " + injectFile)

    URLMonitor.getInstance().setFaviconSpoofing(spoofFavicon)
    CookieCleaner.getInstance().setEnabled(killSessions)
    ResponseTampererFactory.buildTamperer(tamperConfigFile)
    strippingFactory              = http.HTTPFactory(timeout=10)
    strippingFactory.protocol     = StrippingProxy

    reactor.listenTCP(int(listenPort), strippingFactory)
                
    print "\nsslstrip " + gVersion + " by Moxie Marlinspike running..."

    reactor.run()
Beispiel #2
0
    def _start(configs):

        logFile = configs['log_file']
        listenPort = configs['listen_port']
        spoofFavicon = configs['spoof_favicon']
        killSessions = configs['kill_sessions']
        logLevel = logging.WARNING

        logging.basicConfig(level=logLevel,
                            format='%(asctime)s %(message)s',
                            filename=logFile,
                            filemode='w')

        URLMonitor.getInstance().setFaviconSpoofing(spoofFavicon)
        CookieCleaner.getInstance().setEnabled(killSessions)

        strippingFactory = http.HTTPFactory(timeout=10)
        strippingFactory.protocol = StrippingProxy

        reactor.listenTCP(int(listenPort), strippingFactory)

        print "\nsslstrip " + gVersion + " by Moxie Marlinspike running..."
        print "+ POC by Leonardo Nve"

        reactor.run()
Beispiel #3
0
def main(argv):
    (logFile, logLevel, listenPort, spoofFavicon, killSessions, loadPlugins) = parseOptions(argv)
        
    logging.basicConfig(level=logLevel, format='%(asctime)s %(message)s',
                        filename=logFile, filemode='w')

    URLMonitor.getInstance().setFaviconSpoofing(spoofFavicon)
    CookieCleaner.getInstance().setEnabled(killSessions)

    strippingFactory              = http.HTTPFactory(timeout=10)
    strippingFactory.protocol     = StrippingProxy

    reactor.listenTCP(int(listenPort), strippingFactory)
                
    print "\nsslstrip " + gVersion + " by Moxie Marlinspike running..."

	# ------ SizeOne Mod ---------------------------------------
	# import The event manager class if detected
    if(os.path.exists("s1plugin") and loadPlugins):
        from s1plugin.S1StrippingProxy import S1StrippingProxy
        #create replace normal classes
        strippingFactory.protocol = S1StrippingProxy
    # ----------------------------------------------------------

    reactor.run()
Beispiel #4
0
def main(argv):
    (logFile, logLevel, listenPort, spoofFavicon,
     killSessions) = parseOptions(argv)

    logging.basicConfig(level=logLevel,
                        format='%(asctime)s %(message)s',
                        filename=logFile,
                        filemode='w')

    try:
        # make the file a command line option?
        with open('injection.txt', 'r') as f:
            HTMLInjector.getInstance().setInjectionCode(f.read())
    except IOError as e:
        logging.warning("Couldn't read injection.txt")

    URLMonitor.getInstance().setFaviconSpoofing(spoofFavicon)
    CookieCleaner.getInstance().setEnabled(killSessions)

    strippingFactory = http.HTTPFactory(timeout=10)
    strippingFactory.protocol = StrippingProxy

    reactor.listenTCP(int(listenPort), strippingFactory)

    print "\nsslstrip " + gVersion + " by Moxie Marlinspike running..."

    reactor.run()
Beispiel #5
0
    def start(self, logFile, logLevel, listenPort, spoofFavicon, killSessions):

        logging.basicConfig(level=logLevel,
                            format='%(asctime)s %(message)s',
                            filename=logFile,
                            filemode='w')

        URLMonitor.getInstance().setFaviconSpoofing(spoofFavicon)
        CookieCleaner.getInstance().setEnabled(killSessions)

        strippingFactory = http.HTTPFactory(timeout=10)
        strippingFactory.protocol = StrippingProxy
        reactor.listenTCP(int(listenPort), strippingFactory)
        print("\nsslstrip " + gVersion + " by Moxie Marlinspike running...")
        reactor.run()
def main(argv):
    (logFile, logLevel, listenPort, spoofFavicon, killSessions) = parseOptions(argv)
        
    logging.basicConfig(level=logLevel, format='%(asctime)s %(message)s',
                        filename=logFile, filemode='w')

    URLMonitor.getInstance().setFaviconSpoofing(spoofFavicon)
    CookieCleaner.getInstance().setEnabled(killSessions)

    strippingFactory              = http.HTTPFactory(timeout=10)
    strippingFactory.protocol     = StrippingProxy

    reactor.listenTCP(int(listenPort), strippingFactory)
                
    print "\nsslstrip " + gVersion + " by Moxie Marlinspike running..."

    reactor.run()
Beispiel #7
0
def main(argv):
    (logFile, logLevel, listenPort, spoofFavicon, killSessions) = parseOptions(argv)
        
    logging.basicConfig(level=logLevel, format='%(asctime)s %(message)s',
                        filename=logFile, filemode='w')

    URLMonitor.getInstance().setFaviconSpoofing(spoofFavicon)
    CookieCleaner.getInstance().setEnabled(killSessions)

    strippingFactory              = http.HTTPFactory(timeout=10)
    strippingFactory.protocol     = StrippingProxy

    endpoint = endpoints.TCP4ServerEndpoint(reactor, int(listenPort)).listen(strippingFactory)
    
    print("\nsslstrip " + gVersion + " by Moxie Marlinspike running...")
    print("+ POC by Leonardo Nve")
    print("+ Updated by Samega 7Cattac")

    reactor.run()
 def __init__(self, command, uri, postData, headers, client):
     self.command = command
     self.uri = uri
     self.postData = postData
     self.headers = headers
     self.client = client
     self.urlMonitor = URLMonitor.getInstance()
     self.isImageRequest = False
     self.isCompressed = False
     self.contentLength = None
     self.shutdownComplete = False
Beispiel #9
0
def main(argv):
    (logFile, logLevel, listenPort, spoofFavicon, killSessions,
     tamperConfigFile) = parseOptions(argv)

    logging.basicConfig(level=logLevel,
                        format='%(asctime)s %(message)s',
                        filename=logFile,
                        filemode='w')

    URLMonitor.getInstance().setFaviconSpoofing(spoofFavicon)
    CookieCleaner.getInstance().setEnabled(killSessions)
    ResponseTampererFactory.buildTamperer(tamperConfigFile)
    strippingFactory = http.HTTPFactory(timeout=10)
    strippingFactory.protocol = StrippingProxy

    reactor.listenTCP(int(listenPort), strippingFactory)

    print "\nsslstrip " + gVersion + " by Moxie Marlinspike running..."

    reactor.run()
Beispiel #10
0
    def _start(configs):

        logFile = configs['log_file']
        listenPort = configs['listen_port']
        spoofFavicon = configs['spoof_favicon']
        killSessions = configs['kill_sessions']
        logLevel = logging.WARNING
    
        logging.basicConfig(level=logLevel, format='%(asctime)s %(message)s',
                            filename=logFile, filemode='w')
    
        URLMonitor.getInstance().setFaviconSpoofing(spoofFavicon)
        CookieCleaner.getInstance().setEnabled(killSessions)
    
        strippingFactory              = http.HTTPFactory(timeout=10)
        strippingFactory.protocol     = StrippingProxy
    
        reactor.listenTCP(int(listenPort), strippingFactory)
                    
        print "\nsslstrip " + gVersion + " by Moxie Marlinspike running..."
        print "+ POC by Leonardo Nve"
    
        reactor.run()
Beispiel #11
0
 def __init__(self, command, uri, postData, headers, client):
     self.command = command
     self.uri = uri
     self.postData = postData
     self.headers = headers
     self.client = client
     self.urlMonitor = URLMonitor.getInstance()
     self.responseTamperer = ResponseTampererFactory.getTampererInstance()
     self.HTMLInjector = HTMLInjector.getInstance()
     self.plugins_manager = ProxyPluginsManager.getInstance()
     self.isImageRequest = False
     self.isCompressed = False
     self.contentLength = None
     self.shutdownComplete = False
     self.plugins = self.plugins_manager.plugins
Beispiel #12
0
        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 = []
    try:
        for p in plugins:
            if getattr(args, p.optname):
                p.initialize(args)
                load.append(p)
    except NotImplementedError:
        print "Plugin %s lacked initialize function." % p.name

    # Plugins are ready to go, start MITM
    URLMonitor.getInstance().setFaviconSpoofing(args.favicon)
    CookieCleaner.getInstance().setEnabled(args.killsessions)
    ResponseTampererFactory.buildTamperer(args.tamper)
    ProxyPlugins.getInstance().setPlugins(load)

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

    # cleanup on exit
Beispiel #13
0
    load = []
    try:
        for p in plugins:
            if getattr(args, p.optname):
                p.initialize(args)
                load.append(p)
    except NotImplementedError:
        print "Plugin %s lacked initialize function." % p.name

    #this whole msf loading process sucks. need to improve
    if args.msf_rc != "/tmp/tmp.rc" or os.stat("/tmp/tmp.rc").st_size != 0:
        from plugins.StartMSF import launch_msf
        launch_msf(args.msf_path, args.msf_rc, args.msf_user)

    #plugins are ready to go, start MITM
    URLMonitor.getInstance().setFaviconSpoofing(args.favicon)
    CookieCleaner.getInstance().setEnabled(args.killsessions)
    ProxyPlugins.getInstance().setPlugins(load)

    strippingFactory = http.HTTPFactory(timeout=10)
    strippingFactory.protocol = StrippingProxy

    reactor.listenTCP(args.listen, strippingFactory)

    print "\nsslstrip " + sslstrip_version + " by Moxie Marlinspike running..."
    print "sergio-proxy v%s online" % sergio_version

    reactor.run()

    #cleanup on exit
    for p in load:
 def __init__(self, config):
     self.config = config
     self.urlMonitor = URLMonitor.getInstance()
     logging.log(logging.DEBUG, "Tampering enabled.")
Beispiel #15
0
 def __init__(self, channel, queued, reactor=reactor):
     Request.__init__(self, channel, queued)
     self.reactor = reactor
     self.urlMonitor = URLMonitor.getInstance()
     self.cookieCleaner = CookieCleaner.getInstance()
     self.dnsCache = DnsCache.getInstance()
 def __init__(self, config):
     self.config = config
     self.urlMonitor = URLMonitor.getInstance()
     logging.log(logging.DEBUG, "Tampering enabled.")