Description
Dumps SAM hashes and LSA secrets (including cached creds) from the remote Windows target without executing any agent locally. This is done by remotely updating the registry key security descriptor, taking advantage of the WriteDACL privileges held by local administrators to set temporary read permissions.
This can be disabled by setting the `INLINE` option to false and the module will fallback to the original implementation, which consists in saving the registry hives locally on the target (%SYSTEMROOT%\Temp\<random>.tmp), downloading the temporary hive files and reading the data from it. This temporary files are removed when it's done.
On domain controllers, secrets from Active Directory is extracted using [MS-DRDS] DRSGetNCChanges(), replicating the attributes we need to get SIDs, NTLM hashes, groups, password history, Kerberos keys and other interesting data. Note that the actual `NTDS.dit` file is not downloaded. Instead, the Directory Replication Service directly asks Active Directory through RPC requests.
This modules takes care of starting or enabling the Remote Registry service if needed. It will restore the service to its original state when it's done.
This is a port of the great Impacket `secretsdump.py` code written by Alberto Solino.
Module options
To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':
msf > use auxiliary/gather/windows/secrets_dumpmsf undefined(secrets_dump) > show actions ...actions...msf undefined(secrets_dump) > set ACTION < action-name >msf undefined(secrets_dump) > show options ...show and set options...msf undefined(secrets_dump) > runPrioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub