mirror of
https://github.com/lgandx/Responder.git
synced 2025-07-06 04:51:23 -07:00
Added new option in Responder.conf. Capture multiple hashes from the same client. Default is On.
This commit is contained in:
parent
fb69f14f69
commit
35d933d596
3 changed files with 17 additions and 5 deletions
|
@ -49,7 +49,7 @@ DontRespondTo =
|
||||||
DontRespondToName = ISATAP
|
DontRespondToName = ISATAP
|
||||||
|
|
||||||
; If set to On, we will stop answering further requests from a host
|
; If set to On, we will stop answering further requests from a host
|
||||||
; if a hash hash been previously captured for this host.
|
; if a hash has been previously captured for this host.
|
||||||
AutoIgnoreAfterSuccess = Off
|
AutoIgnoreAfterSuccess = Off
|
||||||
|
|
||||||
; If set to On, we will send ACCOUNT_DISABLED when the client tries
|
; If set to On, we will send ACCOUNT_DISABLED when the client tries
|
||||||
|
@ -57,6 +57,11 @@ AutoIgnoreAfterSuccess = Off
|
||||||
; This may break file serving and is useful only for hash capture
|
; This may break file serving and is useful only for hash capture
|
||||||
CaptureMultipleCredentials = On
|
CaptureMultipleCredentials = On
|
||||||
|
|
||||||
|
; If set to On, we will write to file all hashes captured from the same host.
|
||||||
|
; In this case, Responder will log from 172.16.0.12 all user hashes: domain\toto,
|
||||||
|
; domain\popo, domain\zozo. Recommended value: On, capture everything.
|
||||||
|
CaptureMultipleHashFromSameHost = On
|
||||||
|
|
||||||
[HTTP Server]
|
[HTTP Server]
|
||||||
|
|
||||||
; Set to On to always serve the custom EXE
|
; Set to On to always serve the custom EXE
|
||||||
|
|
|
@ -147,9 +147,10 @@ class Settings:
|
||||||
self.DontRespondToName = filter(None, [x.upper().strip() for x in config.get('Responder Core', 'DontRespondToName').strip().split(',')])
|
self.DontRespondToName = filter(None, [x.upper().strip() for x in config.get('Responder Core', 'DontRespondToName').strip().split(',')])
|
||||||
|
|
||||||
# Auto Ignore List
|
# Auto Ignore List
|
||||||
self.AutoIgnore = self.toBool(config.get('Responder Core', 'AutoIgnoreAfterSuccess'))
|
self.AutoIgnore = self.toBool(config.get('Responder Core', 'AutoIgnoreAfterSuccess'))
|
||||||
self.CaptureMultipleCredentials = self.toBool(config.get('Responder Core', 'CaptureMultipleCredentials'))
|
self.CaptureMultipleCredentials = self.toBool(config.get('Responder Core', 'CaptureMultipleCredentials'))
|
||||||
self.AutoIgnoreList = []
|
self.CaptureMultipleHashFromSameHost = self.toBool(config.get('Responder Core', 'CaptureMultipleHashFromSameHost'))
|
||||||
|
self.AutoIgnoreList = []
|
||||||
|
|
||||||
# CLI options
|
# CLI options
|
||||||
self.ExternalIP = options.ExternalIP
|
self.ExternalIP = options.ExternalIP
|
||||||
|
|
8
utils.py
8
utils.py
|
@ -157,7 +157,7 @@ def SaveToDb(result):
|
||||||
cursor.text_factory = sqlite3.Binary # We add a text factory to support different charsets
|
cursor.text_factory = sqlite3.Binary # We add a text factory to support different charsets
|
||||||
res = cursor.execute("SELECT COUNT(*) AS count FROM responder WHERE module=? AND type=? AND client=? AND LOWER(user)=LOWER(?)", (result['module'], result['type'], result['client'], result['user']))
|
res = cursor.execute("SELECT COUNT(*) AS count FROM responder WHERE module=? AND type=? AND client=? AND LOWER(user)=LOWER(?)", (result['module'], result['type'], result['client'], result['user']))
|
||||||
(count,) = res.fetchone()
|
(count,) = res.fetchone()
|
||||||
|
|
||||||
if not count:
|
if not count:
|
||||||
with open(logfile,"a") as outf:
|
with open(logfile,"a") as outf:
|
||||||
if len(result['cleartext']): # If we obtained cleartext credentials, write them to file
|
if len(result['cleartext']): # If we obtained cleartext credentials, write them to file
|
||||||
|
@ -168,6 +168,12 @@ def SaveToDb(result):
|
||||||
cursor.execute("INSERT INTO responder VALUES(datetime('now'), ?, ?, ?, ?, ?, ?, ?, ?)", (result['module'], result['type'], result['client'], result['hostname'], result['user'], result['cleartext'], result['hash'], result['fullhash']))
|
cursor.execute("INSERT INTO responder VALUES(datetime('now'), ?, ?, ?, ?, ?, ?, ?, ?)", (result['module'], result['type'], result['client'], result['hostname'], result['user'], result['cleartext'], result['hash'], result['fullhash']))
|
||||||
cursor.commit()
|
cursor.commit()
|
||||||
|
|
||||||
|
if settings.Config.CaptureMultipleHashFromSameHost:
|
||||||
|
with open(logfile,"a") as outf:
|
||||||
|
if len(result['cleartext']): # If we obtained cleartext credentials, write them to file
|
||||||
|
outf.write('%s:%s\n' % (result['user'].encode('utf8', 'replace'), result['cleartext'].encode('utf8', 'replace')))
|
||||||
|
else: # Otherwise, write JtR-style hash string to file
|
||||||
|
outf.write(result['fullhash'].encode('utf8', 'replace') + '\n')
|
||||||
|
|
||||||
if not count or settings.Config.Verbose: # Print output
|
if not count or settings.Config.Verbose: # Print output
|
||||||
if len(result['client']):
|
if len(result['client']):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue