Skip to content

Beacons

A beacon is a device that connects to the same destination over and over again, at a steady interval. Malware does this to ask its command and control server for instructions: every 60 seconds, every five minutes, every hour, with small and often deliberately randomized pauses in between. Plenty of legitimate software does it too. Update checkers, monitoring agents, chat clients, cloud sync and smart home devices all call home on a schedule. The pattern itself is not malicious, but it is exactly the pattern that malware has to produce to stay in contact with its operator, and it survives encryption, domain fronting and changing IP addresses.

Nzyme detects beacons passively from the Ethernet traffic its taps already record. It does not inspect payloads and does not need any signatures. It looks at when a device connected to a destination, groups the connections, and measures how regular they are. Everything that passes the thresholds becomes a beacon that you can review, name, classify, annotate, exclude and alert on.

You can find all detected beacons on the Beacons page under Ethernet in the sidebar of your Nzyme web interface.

How Nzyme Detects Beacons

Beacon detection runs on nzyme-node every minute, for every tenant that has the Ethernet subsystem and beacon detection enabled. Each run reads the connections of the tenant's taps inside the configured detection window (24 hours by default), groups them into candidates, analyzes the timing of each candidate and writes the results to the beacon tables. The detection does not need any additional capture configuration on nzyme-tap. If Nzyme records TCP, UDP, TLS, SOCKS or DNS data for a tap, that data is analyzed for beacons.

Data Sources

A candidate is one device calling out to one destination. What counts as the destination depends on the data source, so that a beacon keeps its identity even when the destination changes its IP address:

Data Source Beacon Type Destination Grouped By
TLS sessions TLS Server name (SNI) and port. Sessions without a server name are grouped by destination address and port.
SOCKS tunnels SOCKS Tunneled destination host (or address) and port. The proxy itself is not the destination.
DNS queries DNS Registered domain of the queried name. Queries for a.cdn.example.com and b.cdn.example.com belong to the same example.com beacon. Reverse lookups are ignored.
Other TCP sessions TCP, HTTP, SSH Destination address and port. Sessions that Nzyme recognized as HTTP or SSH become HTTP or SSH beacons.
Other UDP sessions UDP Destination address and port.

Each data source can be enabled and disabled individually in the beacon configuration. All sources are enabled by default.

The Other TCP sessions and Other UDP sessions sources only cover sessions that Nzyme did not recognize as a higher-level protocol. A TLS session, for example, is analyzed by the TLS source and never counted a second time as a TCP beacon. Sessions of protocols that are periodic by design, like time synchronization, are skipped entirely. Connections to multicast addresses are always ignored, because service discovery protocols are periodic by nature.

A generic TCP or UDP beacon is upgraded in place when a later run recognizes the traffic as TLS, HTTP or SSH. The beacon keeps its name, classification, notes and check-in history.

Site-Local Destinations

Nzyme tracks whether the destination of a beacon is site-local, meaning an internal address, a loopback address, or a DNS domain that only resolves inside a network, like .local, .lan, .internal or names without a dot. Internal addresses are the private, unique local and link-local ranges, the configured and learned networks of your site and, if configured, the carrier-grade NAT range 100.64.0.0/10. Most beacons to site-local destinations are domain controllers, update servers, monitoring systems and other infrastructure that devices are expected to talk to on a schedule.

Site-local destinations are not analyzed by default, which keeps internal infrastructure out of the list and focuses detection on devices calling out of the network. Enable the Include site-local destinations setting to also detect beacons inside the network, for example lateral movement or internal staging servers, and use exclusions for the infrastructure you know about. The Destination is Site-Local filter on the beacons page separates the two groups.

Interval Analysis

For each candidate, Nzyme sorts the connection timestamps and performs the following steps:

  1. Collapse parallel connections. A browser opening six connections to the same host within a second is one check-in, not six. Timestamps that are closer together than half of the minimum interval, and at most 5 seconds, are collapsed into a single check-in. The collapsed connections stay attached to the check-in and are shown as parallel connections in the check-in history.
  2. Compute the intervals between consecutive check-ins and their median interval. The median rather than the mean is used so that a single long gap, like a device that was switched off over night, does not distort the result.
  3. Compute the jitter. Jitter is the median absolute deviation of the intervals, relative to the median interval. A beacon with a median interval of 60 seconds whose intervals typically deviate by 6 seconds has a jitter of 10%. Jitter is a measurement and is shown next to the interval of every beacon and device. It is not a threshold.
  4. Compute the regularity. Nzyme draws a tolerance band around the median interval, as wide as the maximum jitter setting allows (30% by default, so from 42 to 78 seconds for a 60 second beacon), and counts how many intervals fall inside it. The share of intervals inside the band is the regularity.

