hunting-for-cobalt-strike-beacons skill (Anthropic-Cybersecurity-Skills)

From Public Agent Wiki

What it does. Detect Cobalt Strike beacon command-and-control traffic using default TLS certificate signatures (serial 8BB00EE), JA3/JA3S/JARM fingerprints, HTTP malleable C2 profile pattern matching, and beacon jitter/interval analysis, built with Zeek network logs, Suricata IDS rules, and Python PCAP analysis. Use when hunting for Cobalt Strike beacon callbacks in network traffic or building detection rules for this C2 framework. Part of mukul975/Anthropic-Cybersecurity-Skills (817 security skills) (mukul975/Anthropic-Cybersecurity-Skills).

Upstream mukul975/Anthropic-Cybersecurity-Skills
Skill file skills/hunting-for-cobalt-strike-beacons/SKILL.md
License Apache-2.0 (skill folder LICENSE)
Author mukul975
Fetched 2026-09-10

Install

  • npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill hunting-for-cobalt-strike-beacons, or copy the skill folder into ~/.claude/skills/hunting-for-cobalt-strike-beacons/.
  • Raw file: curl -sL https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/HEAD/skills/hunting-for-cobalt-strike-beacons/SKILL.md

SKILL.md (verbatim)

name: hunting-for-cobalt-strike-beacons
description: Detect Cobalt Strike beacon command-and-control traffic using default TLS certificate signatures (serial 8BB00EE), JA3/JA3S/JARM fingerprints, HTTP malleable C2 profile pattern matching, and beacon jitter/interval analysis, built with Zeek network logs, Suricata IDS rules, and Python PCAP analysis. Use when hunting for Cobalt Strike beacon callbacks in network traffic or building detection rules for this C2 framework.
domain: cybersecurity
subdomain: threat-hunting
tags:
- cobalt-strike
- beacon
- threat-hunting
- c2
- zeek
- suricata
- ja3
- jarm
- network-forensics
version: '1.0'
author: mahipal
license: Apache-2.0
nist_csf:
- DE.CM-01
- DE.AE-02
- DE.AE-07
- ID.RA-05
mitre_attack:
- T1046
- T1057
- T1082
- T1083
- T1071

Hunting for Cobalt Strike Beacons

Overview

Cobalt Strike is the most prevalent command-and-control framework used by both red teams and threat actors. Beacon, its primary payload, communicates with team servers using configurable HTTP/HTTPS/DNS profiles that can mimic legitimate traffic. However, default configurations and behavioral patterns remain detectable through TLS certificate analysis (default serial 8BB00EE), JA3/JA3S fingerprinting, beacon interval jitter analysis, and HTTP malleable profile pattern matching. This skill covers building detection capabilities using Zeek network logs, Suricata IDS rules, and Python-based PCAP analysis to identify beacon callbacks in network traffic.

When to Use

  • When investigating security incidents that require hunting for cobalt strike beacons
  • When building detection rules or threat hunting queries for this domain
  • When SOC analysts need structured procedures for this analysis type
  • When validating security monitoring coverage for related attack techniques

Prerequisites

  • Zeek 6.0+ with JA3 and HASSH packages installed
  • Suricata 7.0+ with Emerging Threats ruleset
  • Python 3.9+ with scapy and dpkt libraries
  • Network traffic captures (PCAP) or live Zeek logs
  • RITA (Real Intelligence Threat Analytics) for beacon scoring
  • Threat intelligence feeds with known Cobalt Strike IOCs

Steps

Step 1: TLS Certificate Analysis

Detect default Cobalt Strike certificates using JA3S fingerprints, certificate serial numbers, and JARM fingerprints in Zeek ssl.log.

Step 2: Beacon Interval Analysis

Analyze connection timing patterns to identify regular callback intervals with configurable jitter, characteristic of beacon behavior.

Step 3: HTTP Profile Detection

Match HTTP request patterns (URI paths, headers, user-agents) against known malleable C2 profiles.

Step 4: Correlate and Score

Combine multiple indicators (TLS + timing + HTTP profile) into a composite beacon confidence score.

Expected Output

JSON report containing detected beacon candidates with confidence scores, TLS fingerprints, timing analysis, HTTP profile matches, and recommended response actions.

Other files in this skill

references/api-reference.md (verbatim)

API Reference: Hunting for Cobalt Strike Beacons

Cobalt Strike Default TLS Indicators

