# Symlink Trickery

Symlinks can sometimes be used to creatively subvert the expectations of a program and escalate privileges.&#x20;

For example, let's say a cronjob is backing up files from a directory and making them world readable. If you can delete that directory and replace it with a symlink to a system folder, then you can read the system files.

Symlinks can also be useful when exploiting [SUID executables](/leet-sheet/post-exploitation/linux/linux-privilege-escalation/suid-bit.md) and especially [wildcard injections](/leet-sheet/post-exploitation/linux/linux-privilege-escalation/wildcard-injection.md#chmod-chown-privilege-hijack).


---

# 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://heinosass.gitbook.io/leet-sheet/post-exploitation/linux/linux-privilege-escalation/symlink-trickery.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.