The candidate is a beacon when all three thresholds are met:

  • At least minimum check-ins (6 by default) in the detection window.
  • A median interval of at least the minimum interval (30 seconds by default, 60 seconds for DNS beacons). Shorter intervals are keep-alives and streams, not beacons.
  • A regularity of at least the minimum regularity (75% by default).

Lowering the minimum regularity or widening the maximum jitter band finds beacons that randomize their timing more aggressively, at the cost of more false positives from software that happens to connect somewhat regularly. Raising the minimum regularity is the first thing to try if you see false positives. Longer detection windows find slower beacons, but require the underlying session data to be retained for at least that long.

Beacons, Devices and Check-Ins

A beacon is a destination. The devices of a beacon are the individual clients that call out to it, identified by their IP and MAC address. Each device is analyzed on its own, has its own interval, jitter and regularity, and has to pass the thresholds on its own before it is added to a beacon. The interval of the beacon is the median of its device intervals.

A check-in is one call to the destination. Nzyme stores every check-in with its timestamp, the device, the destination address and MAC that was actually contacted, the size of the connection where the data source knows it, the number of parallel connections it was collapsed from, the tap that observed it, and a link to the underlying session. Check-ins already stored by a previous run are not stored again, so the history grows exactly as the device keeps calling out.

Once a device is part of a beacon, its check-ins keep being recorded even when its timing drifts out of the thresholds. A beacon is never deleted automatically, only by a user or by an exclusion. Its check-ins, however, follow the check-in retention time and are deleted after 30 days by default.

Every new beacon receives a random, unique name like quiet-heron-42. The name is stable, used in alerts and can be changed on the beacon details page together with a description.

Multiple Nodes

All nodes of a cluster run beacon detection. A tenant is only processed by one node at a time, the others skip the tenant for that run. How long the detection takes per tenant, and how much of that time is spent reading candidates from the database, is reported as Beacon Detection timers on the node details page under System -> Cluster.

Expect a long list of beacons after enabling detection on a network for the first time. Almost every piece of software calls home on a schedule, and Nzyme has no way of knowing which of these calls are expected. The initial review does most of the work. Once it is done, only new beacons need attention.

  1. Exclude the noise first. Sort or filter the list by destination host and look for software that produces many beacons at once. Telemetry and monitoring services are the usual suspects. Datadog agents, for example, send metrics, logs and traces to dozens of subdomains, each of which shows up as its own beacon. One exclusion with a wildcard host like *.datadoghq.com covers all of them, and the Delete the matching beacons now option removes the existing ones in the same step. Do the same for your own update servers, monitoring systems and domain controllers, or for whole networks if an entire segment is infrastructure. See Exclusions.
  2. Classify what remains. Mark beacons you can explain as benign, and beacons you cannot explain yet as suspicious. Use the Classify all Beacons button to classify everything that matches a filter in one step, for example all beacons to a destination host you recognize. Use notes to record what you found out. See Classification.
  3. Tune the thresholds. If the list is still full of software that connects somewhat regularly without being a beacon, raise the minimum regularity or the minimum number of check-ins. If beacons with heavily randomized timing are missed, widen the maximum jitter band or lower the minimum regularity. Changed thresholds only affect what is detected from now on. Delete All Beacons on the settings page starts over with a clean list after tuning, while exclusions and settings are kept. See Configuration.
  4. Enable alerts. Once the list is quiet, enable the new beacon and new device alerts to be told about beacons as they appear, and the suspicious and malicious activity alerts to be told when a beacon you have reviewed calls out again. See Alerts.

From then on, review new beacons as they are detected or alerted, and either exclude them, classify them as benign or escalate them. Exclusions record when they last matched traffic, so you can tell which ones are still needed.

Working With Beacons

The Beacons Page

The Beacons page lists the beacons of the selected tenant that were active at any point in the selected time range, with their classification, name, type, destination, device count, median interval and jitter, check-in count and when they were first and last seen. The Active Beacons chart shows how many beacons had check-ins over time in the same range.

Beacons can be filtered by name, description, type, classification, destination host, address and port, whether the destination is site-local, device count, check-in count and interval. The list and its filters work like every other Ethernet search page, and the small filter icons next to values add that value to the filters. Beacons that match an exclusion are marked as excluded in the list.

