WAKE

WAKE enriches, matches, and scores the line inside rsyslog, then gossips deposits across a tenant-scoped mesh. The message path is C. mmclassify is the output action for event-cadence plugins. imclassify and immesh are input modules, each on its own thread.

The C hot path

On each source ruleset the line is parsed, then enriched, then matched, then scored, before it is written. mmsigma runs immediately before mmwake on that same message, so the score sees $!sigma. Some sources then call wake_severity, which maps a vendor severity word onto severity_id. Suricata does not: it keeps its own map. The shared logstore calls wake_sigma only when that call has not already run. None of these actions blocks the rsyslog queue. mmclassify is the next action in the module contract. The shipped ruleset does not call it. imclassify is not an action on this line.

mmenrich - CTI enrichment (C)
IOC lookup against a compiled .thrt database (IPs, domains, hashes, emails) plus MaxMind GeoIP City and ASN. The lookup path is bloom filter, then an accel table and binary search, with the CRC32C instruction from SSE 4.2 and ARMv8-CRC used for hashing; the vector code paths belong to the offline IOC miner rather than the lookup. Writes $!threat, $!labels and $!tags. It also reads the prevalence table imclassify publishes. The action itself keeps no entity state and does not score.
mmsigma - Sigma detection & correlation (C)
Multi-pattern Sigma rule matching with a Teddy/SIMD matcher, carrying each rule’s MITRE ATT&CK technique into the verdict. The same action runs the correlation engine (event_count, value_count, temporal, sum/avg/percentile, beaconing, temporal_ordered). Commutative partials hash onto one owner in a configured ring as $!sigma_contribution; the module does not open sockets. Percentile, median, ordered and beaconing types stay local. This plane does not merge with the pheromone table. See the mmsigma mesh pattern.
mmwake - score and entity file (C)
Writes two numbers on the line. Both start at 0.10. threat_level is the hunt number. wake.alert=yes is the mark, set when the alert score reaches 0.70. Severity comes from severity_id. Counters use a .score_baseline sidecar. A mesh deposit is added to threat_level only, as mesh_bonus (confidence divided by 20000, capped at 0.30). That bonus does not set wake.alert. Requires the SIMD TurboVM parser. This is the scorer the shipped ruleset calls.
mmclassify - event plugins (C)
Output action. doAction runs on the worker that has the line, after mmwake, once per message. It dispatches plugins whose delay_s is 0, adds each score_contribution to threat_level, and writes $!classify. It does not set wake.alert. No event plugin is compiled in (N_EVENT_PLUGINS is 0). The shipped rulesets do not load the module and do not call the action.
imclassify - fourteen detectors (C)
Input module. One runInput thread, the same shape as immesh, not an action on the message. It dispatches the fourteen plugins whose delay_s is greater than 0. They are listed on behavioral detectors. A finding deposits on the pheromone slot. The deposit does not set wake.alert. Beaconing is not one of the fourteen: it is an mmsigma correlation.

Mesh, engine, and console

libwake and immesh - pheromone gossip (C)
Edges broadcast deposits to their tenant peers over SWIM and PlumTree, run by the immesh rsyslog module. Receivers add the confidence into the shared counter. A quorum alert wants two distinct sources by default. That quorum alert is not wake.alert. wake.alert is set on the host that scored the line.
wakeweb - SOC console
Delegates authentication to one identity store. A viewer session is read-only: mutations raise PermissionError. The analyst list at /alerts has two lenses. Page is wake.alert=yes. Hunt is threat_level at or above 0.70 when the mark is not yes. See the console.
Entity profile198.51.100.1 · tenant: north
TCP baseline UDP baseline ICMP deviation
Weekly traffic baseline00h - 24h
Mon
Tue
Wed
Thu
Fri
Sat
Sun
low high  ·  deviation
Per-protocol EMA classification with a weekly traffic baseline. The amber cell marks a deviation from the rolling profile. Illustrative - representative data, RFC 5737 documentation IPs.

