Langsung ke konten
Skillpedia
Keamanan35k · #7693

building-c2-redirector-infrastructure

Fungsinya

Tool ini membantu Anda menyiapkan server perantara (redirector) untuk menyembunyikan server command and control (C2) utama. Tool ini menyaring lalu lintas agar hanya komunikasi yang sah dari program Anda (implant) yang sampai ke server utama, sementara lalu lintas yang mencurigakan dialihkan ke situs web biasa.

Kapan dipakai

  • ✓Saat Anda perlu menyembunyikan server utama dari serangan.
  • ✓Untuk memastikan hanya lalu lintas yang diharapkan yang sampai ke server C2.
  • ✓Untuk mengalihkan pengunjung yang penasaran dan pemeriksaan keamanan ke situs umpan yang tidak berbahaya.

Link skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/building-c2-redirector-infrastructure/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/building-c2-redirector-infrastructure/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit →

Contoh permintaan ke AI

“Siapkan redirector untuk menyembunyikan server C2 saya, dan alihkan lalu lintas yang tidak valid ke example.com.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Tool ini menggunakan perangkat lunak seperti Nginx atau Apache untuk memeriksa koneksi yang masuk. Jika sebuah koneksi terlihat sah (sesuai dengan profil yang sudah ditentukan), koneksi itu diteruskan ke server C2. Jika tidak, koneksi dialihkan ke situs umpan.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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.
  • cs2modrewrite to 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_rewrite redirector with [P] proxying and 302 decoy 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

…

Pertanyaan umum

Apa itu 'C2 redirector'?

C2 redirector adalah server yang berada di antara program berbahaya Anda (implant) dan server kontrol utama. Server ini membantu menyembunyikan server utama dan menyaring lalu lintas.

Apa itu 'Malleable C2 profile'?

Malleable C2 profile adalah kumpulan aturan yang menentukan bagaimana lalu lintas program Anda harus terlihat (misalnya alamat, header, dan lainnya). Redirector menggunakan aturan ini untuk mengenali lalu lintas yang benar.

Apa arti 'OPSEC' dalam konteks ini?

OPSEC (Operational Security) adalah langkah-langkah untuk menghindari deteksi dan pelacakan, misalnya dengan menyembunyikan server asli dan membuat lalu lintas terlihat normal.

Detail

Deskripsi asli dari pembuat

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

repo: mukul975/Anthropic-Cybersecurity-Skills

Popularitas

Bintang GitHub
35k
Peringkat
#7693
Lisensi
Apache-2.0
Diperbarui
31/8/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa