offensive-windows-mitigations
This skill provides a comprehensive methodology for understanding Windows exploit mitigations including ASLR, DEP/NX, CFG, CET, SEHOP, Heap Guard, and ACG. Use it when researching how these protections work, learning to detect active mitigations on target systems, testing exploits against protected binaries, or preparing to study mitigation bypass techniques in subsequent training modules.
git clone --depth 1 https://github.com/SnailSploit/Claude-Red /tmp/offensive-windows-mitigations && cp -r /tmp/offensive-windows-mitigations/Skills/infrastructure/offensive-windows-mitigations ~/.claude/skills/offensive-windows-mitigationsSKILL.md
# SKILL: Week 6: Understanding Windows Mitigations ## Metadata - **Skill Name**: windows-mitigations - **Folder**: offensive-windows-mitigations - **Source**: https://github.com/SnailSploit/offensive-checklist/blob/main/6-windows-mitigations.md ## Description Deep-dive on Windows exploit mitigations: ASLR, DEP/NX, CFG, CET/Shadow Stack, SEHOP, Heap Guard, ACG, Arbitrary Code Guard. Covers both the protection mechanism and known bypass techniques. Use when researching Windows exploit mitigations, planning bypass strategies, or understanding protection depth. ## Trigger Phrases Use this skill when the conversation involves any of: `Windows mitigations, ASLR, DEP, NX, CFG, CET, shadow stack, SEHOP, heap guard, ACG, mitigation bypass, exploit mitigation, Windows hardening` ## Instructions for Claude When this skill is active: 1. Load and apply the full methodology below as your operational checklist 2. Follow steps in order unless the user specifies otherwise 3. For each technique, consider applicability to the current target/context 4. Track which checklist items have been completed 5. Suggest next steps based on findings --- ## Full Methodology # Week 6: Understanding Windows Mitigations ## Overview _created by AnotherOne from @Pwn3rzs Telegram channel_. Last week you learned basic exploitation in an environment without protections. This week, you'll learn about the defensive mechanisms that modern Windows systems employ to prevent those attacks. Understanding these mitigations is essential before learning to bypass them (Week 8). Week 7 continues with enterprise security topics (offensive reconnaissance, Windows 11 24H2/25H2 mitigations, cross-platform defenses). **This Week's Focus**: - Understand how each mitigation works - Learn to detect active mitigations - Verify mitigation effectiveness - Test exploits against protected binaries - Prepare for Week 7's boundaries and Week 8's bypass techniques ### Prerequisites Before starting this week, ensure you have: - Completed Week 5: Basic Exploitation (Linux) - you should be able to exploit stack overflows, build ROP chains, and use pwntools - A Windows 11 VM (isolated, snapshot before each exercise) - Visual Studio 2022 Build Tools installed - WinDbg Preview installed - Basic familiarity with x64 assembly and calling conventions ### Week 6 Deliverables By the end of this week, you should have completed the following: - [ ] **Lab Environment**: Windows 11 VM with Visual Studio Build Tools, WinDbg Preview, and Sysinternals installed - [ ] **Test Binaries**: Compiled `vulnerable_suite_win_mitigated.c` and `vuln_server_win.c` with various mitigation flags - [ ] **DEP Verified**: Demonstrated DEP blocking shellcode execution with crash analysis (Exception Code 0xC0000005, Param 8) - [ ] **ASLR Measured**: Recorded addresses of `check_aslr.exe` across 3 reboots and documented randomization behavior - [ ] **Stack Cookie Tested**: Triggered `/GS` cookie check failure and analyzed in WinDbg - [ ] **CFG Validated**: Demonstrated CFG blocking indirect call to invalid target - [ ] **Crash Dumps Analyzed**: Created at least 3 crash dumps and identified which mitigation caused each termination using `!analyze -v` - [ ] **Week 5 Exploit Retesting**: Re-ran Week 5 exploits against mitigated binaries and documented failures - [ ] **Mitigation Audit Report**: Generated system-wide and per-binary mitigation audit using PowerShell scripts - [ ] **Hardening Capstone**: Completed the SecureServer v1.0 hardening exercise (Day 7) ### Context Why Mitigations Matter: Modern exploits chain multiple vulnerabilities and bypass layers of protection. Understanding mitigations helps you: - Recognize when an exploit is blocked vs. when it succeeds - Analyze crash dumps to identify exploitation attempts - Design defense-in-depth strategies - Prepare for Weeks 7-8 (advanced mitigations and bypass techniques) **Recent CVEs Demonstrating Mitigation Importance**: | CVE | Vulnerability | Mitigations Involved | Outcome | | -------------- | ------------------------------- | -------------------- | ------------------------------------- | | CVE-2024-21338 | AppLocker (appid.sys) EoP | KASLR, SMEP, kCFG | Admin-to-Kernel bypass of kCFG | | CVE-2024-30088 | Authz Kernel TOCTOU | KASLR, SMEP, CFG | Exploited via race condition | | CVE-2023-36802 | MSKSSRV Object Type Confusion | KASLR, SMEP, CFG | Pool spray + type confusion to EoP | | CVE-2025-29824 | CLFS Driver Use-After-Free | KASLR, SMEP | Zero-day exploited in wild (Apr 2025) | | CVE-2024-49138 | CLFS Heap-Based Buffer Overflow | DEP, ASLR, KASLR | EoP exploited in wild (Dec 2024) | | CVE-2023-32019 | Windows Kernel Info Disclosure | KASLR | Leaked kernel memory bypassing KASLR | | CVE-2023-28252 | CLFS Driver EoP | KASLR, SMEP | Abused CLFS log file parsing | | CVE-2022-34718 | Windows TCP/IP RCE (EvilESP) | DEP, ASLR, CFG | Required sophisticated heap grooming | **Connection to Week 4 (Crash Analysis)**: When you receive a crash dump, the exception codes reveal which mitigation stopped the exploit: ```text Week 4 Crash Analysis -> Week 6 Mitigation Identification ───────────────────────────────────────────────────────── Process Exit Code WinDbg Exception Code Mitigation ────────────────────── ───────────────────── ────────── 0xC0000005 (Param[0]=8) 0xC0000005 DEP violation (execute on NX page) 0xC0000409 0xC0000409 (subcode 2) /GS stack cookie corruption 0x80000003 0xC0000409 (subcode 10) CFG indirect call validation failed 0x80000003 0xC0000407 CET shadow stack mismatch 0xC0000374 0xC0000374 Heap integrity check failed IMPORTANT: Python/cmd see the PROCESS E
Active Directory attack methodology for internal network red team engagements. Covers reconnaissance (BloodHound, PowerView, ADExplorer), credential abuse (Kerberoasting, ASREProasting, NTLM relay, LLMNR/NBT-NS poisoning), privilege escalation (ACL abuse, GPO abuse, unconstrained/constrained delegation), lateral movement (Pass-the-Hash, Pass-the-Ticket, Overpass-the-Hash, WMI/WinRM/PsExec), persistence (Golden/Silver/Diamond Tickets, DCSync, DCShadow, AdminSDHolder, Skeleton Key), forest trust attacks, ADCS abuse (ESC1-ESC15), and modern MDI/Defender for Identity evasion. Use when assessing on-prem AD, hybrid AD/Entra ID environments, or ADCS deployments.
JWT attack methodology for penetration testers. Covers algorithm confusion (alg:none, RS256→HS256), weak HMAC secret brute force, kid parameter injection (SQLi, path traversal), jku/x5u/jwk header injection, JWKS cache poisoning, JWS/JWE confusion, timing attacks, and mobile JWT storage extraction. Use when testing JWT-based authentication, hunting auth bypass via token manipulation, or evaluating JWT implementation security in web or mobile apps.
Cloud security attack methodology covering AWS, Azure, and GCP. Includes credential harvesting (IMDS, ~/.aws, env vars, leaked CI secrets, instance roles), enumeration with cloud-specific tools (pacu, ScoutSuite, Prowler, ROADtools, gcp_enum), privilege escalation paths (IAM PassRole, AssumeRole chains, Lambda/Functions privilege flips, Azure Owner-on-self, GCP serviceAccountTokenCreator), persistence techniques (IAM user/key creation, AAD app registration, GCP svc account key creation, EventBridge/Logic Apps backdoors), data exfiltration (S3/Blob/GCS, snapshot share, RDS/CosmosDB/Cloud SQL exfil), cloud-native lateral movement (cross-account assume, Azure AD multi-tenant, GCP project hierarchy), serverless attacks (Lambda env vars, layer hijack, Step Functions), Kubernetes-on-cloud (EKS/AKS/GKE-specific paths to node and AWS metadata), and CSPM evasion (CloudTrail blind spots, GuardDuty mute, Sentinel rule shaping). Use when the engagement scope is cloud accounts, when you've stolen cloud credentials, or when assessing cloud posture.