mirror of
https://github.com/lgandx/Responder.git
synced 2025-08-14 18:47:41 -07:00
Minor fixes
This commit is contained in:
parent
26d205eb2e
commit
a882d397a8
13 changed files with 20 additions and 121 deletions
|
@ -50,12 +50,7 @@ class FTP(BaseRequestHandler):
|
|||
'fullhash': User+':'+Pass
|
||||
})
|
||||
|
||||
#print text("[FTP] Client : %s" % color(self.client_address[0], 3))
|
||||
#print text("[FTP] Username : %s" % color(User, 3))
|
||||
#print text("[FTP] Password : %s" % color(Pass, 3))
|
||||
#WriteData(settings.Config.FTPLog % self.client_address[0], User+":"+Pass, User+":"+Pass)
|
||||
|
||||
else :
|
||||
else:
|
||||
Packet = FTPPacket(Code="502",Message="Command not implemented.")
|
||||
self.request.send(str(Packet))
|
||||
data = self.request.recv(1024)
|
||||
|
|
|
@ -57,14 +57,6 @@ def ParseHTTPHash(data, client):
|
|||
'fullhash': WriteHash,
|
||||
})
|
||||
|
||||
#print text("[HTTP] NTLMv1 Client : %s" % client)
|
||||
#print text("[HTTP] NTLMv1 Hostname : %s" % HostName)
|
||||
#print text("[HTTP] NTLMv1 User : %s" % User)
|
||||
#print text("[HTTP] NTLMv1 Hash : %s" % LMHash+":"+NTHash)
|
||||
#
|
||||
#WriteHash = '%s::%s:%s:%s:%s' % (User, HostName, LMHash, NTHash, settings.Config.NumChal)
|
||||
#WriteData(settings.Config.HTTPNTLMv1Log % client, WriteHash, User+"::"+HostName)
|
||||
|
||||
if NthashLen > 24:
|
||||
NthashLen = 64
|
||||
DomainLen = struct.unpack('<H',data[28:30])[0]
|
||||
|
@ -85,14 +77,6 @@ def ParseHTTPHash(data, client):
|
|||
'fullhash': WriteHash,
|
||||
})
|
||||
|
||||
#print text("[HTTP] NTLMv2 Client : %s" % client)
|
||||
#print text("[HTTP] NTLMv2 Hostname : %s" % HostName)
|
||||
#print text("[HTTP] NTLMv2 User : %s" % Domain+"\\"+User)
|
||||
#print text("[HTTP] NTLMv2 Hash : %s" % NTHash[:32]+":"+NTHash[32:])
|
||||
#
|
||||
#WriteHash = '%s::%s:%s:%s:%s' % (User, Domain, settings.Config.NumChal, NTHash[:32], NTHash[32:])
|
||||
#WriteData(settings.Config.HTTPNTLMv2Log % client, WriteHash, User+"::"+HostName)
|
||||
|
||||
def GrabCookie(data, host):
|
||||
Cookie = re.search('(Cookie:*.\=*)[^\r\n]*', data)
|
||||
|
||||
|
@ -214,11 +198,6 @@ def PacketSequence(data, client):
|
|||
'cleartext': ClearText_Auth.split(':')[1],
|
||||
})
|
||||
|
||||
#print text("[HTTP] (Basic) Client : %s" % color(client, 3))
|
||||
#print text("[HTTP] (Basic) Username : %s" % color(ClearText_Auth.split(':')[0], 3))
|
||||
#print text("[HTTP] (Basic) Password : %s" % color(ClearText_Auth.split(':')[1], 3))
|
||||
#WriteData(settings.Config.HTTPBasicLog % client, ClearText_Auth, ClearText_Auth)
|
||||
|
||||
if settings.Config.Force_WPAD_Auth and WPAD_Custom:
|
||||
if settings.Config.Verbose:
|
||||
print text("[HTTP] WPAD (auth) file sent to %s" % client)
|
||||
|
|
|
@ -254,6 +254,9 @@ class HTTP_Proxy(BaseHTTPServer.BaseHTTPRequestHandler):
|
|||
self._read_write(soc, 300)
|
||||
except:
|
||||
pass
|
||||
except:
|
||||
pass
|
||||
|
||||
finally:
|
||||
soc.close()
|
||||
self.connection.close()
|
||||
|
@ -301,6 +304,9 @@ class HTTP_Proxy(BaseHTTPServer.BaseHTTPRequestHandler):
|
|||
except:
|
||||
pass
|
||||
|
||||
except:
|
||||
pass
|
||||
|
||||
finally:
|
||||
soc.close()
|
||||
self.connection.close()
|
||||
|
@ -326,10 +332,13 @@ class HTTP_Proxy(BaseHTTPServer.BaseHTTPRequestHandler):
|
|||
pass
|
||||
else:
|
||||
out = soc
|
||||
data = i.recv(4096)
|
||||
try:
|
||||
data = i.recv(4096)
|
||||
|
||||
if self.command == "POST" and settings.Config.Verbose:
|
||||
print text("[PROXY] POST Data : %s" % data)
|
||||
if self.command == "POST" and settings.Config.Verbose:
|
||||
print text("[PROXY] POST Data : %s" % data)
|
||||
except:
|
||||
pass
|
||||
if data:
|
||||
try:
|
||||
out.send(data)
|
||||
|
|
|
@ -47,11 +47,6 @@ class IMAP(BaseRequestHandler):
|
|||
'fullhash': Credentials[0]+":"+Credentials[1],
|
||||
})
|
||||
|
||||
#print text("[IMAP] Address : %s" % color(self.client_address[0], 3, 0))
|
||||
#print text("[IMAP] Username : %s" % color(Credentials[0], 3, 0))
|
||||
#print text("[IMAP] Password : %s" % color(Credentials[1], 3, 0))
|
||||
#WriteData(settings.Config.IMAPLog % self.client_address[0], Credentials, Credentials)
|
||||
|
||||
## FIXME: Close connection properly
|
||||
## self.request.send(str(ditchthisconnection()))
|
||||
## data = self.request.recv(1024)
|
||||
|
|
|
@ -133,10 +133,6 @@ class KerbTCP(BaseRequestHandler):
|
|||
'fullhash': KerbHash,
|
||||
})
|
||||
|
||||
#print text("[KERBEROS] Address :" % self.client_address[0])
|
||||
#print text("[KERBEROS] MSKerbv5 Hash :" % KerbHash)
|
||||
#WriteData(settings.Config.KerberosLog % self.client_address[0], KerbHash, KerbHash)
|
||||
|
||||
except Exception:
|
||||
raise
|
||||
|
||||
|
@ -159,9 +155,5 @@ class KerbUDP(BaseRequestHandler):
|
|||
'fullhash': KerbHash,
|
||||
})
|
||||
|
||||
#print text("[KERBEROS] Address :" % self.client_address[0])
|
||||
#print text("[KERBEROS] MSKerbv5 Hash :" % KerbHash)
|
||||
#WriteData(settings.Config.KerberosLog % self.client_address[0], KerbHash, KerbHash)
|
||||
|
||||
except Exception:
|
||||
raise
|
||||
|
|
|
@ -64,12 +64,6 @@ def ParseLDAPHash(data, client):
|
|||
'hash': NtHash,
|
||||
'fullhash': WriteHash,
|
||||
})
|
||||
|
||||
#print text("[LDAP] NTLMv1 Address : %s" % client)
|
||||
#print text("[LDAP] NTLMv1 Username : %s\\%s" % (Domain, User))
|
||||
#print text("[LDAP] NTLMv1 Hash : %s" % NtHash)
|
||||
#WriteHash = User+"::"+Domain+":"+LMHash+":"+NtHash+":"+settings.Config.NumChal
|
||||
#WriteData(settings.Config.LDAPNTLMv1Log % client, WriteHash, User+"::"+Domain)
|
||||
|
||||
if LMhashLen < 2 and settings.Config.Verbose:
|
||||
print text("[LDAP] Ignoring anonymous NTLM authentication")
|
||||
|
@ -114,12 +108,6 @@ def ParseLDAPPacket(data, client):
|
|||
'cleartext': Password,
|
||||
'fullhash': UserDomain+':'+Password,
|
||||
})
|
||||
|
||||
#print text("[LDAP] Client : %s" % color(client, 3, 0))
|
||||
#print text("[LDAP] Username : %s" % color(UserDomain, 3, 0))
|
||||
#print text("[LDAP] Password : %s" % color(Password, 3, 0))
|
||||
#WritePass = '%s: %s:%s' % (client, UserDomain, Password)
|
||||
#WriteData(settings.Config.LDAPClearLog % client, WritePass, WritePass)
|
||||
|
||||
if sasl == "\xA3":
|
||||
Buffer = ParseNTLM(data,client)
|
||||
|
|
|
@ -85,13 +85,6 @@ def ParseSQLHash(data, client):
|
|||
'fullhash': WriteHash,
|
||||
})
|
||||
|
||||
#print text("[MSSQL] NTLMv1 Client : %s" % color(client, 3, 0))
|
||||
#print text("[MSSQL] NTLMv1 Domain : %s" % color(Domain, 3, 0))
|
||||
#print text("[MSSQL] NTLMv1 User : %s" % color(User, 3, 0))
|
||||
#print text("[MSSQL] NTLMv1 Hash : %s" % color(LMHash+":"+NTHash, 3, 0))
|
||||
#WriteHash = '%s::%s:%s:%s:%s' % (User, Domain, LMHash, NTHash, settings.Config.NumChal)
|
||||
#WriteData(settings.Config.MSSQLNTLMv1Log % client, User+"::"+Domain+":"+LMHash+":"+NtHash+":"+NumChal, User+"::"+Domain)
|
||||
|
||||
if NthashLen > 60:
|
||||
WriteHash = '%s::%s:%s:%s:%s' % (User, Domain, settings.Config.NumChal, NTHash[:32], NTHash[32:])
|
||||
|
||||
|
@ -104,13 +97,6 @@ def ParseSQLHash(data, client):
|
|||
'fullhash': WriteHash,
|
||||
})
|
||||
|
||||
#print text("[MSSQL] NTLMv2 Client : %s" % color(client, 3, 0))
|
||||
#print text("[MSSQL] NTLMv2 Domain : %s" % color(Domain, 3, 0))
|
||||
#print text("[MSSQL] NTLMv2 User : %s" % color(User, 3, 0))
|
||||
#print text("[MSSQL] NTLMv2 Hash : %s" % color(NTHash[:32]+":"+NTHash[32:], 3, 0))
|
||||
#WriteHash = '%s::%s:%s:%s:%s' % (User, Domain, settings.Config.NumChal, NTHash[:32], NTHash[32:])
|
||||
#WriteData(settings.Config.MSSQLNTLMv2Log % client, WriteHash,User+"::"+Domain)
|
||||
|
||||
def ParseSqlClearTxtPwd(Pwd):
|
||||
Pwd = map(ord,Pwd.replace('\xa5',''))
|
||||
Pw = []
|
||||
|
@ -132,14 +118,6 @@ def ParseClearTextSQLPass(data, client):
|
|||
'fullhash': TDS.UserName +':'+ ParseSqlClearTxtPwd(TDS.Password),
|
||||
})
|
||||
|
||||
#print text("[MSSQL] Client : %s (%s)" % (color(client, 3, 0) , color(TDS.ClientName, 3, 0)))
|
||||
#print text("[MSSQL] Server : %s" % color(TDS.ServerName, 3, 0))
|
||||
#print text("[MSSQL] Database : %s" % color(TDS.DatabaseName, 3, 0))
|
||||
#print text("[MSSQL] Username : %s" % color(TDS.UserName, 3, 0))
|
||||
#print text("[MSSQL] Password : %s" % color(ParseSqlClearTxtPwd(TDS.Password), 3, 0))
|
||||
#WritePass = TDS.UserName +':'+ ParseSqlClearTxtPwd(TDS.Password)
|
||||
#WriteData(settings.Config.MSSQLClearLog % client, WritePass, WritePass)
|
||||
|
||||
# MSSQL Server class
|
||||
class MSSQL(BaseRequestHandler):
|
||||
|
||||
|
|
|
@ -51,11 +51,6 @@ class POP3(BaseRequestHandler):
|
|||
'fullhash': User+":"+Pass,
|
||||
})
|
||||
|
||||
#print text("[POP3] Address : %s" % color(self.client_address[0], 3))
|
||||
#print text("[POP3] Username : %s" % color(User, 3))
|
||||
#print text("[POP3] Password : %s" % color(Pass, 3))
|
||||
#WriteData(settings.Config.POP3Log % self.client_address[0], User+":"+Pass, User+":"+Pass)
|
||||
|
||||
data = self.SendPacketAndRead()
|
||||
|
||||
else:
|
||||
|
|
|
@ -131,12 +131,6 @@ def ParseSMBHash(data,client):
|
|||
'fullhash': WriteHash,
|
||||
})
|
||||
|
||||
#print text("[SMB] NTLMv1 (SSP) Address : %s" % client)
|
||||
#print text("[SMB] NTLMv1 (SSP) Username : %s\\%s" % (Domain, Username))
|
||||
#print text("[SMB] NTLMv1 (SSP) Hash : %s" % SMBHash)
|
||||
#WriteHash = '%s::%s:%s:%s:%s' % (Username, Domain, LMHash, SMBHash, settings.Config.NumChal)
|
||||
#WriteData(settings.Config.SMBNTLMSSPv1Log % client, WriteHash, Username+"::"+Domain)
|
||||
|
||||
if NthashLen > 60:
|
||||
SMBHash = SSPIStart[NthashOffset:NthashOffset+NthashLen].encode("hex").upper()
|
||||
DomainLen = struct.unpack('<H',data[109:111])[0]
|
||||
|
@ -156,12 +150,6 @@ def ParseSMBHash(data,client):
|
|||
'fullhash': WriteHash,
|
||||
})
|
||||
|
||||
#print text("[SMB] NTLMv2 (SSP) Address : %s" % client)
|
||||
#print text("[SMB] NTLMv2 (SSP) Username : %s\\%s" % (Domain, Username))
|
||||
#print text("[SMB] NTLMv2 (SSP) Hash : %s" % SMBHash)
|
||||
#WriteHash = '%s::%s:%s:%s:%s' % (Username, Domain, settings.Config.NumChal, SMBHash[:32], SMBHash[32:])
|
||||
#WriteData(settings.Config.SMBNTLMSSPv2Log % client, WriteHash, Username+"::"+Domain)
|
||||
|
||||
# Parse SMB NTLMv1/v2
|
||||
def ParseLMNTHash(data, client):
|
||||
|
||||
|
@ -185,12 +173,6 @@ def ParseLMNTHash(data, client):
|
|||
'fullhash': WriteHash,
|
||||
})
|
||||
|
||||
#print text("[SMB] NTLMv2 Address : %s" % client)
|
||||
#print text("[SMB] NTLMv2 Username : %s\\%s" % (Domain, Username))
|
||||
#print text("[SMB] NTLMv2 Hash : %s" % NtHash)
|
||||
#WriteHash = '%s::%s:%s:%s:%s' % (Username, Domain, settings.Config.NumChal, LmHash, NtHash)
|
||||
#WriteData(settings.Config.SMBNTLMv2Log % client, WriteHash, Username+"::"+Domain)
|
||||
|
||||
if NthashLen == 24:
|
||||
NtHash = data[65+LMhashLen:65+LMhashLen+NthashLen].encode('hex').upper()
|
||||
LmHash = data[65:65+LMhashLen].encode('hex').upper()
|
||||
|
@ -205,12 +187,6 @@ def ParseLMNTHash(data, client):
|
|||
'fullhash': WriteHash,
|
||||
})
|
||||
|
||||
#print text("[SMB] NTLMv1 Address : %s" % client)
|
||||
#print text("[SMB] NTLMv1 Username : %s\\%s" % (Domain, Username))
|
||||
#print text("[SMB] NTLMv1 Hash : %s" % NtHash)
|
||||
#WriteHash = '%s::%s:%s:%s:%s' % (Username, Domain, LmHash, NtHash, settings.Config.NumChal)
|
||||
#WriteData(settings.Config.SMBNTLMv1Log % client, WriteHash, Username+"::"+Domain)
|
||||
|
||||
def IsNT4ClearTxt(data, client):
|
||||
HeadLen = 36
|
||||
|
||||
|
|
|
@ -62,12 +62,5 @@ class ESMTP(BaseRequestHandler):
|
|||
'fullhash': Username+":"+Password,
|
||||
})
|
||||
|
||||
#print text("[SMTP] Address : %s" % color(self.client_address[0], 3))
|
||||
#print text("[SMTP] Username : %s" % color(Username, 3))
|
||||
#print text("[SMTP] Password : %s" % color(Password, 3))
|
||||
#WriteData(settings.Config.SMTPClearLog % self.client_address[0], Username+":"+Password, Username+":"+Password)
|
||||
|
||||
## FIXME: Close connection properly
|
||||
|
||||
except Exception:
|
||||
pass
|
Loading…
Add table
Add a link
Reference in a new issue