building-c2-redirector-infrastructure
Что он делает
Этот инструмент помогает развернуть промежуточный сервер (редиректор), который скрывает основной C2-сервер. Он фильтрует трафик, пропуская к основному серверу только легитимные соединения от вашей программы (импланта), а подозрительный трафик перенаправляет на обычный сайт.
Когда использовать
- ✓Когда нужно скрыть основной сервер от атак.
- ✓Чтобы к C2-серверу попадал только ожидаемый трафик.
- ✓Чтобы перенаправлять случайных посетителей и проверки безопасности на безобидный сайт-приманку.
Ссылка на скилл
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/building-c2-redirector-infrastructure/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Настрой редиректор для скрытия моего C2-сервера, перенаправляя некорректный трафик на example.com.”
5 новых скиллов в неделю. 1 минута чтения.
Как это работает
Инструмент использует такие программы, как Nginx или Apache, чтобы проверять входящие соединения. Если соединение похоже на легитимное (соответствует заданному профилю), оно передается на C2-сервер. В остальных случаях трафик перенаправляется на сайт-приманку.
Технический текст (оригинальный SKILL.md)
Оригинальный текст автора на английском, прямо с 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.
When to Use
- Standing up red-team C2 that must survive blue-team triage and domain takedown requests.
- Separating a hidden team server from any internet-facing host during an engagement.
- Filtering implant traffic so only profile-matching requests reach the backend, diverting scanners.
- Adding TLS termination, domain categorization, and CDN/domain fronting to an HTTP(S) listener.
- Teaching defenders how external-proxy C2 (T1090.002) is constructed so they can detect it.
Prerequisites
- One or more disposable cloud VPS instances (the redirector edge) and a separate, firewalled team-server host.
- A registered domain with controllable DNS, ideally aged/categorized.
- Root on the redirector host. Install the web server and TLS tooling:
# Debian/Ubuntu redirector sudo apt update sudo apt install -y nginx apache2 socat certbot python3-certbot-nginx git # Enable Apache proxy modules if using mod_rewrite redirector sudo a2enmod rewrite proxy proxy_http ssl headers - The C2 framework's Malleable C2 profile (Cobalt Strike
.profile, Sliver/Havoc HTTP profile) defining URIs, User-Agent, and headers. cs2modrewriteto auto-generate rules from a Cobalt Strike profile:git clone https://github.com/threatexpress/cs2modrewrite- Firewall the team server so it only accepts the redirector's source IP on the C2 port.
Objectives
- Deploy a dumb-pipe redirector (socat/iptables) for fast port separation.
- Deploy a filtering nginx reverse-proxy redirector keyed to a malleable profile.
- Deploy an Apache
mod_rewriteredirector with[P]proxying and302decoy fallback. - Auto-generate redirector rules from a Cobalt Strike profile with
cs2modrewrite. - Terminate TLS with Let's Encrypt and harden the public edge.
- Apply OPSEC: header/UA validation, geo filtering, decoy diversion, and infra rotation.
MITRE ATT&CK Mapping
| Technique ID | Official Name | Relevance |
|---|---|---|
| T1090.002 | Proxy: External Proxy | The redirector is an external intermediary that proxies C2 to hide the team server |
| T1090.004 | Proxy: Domain Fronting | CDN fronting routes beacon traffic through a trusted high-reputation domain |
…
Частые вопросы
Что такое «C2-редиректор»?
Это сервер, который стоит между вашей программой (имплантом) и основным сервером управления. Он помогает скрыть основной сервер и фильтровать трафик.
Что такое профиль Malleable C2?
Это набор правил, определяющих, как должен выглядеть трафик вашей программы (например, какие адреса и заголовки использовать). Редиректор использует эти правила, чтобы распознать нужный трафик.
Что означает OPSEC в этом контексте?
OPSEC (операционная безопасность) означает меры, которые помогают не быть обнаруженным и не быть связанным с атакой, например, скрытие реального сервера и маскировка трафика под обычный.
Подробности
Оригинальное описание автора
Build dumb-pipe and traffic-filtering C2 redirectors with nginx (proxy_pass) and Apache (mod_rewrite), deriving filter rules from a Malleable C2 profile, layering Let's Encrypt TLS, and applying OPSEC controls like domain fronting and UA/geo filtering. Use when standing up red-team C2 that must survive blue-team triage or ensuring only profile-matching implant traffic reaches the hidden team serve
Популярность
- Звёзды на GitHub
- 35k
- Место в рейтинге
- #7693
- Лицензия
- Apache-2.0
- Обновлён
- 31.08.2026
Комментарии
- …
Другие скиллы из этого репозитория
abusing-dpapi-for-credential-access
35kДаёт ИИ-агенту готовые инструкции для конкретной задачи, чтобы он делал её лучше и быстрее.
abusing-shadow-credentials-for-privesc
35kУчит ИИ-агента писать ясные структурированные тексты.
achieving-cmmc-level-2-compliance
35kПомогает агенту подготовить среду к соответствию CMMC уровня 2.
acquiring-disk-image-with-dd-and-dcfldd
35kПомогает агенту создавать точные копии дисков для расследований.
Похожие скиллы
reverse-engineer-anything
422kПомогает агенту изучить готовые приложения и пакеты, объяснить их функции, сравнить версии или помочь с пересборкой через REA.
1password
394kПомогает агенту настроить командную строку 1Password, войти в нее и читать или подставлять секреты, не выводя их значения в чат.
healthcheck
394kПомогает агенту проверить компьютер или сервер, на котором работает OpenClaw, на риски безопасности, такие как SSH, файрвол, обновления и резервные копии, а затем предложить безопасные исправления.