Linux PrivEsc
Sudo Based Privilege Escalation
The holy bible of Linux Privesc: https://gtfobins.github.io/
Abusing sudo with LD_PRELOAD
You can abuse the LD_Preload sudo permission by writing and compiling the following C code. This will:
Check for LD_PRELOAD (with the env_keep option)
Write a simple C code compiled as a share object (.so extension) file
Run the program with sudo rights and the LD_PRELOAD option pointing to our .so file
Save and compile using:
SUID based
Capabilities
Cron Jobs
Path
NSF
nfs.c:
Last updated