Seven days of advanced post-exploitation — Linux and Windows privilege escalation, Mimikatz credential harvesting, Active Directory attacks (Kerberoasting, Pass-the-Hash, DCSync, Golden Tickets), and lateral movement across enterprise networks. This is where pentesters separate from script kiddies.
THEORYLAB SUID · sudo Misconfigs · Cron · Kernel Exploits · PATH Hijacking
You have a shell. Now escalate. Getting initial access as www-data or a low-privilege user is just the beginning. Privilege escalation (privesc) is the art of moving from limited access to root. On Linux, there are seven reliable categories of escalation vectors. A methodical attacker checks all of them. linpeas.sh automates this entire checklist in under 60 seconds.
service), put a malicious binary earlier in PATH. SUID binary runs your version as root.gtfobins.github.io is your bible for SUID/sudo exploitation. It catalogs every Unix binary that can be abused to break out of restricted environments, escalate privileges, or exfiltrate data. For any SUID binary you find — check GTFOBins first before writing custom exploits.
sudo -l shows: (root) NOPASSWD: /usr/bin/python3 /opt/monitor.py. The file /opt/monitor.py is owned by root and not writable. How do you escalate to root?cat /opt/monitor.py. Then create the hijack module in a writable directory that\'s on the Python path.')">B Check what modules monitor.py imports, create a malicious module with the same name in a writable directory Python searches first (library hijacking)sudo python3 /opt/monitor.py -c "import os;os.system('/bin/bash')" to pass code via argumentsfind / -perm -4000 2>/dev/null. Look each up on gtfobins.github.io. Exploit at least one to get a root shell.sudo -l. Can your user run anything as root? Check GTFOBins for each allowed binary./etc/crontab and /etc/cron.d/. Are any scripts writable? Demonstrate the write-to-script technique.THEORYLAB Token Impersonation · Unquoted Paths · DLL Hijacking · AlwaysInstallElevated
Windows privesc is a different beast. The Windows security model — tokens, ACLs, services, registry — creates a uniquely rich attack surface. The most reliable technique in modern engagements is token impersonation — if you have SeImpersonatePrivilege (which service accounts like IIS and SQL Server always have), you can become SYSTEM in seconds.
Windows access tokens represent the security context of a process. Service accounts (IIS, MSSQL, network services) are granted SeImpersonatePrivilege — they can impersonate any user who connects to them. Potato attacks exploit this: create a fake COM server that SYSTEM connects to, then impersonate SYSTEM.
IIS APPPOOL\DefaultAppPool on a Windows Server 2019 web server. whoami /priv shows SeImpersonatePrivilege: Enabled. You upload GodPotato.exe but Windows Defender flags and deletes it. What is your next approach?TOOLLAB Meterpreter Commands · Hashdump · Persistence · Pivoting Concepts
Root is not the end goal — intelligence and persistence are. Professional red teamers don't just escalate and screenshot. They enumerate the internal network, harvest credentials, establish persistence, and map paths to the highest-value targets (Domain Controller, financial systems, source code). This is where you transition from "hacker" to "threat actor simulation."
| OBJECTIVE | WHY IT MATTERS | TOOL/TECHNIQUE |
|---|---|---|
| Situational Awareness | Where are you? What network? Who else is here? What's connected? | sysinfo, ipconfig, arp, route print, netstat |
| Credential Harvesting | Every credential found enables lateral movement or escalation | hashdump, Mimikatz, LaZagne, browser credential dumpers |
| Persistence | Survive reboots — clients patch fast after incidents | Registry run keys, scheduled tasks, service installation, startup folder |
| Internal Recon | Enumerate the internal network that was invisible from outside | arp_scanner, port_scan, ping sweep |
| Data Exfiltration Proof | Demonstrate business impact — what data could an attacker take? | download sensitive files, database dumps |
| Pivoting Setup | Use compromised host as gateway to reach isolated network segments | route add, socks proxy, port forwarding |
Your Kali machine can't reach 192.168.100.0/24 directly. But the compromised Windows machine has an interface on both 10.10.10.0/24 (where you are) AND 192.168.100.0/24 (the internal segment). You use the compromised host as a proxy — routing your traffic through it to reach previously unreachable targets.
ipconfig reveals two network interfaces: 10.0.0.5 (DMZ — where you came from) and 172.16.0.5 (internal corporate network — unreachable from your Kali). What is the correct Metasploit command sequence to scan the internal 172.16.0.0/24 network through your Meterpreter session (session ID 1)?nmap -sV 172.16.0.0/24 from Kali — the route is automatic once you have a sessionsessions -i 1 then run ipconfig in the session to scan from the compromised hostroute add 172.16.0.0/24 1, then use MSF scanner modules with RHOSTS set to the internal rangeportfwd add -l 8080 -p 80 -r 172.16.0.5 to forward each host individuallyTOOLLAB sekurlsa · LSASS · Pass-the-Hash · Pass-the-Ticket · Credential Hunting
Mimikatz changed everything. In 2011, Benjamin Delpy released a tool that could extract Windows plaintext passwords, NTLM hashes, and Kerberos tickets directly from LSASS (Local Security Authority Subsystem Service) memory. Windows was storing credentials in a reversible form for convenience — Mimikatz made that catastrophic. Even after Microsoft's WDigest mitigations, Mimikatz remains the most powerful credential harvesting tool in existence.
LSASS (lsass.exe) is a critical Windows process that manages authentication. It keeps credentials in memory to enable Single Sign-On. Mimikatz reads LSASS memory to extract these credentials. Requires SYSTEM or SeDebugPrivilege — which you get after privilege escalation.
Windows NTLM authentication doesn't require the cleartext password — it requires the hash. If you have an NTLM hash from Mimikatz, you can authenticate as that user without cracking it. This is Pass-the-Hash — one of the most impactful lateral movement techniques in Windows environments.
sekurlsa::logonpasswords shows Administrator's NTLM hash but the wdigest password field shows (null). What does this mean and does it stop your attack?THEORYLAB Kerberoasting · AS-REP Roasting · DCSync · Golden Ticket · Silver Ticket
Active Directory attacks are the crown jewels of offensive security. Kerberoasting and DCSync are used in virtually every real-world domain compromise. They exploit fundamental design decisions in the Kerberos protocol and AD replication — not implementation bugs. Understanding them makes you both a better attacker and a far better defender.
Any authenticated domain user can request a Kerberos service ticket (TGS) for any SPN (Service Principal Name) — this is by design. The TGS is encrypted with the service account's NTLM hash. You take it offline and crack it. Service accounts often have weak passwords and high privileges (SQL service accounts, backup agents, etc.).
Domain Controllers replicate with each other using MS-DRSR protocol. DCSync mimics a DC requesting replication — it dumps ALL password hashes in the domain without touching disk or running code on the DC. Requires Replicating Directory Changes rights (Domain Admins, NTDS.DIT sync accounts, or misassigned replication rights in BloodHound).
TOOLLAB PSExec · WMI · RDP Abuse · BloodHound Paths · CrackMapExec
Lateral movement is how attackers spread from a beachhead to high-value targets. Compromising a helpdesk workstation is the beginning. The end goal is the Domain Controller, the financial system, or the source code repository. Each hop uses harvested credentials, token impersonation, or forged tickets to authenticate to the next machine. The BloodHound path you mapped in Week 3 becomes your attack roadmap here.
| TECHNIQUE | PROTOCOL | REQUIRES | LEAVES LOGS | TOOL |
|---|---|---|---|---|
| PSExec | SMB (445) | Admin share access (C$) | Yes — service created in Event Log | impacket-psexec, CrackMapExec |
| WMI | DCOM (135+) | Local admin on target | Minimal — no service created | impacket-wmiexec, CrackMapExec |
| WinRM | HTTP/S (5985/5986) | Remote Management Users group | Minimal | evil-winrm |
| RDP | RDP (3389) | Remote Desktop Users group | Yes — logon events | xfreerdp, Restricted Admin Mode for PtH |
| Pass-the-Hash via SMB | SMB (445) | NTLM hash + local admin | Minimal | CrackMapExec, Impacket |
| Pass-the-Ticket | Kerberos (88) | Valid Kerberos ticket | Minimal — looks like normal Kerberos | Mimikatz, Rubeus |
LAB End-to-End AD Compromise · MITRE ATT&CK Mapping · Week 5 Review
Week 5 complete. You've covered the full post-exploitation lifecycle — from landing as a low-privilege user to forging Golden Tickets that give permanent domain control. Today maps your techniques to MITRE ATT&CK and runs a complete simulated AD compromise.
| DAY | TOPIC | KEY TECHNIQUE | TOOL |
|---|---|---|---|
| 29 | Linux PrivEsc | SUID GTFOBins, sudo misconfig, cron hijack, kernel exploits | linpeas.sh, GTFOBins |
| 30 | Windows PrivEsc | Token impersonation (Potato), unquoted paths, AlwaysInstallElevated | winpeas, GodPotato, PrintSpoofer |
| 31 | Post-Exploitation I | Internal recon, persistence (registry/cron), pivoting via routes | Meterpreter, proxychains |
| 32 | Mimikatz | LSASS dump, Pass-the-Hash, Pass-the-Ticket | mimikatz, CrackMapExec, Impacket |
| 33 | AD Attacks | Kerberoasting, AS-REP Roasting, DCSync, Golden Ticket | GetUserSPNs, Impacket, Mimikatz |
| 34 | Lateral Movement | PSExec, WMI, WinRM, RDP-PtH, BloodHound path following | evil-winrm, wmiexec, CrackMapExec |
| 35 | Full Chain | End-to-end: foothold → privesc → credential dump → lateral → DA | Everything |
Week 5 Readiness Check: Before Week 6, verify you can: (1) Run linpeas on a Linux machine and identify + exploit at least one SUID binary using GTFOBins. (2) Use GodPotato or PrintSpoofer to escalate from a service account to SYSTEM on Windows. (3) Extract credentials with Mimikatz sekurlsa::logonpasswords and use the NTLM hash for Pass-the-Hash with CrackMapExec. (4) Run Kerberoasting with impacket-GetUserSPNs and crack the resulting hash with Hashcat mode 13100. (5) Complete at least one HackTheBox Active Directory machine (Active, Forest, or Sauna) independently.