> For the complete documentation index, see [llms.txt](https://cajac.gitbook.io/ctf-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cajac.gitbook.io/ctf-notes/priv-esc/linux-privilege-escalation/finding-flag-files.md).

# Finding flag files

## Finding user flags

The user flags for Linux boxes are usually found in one of the user home directories such as `/home/userone/`.

Possible names are:

* `flag.txt`
* `local.txt`
* `user.txt`&#x20;
* `user_flag.txt`

We can "automate" the finding and printing of the flag with `find`

```bash
find /home -type f -name local.txt -exec 'cat {}' \;
```

## Finding root flags

The root flag for Linux boxes is usually found in root's home directory (`/root`).

Possible names are:

* `proof.txt`
* `root.txt`
