mirror of
https://github.com/lgandx/Responder.git
synced 2025-08-19 21:03:33 -07:00
Merge branch 'master' of https://github.com/lgandx/Responder
This commit is contained in:
commit
fc4ac599d3
4 changed files with 14 additions and 10 deletions
|
@ -8,7 +8,7 @@ Author: Laurent Gaffie <laurent.gaffie@gmail.com > https://g-laurent.blogspot.c
|
||||||
|
|
||||||
## Intro ##
|
## Intro ##
|
||||||
|
|
||||||
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.
|
Responder is 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.
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ This module allows you to see NBT-NS, BROWSER, LLMNR, DNS requests on the networ
|
||||||
|
|
||||||
## Hashes ##
|
## Hashes ##
|
||||||
|
|
||||||
All hashes are printed to stdout and dumped in an unique file John Jumbo compliant, using this format:
|
All hashes are printed to stdout and dumped in a unique John Jumbo compliant file, using this format:
|
||||||
|
|
||||||
(MODULE_NAME)-(HASH_TYPE)-(CLIENT_IP).txt
|
(MODULE_NAME)-(HASH_TYPE)-(CLIENT_IP).txt
|
||||||
|
|
||||||
|
|
14
settings.py
14
settings.py
|
@ -206,16 +206,20 @@ class Settings:
|
||||||
if self.NumChal.lower() == 'random':
|
if self.NumChal.lower() == 'random':
|
||||||
self.NumChal = "random"
|
self.NumChal = "random"
|
||||||
|
|
||||||
if len(self.NumChal) is not 16 and not "random":
|
if len(self.NumChal) != 16 and self.NumChal != "random":
|
||||||
print(utils.color("[!] The challenge must be exactly 16 chars long.\nExample: 1122334455667788", 1))
|
print(utils.color("[!] The challenge must be exactly 16 chars long.\nExample: 1122334455667788", 1))
|
||||||
sys.exit(-1)
|
sys.exit(-1)
|
||||||
|
|
||||||
self.Challenge = ""
|
self.Challenge = b''
|
||||||
if self.NumChal.lower() == 'random':
|
if self.NumChal.lower() == 'random':
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
for i in range(0, len(self.NumChal),2):
|
if self.PY2OR3 == 'PY2':
|
||||||
self.Challenge += self.NumChal[i:i+2].decode("hex")
|
for i in range(0, len(self.NumChal),2):
|
||||||
|
self.Challenge += self.NumChal[i:i+2].decode("hex")
|
||||||
|
else:
|
||||||
|
self.Challenge = bytes.fromhex(self.NumChal)
|
||||||
|
|
||||||
|
|
||||||
# Set up logging
|
# Set up logging
|
||||||
logging.basicConfig(filename=self.SessionLogFile, level=logging.INFO, format='%(asctime)s - %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p')
|
logging.basicConfig(filename=self.SessionLogFile, level=logging.INFO, format='%(asctime)s - %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p')
|
||||||
|
|
|
@ -412,12 +412,12 @@ class SMBRelay(BaseRequestHandler):
|
||||||
data = self.request.recv(4096)
|
data = self.request.recv(4096)
|
||||||
|
|
||||||
## Make sure it's not a Kerberos auth.
|
## Make sure it's not a Kerberos auth.
|
||||||
if data.find("NTLM") is not -1:
|
if data.find("NTLM") != -1:
|
||||||
## Start with nego protocol + session setup negotiate to our target.
|
## Start with nego protocol + session setup negotiate to our target.
|
||||||
data, smbdata, s, challenge = GrabNegotiateFromTarget(data, s, Pivoting)
|
data, smbdata, s, challenge = GrabNegotiateFromTarget(data, s, Pivoting)
|
||||||
|
|
||||||
## Make sure it's not a Kerberos auth.
|
## Make sure it's not a Kerberos auth.
|
||||||
if data.find("NTLM") is not -1:
|
if data.find("NTLM") != -1:
|
||||||
##Relay all that to our client.
|
##Relay all that to our client.
|
||||||
if data[8:10] == "\x73\x00":
|
if data[8:10] == "\x73\x00":
|
||||||
head = SMBHeader(cmd="\x73",flag1="\x98", flag2="\x43\xc8", errorcode="\x16\x00\x00\xc0", pid=pidcalc(data),mid=midcalc(data))
|
head = SMBHeader(cmd="\x73",flag1="\x98", flag2="\x43\xc8", errorcode="\x16\x00\x00\xc0", pid=pidcalc(data),mid=midcalc(data))
|
||||||
|
|
|
@ -11,7 +11,7 @@ else:
|
||||||
|
|
||||||
def StructWithLenPython2or3(endian,data):
|
def StructWithLenPython2or3(endian,data):
|
||||||
#Python2...
|
#Python2...
|
||||||
if PY2OR3 is "PY2":
|
if PY2OR3 == "PY2":
|
||||||
return struct.pack(endian, data)
|
return struct.pack(endian, data)
|
||||||
#Python3...
|
#Python3...
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue