RedSnarf

Outil de post-exploitation pour récupérer les hashes de mots de passe et les identifiants depuis des postes de travail, serveurs et contrôleurs de domaine Windows via des méthodes SMB, WMI et registre. Post-exploitation tool for retrieving password hashes and credentials from Windows workstations, servers, and domain controllers using SMB, WMI, and registry-based methods.

↗ https://github.com/nccgroup/redsnarf

Overview

RedSnarf is a Python, menu-driven post-exploitation tool for pentesters working in Windows/Active Directory environments. Given a set of credentials, it can pull SAM/SYSTEM hives, dump LSA secrets, extract cached domain credentials, and grab hashes from LSASS memory across single hosts or lists of targets — wrapping several classic credential-extraction techniques behind one interactive menu instead of running each utility separately.

Common Usage

Launch RedSnarf’s interactive menu

python2 redsnarf.py
# Typical workflow from the menu:
#  1. Select target type: single IP, IP range, or file of IPs
#  2. Supply credentials (username/password or username/hash for pass-the-hash)
#  3. Choose extraction method, e.g.:
#     - Get hashes from SAM/SYSTEM via reg save
#     - Dump LSA secrets
#     - Grab cached domain credentials
#     - Retrieve hashes via WMI

Non-interactive style invocation against a target list with pass-the-hash

python2 redsnarf.py -H <hash> -u administrator -d CORP -f targets.txt -m sam

Tips

  • Requires admin/SMB access on the target(s) — this is a credential-use tool, not an initial-access tool
  • Pass-the-hash works for most modules, avoiding the need for cleartext creds
  • Results (hashes, secrets) are written to a local output directory for later cracking with hashcat/john
Help / Man page
RedSnarf - retrieve hashes and credentials from Windows systems

Usage: redsnarf.py [options]

  -u USERNAME       username for authentication
  -p PASSWORD       password for authentication
  -H HASH           NTLM hash for pass-the-hash
  -d DOMAIN         target domain
  -i TARGET         single target IP
  -f FILE           file containing list of target IPs
  -m MODULE         extraction module: sam | lsa | cachedcreds | wmi | lsass
  -o OUTPUT         output directory for retrieved data

Run without arguments to use the interactive menu instead.

Vue d’ensemble

RedSnarf est un outil de post-exploitation Python, piloté par menu, pour les pentesters travaillant dans des environnements Windows/Active Directory. Avec un jeu d’identifiants, il peut extraire les ruches SAM/SYSTEM, dumper les secrets LSA, extraire les identifiants de domaine mis en cache et récupérer des hashes depuis la mémoire LSASS sur un ou plusieurs hôtes cibles : il regroupe plusieurs techniques classiques d’extraction d’identifiants derrière un seul menu interactif plutôt que de lancer chaque utilitaire séparément.

Utilisation courante

Lancer le menu interactif de RedSnarf

python2 redsnarf.py
# Workflow typique depuis le menu :
#  1. Sélectionner le type de cible : IP unique, plage d'IP, ou fichier d'IP
#  2. Fournir des identifiants (utilisateur/mot de passe ou utilisateur/hash pour pass-the-hash)
#  3. Choisir la méthode d'extraction, par exemple :
#     - Récupérer les hashes depuis SAM/SYSTEM via reg save
#     - Dumper les secrets LSA
#     - Récupérer les identifiants de domaine mis en cache
#     - Récupérer les hashes via WMI

Invocation en style non interactif contre une liste de cibles avec pass-the-hash

python2 redsnarf.py -H <hash> -u administrator -d CORP -f targets.txt -m sam

Conseils

  • Nécessite un accès admin/SMB sur la ou les cibles : c’est un outil d’utilisation d’identifiants, pas un outil d’accès initial
  • Le pass-the-hash fonctionne pour la plupart des modules, évitant le besoin d’identifiants en clair
  • Les résultats (hashes, secrets) sont écrits dans un répertoire de sortie local pour un cracking ultérieur avec hashcat/john
Aide / Page de manuel
RedSnarf - retrieve hashes and credentials from Windows systems

Usage: redsnarf.py [options]

  -u USERNAME       username for authentication
  -p PASSWORD       password for authentication
  -H HASH           NTLM hash for pass-the-hash
  -d DOMAIN         target domain
  -i TARGET         single target IP
  -f FILE           file containing list of target IPs
  -m MODULE         extraction module: sam | lsa | cachedcreds | wmi | lsass
  -o OUTPUT         output directory for retrieved data

Run without arguments to use the interactive menu instead.