TechBizAcademy

15Linux Privilege Escalation: From User to Root

Enumerate sudo rules, SUID binaries, cron jobs and writable paths, then escalate — and record the hardening.

0 / 0
root@techbiz-lab — practice range
root@techbiz-lab:~#

About this lab

Privilege escalation is turning the access you have into the access you want. On Linux it is almost always enumeration rather than exploitation: the misconfiguration is already there, and the work is noticing it.

The usual suspects are a sudo rule that is wider than intended, a SUID binary that can be made to do something it was not meant to, a cron job running as root from a writable path, and credentials sitting in a world-readable file.

What you will do

  1. Establish who you are and what you can already do, starting with sudo -l.
  2. Find SUID binaries and check them against known escape techniques.
  3. Look for cron jobs running as root, and check whether anything they touch is writable by you.
  4. Search configuration files and history for credentials.
  5. Escalate to root and record exactly which misconfiguration allowed it.

Where this is used

A shell as www-data is a finding; root on the same host is a different conversation. On the defensive side, the same checklist is a hardening review — run it against your own servers and fix what it finds.

Simulated environment — no real systems are contacted. Only ever test systems you own or are authorised in writing to test.