Skip to main content

The Mindset

  • Who am I? — Your current user, privileges, and group memberships.
  • Where am I? — The OS, kernel, architecture, and how the system is set up.
  • What’s around me? — Users, services, network, files, and misconfigurations.
You cannot escalate privileges without first enumerating the system. If you’re stuck, you haven’t gathered enough information — step back and dig deeper.

The Enumeration Checklist

At minimum, collect the following before moving on:

Who Am I?

whoami — Current Username

The most basic check. Always run this first on any new shell.

id — User Identity & Group Memberships

This is whoami on steroids. It reveals your UID, GID, and every group you belong to.
Output breakdown:
  • uid — Your numeric user ID. 0 = root. 1000+ = regular user.
  • gid — Your primary group, usually created alongside your user account.
  • groups — Every group you belong to. This is what matters for privilege escalation.
What to look for in the output:
Any non-standard group is worth investigating. Custom groups often grant access to specific applications or files that weren’t locked down properly.

Where Am I? — System Details

All of the following answer the same question: what exactly is this machine? Run them together as a block.

hostname — Machine Name

Hostnames often reveal the machine’s role (e.g., db-prod-01, web-dev, dc01). This context matters for lateral movement and understanding the environment.

uname — Kernel & OS Information

uname -a output breakdown:
Take uname -r output and search it directly: searchsploit linux kernel 4.15.0 or Google "4.15.0-99-generic exploit". An unpatched kernel is often a direct path to root.

/etc/os-release — OS Name & Version

/proc/version — Kernel + Compiler Info

lscpu — CPU Architecture

pwd — Current Working Directory


Who Else Is Here?

All Users on the System

Currently Logged-In Users

Sudo Rights


Environment & Path

Things to look for in the environment:
  • PATH entries pointing to writable directories (PATH hijacking)
  • AWS_*, DOCKER_*, TOKEN, KEY, SECRET variables
  • HISTFILE location — command history can contain credentials

Next: Finding Files & Directories — hunting config files, credentials, and interesting artifacts.