You've got a shell on a Linux box - now what? Before exploiting anything, you need to understand the system. Enumeration is the systematic process of gathering information that reveals privilege escalation paths.
Think of it like being a burglar who got into a house. Before looking for valuables, you need to know: Where are the rooms? Who lives here? What's locked? What's not? The more you know, the better your choices.
Enumeration is 80% of the Work
In CTFs and real engagements, most of your time should be spent enumerating. A thorough enumeration often reveals easy wins that brute-force or complex exploits never would.
System Information
Kernel Version Matters
Write down the exact kernel version. Later, you'll search for kernel exploits like DirtyCow or DirtyPipe that work on specific versions.
Users and Groups
Password Information
Sudo Permissions
Sudo -l is Essential
ALWAYS run "sudo -l" early in enumeration. It's the most common easy win in CTFs and real systems. Many admins misconfigure sudo.
Files and Permissions
Sensitive Files
Network Information
Processes and Services
Installed Software
Version Numbers are Gold
Write down version numbers of common software. Specific versions have known CVEs. "sudo 1.8.31" might be vulnerable to Baron Samedit!
Scheduled Tasks
Enumeration Methodology
Systematic Enumeration
1
Quick Winssudo -l, SUID binaries, bash history
2
System InfoKernel version, OS, architecture
3
UsersWho's on the system, interesting groups
4
FilesSensitive files, writable locations
5
NetworkInternal services, other hosts
6
ProcessesWhat's running as root
7
ScheduledCron jobs, systemd timers
8
SoftwareVersions for known CVEs
Knowledge Check
Challenges
Key Takeaways
- Always run "sudo -l" first - it's often the easy win
- SUID binaries run as owner - find them with find -perm -4000
- Check ~/.bash_history for leaked credentials
- Note kernel and software versions for CVE lookup
- World-writable files and directories are potential targets
- Systematic enumeration beats random exploitation attempts