Evasion-SubAgents: Command for Claude Code

.claude/commands/c2_evasion.md

c2_evasion is a command for Claude Code from JDArmy/Evasion-SubAgents. It costs 60 tokens per session (692 once invoked), scanned A, original, MIT.

A command for examining command-and-control software, which can remotely communicate with compromised systems, and changing its source code to avoid security detections. It searches for YARA, Sigma, and network rules and records its findings.

In plain words
What is it for?
Use it in permitted research to study command-and-control components, map detection rules to source code, and document defensive findings.
Why use it?
It organizes detection-rule analysis and code review for authorized security testing, but its evasion changes could also be misused.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions subagents.

This is JDArmy/Evasion-SubAgents's own configuration. It tells Claude Code how to work on Evasion-SubAgents itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Evasion-SubAgents configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./rules/<c2_name>/.

Reuse

Borrowing it

Nothing to install: this file belongs to JDArmy/Evasion-SubAgents. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/JDArmy/Evasion-SubAgents/main/.claude/commands/c2_evasion.md
Clone the repo
git clone --depth 1 https://github.com/JDArmy/Evasion-SubAgents

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 c2_evasion

README.md
[![agentmods](https://agentmods.dev/badge/commands/jdarmy/evasion-subagents/c2_evasion.svg)](https://agentmods.dev/commands/jdarmy/evasion-subagents/c2_evasion)
Your own site
<a href="https://agentmods.dev/commands/jdarmy/evasion-subagents/c2_evasion"><img src="https://agentmods.dev/badge/commands/jdarmy/evasion-subagents/c2_evasion.svg" alt="Measured on agentmods" height="20"></a>
Per session 60 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 692 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.
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.00060 $0.00692
Opus 5 $0.00030 $0.00346
Sonnet 5 $0.00012 $0.00138
Haiku 4.5 $0.00006 $0.00069

Measured 8d ago against content hash ca670e84b35d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

c2_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 8d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.claude/commands/c2_evasion.md · 84 lines

How it starts

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

C2 Evasion Command

Launch the c2-evasion-agent to analyze and modify C2 framework source code.

Usage

/c2_evasion /path/to/c2/source
/c2_evasion ./mythic-agent
/c2_evasion ./sliver-client

What This Command Does

  1. Identifies C2 framework type and components (implant/server)
  2. Searches detection rules (YARA, Sigma, Network) via gh CLI
  3. Per-rule analysis - Creates separate analysis for EACH rule with evasion strategies
  4. Proactively searches for sensitive strings (even if YARA rules are hex-only)
  5. Modifies source code - Compiler flags FIRST, then source changes
  6. Documents all changes in ./rules/<c2_name>/

CRITICAL: Per-Rule Analysis

For EACH YARA/Sigma rule, create ./rules/<c2_name>/rule_analysis/<rule_name>.md:

  • Parse all patterns ($a1, $s1, hex, regex)
  • Identify pattern source in code
  • Develop evasion strategies with priority:
    1. Compiler flags (LOWEST effort, HIGHEST impact)
    2. Build configuration changes
    3. Source code modifications
    4. Function/struct refactoring (last resort)

Priority Framework

Priority Component Action
1 (HIGHEST) Implant/Beacon/Agent MODIFY
2 (HIGH) Network Exposure MODIFY
3 (SKIP) Internal Strings SKIP

Evasion Priority

Strategy Priority Effort
Compiler flags 1 (BEST) Low
Build config 2 Medium
Source changes 3 Medium
Refactoring 4 High

Output

./rules/<c2_name>/
├── yara/              # Found YARA rules
├── sigma/             # Found Sigma rules
├── network/           # Found network rules
├── rule_analysis/           # Per-rule analysis files
│   ├── Windows_Trojan_X.md
│   └── ...
├── binary_assets/
│   └── analysis.md
├── hex_analysis.md
└── modifications_summary.md

Security

  • ONLY modify code in user-provided path
  • NEVER run or test modified binaries
  • NEVER skip a rule - every rule must have analysis
  • ALWAYS try compiler flags first
  • Document ALL changes

Read the full file on GitHub · 84 lines

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. 8d ago First seen · 84 lines · 0 tokens per session scan A ca670e84b35d

Subscribe to this mod's changes

c2_evasion is a command published in the GitHub repository JDArmy/Evasion-SubAgents (315 stars, last pushed 5mo ago), licensed MIT. It adds 60 tokens to every session and 692 once invoked, about $0.0003 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.