Overview
Linux is the dominant operating system in server environments, cloud infrastructure, and embedded systems. Understanding its internals is essential for both offensive security and hardening. This page covers the foundational concepts needed before diving into privilege escalation techniques.Privilege Escalation Checklist
The best automated tool for Linux local privilege escalation enumeration is LinPEAS.System Information
Check PATH and Environment
Look for writable folders in PATH and sensitive data in environment variables.
Key Checklist Areas
Drives and Filesystems
Drives and Filesystems
- List mounted and unmounted drives
- Check
/etc/fstabfor credentials - Look for writable mount points
Installed Software and Processes
Installed Software and Processes
- Check for useful and vulnerable software
- Monitor running processes for privilege misconfigurations
Scheduled Jobs (Cron)
Scheduled Jobs (Cron)
- Look for writable cron scripts or PATH abuse
- Check for wildcard injection opportunities
Services and Timers
Services and Timers
- Check for writable
.servicefiles - Look for writable binaries executed by services
- Enumerate systemd timers
Sockets and D-Bus
Sockets and D-Bus
- Identify writable Unix domain sockets
- Check for exploitable D-Bus services
Network Enumeration
Network Enumeration
- Map the network position and open ports
- Check for sniffable traffic
Users and Groups
Users and Groups
- Enumerate all users, groups, and superusers
- Check clipboard and password policy
SUDO and SUID
SUDO and SUID
- Review sudo permissions with GTFOBins
- Find exploitable SUID binaries
Capabilities and ACLs
Capabilities and ACLs
- Check for unexpected Linux capabilities
- Look for unusual ACLs on files
SSH and Interesting Files
SSH and Interesting Files
- Review SSH configuration and keys
- Search profile files, shadow, and backup files
Linux Security Mechanisms
AppArmor
Mandatory access control system that restricts program capabilities using per-program profiles.
SELinux
Security-Enhanced Linux provides fine-grained mandatory access control policies for processes and files.
ASLR
Address Space Layout Randomization randomizes memory addresses to mitigate memory exploitation.
Capabilities
Linux capabilities split root privileges into distinct units that can be independently granted.