# Local Privilege Escalation

Privilege escalation occurs when an attacker exploits a bug, a design flaw or a misconfiguration in a software being executed with higher privileges to gain access to protected resources or gain code execution with elevated privileges.

Nonetheless, there are two types of privilege escalation:

* **Vertical privilege escalation**: This is the actual privilege elevation, where an attacker with lower permissions can access functions or content reserved for higher privilege users. For example, an attacker can read the file `/etc/shadow` on a system thanks to a path traversal vulnerability in an application being executed as root.
* **Horizontal privilege escalation**: The horizontal privilege escalation, pretty common in lateral movements techniques, occurs when an attacker takes over other accounts with almost the same privileges as the attacker. For example, an attacker can obtain an NTLM hash of one user on an AD environment to access a different computer.


---

# 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://the-pentesting-guide.marmeus.com/local_privilege_escalation.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.
