Agent on Linux, XDP captureT1071

Find hosts that beacon

When malware calls home, it tends to call on a schedule. Thalamus can write one beacon record per source and destination pair that reconnects at a regular interval. The record is telemetry, with no score, alert or ban: confirm it with a second signal, and contain the host if it holds up.

Overview

Command and control traffic is often encrypted, short and unremarkable one connection at a time. What gives it away is the rhythm: the same host reaching the same destination every minute, for hours.

Beacon telemetry looks for that rhythm in the IDS flow table and reports each regular pair, then reports it again after a quiet period. It decides nothing; that is left to you and your rules.

When you see this

  1. A host reaches the same external destination at a fixed interval.
  2. The traffic classifier rates a flow as plausibly C2 without it being the top class.
  3. Connections continue overnight, when nobody is working.

Steps

  1. 01

    Turn on beacon telemetry

    It needs ids.enabled and the XDP flow table: not AF_PACKET, and not Windows. Changing it takes a restart. If logging.eve_log.event_types is set, it must list beacon.

    /etc/synapse/config.yaml
    ids:
      enabled: true
      capture_mode: xdp
      beacon:
        enabled: true
        min_conns: 8
        min_span_secs: 600
        realert_secs: 3600
        ignore_dst_ports: [53, 123]
  2. 02

    Leave out what beacons by design

    DNS, NTP and update checks are regular on purpose. ignore_dst_ports keeps those pairs tracked but never reported. Internal destinations are not reported unless report_internal_dst is on.

  3. 03

    Read the records

    Each regular pair produces one beacon record in the EVE output: after min_conns connections spanning at least min_span_secs, and again after realert_secs.

  4. 04

    Confirm with a second signal

    A steady interval alone is not proof: plenty of legitimate software polls. Look for a second signal on the same host: the traffic classifier's C2 probability, an IDS alert, a destination the feeds already know.

    Smart firewall rule, action log
    ml.traffic.c2 ge 90 and ids.alert_count > 0
    DecisionDoes a second signal agree?

    Yes Contain the host.

    No Keep the pair under review. If it is legitimate polling, leave it; if the port is noise, ignore it.

  5. 05

    Contain the host

    Cut its egress without pulling the cable: allow what the investigation needs, deny everything else, and keep watching. The containment playbook has the steps.

Common mistakes

  1. Treating a beacon record as an alert. It carries no score.
  2. Turning it on with AF_PACKET capture or on Windows, where it needs the XDP flow table it does not have.
  3. Leaving DNS and NTP to be reported instead of ignoring those ports.

Escalate when

  • A beaconing host that also has an IDS alert.
  • The same destination beaconed to from several hosts.

Where this stops working

  • A pair is reported only after min_conns connections spanning min_span_secs: something that calls home rarely takes longer to show.
  • It is telemetry, not prevention: nothing is blocked until a rule acts.
Run it here

Send the request. Watch where it stops.

Edit the request or any rule and the pipeline runs again. The rules are real wirefilter expressions, evaluated the way the agent evaluates them; the traffic and model scores are samples. It all runs in your browser.

Try this A beacon record never blocks anything. This lab starts where it ends: the C2 rule flags the host, and egress rules contain it.

The request

egress · agent mode

Every value is a rule field. Change one and the pipeline re-runs.

Connection
Fingerprints, from Dendrite
Model scores, sample output from Cortex
Flow behaviour, per source
Payload, what Thalamus inspects
Result Dropped at the TC hook
ResultDropped at the TC hookHillock · firewall rules · Logged by Amygdala
  1. 01Capture and fingerprintDendrite · On the wireObserved

    Computed JA4, JA4T for this connection. Capture only: Dendrite never blocks.

  2. 02Access rulesHillock · XDP hook, before routingNot used

    Access rules answer whether a source may reach this host, so they apply to inbound traffic only.

  3. 03Intrusion detectionThalamus · On the hostFlagged

    Alert on sid 9000101. IDS context becomes rule fields: ids.alert_count, ids.sids.

    sid 9000101Sample: periodic TLS beacon to a newly seen hostMatched

    Thalamus runs Suricata-compatible signatures across thirty-plus protocols. Here a signature is reduced to one content match.

  4. 04Behavioural modelsCortex · On the host CPUObserved

    Sample scores, 0 to 100: C2 97, scan 3, malicious flow 88. Nothing leaves the machine to be scored.

  5. 05Service graphHippocampus · On the hostNot used

    No workload identity on this flow.

  6. 06Smart firewall rulesAmygdala · Decided on the host, enforced in nftablesFlagged

    Matched a log rule: recorded what it would have done, enforced nothing.

    Matched
  7. 07Firewall rulesHillock · TC hook, in the kernelDropped

    Rule 100 drops egress tcp/443 to 203.0.113.50. Enforced in the kernel, so a process on the host cannot bypass it.

    Log collectorNo match
    Management planeNo match
    Deny all other egressMatched

    Lowest order first, first match wins. Stateless: a reply needs a rule of its own.

  8. 08WAF rulesProxy · In the proxy, after decryptionNot reached

    Agent mode does no HTTP proxying, so there is no request for the WAF to read.

  9. 09Content scanningProxy · ClamAV, before forwardingNot reached

    No WAF rule selected this request for scanning, so nothing was scanned.

Field names and operators follow the docs: WAF and Smart Firewall. A rule that names an unknown field does not load; a field the request does not carry never matches.

What lands in the event log
{
  "ts": "2026-11-17T09:41:07.212Z",
  "layer": "ids",
  "action": "notice",
  "source": "ids",
  "rule_id": "sid:9000101",
  "rule_msg": "Sample: periodic TLS beacon to a newly seen host",
  "src_ip": "10.0.4.21",
  "src_port": 54321,
  "dst_ip": "203.0.113.50",
  "dst_port": 443,
  "fingerprints": {
    "ja4t": "64240_2-4-8-1-3_1460_10",
    "ja4": "t13d0911h1_4b22cbed5bed_6d0c5a0d3e8f"
  }
}
{
  "ts": "2026-11-17T09:41:07.212Z",
  "layer": "smart_firewall",
  "action": "log",
  "source": "traffic_classifier",
  "signals": [
    "traffic_classifier",
    "ids"
  ],
  "rule_id": "s14",
  "src_ip": "10.0.4.21",
  "src_port": 54321,
  "dst_ip": "203.0.113.50",
  "dst_port": 443,
  "fingerprints": {
    "ja4t": "64240_2-4-8-1-3_1460_10",
    "ja4": "t13d0911h1_4b22cbed5bed_6d0c5a0d3e8f"
  }
}

The firewall rule's drop is not shown: the documented event layers are access rules, smart firewall, IDS and WAF.

Shaped like the documented event schema; the timestamp, ports, rule ids and ban duration are illustrative.

Now on your own traffic.

A demo runs the same pipeline against real packets, with the engineers who built it.