Pipeline

  log sources    syslog, journald, file tail, MQTT, ...
       |
       v
  [ rsyslog ]
       +-- mmnormalize + TurboVM   named fields
       +-- mmenrich                CTI / GeoIP / prevalence -> $!threat
       +-- mmsigma                 Sigma + correlation -> $!sigma
       +-- mmwake                  threat_level + wake.alert
       +-- mmclassify             event plugins, this message
                                     none registered
                                     shipped ruleset does not call it
       |
       separate threads, same process
       +-- imclassify             14 detectors, own runInput thread
       |                             deposit does not set wake.alert
       +-- immesh                  gossip + quorum on the pheromone file
       |                             not a step of this line
       v
  [ ClickHouse wake.events ]
       |
       v
  [ wakeweb ]                /alerts: page and hunt

Two meshes, one engine

A central correlator assumes a reliable path back to one box. That does not hold for a remote site, a DMZ collector, or an air-gapped floor. WAKE uses two planes that must not be collapsed into one gossip topic.

two planes one destination vs every peer
Sigma reduce compared with pheromone gossip On the left, the Sigma reduce plane: three peers send their commutative partials to exactly one owner chosen by hashing the correlation identifier and group onto a configured ring. On the right, the pheromone plane: every peer broadcasts signals about scored entities to every other peer, accumulating into a shared counter. plane 01 / sigma reduce Exactly one owner. Commutative partials merge on a single owner. 1 emit 2 emit 3 emit 0 edge-00 OWNER owner = djb2(corr_id TAB group) % peercount One configured ring per site. Carried by ordinary rsyslog omfwd; the module opens no socket. plane 02 / pheromone Everyone tells everyone. Signals about scored entities, tenant-wide. 1 2 3 4 accumulated, then decayed on a timer Liveness and entity scoring. Never Sigma partials: collapsing the two planes would double-count fires.
Same engine, two shapes. Sigma reduce is modulo hashing onto one owner in an operator-configured ring, so a partial is applied exactly once; changing the ring size reshuffles every group. Pheromone is gossip to every tenant peer, where the same signal arriving from several directions is the point.
Sigma reduce (hashed owner)
Commutative correlation windows (event_count, value_count, temporal, sum/avg) merge among the peers named in the overlay's ring. Owner = djb2(corr_id TAB group) % peercount. Non-owners emit $!sigma_contribution JSON; rsyslog omfwd moves it. temporal_ordered and raw beaconing stay on the node that saw the events. mmsigma never opens a socket. See the vector diagram.
Pheromone (SWIM / PlumTree)
Each edge broadcasts deposits to tenant peers. Receivers add the confidence into a shared counter, which decays on a timer. That counter becomes mesh_bonus on threat_level, capped at 0.30, and it does not set wake.alert. A quorum alert is a separate check, two sources by default. Injected wake_signal JSON has no TurboVM arena, so that ruleset skips mmsigma. This plane is liveness and deposit gossip, not Sigma partials.
Threat activitythreat_level · 0 to 1
Entitythreat_levelwake.alertSources
203.0.113.66
0.82
yes5
198.51.100.23
0.74
no3
user:svc-backup
0.61
no2
192.0.2.140
0.40
no2
host:edge-04
0.18
no1
Illustrative. Both numbers start at 0.10. wake.alert=yes is the mark, at 0.70 on the alert score, and one host can set it. A line can sit above 0.70 on threat_level with the mark still no: counters and the mesh add to threat_level only. RFC 5737 documentation IPs.

Campaign, then TAC shadow

The campaign matcher that runs is attack_chain, one of the fourteen imclassify plugins, on that module's thread. It matches tactics already stored, on one entity, and order does not matter. sequence adds order, absence, and a handoff. Neither is the pheromone plane.

TAC (Transient Associative Coupling) is a local memory of which techniques co-fire on the same entity. tac_shadow_enabled defaults off. Nothing in wake.alert or threat_level reads it. It does not replace attack_chain.

Integration

WAKE does not dial a control plane to score a line. Detection stays on the host that has the log.

Edge-portable
The WAKE rsyslog modules run on FreeBSD and Linux. Only the platform integration differs; detectors are the same.
Storage
Each edge writes the enriched stream to ClickHouse wake.events with omclickhouse, and its decisions to wake.alerts. Entity rows are SQLite. The fourteen detectors do not live in either store: imclassify reads the entity file on its own thread and deposits on the pheromone slot.
Parsing
The fast path is TurboVM, a 64-byte bytecode VM with SSE 4.2 / NEON code paths integrated into liblognorm.