Linux Privilege Escalation Cheatsheet
So you got a shell, what now? This cheatsheet will help you with local enumeration as well as escalate your privilege further
Usage of different enumeration scripts are encouraged, my favourite is LinPEAS Another linux enumeration script I personally use is LinEnum Abuse existing functionality of programs using GTFOBins
Note: This is a live document. I’ll be adding more content as I learn more
Unstable shell
Send yourself another shell from within the unstable shell
Make it functional
Necessary for privilege escalation purposes
General info
Automated enumeration
Abusing sudo
Can sudo but absolute path is specified? Use ltrace
to view libraries being loaded by these programs and check if absolute path is specified or not
Weak file permissions
Abusing CRON jobs
Use a suid program and use as per context getsuid.c
Abusing wildcards
Check out this fantastic document of a talk
- Abusing
chmod
- Abusing
chown
- Abusing
tar
- Abusing
rsync
Abusing NFS < 4
Refer to my personal notes for exploiting NFS < 4