Linux Privilege Escalation
Basic Linux Privilege Escalation
https://blog.g0tmi1k.com/2011/08/basic-linux-privilege-escalation/
Automated Enumeration
git clone https://github.com/rebootuser/LinEnum.git
./LinEnum.shgit clone https://github.com/diego-treitos/linux-smart-enumerationgit clone https://github.com/pentestmonkey/unix-privesc-check.git
./unix-privesc-check
./unix-privesc-check standard > output.txtInformation Gathering
What's the OS? What version? What architecture?
cat /etc/issue cat /etc/*-release uname -i lsb_release -a (Debian based OSs)Who are we? Where are we?
id whoami pwdWho uses the box? What users? (And which ones have a valid shell)
cat /etc/passwd grep -vE "nologin|false" /etc/passwdWhat's currently running on the box? What active network services are there?
ps aux netstat -antupWhat's installed? What kernel is being used?
dpkg -l (Debian based OSs) rpm -qa (CentOS / openSUSE ) uname -a
Check sudo access
Mix cp/chown and chmod
https://www.adampalmer.me/iodigitalsec/2009/10/03/linux-c-setuid-setgid-tutorial/
https://www.hackingarticles.in/linux-privilege-escalation-using-suid-binaries/
Check Scheduled Tasks
https://github.com/DominicBreuker/pspy
Readable/Writable Files and Directories
Check history, bashrc, backup
Binaries That AutoElevate
Unmounted Disks
cat /etc/fstab /bin/lsblk mount
Last updated
Was this helpful?