Home Linux Privilege Escalation SUID Binary Privilege Escalation
easy Live now Linux · Privilege Escalation

SUID Binary Privilege Escalation

A stray SUID bit on the wrong binary is an instant root. Drill enumerating and abusing SUID binaries until it's automatic.

Enumerate SUID-root binaries with `find / -perm -4000 -type f`, recognize the one that doesn't belong among the system defaults, and abuse it (a SUID shell with `-p`, `find -exec`, and friends) to read the root flag.

Each rep seeds a different SUID binary, so you learn to spot the anomaly rather than recall a single trick.

How the attack works

  1. List every SUID-root binary on the host. find / -perm -4000 -type f 2>/dev/null
  2. Pick out the binary that isn't a normal system default — that's the seeded flaw.
  3. Abuse it with its GTFOBins SUID payload to run as root (note the -p to preserve euid). find . -exec /bin/sh -p \; -quit
  4. Read the root-owned flag. cat /root/flag.txt

On PwnKata the binary, account, and paths change every rep — so you drill the recognition, not this exact command.

What you'll practice

SUIDGTFOBinslinux privilege escalationprivesc practice

Sourced from

drill workspace · session live
easy

SUID Binary Privilege Escalation

A stray SUID bit on the wrong binary is an instant root. Drill enumerating and abusing SUID binaries until it's automatic.

Objective

Recover the flag at /root/flag.txt and submit it.

Drill this now

Spin up a live isolated target and start practicing in seconds — free.

Start drilling