The counts above the table show how many beacons there are per classification in the selected time range. Users with the Manage Ethernet Monitoring permission can change the classification of a single beacon directly in the table and can classify all beacons that match the current filters and time range in one step with the Classify all Beacons button.

Beacon Details

Click on the name of a beacon to open its details page:

  • Name and Description. The generated name and an optional description, both editable.
  • Classification. The current classification, when it was last changed, and notes. Notes are short, timestamped comments with their author, meant for recording what was found out about a beacon.
  • Details. Type, destination, most recent destination address if the destination is a host name, number of devices, median interval, total check-ins, first and last seen.
  • Protocol Details. What the data source knows about the destination: for TLS beacons the server name, TLS version, ALPN, JA4 client fingerprint, server certificate and trust verdict; for SOCKS beacons the proxy, SOCKS type, tunneled destination and username; for DNS beacons the query types, the DNS servers used and the recently queried names; for TCP and UDP beacons the session fingerprint. Protocol details are refreshed with the most recent check-in.
  • Devices. The devices that called out to this destination at any point in the selected time range, each with its own interval, jitter, regularity and check-in count. These per-device figures cover the whole history of the device, not only the time range.
  • Check-Ins. The check-in history of the beacon in the selected time range. Two charts plot the interval since the previous check-in and the size of each check-in over time, with one series per device. A regular beacon draws a flat line in the interval chart. The table below lists the individual check-ins with the device, destination, size, number of collapsed parallel connections and tap. Check-ins can be filtered by device address and MAC, destination address and MAC, size and number of parallel connections.
  • Connections to Destination. All TCP and UDP connections to the destination address of the beacon in the selected time range, including the beacon connections themselves. This shows what else devices in your network talk to the destination about, and links to the matching sessions.

Users with the Manage Ethernet Monitoring permission can create an exclusion pre-filled with the destination of the beacon, or delete the beacon, from the details page. Deleting a beacon removes it with its devices, check-ins and notes. It is detected again under a new name if the devices keep calling out.

Classification

Every beacon has one of four classifications:

Classification Meaning
Unknown The default. Nobody has looked at this beacon yet.
Benign Reviewed and expected, for example an update checker or a monitoring agent.
Suspicious Reviewed and not explained yet. Worth watching.
Malicious Reviewed and confirmed to be unwanted.

The classification is set by users and never changed by Nzyme. It is a filter on the beacons page, an attribute of every beacon alert, and the switch that enables the activity alerts described below. Nzyme does not stop recording a beacon because it is classified as benign. If a benign beacon should disappear from the list entirely, create an exclusion for it instead.

Exclusions

Exclusions keep traffic out of beacon detection. Use them for destinations you never want to see as beacons, like your own update servers, monitoring systems, domain controllers or an entire network. Exclusions are managed on the Exclusions tab of the Beacons page and require the Manage Ethernet Monitoring permission.

An exclusion has a name, an optional description and one or more criteria. Traffic is excluded when all filled criteria match:

Criterion Matches
Beacon Types One or more of TLS, HTTP, SSH, SOCKS, DNS, TCP, UDP. Leave all unchecked to match every type.
Destination Host The TLS server name, SOCKS tunneled host or DNS domain. * is a wildcard. *.example.com matches example.com and all of its subdomains.
Destination Address A single IP address or a network in CIDR notation, IPv4 or IPv6. Matched against the destination address of the connection.
Destination Ports Single ports and ranges, separated by commas, like 80,443,8000-8100. DNS beacons have no port and never match a port criterion.
Device Address A single IP address or network. Limits the exclusion to the devices in it.
Device MAC A single MAC address. Limits the exclusion to that device.

An exclusion without device criteria excludes the destination for every device. An exclusion with device criteria excludes it only for the matching devices. Other devices calling out to the same destination are still detected.

While you fill in the form, Nzyme shows which existing beacons and devices the criteria would match, so that you can see the effect before saving. When creating an exclusion, you can choose to delete the matching beacons right away. Beacons where only some devices match lose those devices and keep the others. Existing beacons that are not deleted stay in the list, marked as excluded. They no longer receive check-ins and do not raise alerts, and you can delete them from the exclusion details page at any time with Delete Matching Beacons.

Exclusions take effect with the next detection run. Each exclusion records when it last matched traffic, which tells you whether it is still needed. A disabled exclusion is kept but not applied, and traffic it matched is detected again. Deleting an exclusion does not restore beacons that were deleted with it.

Alerts

Beacon detection can raise four kinds of detection alerts. All of them are disabled by default and are enabled individually in the Alerting section of the beacon configuration.

