mirror of
https://github.com/lgandx/Responder.git
synced 2025-07-11 15:46:14 -07:00
commit
fe58475c63
6 changed files with 26 additions and 16 deletions
|
@ -40,6 +40,7 @@ parser.add_option('-u','--upstream-proxy', action="store", help="Upstream H
|
||||||
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)
|
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)
|
||||||
|
|
||||||
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. Default: False", dest="ProxyAuth_On_Off", default=False)
|
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. Default: False", dest="ProxyAuth_On_Off", default=False)
|
||||||
|
parser.add_option('-Q','--quiet', action="store_true", help="Tell Responder to be quiet, disables a bunch of printing from the poisoners. Default: False", dest="Quiet", default=False)
|
||||||
|
|
||||||
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)
|
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)
|
||||||
parser.add_option('--disable-ess', action="store_true", help="Force ESS downgrade. Default: False", dest="NOESS_On_Off", default=False)
|
parser.add_option('--disable-ess', action="store_true", help="Force ESS downgrade. Default: False", dest="NOESS_On_Off", default=False)
|
||||||
|
@ -370,6 +371,9 @@ def main():
|
||||||
|
|
||||||
if settings.Config.AnalyzeMode:
|
if settings.Config.AnalyzeMode:
|
||||||
print(color('[+] Responder is in analyze mode. No NBT-NS, LLMNR, MDNS requests will be poisoned.', 3, 1))
|
print(color('[+] Responder is in analyze mode. No NBT-NS, LLMNR, MDNS requests will be poisoned.', 3, 1))
|
||||||
|
if settings.Config.Quiet_Mode:
|
||||||
|
print(color('[+] Responder is in quiet mode. No NBT-NS, LLMNR, MDNS messages will print to screen.', 3, 1))
|
||||||
|
|
||||||
|
|
||||||
if settings.Config.DHCP_On_Off:
|
if settings.Config.DHCP_On_Off:
|
||||||
from poisoners.DHCP import DHCP
|
from poisoners.DHCP import DHCP
|
||||||
|
|
|
@ -256,7 +256,7 @@ def ParseDHCPCode(data, ClientIP,DHCP_DNS):
|
||||||
RequestIP = data[245:249]
|
RequestIP = data[245:249]
|
||||||
|
|
||||||
if DHCPClient.count(MacAddrStr) >= 4:
|
if DHCPClient.count(MacAddrStr) >= 4:
|
||||||
return "'%s' has been poisoned more than 4 times. Ignoring..." % MacAddrStr
|
return "'%s' has been poisoned more than 4 times. Ignoring..." % MacAddrStr
|
||||||
|
|
||||||
if OpCode == b"\x02" and Respond_To_Requests: # DHCP Offer
|
if OpCode == b"\x02" and Respond_To_Requests: # DHCP Offer
|
||||||
ROUTERIP = ClientIP
|
ROUTERIP = ClientIP
|
||||||
|
@ -346,5 +346,5 @@ def DHCP(DHCP_DNS):
|
||||||
if SrcPort == 67 or DstPort == 67:
|
if SrcPort == 67 or DstPort == 67:
|
||||||
ClientIP = socket.inet_ntoa(data[0][26:30])
|
ClientIP = socket.inet_ntoa(data[0][26:30])
|
||||||
ret = ParseDHCPCode(data[0][42:], ClientIP,DHCP_DNS)
|
ret = ParseDHCPCode(data[0][42:], ClientIP,DHCP_DNS)
|
||||||
if ret:
|
if ret and not settings.Config.Quiet_Mode:
|
||||||
print(text("[*] [DHCP] %s" % ret))
|
print(text("[*] [DHCP] %s" % ret))
|
||||||
|
|
|
@ -37,7 +37,7 @@ def IsICMPRedirectPlausible(IP):
|
||||||
for line in file:
|
for line in file:
|
||||||
ip = line.split()
|
ip = line.split()
|
||||||
if len(ip) < 2:
|
if len(ip) < 2:
|
||||||
continue
|
continue
|
||||||
elif ip[0] == 'nameserver':
|
elif ip[0] == 'nameserver':
|
||||||
dnsip.extend(ip[1:])
|
dnsip.extend(ip[1:])
|
||||||
for x in dnsip:
|
for x in dnsip:
|
||||||
|
@ -76,8 +76,9 @@ class LLMNR(BaseRequestHandler): # LLMNR Server class
|
||||||
Buffer1 = LLMNR_Ans(Tid=NetworkRecvBufferPython2or3(data[0:2]), QuestionName=Name, AnswerName=Name)
|
Buffer1 = LLMNR_Ans(Tid=NetworkRecvBufferPython2or3(data[0:2]), QuestionName=Name, AnswerName=Name)
|
||||||
Buffer1.calculate()
|
Buffer1.calculate()
|
||||||
soc.sendto(NetworkSendBufferPython2or3(Buffer1), self.client_address)
|
soc.sendto(NetworkSendBufferPython2or3(Buffer1), self.client_address)
|
||||||
LineHeader = "[*] [LLMNR]"
|
if not settings.Config.Quiet_Mode:
|
||||||
print(color("%s Poisoned answer sent to %s for name %s" % (LineHeader, self.client_address[0].replace("::ffff:",""), Name), 2, 1))
|
LineHeader = "[*] [LLMNR]"
|
||||||
|
print(color("%s Poisoned answer sent to %s for name %s" % (LineHeader, self.client_address[0].replace("::ffff:",""), Name), 2, 1))
|
||||||
SavePoisonersToDb({
|
SavePoisonersToDb({
|
||||||
'Poisoner': 'LLMNR',
|
'Poisoner': 'LLMNR',
|
||||||
'SentToIp': self.client_address[0],
|
'SentToIp': self.client_address[0],
|
||||||
|
@ -89,8 +90,9 @@ class LLMNR(BaseRequestHandler): # LLMNR Server class
|
||||||
Buffer1 = LLMNR6_Ans(Tid=NetworkRecvBufferPython2or3(data[0:2]), QuestionName=Name, AnswerName=Name)
|
Buffer1 = LLMNR6_Ans(Tid=NetworkRecvBufferPython2or3(data[0:2]), QuestionName=Name, AnswerName=Name)
|
||||||
Buffer1.calculate()
|
Buffer1.calculate()
|
||||||
soc.sendto(NetworkSendBufferPython2or3(Buffer1), self.client_address)
|
soc.sendto(NetworkSendBufferPython2or3(Buffer1), self.client_address)
|
||||||
LineHeader = "[*] [LLMNR]"
|
if not settings.Config.Quiet_Mode:
|
||||||
print(color("%s Poisoned answer sent to %s for name %s" % (LineHeader, self.client_address[0].replace("::ffff:",""), Name), 2, 1))
|
LineHeader = "[*] [LLMNR]"
|
||||||
|
print(color("%s Poisoned answer sent to %s for name %s" % (LineHeader, self.client_address[0].replace("::ffff:",""), Name), 2, 1))
|
||||||
SavePoisonersToDb({
|
SavePoisonersToDb({
|
||||||
'Poisoner': 'LLMNR6',
|
'Poisoner': 'LLMNR6',
|
||||||
'SentToIp': self.client_address[0],
|
'SentToIp': self.client_address[0],
|
||||||
|
|
|
@ -73,7 +73,8 @@ class MDNS(BaseRequestHandler):
|
||||||
Buffer = MDNS_Ans(AnswerName = Poisoned_Name)
|
Buffer = MDNS_Ans(AnswerName = Poisoned_Name)
|
||||||
Buffer.calculate()
|
Buffer.calculate()
|
||||||
soc.sendto(NetworkSendBufferPython2or3(Buffer), self.client_address)
|
soc.sendto(NetworkSendBufferPython2or3(Buffer), self.client_address)
|
||||||
print(color('[*] [MDNS] Poisoned answer sent to %-15s for name %s' % (self.client_address[0].replace("::ffff:",""), Request_Name), 2, 1))
|
if not settings.Config.Quiet_Mode:
|
||||||
|
print(color('[*] [MDNS] Poisoned answer sent to %-15s for name %s' % (self.client_address[0].replace("::ffff:",""), Request_Name), 2, 1))
|
||||||
SavePoisonersToDb({
|
SavePoisonersToDb({
|
||||||
'Poisoner': 'MDNS',
|
'Poisoner': 'MDNS',
|
||||||
'SentToIp': self.client_address[0],
|
'SentToIp': self.client_address[0],
|
||||||
|
@ -86,7 +87,8 @@ class MDNS(BaseRequestHandler):
|
||||||
Buffer = MDNS6_Ans(AnswerName = Poisoned_Name)
|
Buffer = MDNS6_Ans(AnswerName = Poisoned_Name)
|
||||||
Buffer.calculate()
|
Buffer.calculate()
|
||||||
soc.sendto(NetworkSendBufferPython2or3(Buffer), self.client_address)
|
soc.sendto(NetworkSendBufferPython2or3(Buffer), self.client_address)
|
||||||
print(color('[*] [MDNS] Poisoned answer sent to %-15s for name %s' % (self.client_address[0].replace("::ffff:",""), Request_Name), 2, 1))
|
if not settings.Config.Quiet_Mode:
|
||||||
|
print(color('[*] [MDNS] Poisoned answer sent to %-15s for name %s' % (self.client_address[0].replace("::ffff:",""), Request_Name), 2, 1))
|
||||||
SavePoisonersToDb({
|
SavePoisonersToDb({
|
||||||
'Poisoner': 'MDNS6',
|
'Poisoner': 'MDNS6',
|
||||||
'SentToIp': self.client_address[0],
|
'SentToIp': self.client_address[0],
|
||||||
|
|
|
@ -47,8 +47,9 @@ class NBTNS(BaseRequestHandler):
|
||||||
Buffer1 = NBT_Ans()
|
Buffer1 = NBT_Ans()
|
||||||
Buffer1.calculate(data)
|
Buffer1.calculate(data)
|
||||||
socket.sendto(NetworkSendBufferPython2or3(Buffer1), self.client_address)
|
socket.sendto(NetworkSendBufferPython2or3(Buffer1), self.client_address)
|
||||||
LineHeader = "[*] [NBT-NS]"
|
if not settings.Config.Quiet_Mode:
|
||||||
print(color("%s Poisoned answer sent to %s for name %s (service: %s)" % (LineHeader, self.client_address[0].replace("::ffff:",""), Name, NBT_NS_Role(NetworkRecvBufferPython2or3(data[43:46]))), 2, 1))
|
LineHeader = "[*] [NBT-NS]"
|
||||||
|
print(color("%s Poisoned answer sent to %s for name %s (service: %s)" % (LineHeader, self.client_address[0].replace("::ffff:",""), Name, NBT_NS_Role(NetworkRecvBufferPython2or3(data[43:46]))), 2, 1))
|
||||||
SavePoisonersToDb({
|
SavePoisonersToDb({
|
||||||
'Poisoner': 'NBT-NS',
|
'Poisoner': 'NBT-NS',
|
||||||
'SentToIp': self.client_address[0],
|
'SentToIp': self.client_address[0],
|
||||||
|
|
|
@ -96,8 +96,8 @@ class Settings:
|
||||||
self.LDAP_On_Off = self.toBool(config.get('Responder Core', 'LDAP'))
|
self.LDAP_On_Off = self.toBool(config.get('Responder Core', 'LDAP'))
|
||||||
self.DNS_On_Off = self.toBool(config.get('Responder Core', 'DNS'))
|
self.DNS_On_Off = self.toBool(config.get('Responder Core', 'DNS'))
|
||||||
self.RDP_On_Off = self.toBool(config.get('Responder Core', 'RDP'))
|
self.RDP_On_Off = self.toBool(config.get('Responder Core', 'RDP'))
|
||||||
self.DCERPC_On_Off = self.toBool(config.get('Responder Core', 'DCERPC'))
|
self.DCERPC_On_Off = self.toBool(config.get('Responder Core', 'DCERPC'))
|
||||||
self.WinRM_On_Off = self.toBool(config.get('Responder Core', 'WINRM'))
|
self.WinRM_On_Off = self.toBool(config.get('Responder Core', 'WINRM'))
|
||||||
self.Krb_On_Off = self.toBool(config.get('Responder Core', 'Kerberos'))
|
self.Krb_On_Off = self.toBool(config.get('Responder Core', 'Kerberos'))
|
||||||
|
|
||||||
# Db File
|
# Db File
|
||||||
|
@ -133,9 +133,10 @@ class Settings:
|
||||||
self.Bind_To6 = utils.FindLocalIP6(self.Interface, self.OURIP)
|
self.Bind_To6 = utils.FindLocalIP6(self.Interface, self.OURIP)
|
||||||
self.DHCP_DNS = options.DHCP_DNS
|
self.DHCP_DNS = options.DHCP_DNS
|
||||||
self.ExternalIP6 = options.ExternalIP6
|
self.ExternalIP6 = options.ExternalIP6
|
||||||
|
self.Quiet_Mode = options.Quiet
|
||||||
|
|
||||||
if self.Interface == "ALL":
|
if self.Interface == "ALL":
|
||||||
self.Bind_To_ALL = True
|
self.Bind_To_ALL = True
|
||||||
else:
|
else:
|
||||||
self.Bind_To_ALL = False
|
self.Bind_To_ALL = False
|
||||||
#IPV4
|
#IPV4
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue