costrict-plugins-repo/mukul975-anthropic-cybersecurity-skills-cybersecurity-skills/analyzing-command-and-control-communication
Claude Code and agent skill by costrict-plugins-repo/mukul975-anthropic-cybersecurity-skills-cybersecurity-skills
- community
Checking that the SKILL.md file is still in the repository.
'Analyzes malware C2 communication over HTTP, HTTPS, DNS, and custom
Install
npx vskill@latest install costrict-plugins-repo/mukul975-anthropic-cybersecurity-skills-cybersecurity-skills/analyzing-command-and-control-communicationSKILL.md
The same SKILL.md was published earlier as mukul975/anthropic-cybersecurity-skills/analyzing-command-and-control-communication.
Analyzing Command-and-Control Communication
When to Use
- Reverse engineering a malware sample has revealed network communication that needs protocol analysis
- Building network-level detection signatures for a specific C2 framework (Cobalt Strike, Metasploit, Sliver)
- Mapping C2 infrastructure including primary servers, fallback domains, and dead drops
- Analyzing encrypted or encoded C2 traffic to understand the command set and data format
- Attributing malware to a threat actor based on C2 infrastructure patterns and tooling
Do not use for general network anomaly detection; this is specifically for understanding known or suspected C2 protocols from malware analysis.
Prerequisites
- PCAP capture of malware network traffic (from sandbox, network tap, or full packet capture)
- Wireshark/tshark for packet-level analysis
- Reverse engineering tools (Ghidra, dnSpy) for understanding C2 code in the malware binary
- Python 3.8+ with
scapy,dpkt, andrequestsfor protocol analysis and replay - Threat intelligence databases for C2 infrastructure correlation (VirusTotal, Shodan, Censys)
- JA3/JA3S fingerprint databases for TLS-based C2 identification
Workflow
Step 1: Identify the C2 Channel
Determine the protocol and transport used for C2 communication:
Step 2: Analyze Beacon Pattern
Characterize the periodic communication pattern:
Step 3: Decode C2 Protocol Structure
Reverse engineer the message format from captured traffic:
Step 4: Identify C2 Framework
Match observed patterns to known C2 frameworks:
Step 5: Map C2 Infrastructure
Document the full C2 infrastructure and failover mechanisms:
Step 6: Create Network Detection Signatures
Build detection rules based on analyzed C2 characteristics:
Key Concepts
| Term | Definition | |
|---|---|---|
| Beaconing | Periodic check-in communication from malware to C2 server at regular intervals, often with jitter to avoid pattern detection | |
| Jitter | Randomization applied to beacon interval (e.g., 60s +/- 15%) to make the timing pattern less predictable and harder to detect | |
| Malleable C2 | Cobalt Strike feature allowing operators to customize all aspects of C2 traffic (URIs, headers, encoding) to mimic legitimate services | |
| Dead Drop | Intermediate location (paste site, cloud storage, social media) where C2 commands are posted for the malware to retrieve | |
| Domain Fronting | Using a trusted CDN domain in the TLS SNI while routing to a different backend, making C2 traffic appear to go to a legitimate service | |
| Fast Flux | Rapidly changing DNS records for C2 domains to distribute across many IPs and resist takedown efforts | |
| C2 Framework | Software toolkit providing C2 server, implant generator, and operator interface (Cobalt Strike, Metasploit, Sliver, Covenant) |
Tools & Systems
- Wireshark: Packet analyzer for detailed C2 protocol analysis at the packet level
- RITA (Real Intelligence Threat Analytics): Open-source tool analyzing Zeek logs for beacon detection and DNS tunneling
- CobaltStrikeParser: Tool extracting Cobalt Strike beacon configuration from samples and memory dumps
- JA3/JA3S: TLS fingerprinting method for identifying C2 frameworks by their TLS implementation characteristics
- Shodan/Censys: Internet scanning platforms for mapping C2 infrastructure and identifying related servers
Common Scenarios
Scenario: Reverse Engineering a Custom C2 Protocol
Context: A malware sample communicates with its C2 server using an unknown binary protocol over TCP port 8443. The protocol needs to be decoded to understand the command set and build detection signatures.
Approach:
- Filter PCAP for TCP port 8443 conversations and extract the TCP streams
- Analyze the first few exchanges to identify the handshake/authentication mechanism
- Map the message structure (length prefix, type field, payload encoding)
- Cross-reference with Ghidra disassembly of the send/receive functions in the malware
- Identify the command dispatcher and document each command code's function
- Build a protocol decoder in Python for ongoing traffic analysis
- Create Suricata rules matching the protocol handshake or static header bytes
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/analyzing-command-and-control-communication/SKILL.md
Popularity
- Repository stars
- 72
- Repository forks
- 11
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/costrict-plugins-repo/mukul975-anthropic-cybersecurity-skills-cybersecurity-skills/analyzing-command-and-control-communication)