Linux Privilege Escalation
Root account has full administrative access to operating system
Initial entry is through a low privilege account/shell
Target machine might have misconfigurations
SUID (Set User ID) Permission
Allows low privileged users to run exe with file system permissions of the owner (run as root)
Exe installed globally by the system
Example: Ping
#Check permissions of ping
ls -al /bin/ping
#Output
-rwsr-xr-x 1 root root 64424 Jun 28 2019 /bin/ping
#the s bit denotes that SUID permission is set
#find all executables with SUID permission set
find / -perm -u=s -type f 2>/dev/null[Manual] Using Find to execute root commands
First we set SUID bit for executable Find (this will be our attack vector)
Leverage Find to execute root commands:

LinPeas
Linpeas.sh --> automated script for Linux Priv Escalations that runs alot of checks for vulnerabilities
searches password, writable files
Go to Interesting Files --> SUID

Last updated