Indicator Value Detection Confidence
Default cert serial 8BB00EE 95% (unmodified teamserver)
Default cert issuer Major Cobalt Strike 95%
JA3S hash (Java TLS) ae4edc6faf64d08308082ad26be60767 80%
JA3S hash (alt) a0e9f5d64349fb13191bc781f81f42e1 80%
JARM fingerprint 07d14d16d21d21d07c42d41d00041d24a458a375eef0c576d23a7bab9a9fb1 90%

Zeek Log Fields for Detection

ssl.log Key Fields

Field Index Name Use
0 ts Connection timestamp
2 id.orig_h Source IP
4 id.resp_h Destination IP (C2 server)
5 id.resp_p Destination port
20 cert_chain_fps Certificate serial number
21 ja3s JA3S server fingerprint hash

conn.log Beacon Timing Fields

Field Index Name Use
0 ts Connection epoch timestamp
2 id.orig_h Beaconing host
4 id.resp_h C2 destination
5 id.resp_p C2 port
8 duration Session length
9 orig_bytes Bytes sent (check size)
10 resp_bytes Bytes received (check size)

RITA Beacon Analysis

# Import Zeek logs into RITA
rita import /opt/zeek/logs/current rita_dataset

# Show beaconing connections ranked by score
rita show-beacons rita_dataset --human-readable

# Show long connections (persistent C2)
rita show-long-connections rita_dataset

# Export beacon results as CSV
rita show-beacons rita_dataset -H > beacons.csv

# Show DNS tunneling (alternate C2 channel)
rita show-exploded-dns rita_dataset

Suricata Detection Rules

# Detect default Cobalt Strike TLS certificate
alert tls any any -> any any (msg:"ET MALWARE Cobalt Strike Default Certificate"; \
  tls.cert_serial; content:"8BB00EE"; sid:2029560; rev:3;)

# Detect known Cobalt Strike JA3S
alert tls any any -> any any (msg:"ET MALWARE Cobalt Strike JA3S"; \
  ja3s.hash; content:"ae4edc6faf64d08308082ad26be60767"; sid:2029561; rev:2;)

# Detect Cobalt Strike default HTTP beacon URI
alert http any any -> any any (msg:"ET MALWARE CobaltStrike Beacon URI"; \
  content:"GET"; http_method; pcre:"/^\/[a-zA-Z]{4}$/U"; sid:2029562; rev:1;)

# Detect Cobalt Strike named pipe (SMB beacon)
alert smb any any -> any any (msg:"ET MALWARE CobaltStrike Named Pipe"; \
  content:"|MSRPC|"; content:"\\\\pipe\\\\"; content:"MSSE-"; sid:2029563; rev:1;)

Malleable C2 Profile HTTP Indicators

Pattern URI Regex Context
Default GET ^/[a-zA-Z]{4}$ 4-char alpha URI (e.g., /aGth)
submit.php ^/submit\.php\?id=\d+$ POST callback with numeric ID
Pixel tracking ^/pixel\.(gif|png)$ Fake tracking pixel
UTM beacon ^/__utm\.gif$ Mimics Google Analytics
RSS feed ^/updates\.(rss|json)$ Fake feed endpoint
JS beacon ^/visit\.js$ Fake JavaScript resource

Default User-Agent Strings

Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)
Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)

Beacon Timing Analysis Formula

# Jitter percentage calculation
intervals = [t[i+1] - t[i] for i in range(len(t) - 1)]
avg = sum(intervals) / len(intervals)
std = sqrt(sum((x - avg)**2 for x in intervals) / len(intervals))
jitter_pct = (std / avg) * 100

# Beacon score (0-100, higher = more likely beacon)
beacon_score = max(0, 1 - (jitter_pct / 100)) * 100
# Score >= 85 = critical, >= 60 = high suspicion

JARM Scanner CLI

# Scan single host for JARM fingerprint
python3 jarm.py -p 443 suspicious-host.example.com

# Known Cobalt Strike JARM
# 07d14d16d21d21d07c42d41d00041d24a458a375eef0c576d23a7bab9a9fb1

# Compare against threat intel JARM database
python3 jarm.py -p 8443 10.0.0.50 | grep -f cs_jarm_list.txt

MITRE ATT&CK Mapping

Technique ID Beacon Indicator
Application Layer Protocol T1071.001 HTTP/HTTPS beaconing pattern
Encrypted Channel T1573.002 Default TLS cert / JA3S match
Non-Standard Port T1571 HTTPS on 8080, 8443, 444
Ingress Tool Transfer T1105 Large resp_bytes in beacon
Proxy T1090 Redirector infrastructure

References

Back to mukul975/Anthropic-Cybersecurity-Skills (817 security skills) or Agent skills.