c2detect MCP server
Commit Sep 13, 2026Fingerprint command-and-control frameworks by analyzing network telemetry and TLS indicators like JARM and JA4.
Also known as cognis-digital/c2detect
- Stars
- 42
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- —
- Last commit
- Sep 13, 2026
- License
- —
What is c2detect MCP?
c2detect is an MCP server. Fingerprint command-and-control frameworks by analyzing network telemetry and TLS indicators like JARM and JA4.
Summary generated from the project's README
About c2detect MCP server
Identifying command-and-control frameworks from network telemetry is what c2detect enables for blue-team defenders. By analyzing indicators such as JARM, JA4, certificates, URIs, and ports, the tool fingerprints specific C2 families like Cobalt Strike, Sliver, Mythic, and Havoc. It provides a confidence score and lists the exact indicators that triggered a match, helping security analysts triage infrastructure.
Users can run the tool locally using the scan, match, or correlate commands to process JSON observation files, telemetry text, or directories. It is passive by default, meaning it does not make network calls unless the opt-in, authorization-gated probe command is used. The server can also generate ready-to-deploy Sigma and Suricata rules to move detections directly into a SIEM or IDS. It supports offline use and can cross-reference public threat-intel feeds from abuse.ch when configured.
What you can do with it
- 1Fingerprint C2 frameworks from telemetryIdentify specific command-and-control frameworks like Cobalt Strike or Sliver by analyzing network observations.
- 2Generate detection rules for SIEMCreate Sigma and Suricata rules based on identified C2 signatures to improve network monitoring.
- 3Cluster infrastructure into campaignsGroup multiple network observations together to reveal shared infrastructure used by a single operator.
- 4Perform authorized active probingConduct a TLS handshake against a consented host to fingerprint a suspected team server.
Written from the project's README. Every use case is checked against a quote from it.
Configuration
COGNIS_AI_BACKEND
Automated checks
Ran Nov 15, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachablecognis-digital/c2detect is public and reachablegithub.com/cognis-digital/c2detect ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)No licenseFinding
- Commit or release in the last yearLast commit or release 2026-09-13github.com/cognis-digital/c2detect ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubc2detect
Fingerprint the C2 server behind the beacon. Point it at network telemetry and it names the command-and-control framework — Cobalt Strike, Sliver, Mythic, Havoc, Brute Ratel, and 11+ more — with a confidence score and the exact indicators that matched.
Blue-team / defensive: detect known C2 infrastructure from telemetry. Passive by default; the active probe is opt-in and authorization-gated.
pip install cognis-c2detect
c2detect scan . # → prioritized C2 findings in seconds, offline
See it work
Real, reproducible output — point it at a captured observation and it fingerprints the framework:
$ c2detect scan demos/01-cobalt-strike-network/observations.json
host: 203.0.113.10
jarm=07d14d16d21d21d07c42d41d00041d24a458a375eef0c576d23a7bab9a9fb1 port=443
CONF SEV FAMILY INDICATORS
-----------------------------------------
48 critical Cobalt Strike jarm, port
TOP: Cobalt Strike (48% / critical)
- jarm [+42] matched '07d14d16d21d21d07c42d41d00041d24a458a375eef0c576d23a7bab9a9fb1'
- port [+6] matched '443'
c2detect: 3 C2 indicator(s) across 3 observation(s)
It fuses JA4/JARM/certificate/URI/port indicators against a bundled signature DB — and can emit ready-to-deploy Sigma and Suricata rules from those same signatures (c2detect rules), so a detection goes straight into your SIEM/IDS.
Why c2detect
| threat-intel IP lists | JARM alone | c2detect | |
|---|---|---|---|
| Names the C2 framework (not just "bad IP") | ✗ | partial | ✅ |
| JA4 + JARM + cert + URI + port fusion | ✗ | ✗ | ✅ |
| Confidence score + matched indicators | ✗ | ✗ | ✅ |
| Generates Sigma / Suricata rules | ✗ | ✗ | ✅ |
| Campaign correlation (shared infrastructure) | ✗ | ✗ | ✅ |
| Runs offline, zero runtime deps | varies | ✓ | ✅ |
$ c2detect-emit --help
usage: c2detect [-h] [--version]
{scan,match,db,rules,feeds,correlate,probe,self-check,mcp} ...
Fingerprint-match TLS/network observations against a bundled database of known
C2 frameworks (JA4/JARM/cert/URI/port indicators). Defensive triage only.
positional arguments:
{scan,match,db,rules,feeds,correlate,probe,self-check,mcp}
scan Scan JSON observation files / telemetry text / dirs /
stdin.
match Match explicit indicators (--ja4/--jarm/--port/...).
db List the bundled C2 signature database.
rules Generate Sigma / Suricata detection rules from the
signature DB.
feeds List/update/get the live abuse.ch Feodo-C2 + SSLBL
threat-intel feeds c2detect consumes (keyless; cached;
offline re-serve).
correlate Cluster many observations into shared-infrastructure
campaigns (same JARM/JA4S/cert across hosts = one
operator's estate).
probe AUTHORIZED ACTIVE: TLS-fingerprint a consented
host:port in scope (default OFF; needs --authorized +
--target-allowlist + rate limit).
self-check Scan bundled demo scenarios and report C2 detection
coverage.
mcp Run the MCP server (stdio JSON-RPC).
options:
-h, --help show this help message and exit
--version show program's version number and exit
$ c2detect-emit self-check
c2detect self-check — bundled scenario coverage
================================================
[DETECT ] 01-basic Cobalt Strike
[DETECT ] 01-cobalt-strike-network Cobalt Strike
[DETECT ] 02-deep Cobalt Strike
[DETECT ] 02-mixed-frameworks Brute Ratel C4, Mythic, Sliver
[DETECT ] 03-behavioral Cobalt Strike
[CLEAN ] 03-benign-baseline (quiet)
[DETECT ] 04-sliver-mtls Cobalt Strike, Sliver
[DETECT ] 05-havoc-demon Havoc
[DETECT ] 06-mythic-agent Mythic
[DETECT ] 07-brute-ratel Brute Ratel C4
[DETECT ] 08-adaptixc2-teamserver AdaptixC2
[DETECT ] 09-metasploit-meterpreter Metasploit / Meterpreter
[DETECT ] 10-empire-windows PowerShell Empire
[DETECT ] 11-multi-framework-incident AdaptixC2, Cobalt Strike, Havoc, Sliver
[DETECT ] 12-threat-hunt-jarm-sweep Cobalt Strike, Sliver
[feeds/corr] 13-threat-intel-feeds (non-signature demo)
[DETECT ] 14-campaign-correlation Cobalt Strike, Metasploit / Meterpreter
------------------------------------------------
malicious detected : 14/14
benign clean : 1/1
frameworks exercised: 8/21 in DB
status : HEALTHY
$ c2detect-emit db
FAMILY SEV INDICATORS
------------------------------------------------------
Brute Ratel C4 critical ja3:1, jarm:1, uri:3, cert_quirk:2, port:2
Cobalt Strike critical ja4s:1, ja3:1, ja3s:1, jarm:1, uri:5, uri_regex:1, http_banner:2, user_agent:1, cert_quirk:3, beacon:1, port:3
Metasploit / Meterpreter critical ja3:1, jarm:1, uri:3, cert_quirk:2, port:3
AdaptixC2 high uri:3, http_banner:4, cert_quirk:1, port:4
Covenant high jarm:1, uri:3, http_banner:1, cert_quirk:1, port:3
Godzilla WebShell high uri:3, uri_regex:1, cert_quirk:1, port:3
Havoc high jarm:1, uri:3, http_banner:1, port:3
Mythic high jarm:1, uri:2, http_banner:1, port:3
PoshC2 high uri:4, cert_quirk:2, port:2
PowerShell Empire high ja3:1, uri:3, http_banner:1, port:3
Pupy RAT high ja3:1, uri:2, cert_quirk:2, port:3
SILENTTRINITY high uri:3, http_banner:1, beacon:1, port:3
Sliver high ja4:1, ja4x:1, jarm:1, uri:5, cert_quirk:2, beacon:1, port:3
Caldera (MITRE) medium uri:4, http_banner:1, beacon:1, port:5
Deimos C2 medium uri:3, http_banner:1, port:2
Koadic medium uri:3, user_agent:1, port:3
Merlin medium uri:2, http_banner:1, cert_quirk:1, port:1
NimPlant medium uri:3, http_banner:1, user_agent:1, beacon:1, port:2
Villain medium uri:3, http_banner:2, user_agent:1, port:3
Generic Beaconing Heuristic low beacon:1, port:6
Generic Self-Signed C2 Heuristic low cert_quirk:4, port:5
21 families in bundled signature DB.
Blocks above are real
c2detectoutput — reproduce them from a clone.
Usage — step by step
c2detect is defensive C2-infrastructure triage: it scans telemetry/observation records against a bundled signature DB and flags beaconing, suspicious TLS fingerprints, and staging URIs. It is passive by default — scan/match/correlate/db/rules read input you provide and make no network calls (the optional --feeds only pulls public abuse.ch intel feeds, which can run fully offline from cache). A separate, opt-in and authorization-gated active probe (c2detect probe) can TLS-fingerprint a consented host you are authorized to assess — see Passive vs. active.
- Install (Python 3.10+):
pip install -e . # or: pipx install c2detect - Scan observation files / telemetry text / a directory / stdin:
c2detect scan telemetry.json cat telemetry.log | c2detect scan - Match explicit indicators on the command line (no file needed):
Or correlate a batch to cluster hosts that share C2 infrastructure into campaigns (see Campaign correlation):c2detect match --ja4 t13d1516h2_8daaf6152771_b186095e22b6 --port 443 --beacon-interval 60 --jitter 0.1 c2detect db # list the bundled C2 signature database
Addc2detect correlate telemetry.json # which hosts are one operator's estate, and why--feedsto anyscan/matchto cross-reference host IPs / JA3s against the live abuse.ch Feodo-C2 + SSLBL threat-intel feeds (cached, offline-capable — see Live threat-intel feeds). - Read the output in JSON / SARIF / HTML / badge (e.g. for code scanning):
c2detect scan telemetry.json --format sarif > c2.sarif c2detect scan telemetry.json --format json | jq '.findings' - Gate CI with
--fail-on <severity>(exit non-zero at/above that severity). Optional--aiadds an opt-in Cognis-fleet LLM pass that degrades to rules if no backend is configured:- run: pip install -e . && c2detect scan telemetry.json --fail-on high
Passive vs. active
| Passive (default) | Active (opt-in, gated) | |
|---|---|---|
| Commands | scan · match · correlate · db · rules |
probe |
| Network | none (--feeds pulls public intel, offline-capable) |
one TLS handshake + optional benign HTTP HEAD per target |
| Default | on | OFF — refuses unless explicitly enabled |
| Input | telemetry files / JSON / JSONL / text / stdin | a host:port in an explicit allowlist |
Passive mode is the safe default and the right tool for almost everything: feed it Zeek/Suricata/EDR exports (JSON, JSONL/NDJSON, or free text), IOC sightings, or a directory of captures, and it scores them against the bundled C2 signature DB. It never reaches out to the targets.
⚠️ Active mode — authorized defensive use only
c2detect probeopens a TLS handshake (plus an optional, benignHEAD /) to a host you are authorized to assess, records its certificate / JARM / banner, and runs the same passive scanner on the result — effectively an authorizedopenssl s_clientthat fingerprints a suspected C2 team server. It sends no payloads, runs no exploits, and takes no offensive action.Active probing is OFF by default. To run a probe, all of the following are required, or it refuses:
--authorized— you assert you have documented authorization for every target in scope;--target-allowlist <host|host:port|CIDR>(repeatable, or--allowlist-file) — a mandatory scope; any target not in it is refused and skipped;- a positive
--rate-limit(connections/second; default2.0).A loud authorized-use banner is printed to stderr on every invocation. Probing a host without authorization may be illegal — you are responsible for your scope.
# Authorized assessment of a single consented team server: c2detect probe teamserver.lab.example:50050 \ --authorized \ --target-allowlist teamserver.lab.example:50050 \ --rate-limit 1 --format json # Sweep an owned subnet from a scope file (out-of-scope hosts are skipped): c2detect probe 10.10.5.10 10.10.5.11 8.8.8.8 \ --authorized --allowlist-file scope.txt --rate-limit 2 # → 8.8.8.8 refused (out of scope); 10.10.5.x fingerprinted + scored
Contents
- Why c2detect? · Passive vs. active · Features · Quick start · Example · Detection depth · Campaign correlation · Demos · GitHub Action · Status badge · HTML report · AI mode · Architecture · AI stack · How it compares · Integrations · Install anywhere · Related · Contributing
Why c2detect?
C2 server fingerprinter — Cobalt Strike, Sliver, Mythic, Havoc, Brute Ratel — without standing up heavyweight infrastructure.
c2detect is single-purpose, scriptable, and self-hostable: point it at a target, get prioritized results in the format your workflow already speaks (table · JSON · SARIF), gate CI on it, and let agents drive it over MCP.
Features
- ✅ 21 C2 families fingerprinted — AdaptixC2
new, Cobalt Strike, Metasploit, Sliver, Covenant, Mythic, Brute Ratel, Empire, Havoc, PoshC2, Merlin, Deimos, NimPlant, Villain, Caldera, Pupy, Koadic, SILENTTRINITY, Godzilla + generic self-signed/beaconing heuristics - ✅ TLS + behavioral indicators — JA4 / JA4S / JA4X / JA3 / JA3S / JARM, plus beacon-interval/jitter cadence, checksum/encoded URI regexes, default User-Agents, cert quirks and ports
- ✅ Output: table · JSON · SARIF · HTML report · shields.io badge
- ✅ Deploy as detection rules — generate ready-to-ship Sigma (SIEM) and Suricata (IDS/IPS) rules for every C2 family straight from the signature DB:
c2detect rules --format suricata - ✅ Prove your coverage —
c2detect self-checkscans every bundled scenario and reports detection coverage (14/14 malicious detected, 0 false-positives on the benign baseline), so you can trust the DB and catch regressions in CI - ✅ Reusable GitHub Action (
uses: cognis-digital/c2detect@main) — comments findings on PRs, fails CI on--fail-on - ✅ Opt-in AI mode (
--ai) over your local Cognis fleet — off by default, deterministic without it - ✅ Runs on Linux/macOS/Windows · Docker · devcontainer · MCP server
- ✅ Polyglot core ports — Python (reference), Go, Rust, JavaScript, TypeScript, and POSIX Shell (
ports/), each with its own tests + CI - ✅ Authorization-gated active probe (
c2detect probe) — off by default; TLS-fingerprints a consented, in-scope host (needs--authorized+--target-allowlist+ a rate limit). See Passive vs. active - 🛡️ Strictly defensive — passive triage by default; the optional active probe is authorization-gated, scope-enforced, and sends no payloads
Quick start
pip install cognis-c2detect
c2detect --version
c2detect scan . # scan current project
c2detect scan . --format json # machine-readable
c2detect scan . --fail-on high # CI gate (non-zero exit)
Deploy as detection rules
Don't just scan — ship the intelligence to your stack. c2detect rules
turns the bundled signature DB into deployable detection content for every C2
family, generated from the same high-confidence TLS fingerprints and documented
defaults the scanner uses.
# Sigma rules for your SIEM (one rule per C2 family, TLS-fingerprint keyed)
c2detect rules --format sigma -o c2detect.sigma.yml
# Suricata IDS/IPS rules (JA3/JA4 hash + HTTP URI/User-Agent matches)
c2detect rules --format suricata -o c2detect.rules
Example Suricata output:
alert tls any any -> any any (msg:"C2DETECT Cobalt Strike default JA3"; \
ja3.hash; content:"a0e9f5d64349fb13191bc781f81f42e1"; \
classtype:trojan-activity; sid:9200000; rev:1; \
metadata:c2_family Cobalt_Strike, source c2detect, confidence high;)
SIDs are deterministic in the private 9.2M range so they won't clash with
ET/Talos rule sets. Sigma rules carry stable ids, attack.command_and_control
tags, and per-family c2detect.family.* tags. Tune/threshold before production.
Example
$ c2detect scan .
[HIGH ] C2D-001 example finding (./src/app.py)
[MEDIUM ] C2D-002 another signal (./config.yaml)
2 findings · risk score 5 · 38ms
Detection depth
c2detect scores every observation against a bundled DB of 21 C2 families.
Each family is a blend of observational indicators — nothing describes an
attack, only the out-of-the-box defaults a defender can spot:
| Indicator class | Examples |
|---|---|
| TLS fingerprints | JA4, JA4S, JA4X (x509), JA3, JA3S, JARM |
| Behavioral | beacon interval window + jitter ceiling (e.g. CS default 60s / ~0% jitter), URI checksum/encoding regexes |
| HTTP | default User-Agent strings, spoofed Server banners, default listener URIs |
| PKI | certificate subject/issuer/serial quirks (e.g. “Major Cobalt Strike”, serial 146473198) |
| Network | default listener ports (weak, corroborating only) |
Confidence (0–100) is a weighted blend; two or more strong indicators earn a
corroboration bonus. Tune the floor with --threshold.
Worked demos — c2detect scan demos/<name>/observations.json
Fifteen self-contained, real-use-case scenarios (each with a SCENARIO.md),
grounded in the documented defaults so they genuinely fire:
| Demo | Scenario |
|---|---|
04-sliver-mtls |
Sliver implant over mTLS (JARM + JA4 + beacon cadence) |
05-havoc-demon |
Havoc "Demon" agent (Havoc banner + /demon) |
06-mythic-agent |
Mythic C2 (/agent_message) |
07-brute-ratel |
Brute Ratel C4 (JARM + JA3) |
08-adaptixc2-teamserver |
AdaptixC2 teamserver — branded Server: AdaptixC2 header (2025-26) |
09-metasploit-meterpreter |
reverse_https Meterpreter (/INITM) |
10-empire-windows |
PowerShell Empire (spoofed IIS banner) |
11-multi-framework-incident |
IR: one intrusion staging CS + Sliver + Havoc + AdaptixC2 — all four attributed |
12-threat-hunt-jarm-sweep |
Threat hunt: a JARM export where 2 of 5 egress IPs are C2, hiding among benign CDNs |
14-campaign-correlation |
Correlation: c2detect correlate clusters 6 hosts into 2 shared-infrastructure campaigns + 1 isolated benign host |
Plus the original 01-*/02-*/03-* basics, mixed-frameworks, behavioral, and
benign-baseline (false-positive) scenarios.
Don't take our word for it — run the coverage self-check:
c2detect self-check
# ...
# malicious detected : 14/14
# benign clean : 1/1
# frameworks exercised: 8/21 in DB
# status : HEALTHY
self-check scans every bundled scenario, confirms each malicious one fires and
the benign baseline stays quiet, and exits non-zero if coverage regresses — drop
it straight into CI. --format json for machine-readable coverage.
Campaign correlation — c2detect correlate
One detection says "this host looks like Cobalt Strike." Correlation answers the question that actually drives incident response: which of your hosts are the same operator's infrastructure, and why.
Adversaries rotate IPs, domains and URL paths cheaply, but the shape of their
listener and certificate stack is expensive to change — so it leaks across the
estate. correlate clusters hosts that literally share an expensive-to-
rotate pivot (reused cert serial, JARM, JA4S/JA3S, cert CN, …), draws the
campaign graph with union-find, and shows the exact evidence inline. A lone
shared port (weight 4) never fuses two hosts; a shared JARM (40) always does.
$ c2detect correlate week_telemetry.json
== Campaign #0 [CRITICAL] confidence=100 hosts=3 families: Cobalt Strike
host: 203.0.113.10
host: 203.0.113.11
host: 203.0.113.12
shared infrastructure pivots:
- cert_serial (w=50): 0a1b2c3d4e5f6a7b
- jarm (w=40): 07d14d16d21d21d07c42d41d00041d24a458a375eef0c576d23a7bab9a9fb1
- family (w=18): cobalt strike
c2detect: 2 campaign(s) clustering 5 host(s) by shared C2 infrastructure.
c2detect correlate obs.json --format json # machine-readable campaigns + edges
c2detect correlate obs.json --format dot | dot -Tsvg -o g.svg # Graphviz pivot graph
c2detect correlate obs.json --fail-on critical # CI gate (exit 2)
c2detect correlate obs.json --edge-floor 38 # only JARM-class pivots link
c2detect correlate obs.json --include-singletons # full inventory incl. lone hosts
It does not attribute to a named actor and invents nothing — every reported pivot is a value two observations actually share. Full threat context, the weighting model, and a worked walkthrough are in docs/CORRELATION.md.
GitHub Action
Scan telemetry in CI, comment findings on the PR, and fail on a severity floor —
drop this into any repo as .github/workflows/c2detect.yml:
name: c2detect
on: [push, pull_request]
permissions:
contents: read
pull-requests: write # to comment findings on PRs
security-events: write # to upload SARIF
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cognis-digital/c2detect@main
with:
path: telemetry/ # file or dir to scan
format: sarif # table | json | sarif | html | badge
fail-on: high # fail the build at/above this severity
threshold: "35" # min confidence to report
comment-pr: "true" # post a findings comment via gh api
The action uploads a SARIF + HTML report artifact and exposes
steps.<id>.outputs.findings and steps.<id>.outputs.badge.
Status badge
--format badge prints a shields.io endpoint
JSON you can host and reference:
c2detect scan telemetry/ --format badge > badge.json
# {"schemaVersion":1,"label":"c2detect","message":"clean","color":"brightgreen"}

HTML report
c2detect scan telemetry/ --format html > report.html # clean, self-contained
A single self-contained HTML file (no external assets) with per-host findings, severity pills, indicator breakdown, and any AI-suggested candidates.
c2detect MCP questions
What command-and-control frameworks can c2detect identify?
It can identify Cobalt Strike, Sliver, Mythic, Havoc, Brute Ratel, and over 11 other frameworks.
Can c2detect generate detection rules for my SIEM?
Yes, it can emit ready-to-deploy Sigma and Suricata rules based on its signature database.
What indicators does the tool use for fingerprinting?
The tool fuses JA4, JARM, certificate, URI, and port indicators against a signature database.