mirror of
https://github.com/lgandx/Responder.git
synced 2025-07-07 21:41:21 -07:00
fix for anonymous NTLM connection for LDAP server
This commit is contained in:
parent
f5c1f9464a
commit
1c47e7fcb1
1 changed files with 22 additions and 17 deletions
|
@ -965,7 +965,8 @@ def ParseSearch(data):
|
||||||
|
|
||||||
def ParseLDAPHash(data,client):
|
def ParseLDAPHash(data,client):
|
||||||
SSPIStarts = data[42:]
|
SSPIStarts = data[42:]
|
||||||
LMhashLen = struct.unpack('<H',data[56:58])[0]
|
LMhashLen = struct.unpack('<H',data[54:56])[0]
|
||||||
|
if LMhashLen > 10:
|
||||||
LMhashOffset = struct.unpack('<H',data[58:60])[0]
|
LMhashOffset = struct.unpack('<H',data[58:60])[0]
|
||||||
LMHash = SSPIStarts[LMhashOffset:LMhashOffset+LMhashLen].encode("hex").upper()
|
LMHash = SSPIStarts[LMhashOffset:LMhashOffset+LMhashLen].encode("hex").upper()
|
||||||
NthashLen = struct.unpack('<H',data[64:66])[0]
|
NthashLen = struct.unpack('<H',data[64:66])[0]
|
||||||
|
@ -982,6 +983,10 @@ def ParseLDAPHash(data,client):
|
||||||
WriteData(Outfile,writehash)
|
WriteData(Outfile,writehash)
|
||||||
print "[LDAP] NTLMv1 complete hash is :", writehash
|
print "[LDAP] NTLMv1 complete hash is :", writehash
|
||||||
logging.warning('[LDAP] NTLMv1 complete hash is :%s'%(writehash))
|
logging.warning('[LDAP] NTLMv1 complete hash is :%s'%(writehash))
|
||||||
|
if LMhashLen <2 :
|
||||||
|
Message = '[+]LDAP Anonymous NTLM authentication, ignoring..'
|
||||||
|
print Message
|
||||||
|
logging.warning(Message)
|
||||||
|
|
||||||
def ParseNTLM(data,client):
|
def ParseNTLM(data,client):
|
||||||
Search1 = re.search('(NTLMSSP\x00\x01\x00\x00\x00)', data)
|
Search1 = re.search('(NTLMSSP\x00\x01\x00\x00\x00)', data)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue