building-c2-redirector-infrastructure

building-c2-redirector-infrastructure is a skill for Claude Code, Codex from Youngmaidainon/Agent-Level-Up. It costs 95 tokens per session (2,950 once invoked), scanned A, original, MIT.

A guide to building a C2 redirector: an intermediary server that forwards authorized red-team traffic to a hidden command-and-control server while filtering other requests.

In plain words
What is it for?
Use it to configure nginx or Apache forwarding, traffic filters, TLS, and domain or location-based request rules for red-team infrastructure.
Why use it?
It helps approved security exercises keep the team server less exposed and separate test traffic from scanners or unwanted visitors.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to configure nginx or Apache forwarding, traffic filters, TLS, and domain or location-based request rules for red-team infrastructure.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/youngmaidainon/agent-level-up/building-c2-redirector-infrastructure
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 Youngmaidainon/Agent-Level-Up --skill building-c2-redirector-infrastructure
Clone the repo
git clone --depth 1 https://github.com/Youngmaidainon/Agent-Level-Up

Made for: Claude Code, Codex.

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 building-c2-redirector-infrastructure

README.md
[![agentmods](https://agentmods.dev/badge/skills/youngmaidainon/agent-level-up/building-c2-redirector-infrastructure/github.svg)](https://agentmods.dev/skills/youngmaidainon/agent-level-up/building-c2-redirector-infrastructure)
Your own site
<a href="https://agentmods.dev/skills/youngmaidainon/agent-level-up/building-c2-redirector-infrastructure"><img src="https://agentmods.dev/badge/skills/youngmaidainon/agent-level-up/building-c2-redirector-infrastructure/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 building-c2-redirector-infrastructure

Your own site · 80×15
<a href="https://agentmods.dev/skills/youngmaidainon/agent-level-up/building-c2-redirector-infrastructure"><img src="https://agentmods.dev/badge/skills/youngmaidainon/agent-level-up/building-c2-redirector-infrastructure.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,950 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 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.00095 $0.02950
Opus 5 $0.00048 $0.01475
Sonnet 5 $0.00019 $0.00590
Haiku 4.5 $0.00010 $0.00295

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

Security

Grade A, and why

building-c2-redirector-infrastructure scanned grade A with 2 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 7d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/agent.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Asks for rootlowPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo apt update

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -k https://cdn.example.com/ # expect 302 to decoy
cyber-security/ctf/building-c2-redirector-infrastructure/SKILL.md · 214 lines

How it starts

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

Building C2 Redirector Infrastructure

Authorized Use Only: This skill is for authorized red-team engagements, adversary-emulation exercises, and defensive research only. Command-and-control infrastructure is dual-use; deploying redirectors to control malware on systems you are not explicitly authorized to test is illegal. Operate only inside an agreed scope with a signed rules-of-engagement document, and decommission infrastructure when the engagement ends.

Overview

A C2 redirector is an intermediary host that sits between victim implants and the real team server. Beacons connect to the redirector's public domain/IP; the redirector inspects each request and either proxies legitimate C2 traffic back to the hidden team server or diverts everything else (scanners, blue-team analysts, sandboxes) to a benign decoy site. This protects the team server from discovery, takedown, and attribution, and lets operators rotate the public edge without rebuilding the backend. The technique maps to MITRE ATT&CK T1090.002 (Proxy: External Proxy) — adversaries route C2 through an intermediary node to obscure the true origin.

Redirectors come in two flavors. Dumb pipes (socat, iptables NAT) blindly forward a port and provide separation but no filtering. Smart/filtering redirectors (nginx proxy_pass, Apache mod_rewrite with [P], or purpose-built tools like RedWarden) parse HTTP requests and only forward traffic that matches the implant's Malleable C2 profile — correct URI, User-Agent, headers — while sending everything else a 302 to a real website. The filtering logic is derived directly from the C2 framework's traffic profile, so the two must stay in lock-step. Tools such as cs2modrewrite automate generating Apache/nginx rules from a Cobalt Strike Malleable C2 profile.

This skill covers building both dumb and filtering redirectors with nginx and Apache, deriving filter rules from a malleable profile, layering TLS with Let's Encrypt, and applying OPSEC controls (categorized domains, domain fronting/CDN fronting, header validation, geo/UA filtering) for resilient, low-attribution infrastructure.

Read the full file on GitHub · 214 lines

Files

What ships with it

3 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. 7d ago First seen · 214 lines · 95 tokens per session scan A 325a80a46eea

Subscribe to this mod's changes

building-c2-redirector-infrastructure is a skill published in the GitHub repository Youngmaidainon/Agent-Level-Up (3 stars, last pushed 16d ago), licensed MIT. It adds 95 tokens to every session and 2,950 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.