mirror of
https://github.com/lgandx/Responder.git
synced 2025-12-11 10:19:04 +00:00
fix for anonymous NTLM connection for LDAP server
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user