1. Intro

Enumeration is key to privilege escalation. Several helper scripts exist to assist with enum, but its important to know what pieces of information to look for to be able to perform enumeration manually. When you gain initial shell access, it's important to check several key details:

  1. OS Version
    1. Knowing distribution will give you an idea of available tools, and if the version itself is exploitable
  2. Kernel version
    1. Similar to above. Public pocs for kernel version. These are dangerous. Know what they do before trying in a prod system
  3. Running services
    1. Knowing what svcs are running is important, especially those run as root. Misconfig/vulnerable services running as root can be easy win for privesc. Flaws are discovered in many common svcs (Nagios, Exim, Smba, ProFTPd, etc)
    2. Public PoCs exist for many of them.
ps aux | grep root

Installed packages and versions

Logged-in users

User home directories

Sudo privileges

Configuration files

Cron jobs

Unmounted file systems and additional drives

SETUID and SETGID permissions

Writeable directories

Writeable files