T1068

Exploitation for Privilege Escalation

Exploiting a bug in the kernel, a service or a privileged binary to become root or SYSTEM.

How it shows up on Hack The Box

On HTB these are known kernel exploits (PwnKit, DirtyPipe), Windows service CVEs or custom binaries with buffer overflows, format strings or race conditions.

Techniques in our catalog that match this one (the number is their machines):

Machines to practice it

Sorted from easiest to hardest. The ▶ link takes you to the minute of the IppSec video where it is used.

Guides

Commands

Taken from our cheatsheets and tool pages. Type your details and they are filled into every command.

Linux privilege escalation › Exploitation

PwnKit (pkexec, CVE-2021-4034)
ls -l /usr/bin/pkexec && pkexec --version
DirtyPipe (5.8 to 5.16.11, CVE-2022-0847)
uname -r
Automatic suggestions
./linux-exploit-suggester.sh

Windows and Active Directory privilege escalation › Windows

System and patches
systeminfo

Ghidra › Triage before opening Ghidra

Binary protections
checksec --file=./binario

pwntools › Offset

200-byte pattern
cyclic 200
Offset from the value that ends up in RIP/EIP
cyclic -l 0x6161616c

Tools