c2_evasion

c2_evasion is a command for Claude Code from SeaOf0/dsh-redteam-model. It costs 0 tokens per session (692 once invoked), scanned A, original, MIT.

A command that analyses command-and-control software, which lets an attacker manage compromised computers, and changes its source code to avoid detection rules.

In plain words
What is it for?
Use it on C2 source code to inspect YARA, Sigma, and network rules, analyse matching patterns, try compiler or source changes, and record the results.
Why use it?
It is intended to identify why security tools flag the software and document changes aimed at bypassing those detections.

Command for Claude Code

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

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

Good fit Use it on C2 source code to inspect YARA, Sigma, and network rules, analyse matching patterns, try compiler or source changes, and record the results.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/SeaOf0/dsh-redteam-model
agentmods
npx agentmods add commands/seaof0/dsh-redteam-model/c2_evasion

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/seaof0/dsh-redteam-model/c2_evasion/github.svg)](https://agentmods.dev/commands/seaof0/dsh-redteam-model/c2_evasion)
Your own site
<a href="https://agentmods.dev/commands/seaof0/dsh-redteam-model/c2_evasion"><img src="https://agentmods.dev/badge/commands/seaof0/dsh-redteam-model/c2_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 c2_evasion

Your own site · 80×15
<a href="https://agentmods.dev/commands/seaof0/dsh-redteam-model/c2_evasion"><img src="https://agentmods.dev/badge/commands/seaof0/dsh-redteam-model/c2_evasion.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 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.00000 $0.00692
Opus 5 $0.00000 $0.00346
Sonnet 5 $0.00000 $0.00138
Haiku 4.5 $0.00000 $0.00069

Measured 9d ago against content hash ca670e84b35d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 9d 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:

modes/av-evasion/refs/subagents/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. 9d 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 SeaOf0/dsh-redteam-model (325 stars, last pushed 4d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 692 tokens. 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.