mirror of
https://github.com/lgandx/Responder.git
synced 2025-07-30 11:38:55 -07:00
Fixed various bugs and improved the LDAP module.
This commit is contained in:
parent
75aa21bbb9
commit
be26b504b5
3 changed files with 26 additions and 8 deletions
|
@ -102,19 +102,37 @@ def ParseLDAPPacket(data, client, Challenge):
|
||||||
elif Operation == "\x63":
|
elif Operation == "\x63":
|
||||||
Buffer = ParseSearch(data)
|
Buffer = ParseSearch(data)
|
||||||
return Buffer
|
return Buffer
|
||||||
|
|
||||||
elif settings.Config.Verbose:
|
elif settings.Config.Verbose:
|
||||||
print text('[LDAP] Operation not supported')
|
print text('[LDAP] Operation not supported')
|
||||||
|
|
||||||
|
if data[5:6] == '\x60':
|
||||||
|
UserLen = struct.unpack("<b",data[11:12])[0]
|
||||||
|
UserString = data[12:12+UserLen]
|
||||||
|
PassLen = struct.unpack("<b",data[12+UserLen+1:12+UserLen+2])[0]
|
||||||
|
PassStr = data[12+UserLen+2:12+UserLen+3+PassLen]
|
||||||
|
if settings.Config.Verbose:
|
||||||
|
print text('[LDAP] Attempting to parse an old simple Bind request.')
|
||||||
|
SaveToDb({
|
||||||
|
'module': 'LDAP',
|
||||||
|
'type': 'Cleartext',
|
||||||
|
'client': client,
|
||||||
|
'user': UserString,
|
||||||
|
'cleartext': PassStr,
|
||||||
|
'fullhash': UserString+':'+PassStr,
|
||||||
|
})
|
||||||
|
|
||||||
class LDAP(BaseRequestHandler):
|
class LDAP(BaseRequestHandler):
|
||||||
def handle(self):
|
def handle(self):
|
||||||
try:
|
try:
|
||||||
while True:
|
self.request.settimeout(0.4)
|
||||||
self.request.settimeout(0.5)
|
|
||||||
data = self.request.recv(8092)
|
data = self.request.recv(8092)
|
||||||
Challenge = RandomChallenge()
|
Challenge = RandomChallenge()
|
||||||
|
for x in range(5):
|
||||||
Buffer = ParseLDAPPacket(data,self.client_address[0], Challenge)
|
Buffer = ParseLDAPPacket(data,self.client_address[0], Challenge)
|
||||||
|
|
||||||
if Buffer:
|
if Buffer:
|
||||||
self.request.send(Buffer)
|
self.request.send(Buffer)
|
||||||
except socket.timeout:
|
data = self.request.recv(8092)
|
||||||
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
0
tools/DHCP_Auto.sh
Normal file → Executable file
0
tools/DHCP_Auto.sh
Normal file → Executable file
Loading…
Add table
Add a link
Reference in a new issue