githubEdit

Privilege Escalation

This page provides an overview of privilege escalation techniques. For detailed platform-specific guides, see:

General Methodology

1. Situational Awareness

# Who am I?
whoami
id
hostname

# What system is this?
uname -a                    # Linux
systeminfo                  # Windows
cat /etc/*release           # Linux distro

# Network information
ip a / ifconfig             # Linux
ipconfig /all               # Windows
netstat -antup              # Linux
netstat -ano                # Windows

2. Users & Groups

3. Running Processes & Services

4. Installed Software

5. Scheduled Tasks

Automated Enumeration Tools

Linux

Windows

Common Privilege Escalation Vectors

Linux

Vector
Description
Detection

SUID/SGID

Binaries running with elevated privileges

find / -perm -4000 2>/dev/null

Sudo misconfig

Commands allowed without password

sudo -l

Capabilities

Special kernel privileges

getcap -r / 2>/dev/null

Writable files

Config files, scripts

find / -writable 2>/dev/null

Cron jobs

Scheduled tasks with issues

cat /etc/crontab

Kernel exploits

Unpatched kernel

uname -a

NFS no_root_squash

Mountable shares

cat /etc/exports

Docker group

Container escape

id | grep docker

Windows

Vector
Description
Detection

Unquoted service paths

Service path without quotes

wmic service get name,pathname

Weak service permissions

Modifiable service binaries

accesschk.exe /accepteula -uwcqv *

AlwaysInstallElevated

MSI runs as SYSTEM

Registry check

Stored credentials

Cached passwords

cmdkey /list

DLL hijacking

Missing DLLs in PATH

Process Monitor

Token impersonation

Potato attacks

whoami /priv

Unpatched vulnerabilities

Missing KB

systeminfo

Quick Reference

GTFOBins (Linux)

LOLBAS (Windows)

Resources

Last updated

Was this helpful?