Enumeration sheet

https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Linux%20-%20Privilege%20Escalation.md https://gtfobins.github.io/

UPG SHELL python3 -c 'import pty;pty.spawn("/bin/bash");'

python -c 'import pty;pty.spawn("/bin/bash");'

easy wins

sudo -l 
cat /etc/passwd | grep -i '/bin/.*sh' 

SUID binaries

find / -perm -4000 -type f -exec ls -la {} 2>/dev/null \;
find / -uid 0 -perm -4000 -type f 2>/dev/null

List world writable files

find / -writable ! -user `whoami` -type f ! -path "/proc/*" ! -path "/sys/*" -exec ls -al {} \; 2>/dev/null
find / -perm -2 -type f 2>/dev/null
find / ! -path "*/proc/*" -perm -2 -type f -print 2>/dev/null

check internally hosted services

netstat -tnlp 
ps auxww

nginx stuff

You should also check /opt and /srv

Looking at what other sites are hosted on this server

ls -al /etc/nginx/sites-enabled

password search

grep -r password . 2>/dev/null

Questions