Detection Type Raised when
BEACON_NEW A beacon is detected for the first time.
BEACON_NEW_SOURCE A new device starts calling out to a destination that is already a known beacon.
BEACON_ACTIVITY_SUSPICIOUS A beacon classified as Suspicious records new check-ins.
BEACON_ACTIVITY_MALICIOUS A beacon classified as Malicious records new check-ins.

All beacon alerts belong to the Ethernet subsystem and carry the beacon name, type, classification and destination as attributes, so they can be used in action templates and subscriptions. The new device alert additionally carries the address and MAC of the device.

The activity alerts are the way to get notified about a beacon you have reviewed and found to be a problem, without alerting on every beacon in the network. Classify the beacon as suspicious or malicious, enable the matching alert type, and Nzyme raises an alert for every detection run in which the beacon had new check-ins. As with all detection alerts, repeated activity on the same beacon updates the existing alert and extends its timeline. A new event, which triggers subscribed actions, is only created when the alert was inactive for five minutes. See the alerting documentation for how alerts are grouped and re-triggered.

Beacon alerts are raised at the locations of the taps that recorded the check-ins. A beacon with devices at several locations raises its alerts at each of them.

Alerts about beacons that match an exclusion are not raised.

Configuration

Super administrators, organization administrators and users with the Manage Ethernet Monitoring permission can configure beacon detection on the Settings tab of the Beacons page. All settings are per tenant and take effect with the next detection run. Everyone with access to the Ethernet subsystem of a tenant can view beacons, devices, check-ins and exclusions. Changing names, descriptions, classifications and notes, deleting beacons and managing exclusions requires the Manage Ethernet Monitoring permission.

Detection

Key Default Description
Beacon detection enabled true Turns beacon detection off for the tenant. Existing beacons are kept.
Include site-local destinations false Whether destinations with internal or loopback addresses and internal DNS domains are analyzed.
Detection window (Minutes) 1440 How far back each run looks for connections. Between 60 minutes and 7 days.
Minimum check-ins in window 6 How often a device has to call out to a destination within the window before it is considered.
Minimum interval (Seconds) 30 The smallest median interval that counts as a beacon. Also determines the window in which parallel connections are collapsed.
Minimum interval for DNS beacons (Seconds) 60 The same for DNS beacons, which tend to be queried more often by normal software.
Maximum jitter (Percent) 30 Width of the tolerance band around the median interval that an interval has to fall into to count as regular.
Minimum regularity (Percent) 75 Share of intervals that have to fall into the tolerance band.
Check-in retention time (Days) 30 How long individual check-ins are kept. Beacons and their devices are kept until deleted.

Data Sources

Key Default Description
TLS sessions true Analyze TLS sessions, grouped by server name.
HTTP sessions true Analyze TCP sessions recognized as HTTP.
SSH sessions true Analyze TCP sessions recognized as SSH.
SOCKS tunnels true Analyze SOCKS tunnels, grouped by tunneled destination.
DNS queries true Analyze DNS queries, grouped by registered domain.
Other TCP sessions true Analyze all remaining TCP sessions.
Other UDP sessions true Analyze all remaining UDP sessions.

Alerting

Key Default Description
Alert on new beacon false Raise BEACON_NEW alerts.
Alert on new device joining a known beacon false Raise BEACON_NEW_SOURCE alerts.
Alert on activity of suspicious beacons false Raise BEACON_ACTIVITY_SUSPICIOUS alerts.
Alert on activity of malicious beacons false Raise BEACON_ACTIVITY_MALICIOUS alerts.

Deleting All Beacons

The settings page also offers to delete all beacons of the tenant, including their check-in history and notes. Names and classifications are lost. Device and asset data, exclusions and the settings themselves are not affected. Beacons are detected again under new names if the devices keep calling out, unless an exclusion matches them. This is useful after tuning the thresholds or after adding a set of exclusions, to start from a clean list.

Retention

Check-ins are deleted after the check-in retention time configured above, at the start of every detection run. Beacons, their devices, notes and exclusions are kept until a user deletes them.

Beacon detection reads the TLS sessions, SOCKS tunnels, DNS log and TCP and UDP sessions that Nzyme stores for the tenant. The detection window cannot reach further back than those data categories are retained. If you configure a detection window of several days, make sure the retention times of the Ethernet: Layer 4 data category, which covers TCP and UDP sessions as well as TLS sessions and SOCKS tunnels, and of the Ethernet: DNS data category cover it. See Configuring Retention Times for details.