Behavioral detectors
Sigma answers "does this event match a known pattern". The behavioral
layer answers a different question: "is this entity behaving like
itself". The fourteen plugins run in imclassify, a C
input module. That module has one runInput thread. It is
not a stage of the line. mmclassify is the per-message
action, after mmwake, for plugins whose delay is 0. None
are registered, and the shipped ruleset does not call that action.
mmwake writes one entity file per source.
imclassify reads those files on its own clock.
Fourteen plugins are registered. Twelve poll every 60 seconds. attack_chain
and sequence poll every 300 seconds. A finding deposits
on the entity's pheromone slot. That deposit is added to
threat_level on a later line, as mesh_bonus
(confidence divided by 20000, capped at 0.30). It does not set
wake.alert. The host does not write
behavioral_signals.
How they run
mmwake writes /var/log/wake/<source>.entities
|
v
imclassify one input thread. Not the message path.
60s first_seen, temporal, velocity, icmp_tunneling,
cross_category, credential_pivot, slow_scan,
destination, lateral_movement, data_staging,
dns_tunneling, geo_travel
300s attack_chain, sequence
(they read signals already stored)
|
v
pheromone slot mesh_bonus on threat_level, cap 0.30
wake.alert is not set here
not in the fourteen profile (compiled, must not deposit)
role_incongruence (a promotion, not a plugin)
beaconing (an mmsigma correlation)
attack_chain and
sequence are in the fourteen. They poll stored
signals. They are not a second engine after the line is scored.
The fourteen
Registered in g_cyclic_plugins. A missing section in
classifiers.toml leaves the detector enabled. The only
switch every detector reads is enabled. Quoted strings.
Six detectors read no other key. The names below are the plugin names.
| Detector | Period | What it detects | Keys, or the compiled test | MITRE |
|---|---|---|---|---|
| first_seen | 60s | A new entity, or one returning after a long absence. | return_days=7 | TA0043, or TA0001 on a return |
| temporal | 60s | Activity in a historically quiet hour. | quiet_ratio=0.10, min_days=3 | TA0005 |
| velocity | 60s | A counter above mean + k sigma on recent 1h buckets. | k=3.0, min_windows=6 | depends on the counter |
| icmp_tunneling | 60s | ICMP (proto 2), at least 10 messages, average size above 200 or out/in above 2. | enabled only | TA0010, T1095, T1048.003 |
| cross_category | 60s | At least two categories among auth, network, and app. Then auth failures of at least 5 with any app event (high once the failures reach 20, otherwise medium), network denies of at least 10 with an app success (high), or auth failures of at least 5 with network allows of at least 10 (medium). Reaching 20 failures raises the first pattern from medium to high. 50 is only the confidence divisor on the deny pattern. Neither number is an emit gate. | enabled only | TA0006, TA0005, or TA0008 |
| credential_pivot | 60s | A success on the current record and at least 10 auth failures inside 6 hours. | enabled only. The 6 hours and the count of 10 are compiled. | TA0006, T1110, T1078 |
| slow_scan | 60s | Unique destinations accumulating while each window stays quiet. | dst_threshold=50, min_days=3, max_rate=5.0 | TA0043, T1046, T1595 |
| destination | 60s | Over 24 hours, a destination with any failure counter and at least three visitors emits shared_target. Fewer than two visitors returns early. The handoff finding cannot fire: failure and success are the whole visitor set or empty, never a split. | enabled only. The visitor counts and the 24 hours are compiled. | TA0006, T1110 |
| lateral_movement | 60s | Fan-out to new destinations, and the brute-force then success then spread shape. | fanout_threshold=5 | TA0007, TA0008, T1021, T1046, T1078 |
| data_staging | 60s | Rising egress, egress concentrated on one destination, or a normally inbound entity reversing direction. | growth_factor=2.0, trend_ratio=0.65, min_windows=6 | TA0010, T1041, T1048 |
| dns_tunneling | 60s | Oversized queries or an inverted out/in ratio on port 53 or 853. DoT is a separate signal, dot_tunneling. | dns_tunnel_whitelist. Average query size 200 is compiled. | TA0010, T1071.004, T1048.003 |
| geo_travel | 60s | One entity in two places too far apart for the elapsed time. | max_speed_kmh=900 | TA0001, T1078 |
| attack_chain | 300s | Several MITRE tactics already stored for one entity. Order does not matter. The correlator window is 4 hours, compiled. | enabled only | the finding carries no tactic of its own |
| sequence | 300s | Ordered steps, a learned cadence that stopped, or a handoff to another entity. Lookback is 6 hours. The handoff window is 1 hour. Both are compiled. | enabled only | the pattern's tactic: TA0010, TA0011, TA0008, TA0005 |
Why slow-scan needs its own detector
Velocity is a per-window test. An attacker who stays under it every single window is invisible to it, however long they keep going. The two detectors read the same traffic and disagree, which is the point.
max_rate=5.0 is an upper bound rather than a
floor: a genuinely slow scan is defined partly by being quiet.
Illustrative, representative shape.
Not one of the fourteen
profile- Compiled and tested, and not registered in
g_cyclic_plugins. It must not deposit. The plugin handle is read-only, so it cannot writeentity_profiles. A profile is a prior, not a detector. role_incongruence- A promotion inside the suppress path, not a plugin. When an
entity_profilesrow names a class, a signal in that class'sprofile_forbiddenset is promoted. The hot path does not writeentity_profilestoday, so the promotion matches nothing until a row exists. The host-compromise synthesis (shellcode_on_host,edr_alert) is compiled off. - beaconing
- An mmsigma correlation, at line rate, not a plugin. It fires only where a Sigma base rule feeds that correlation. An edge without one has no beacon coverage.
sequence is the detector that can fire because a learned
cadence stopped. The other thirteen fire on something that happened.
Known gaps
- DoH payload is not this detector
dns_tunnelingscores flows on port 53 and port 853. DNS over HTTPS on 443 is ordinary HTTPS at that layer. A beaconing correlation can still see a client that repeats on a cadence. That is not a look inside the HTTPS body.- Beaconing depends on a base rule
- Beaconing is a rule-set property. Nothing in
imclassifyreports that the base rule is missing. - Profile rows match nothing yet
profile_forbiddenandprofile_suppressionskey onentity_profiles.profile_class. No hot-path writer fills that table, so those rows currently match nothing.
The console's detection health report covers the Sigma layer: rules that produced a promoted signal, and rules that fire on too much of the enriched tail.
Output
The host persists the finding. It deposits on the pheromone slot and
notes one CLASSIFY reason. It does not write behavioral_signals.
A suppressed finding is renamed with a _suppressed suffix,
stamped info, and does not deposit. Sequence steps are
written to entity_sequences and kept for 168 hours.
wake.alert is still mmwake's mark.