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
.thrtdatabase (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,$!labelsand$!tags. It also reads the prevalence tableimclassifypublishes. 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_levelis the hunt number.wake.alert=yesis the mark, set when the alert score reaches 0.70. Severity comes fromseverity_id. Counters use a.score_baselinesidecar. A mesh deposit is added tothreat_levelonly, asmesh_bonus(confidence divided by 20000, capped at 0.30). That bonus does not setwake.alert. Requires the SIMD TurboVM parser. This is the scorer the shipped ruleset calls. mmclassify- event plugins (C)- Output action.
doActionruns on the worker that has the line, aftermmwake, once per message. It dispatches plugins whosedelay_sis 0, adds eachscore_contributiontothreat_level, and writes$!classify. It does not setwake.alert. No event plugin is compiled in (N_EVENT_PLUGINSis 0). The shipped rulesets do not load the module and do not call the action. imclassify- fourteen detectors (C)- Input module. One
runInputthread, the same shape asimmesh, not an action on the message. It dispatches the fourteen plugins whosedelay_sis greater than 0. They are listed on behavioral detectors. A finding deposits on the pheromone slot. The deposit does not setwake.alert. Beaconing is not one of the fourteen: it is an mmsigma correlation.
Mesh, engine, and console
libwakeandimmesh- pheromone gossip (C)- Edges broadcast deposits to their tenant peers over SWIM and PlumTree, run by the
immeshrsyslog module. Receivers add the confidence into the shared counter. A quorum alert wants two distinct sources by default. That quorum alert is notwake.alert.wake.alertis set on the host that scored the line. wakeweb- SOC console- Delegates authentication to one identity store. A
viewersession is read-only: mutations raisePermissionError. The analyst list at/alertshas two lenses. Page iswake.alert=yes. Hunt isthreat_levelat or above 0.70 when the mark is not yes. See the console.
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.
- 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_contributionJSON; rsyslogomfwdmoves it.temporal_orderedand 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_bonusonthreat_level, capped at 0.30, and it does not setwake.alert. A quorum alert is a separate check, two sources by default. Injectedwake_signalJSON has no TurboVM arena, so that ruleset skips mmsigma. This plane is liveness and deposit gossip, not Sigma partials.
| Entity | threat_level | wake.alert | Sources |
|---|---|---|---|
| 203.0.113.66 | 0.82 | yes | 5 |
| 198.51.100.23 | 0.74 | no | 3 |
| user:svc-backup | 0.61 | no | 2 |
| 192.0.2.140 | 0.40 | no | 2 |
| host:edge-04 | 0.18 | no | 1 |
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.eventswithomclickhouse, and its decisions towake.alerts. Entity rows are SQLite. The fourteen detectors do not live in either store:imclassifyreads 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.