# Linux Privilege Escalation

Linux privilege escalation is the process of gaining higher level permissions on a Linux system by exploiting a vulnerability or misconfiguration. It can be done by authorized users who need to perform certain tasks that require elevated privileges, or by unauthorized attackers who want to compromise the system and access sensitive data or resources. There are two main types of privilege escalation: vertical and horizontal.

**Horizontal privilege escalation**, also known as lateral privilege escalation, occurs when an attacker or user with a certain level of access or privilege tries to gain access to another user's account or resources at the same privilege level.

**Vertical privilege escalation** occurs when an attacker or user with lower-level privileges attempts to gain higher-level privileges within a system.

{% content-ref url="/pages/OMcpHPz4p2eCWYbrgaYo" %}
[MySQL Service UDF Exploit](/security/linux-privilege-escalation/mysql-service-udf-exploit.md)
{% endcontent-ref %}

{% content-ref url="/pages/HvTmL6kRafa9nAUjnEAc" %}
[Weak File Permission - /etc/shadow Readable and Writable](/security/linux-privilege-escalation/weak-file-permission-etc-shadow-readable-and-writable.md)
{% endcontent-ref %}


---

# 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://seckio.gitbook.io/security/linux-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.
