offensive-mitigations
Security mitigation reference and bypass catalog: ASLR, DEP/NX, RELRO, stack canaries, CFI, sandboxing, seccomp. Covers both detection of enabled mitigations and known bypass techniques. Use when assessing target hardening or planning exploit mitigation bypasses.
Install / Use
npx skills add SnailSploit/Claude-Red --skill offensive-mitigationsInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
SecuritySupported Platforms
Our assessment of offensive-mitigations
offensive-mitigations scores 87/100 on our quality scale, 679th of 1,108 Security skills we index.
Its SKILL.md is 57 KB long, well organised into 199 sections with 5 code examples: long enough that it reads more like full documentation than a focused instruction file, which agents can find harder to follow.
With 6,850 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so offensive-mitigations is actively maintained.
- Our last check on 2026-11-02 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-09-29. Automated pattern scan on 2026-09-28. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
offensive-mitigations compared with similar skills
All 4 of these similar skills score higher than offensive-mitigations; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| offensive-mitigations (this skill)by SnailSploit | 87 | 6.8k | 58d ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 112.3k | 8d ago | CLAUDE.md |
| x402by browser-use | 100 | 121.0k | 3d ago | SKILL.md |
| algorithmic-artby anthropics | 100 | 177.9k | 55d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 55d ago | SKILL.md |
Frequently asked questions
- How do I install offensive-mitigations?
- Run
npx skills add SnailSploit/Claude-Red --skill offensive-mitigations. The install tabs above show the steps for each supported agent. - Which AI agents does offensive-mitigations work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is offensive-mitigations safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is offensive-mitigations still maintained?
- The repository was last updated about 2 months ago, so offensive-mitigations is actively maintained.
Skill content
View source on GitHubSKILL: Modern Kernel Exploit Mitigations
Metadata
- Skill Name: security-mitigations
- Folder: offensive-mitigations
- Source: https://github.com/SnailSploit/offensive-checklist/blob/main/mitigations.md
Description
Security mitigation reference and bypass catalog: ASLR, DEP/NX, RELRO, stack canaries, CFI, sandboxing, seccomp. Covers both detection of enabled mitigations and known bypass techniques. Use when assessing target hardening or planning exploit mitigation bypasses.
Trigger Phrases
Use this skill when the conversation involves any of:
mitigations, ASLR bypass, DEP bypass, NX bypass, RELRO, stack canary bypass, CFI bypass, sandbox bypass, seccomp bypass, mitigation detection, checksec
Instructions for Claude
When this skill is active:
- Load and apply the full methodology below as your operational checklist
- Follow steps in order unless the user specifies otherwise
- For each technique, consider applicability to the current target/context
- Track which checklist items have been completed
- Suggest next steps based on findings
Full Methodology
Modern Kernel Exploit Mitigations
Memory-safety & Isolation
Kernel Address Space Layout Randomization (KASLR)
- Randomizes memory addresses where the kernel and its components are loaded.
- Makes it difficult for attackers to predict kernel code and data locations.
Bypass Techniques
- Information Leaks: Exploiting vulnerabilities (e.g., uninitialized memory, side-channels) to leak kernel pointers and calculate the base address.
- Side-Channel Attacks: Using timing, cache, or other microarchitectural side channels to infer memory layout.
- Prefetch Cache Timing: Measures access speed across the kASLR range (0xfffff80000000000 to 0xfffff80800000000, ~0x8000 iterations with 0x100000 alignment). The fastest access indicates a cached address, revealing the actual kernel base. Uses
rdtscpfor timing,mfencefor memory barriers, andprefetchnta/prefetcht2for cache manipulation.
- Prefetch Cache Timing: Measures access speed across the kASLR range (0xfffff80000000000 to 0xfffff80800000000, ~0x8000 iterations with 0x100000 alignment). The fastest access indicates a cached address, revealing the actual kernel base. Uses
- Targeting Non-Randomized Regions: Exploiting data or code segments that are not fully randomized.
- Brute-Force: Feasible in environments with limited entropy (e.g., some 32-bit systems or specific configurations).
- Intel LAM: Linear Address Masking support exists on recent kernels/CPUs but may be disabled by default. Verify with kernel config, boot params, and CPU flags on your target.
Kernel Page Table Isolation (KPTI)
- Linux:
- Separates user-space and kernel-space page tables.
- Mitigates the Meltdown vulnerability by preventing user-space access to kernel memory.
Bypass Techniques
- Side-Channel Attacks: Exploiting microarchitectural side channels (e.g., TLB timing, cache attacks) that leak information across the isolation boundary.
- Hardware Vulnerabilities: Exploiting CPU vulnerabilities (e.g., L1TF, MDS) that can bypass page table separation.
- Implementation Flaws: Bugs in the KPTI implementation itself.
Practitioner
- Linux: check status via
/sys/devices/system/cpu/vulnerabilities/*anddmesg | grep -i kpti. - Windows: verify meltdown/KVA shadowing with
Get-SpeculationControlSettingsPowerShell script from Microsoft.
Supervisor Mode Access Prevention (SMAP)
- Linux:
- Hardware feature preventing unintended kernel access to user-space memory.
- Protects against attacks exploiting improper memory accesses.
Bypass Techniques
- ROP/JOP Gadgets: Finding instruction sequences (gadgets) within kernel code that disable SMAP temporarily (e.g., via
stacinstruction) before accessing user memory. - Data-Only Attacks: Attacks that achieve their goal without directly accessing user-space data from the kernel inappropriately.
- Kernel Information Leaks: Combining with KASLR bypasses to find suitable gadgets.
Practitioner
- Linux: confirm with
grep smap /proc/cpuinfoandcat /proc/cpuinfo | grep 'smep\|smap'. - Check CR4 at runtime with
rdmsr/wrmsrtools orlscpu -eon supported systems.
Supervisor Mode Execution Protection (SMEP)
- Linux/Windows:
- Hardware feature preventing execution of user-space code when in supervisor mode.
- Located in bit 20 of the CR4 control register.
- Blocks certain privilege escalation attacks that rely on executing shellcode in user-mode memory.
Bypass Techniques
- ROP/JOP Chains: Constructing code reuse chains entirely from existing kernel code, avoiding execution of user-space code.
- Data-Only Attacks: Exploiting vulnerabilities without needing to execute shellcode (e.g., overwriting kernel data structures).
- Disabling SMEP: Finding gadgets or techniques to modify the CR4 control register to disable SMEP.
- Type Confusion Exploits: Using type confusion vulnerabilities to gain control flow and build ROP chains for SMEP bypass.
- Page Table Manipulation: Modifying page table entries (PTEs) to change user pages to supervisor pages, making user-space code executable in kernel context.
- Write-What-Where Primitives: Using arbitrary write vulnerabilities to modify CR4 register or page table structures.
Practitioner
- Linux:
grep smep /proc/cpuinfo; verify effective state viadmesg | grep -i smep. - Windows: SMEP is enforced when Memory Integrity/HVCI is enabled on modern systems.
Kernel Data Protection (KDP)
- Windows:
- Marks certain kernel memory regions as read-only.
- Prevents unauthorized modification of critical kernel data structures.
Practitioner
- Check with
Get-CimInstance -ClassName Win32_DeviceGuardandSystem Information → Device Guard propertiesfor KDP/HVCI/VBS.
Memory Integrity (Core Isolation)
- Windows:
- Uses virtualization and HVCI to prevent malicious code alteration.
- Guards against code injection or execution in kernel mode.
Practitioner
- Enable/verify: Windows Security → Device Security → Core isolation details.
- PowerShell:
Get-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity | Select-Object Enabled.
Read-Only Data Sections (RODATA)
- Linux:
- Marks specific kernel memory regions as read-only.
- Prevents modification of critical data structures and code.
Hardened Usercopy
- Linux:
- Adds boundary checks to memory copy operations between user and kernel space.
- Prevents buffer overflows and memory corruption during copy operations.
Memory Tagging Extension (MTE)
- Linux (ARM):
- Hardware-assisted memory safety feature to detect memory corruption bugs.
- Mitigates use-after-free and buffer overflows at a hardware level.
- Adopted as a production security feature in Android 16 (March 2025) with both asynchronous and synchronous detection modes available for apps.
How MTE Works
- 4-bit Tags: Each 16-byte memory allocation receives a random 4-bit tag (values 0-15)
- Pointer Tagging: Upper bits of pointers store the allocation tag
- Tag Checking: Hardware validates pointer tag matches memory tag on every dereference
- Fault on Mismatch: Invalid access triggers
SIGSEGV(sync mode) or logs asynchronously (async mode)
Bypass Techniques
- Tag Collision (Probabilistic): With only 4-bit tags (16 possible values), collision probability is high
- Increase entropy with larger allocation pools; Android 16 uses tag rotation heuristics.
- Untagged Memory Regions: Not all memory is MTE-protected
- Enable MTE on stack via
prctl(PR_MTE_TCF_SYNC, PR_TAGGED_ADDR_ENABLE).
- Enable MTE on stack via
- Asynchronous Mode Exploitation: Android's async mode delays fault reporting for performance
- Use synchronous mode (
MTE_mode=sync) for security-critical apps.
- Use synchronous mode (
- Integer Overflow in Tag Calculation: MTE tags are derived from allocation size; overflow can corrupt tags
- Kernel-Space Bypass: MTE only protects userspace by default
- Kernel allocations (
kmalloc,vmalloc) don't use MTE (Android 16, Linux 6.8) - Kernel exploit primitives (KASLR leak, arbitrary write) unaffected
- Syscall buffer handling may not validate tags
- Kernel allocations (
- JIT Code Execution: JIT-compiled code can bypass MTE checks
; Assembly gadget to create untagged pointer
mov x0, xzr ; Zero out tag bits
orr x0, x0, #0x1000 ; Set address without tag
ldr x1, [x0] ; Load from untagged pointer (no MTE check)
Exploitation Workflow:
- Leak a tagged pointer
- Strip tag bits (mask upper 8 bits)
- Use untagged pointer for memory operations
- MTE doesn't validate untagged accesses in some contexts
Practitioner
- Android: enable per‑app via Developer Options or
adb shell setprop persist.device_config.runtime_native_boot.mte_mode sync(device‑specific). - Linux: compile with
CONFIG_ARM64_MTEand useprctl(PR_SET_TAGGED_ADDR_CTRL, ...)from user space. - Verify MTE status:
cat /proc/cpuinfo | grep mteand checkHWCAP2_MTEingetauxval(AT_HWCAP2) - Android 16+ apps: opt-in via manifest
<application android:memtagMode="sync">
Intel Linear Address Masking (LAM)
Intel allows software to use upper address bits for metadata, similar to ARM's Top Byte Ignore (TBI).
How LAM Works
- LAM57: Uses bits 62:57 (6 bits) for tags in 5-level paging
- LAM48: Uses bits 62:48 (15 bits) for tags in 4-level paging
- Hardware Masking: CPU ignores tagged bits during address translation
- Use Cases: Memory tagging, capability systems, garbage collection metadata
- Vulnerability Classes:
- Pointer Forge: Attackers can craft tagged pointers without validation
- Info Leak Bypass: Some sanitizers only check canonical addresses; LAM-tagged pointers pass checks
- Address Confusion: Software assuming canonical addresses may mishandle LAM pointers
Memory Sealing
- Linux:
mseal()permanently seals selected VMAs so permissions/mappings can no longer change—even by the owner (verify kernel version and libc support on your target).- Adopted by projects such as Chrome/glibc/BPF tool‑chains to seal JIT pages, locking down GOT/PLT and eBPF JIT regions (version‑specific; verify).
Bypass Techniques
- Time‑of‑use Window: Exploits must succeed before sealing.
- Data‑only Abuse: Still possible if the mapping remains writable.
- Kernel Flaws: Bugs in the
mseal()path could bypass a seal.
Practitioner
- Verify
msealavailability viagrep -R sys_mseal /proc/kallsymsor kernelsymbols. - Userland:
prctl(PR_MSEAL, ...)(glibc 2.41+ headers), check errno forENOSYSon older kernels.
Privileged Access Never (PAN)
- Linux (ARM):
- Hardware feature preventing direct kernel access to user-space memory.
- Similar concept to SMAP on x86, prevents certain data leakage/corruption bugs.
Kernel DMA Protection
- Windows:
- Uses IOMMU/VT-d to protect against malicious peripherals performing DMA attacks.
- Prevents unauthorized memory access via hardware devices.
Pluton Security Processor
- Windows:
- Microsoft Pluton is increasingly deployed with newer platforms, replacing or augmenting discrete TPM 2.0 and hardware‑binding BitLocker keys, Secure Boot, and HVCI policies. Check OEM/SKU documentation for Copilot+ requirements.
Practitioner
- Check Pluton state in Device Manager → Security devices, or
tpm.mscshows Pluton‑backed TPM if present.
Memory Protection Keys (MPK)
- Linux:
- Provides per-page memory permissions using hardware keys.
- Allows fine-grained control over memory access rights.
Bypass Techniques
- PKRU Register Manipulation: Using gadgets to modify the Protection Key Rights Register.
- Unprotected Memory: Targeting memory regions not protected by MPK.
- Implementation Bugs: Exploiting flaws in the MPK implementation.
- Side-Channel Attacks: Using side channels to infer protected memory contents.
Protection Keys for Supervisor (PKS)
- Linux/Intel:
- Extends PKU to supervisor pages; the kernel flip
Truncated for display — read the full file on GitHub.
Related Skills
Agent-Reach
112.3kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
x402
121.0kSet up Browser Use Cloud payments with x402 — pay per request from a crypto wallet (USDC on Base mainnet), no signup or API key.
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
