Loading...
Loading...
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.
npx skill4agent add snailsploit/claude-red offensive-mitigationsmitigations, ASLR bypass, DEP bypass, NX bypass, RELRO, stack canary bypass, CFI bypass, sandbox bypass, seccomp bypass, mitigation detection, checksecrdtscpmfenceprefetchntaprefetcht2/sys/devices/system/cpu/vulnerabilities/*dmesg | grep -i kptiGet-SpeculationControlSettingsstacgrep smap /proc/cpuinfocat /proc/cpuinfo | grep 'smep\|smap'rdmsrwrmsrlscpu -egrep smep /proc/cpuinfodmesg | grep -i smepGet-CimInstance -ClassName Win32_DeviceGuardSystem Information → Device Guard propertiesGet-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity | Select-Object EnabledSIGSEGVprctl(PR_MTE_TCF_SYNC, PR_TAGGED_ADDR_ENABLE)MTE_mode=synckmallocvmalloc; 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)adb shell setprop persist.device_config.runtime_native_boot.mte_mode syncCONFIG_ARM64_MTEprctl(PR_SET_TAGGED_ADDR_CTRL, ...)cat /proc/cpuinfo | grep mteHWCAP2_MTEgetauxval(AT_HWCAP2)<application android:memtagMode="sync">mseal()mseal()msealgrep -R sys_mseal /proc/kallsymssymbolsprctl(PR_MSEAL, ...)ENOSYStpm.mscwrmsr PKS_MSC*WRMSRCONFIG_X86_PKSdmesg | grep -i pks/proc/cpuinfodmesgdmesg | grep -i tpmCONFIG_TCG_TIS_SPI_I2Cwindows‑drivers‑rsmemfd_secretmemfd_secret(2)Core isolationGet-CimInstance -ClassName Win32_DeviceGuardVirtualizationBasedSecurityStatusSecurityServicesConfiguredAzure DCasv5/ECasv5GCP C3AWS C7gaz confcom attestationDriverSiPolicy.p7b/INTEGRITYCHECKFIPS 140-20xC0000141RtlpInsertOrRemoveScpCfgFunctionTableLdrpInitializeProcess -> LdrpProcessMappedModuleZwQueryVirtualMemoryMemoryImageExtensionInformationMEM_IMAGEMEM_PRIVATEZwQueryVirtualMemorySTATUS_INVALID_ADDRESSMEM_PRIVATE0xC00004ACLdrpQueryCurrentPatchNtManageHotPatchSTATUS_CONFLICTING_ADDRESSESMEM_PRIVATEMEM_IMAGE0xC0000141ZwQueryVirtualMemoryMemoryInformationClassMemoryImageExtensionInformationMEM_PRIVATESTATUS_NOT_SUPPORTEDZwQueryVirtualMemory0xC00004ACNtManageHotPatchSTATUS_NOT_SUPPORTEDFlushInstructionCache!vprot rip!vpro rsp.scriptload G:\Projects\narly.js; !nmodData Execution PreventionWindows Exploit GuardVirtualProtectNtProtectVirtualMemorySetProcessMitigationPolicypop rcx; retn; pop rcx; retn; mov [rcx], rax; pop rbp; retn;IATWriteProcessMemoryNtProtectVirtualMemory/guard:cf /guard:xfg/QspectreLoadConfig-fsanitize=cfiCONFIG_CFI_CLANG=yCONFIG_CFI_CLANGGet-ProcessMitigation -Name process.exedumpbin /loadconfig-fstack-clash-protectionIMAGE_GUARD_SHADOW_STACKVMX_GUEST_SSPRETnt!KeKernelShadowStackRestoreContextsecurekernel!SkmmNtKernelShadowStackAssistretSTATUS_STACK_BUFFER_OVERRUNIMAGE_DLLCHARACTERISTICS_GUARD_CFPEB→LdrDataTableEntry.GuardFlagsGet-ProcessMitigation -SystemUserShadowStackUserCetEnabledcet_ss/proc/cpuinfoprctl(PR_SET_SHADOW_STACK_STATUS, ...)ENDBR64SETSSPretNtContinueNtTestAlertENDBR32ENDBR64CET_IBTENDBR32/64ENDBRcat /proc/cpuinfo | grep cet_ibtcr4.cet-fcf-protection=branch-mcetENDBR64ENDBR32PAGE_READWRITENtProtectVirtualMemoryPAGE_EXECUTE_READWOW64CFGwow64logINT3Get-ProcessMitigation -Name process.exe | Select-Object -ExpandProperty DynamicCodeGet-CIPolicyCodeIntegrityGet-ProcessMitigation -Name process.exe | Select-Object -ExpandProperty BinarySignatureMicrosoft-Windows-CodeIntegrity/Operational[!NOTE] Support was removed from Linux 5.6 (April 2020) and GCC 9.1; no mainstream OS or compiler ships MPX today.
PAGE_EXECUTE_READPAGE_EXECUTE_WRITECOPYPAGE_NOACCESSPAGE_EXECUTE_READAMSIamsi.dllIAmsiStream::QueryInterfaceropchainsfile /path/to/binaryreadelf -h /path/to/binary | grep Type-fPIE -pie-fPIC -shared/proc/PID/mapschecksec --file=/path/to/binary0x00MSR_IA32_PRED_CMDprctl()cat /proc/cpuinfo | grep -E "(ibpb|ibrs|stibp|ssbd)"/sys/devices/system/cpu/vulnerabilities/prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, ...)perfGet-CIPolicy -EffectiveGet-ComputerInfo | Select WindowsProductName, WindowsVersionDriverSiPolicy.p7bgpresult /rExport-ProcessMitigationSet-ProcessMitigationGet-ProcessMitigationGet-MpPreference | Select -ExpandProperty AttackSurfaceReductionRules_Ids, AttackSurfaceReductionRules_Actionsgrep Seccomp /proc/<pid>/statusseccomp-tools dump <pid>CAP_SYS_ADMINCAP_NET_ADMINCAP_SYS_MODULEdocker inspect <ctr> | jq '.[0].HostConfig.SecurityOpt, .[0].HostConfig.CapDrop'
capsh --print
lsns | grep " $(cat /proc/self/ns/pid) \|net\|mnt\|user\|ipc\|uts"
grep Seccomp /proc/$$/status
id -Z 2>/dev/null || echo "No SELinux context"CAP_DAC_OVERRIDE--privilegeddocker inspect <container>podman inspect <container>capsh --printlsnsls -la /proc/$$/ns/grep Seccomp /proc/$$/statusid -Zdocker-bench-securitykube-benchSECBIT_EXEC_RESTRICT_FILESECBIT_EXEC_DENY_INTERACTIVEAT_EXECVE_CHECKntsyncio_uringCRITICAL_STRUCTURE_CORRUPTIONflowchart TB
System["System Security"]
subgraph "Memory Protection"
KASLR["Kernel ASLR"]
KPTI["Kernel Page Table Isolation"]
SMAP["Supervisor Mode Access Prevention"]
SMEP["Supervisor Mode Execution Prevention"]
KDP["Kernel Data Protection"]
RODATA["Read-Only Data Sections"]
end
subgraph "Virtualization Security"
VBS["Virtualization-Based Security"]
HVCI["Hypervisor-Enforced Code Integrity"]
MBEC["Mode-Based Execution Control"]
KMCI["Kernel Mode Code Integrity"]
end
subgraph "Control Flow Protection"
CFG["Control Flow Guard"]
CET["Control-Flow Enforcement Technology"]
KCFG["Kernel Control Flow Guard"]
end
System --> KASLR
System --> KPTI
System --> SMAP
System --> SMEP
System --> KDP
System --> RODATA
System --> VBS
System --> HVCI
System --> MBEC
System --> KMCI
System --> CFG
System --> CET
System --> KCFGflowchart TB
Hardware["Hardware (CPU with Virtualization Support)"]
Hypervisor["Hypervisor (Hyper-V)"]
VTL1["VTL1 (Secure Kernel)"]
VTL0["VTL0 (Normal Windows Kernel)"]
Apps["User Applications"]
Hardware --> Hypervisor
Hypervisor --> VTL1
Hypervisor --> VTL0
VTL0 --> Apps
subgraph "Secure World"
VTL1
SecureServices["Secure Services"]
CredGuard["Credential Guard"]
KMCI["Kernel Mode Code Integrity"]
end
VTL1 --> SecureServices
VTL1 --> CredGuard
VTL1 --> KMCIflowchart LR
ClassicMitigations["Classic Mitigations"]
ModernMitigations["Modern Mitigations"]
FutureMitigations["Future Mitigations"]
subgraph "2000s"
DEP["DEP/NX"]
ASLR["ASLR"]
Stack["Stack Cookies"]
SafeSEH["SafeSEH"]
end
subgraph "2010s"
CFG["Control Flow Guard"]
VBS["Virtualization-Based Security"]
HVCI["HVCI"]
WDAC["WDAC"]
end
subgraph "2020s+"
CET["CET Shadow Stack"]
MTE["Memory Tagging"]
CFI["Full CFI"]
end
ClassicMitigations --> DEP
ClassicMitigations --> ASLR
ClassicMitigations --> Stack
ClassicMitigations --> SafeSEH
ModernMitigations --> CFG
ModernMitigations --> VBS
ModernMitigations --> HVCI
ModernMitigations --> WDAC
FutureMitigations --> CET
FutureMitigations --> MTE
FutureMitigations --> CFI