Concepts / Exploitation and privilege escalation

Exploitation and privilege escalation

Privilege escalation

Also called privesc, local privilege escalation, getting root, escalation to root

Turning a limited login on a host into full control, by abusing one thing the system was left doing wrong.

One local flaw is the step to root
One local flaw is the step to root

An ordinary login becomes root through a single misconfiguration. Looking around first (id, sudo -l, a search for setuid files) is how that flaw is found.

Privilege escalation is turning a limited login on a host into root (uid=0). It abuses one local flaw: a sudo rule that runs a program as root, a [[setuid]] binary owned by root, a writable service file, or a root cron job. Finding the flaw comes first: id, sudo -l, find / -perm -4000. The defence is least privilege: never grant a command that can launch other commands.

See it on real machines

Read next

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Sign in with Google or email to start.

Start this lab