> For the complete documentation index, see [llms.txt](https://heinosass.gitbook.io/leet-sheet/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://heinosass.gitbook.io/leet-sheet/post-exploitation/linux/linux-privilege-escalation/symlink-trickery.md).

# 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).
