From a882d397a8adc7bc7461b779c5419dc2758a7938 Mon Sep 17 00:00:00 2001 From: jrmdev Date: Tue, 28 Jul 2015 10:48:21 +1000 Subject: [PATCH] Minor fixes --- Responder.conf | 2 +- servers/FTP.py | 7 +------ servers/HTTP.py | 21 --------------------- servers/HTTP_Proxy.py | 15 ++++++++++++--- servers/IMAP.py | 5 ----- servers/Kerberos.py | 8 -------- servers/LDAP.py | 12 ------------ servers/MSSQL.py | 22 ---------------------- servers/POP3.py | 5 ----- servers/SMB.py | 24 ------------------------ servers/SMTP.py | 7 ------- settings.py | 6 ------ utils.py | 7 ++++++- 13 files changed, 20 insertions(+), 121 deletions(-) diff --git a/Responder.conf b/Responder.conf index c39a6c7..1a52d5c 100644 --- a/Responder.conf +++ b/Responder.conf @@ -39,7 +39,7 @@ RespondToName = ; Specific IP Addresses not to respond to (default = None) ; Example: DontRespondTo = 10.20.1.100-150, 10.20.3.10 -DontRespondTo = 192.168.183.1, 10.0.2.2, 127.0.0.0-254 +DontRespondTo = ; Specific NBT-NS/LLMNR names not to respond to (default = None) ; Example: DontRespondTo = NAC, IPS, IDS diff --git a/servers/FTP.py b/servers/FTP.py index 5af048e..6b1a5e1 100644 --- a/servers/FTP.py +++ b/servers/FTP.py @@ -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) diff --git a/servers/HTTP.py b/servers/HTTP.py index 6ee5d7c..0f0e6e6 100644 --- a/servers/HTTP.py +++ b/servers/HTTP.py @@ -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(' 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): diff --git a/servers/POP3.py b/servers/POP3.py index 63d222f..5bdfa7e 100644 --- a/servers/POP3.py +++ b/servers/POP3.py @@ -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: diff --git a/servers/SMB.py b/servers/SMB.py index 3abb2ba..37bff7f 100644 --- a/servers/SMB.py +++ b/servers/SMB.py @@ -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('