Sensors¶
Sensors detect. They do not act: containment is a separate, measured plane and prevention is audit-first, described in Prevention and blocking.
Sysmon — the kernel flight recorder¶
The foundation. Plasma provisions the official Sysmon build with a baseline configuration and depends on its Event Log channel for process, network, DNS and file telemetry.
- Install: downloaded by the intelligent installer, EULA accepted
non-interactively (
-accepteula). - Health:
sysmon_service(service running),sysmon_feed(newest Sysmon event within 60 minutes) andsysmon_config(the installed config enables every event ID the rules need) are part ofplasma health. - Read: via Event Log API and WHIDS; never by loading a driver of our own.
- Baseline config enables: ProcessCreate (1), NetworkConnect (3),
DriverLoad (6), ImageLoad (7, unsigned only), ProcessAccess (10, LSASS
only), FileCreate (11), RegistryEvent (12/13/14), PipeEvent (17/18,
CreatePipe only), DnsQuery (22) and FileDelete (23, executable/archive
extensions only). The bounded filters keep volume down without making the
rules dormant. On a node where Sysmon already runs, apply the updated
config with
Sysmon64.exe -c C:\ProgramData\Plasma\tools\plasma-sysmon-baseline.xml.
WHIDS — written suspicion rules¶
WHIDS 1.7.0 reads Sysmon and applies gene rules — written expressions with an ATT&CK technique and a criticality of 0–10. Plasma ships twenty-five baseline rules:
| Rule | Score | Looks for |
|---|---|---|
| LOLBin Certutil | 7 | certutil -urlcache / -decode |
| Office Spawning Shell | 8 | winword/excel/outlook → cmd/powershell/wscript/cscript/mshta |
| SAM Hive Dump | 9 | reg save hklm\sam / hklm\system |
| Bitsadmin Transfer | 7 | bitsadmin /transfer, /create |
| Mshta Network | 8 | mshta with an HTTP(S) or UNC target (local paths excluded) |
| Rundll32 JS | 8 | rundll32 javascript: / url.dll / RunHTMLApplication |
| Net Account Add | 8 | net user … /add, net localgroup … /add |
| Encoded Cmd | 6 | -enc, -ec, -EncodedCommand |
| Scheduled Task Create | 6 | schtasks /create |
| Wmic Process Call | 7 | wmic process call create |
| File Delete by LOLBin | 6 | cmd/powershell/certutil/bitsadmin/wmic/reg deleting .exe/.ps1/archives (Sysmon 23/26) |
| Run Key Persistence | 7 | CurrentVersion\Run(Once) registry write (Sysmon 12/13) |
| Service Registry Persistence | 8 | System\CurrentControlSet\Services\ write (Sysmon 12/13) |
| Privileged Group Add | 8 | net localgroup administrators … /add |
| Execution From User Paths | 6 | process running from Downloads / Temp / Users\Public |
| LSASS Access | 9 | Sysmon 10 — a process opening LSASS with credential-dump access |
| Unsigned Driver Load | 8 | Sysmon 6 — driver from a user-writable path, signature missing/invalid |
| Suspicious Named Pipe | 8 | Sysmon 17/18 — PsExec/Cobalt-shaped pipe names |
| Masqueraded System Binary | 9 | svchost/lsass/csrss/… running from outside System32/SysWOW64/WinSxS |
| PowerShell Download | 7 | 4104 script block using WebClient/DownloadFile/Invoke-WebRequest |
| WMI Recon | 6 | 4104 script block querying Win32_ system classes |
| Wmic Recon | 6 | wmic … get/list/where for os/account/service/disk information |
WHIDS runs detect-only: every action band is configured to report.
The v1.7.0 engine has no response verbs at all; Plasma keeps it that way on
purpose. Alerts land in C:\Program Files\Whids\Logs\Alerts\ and are
normalized into the events store by plasma whids pull.
Detect-only describes this sensor, not the whole product. Containment
is a separate, measured layer — plasma enforce is armed by default but
limited to snapshot + kill at score 9+, with approval for isolation and
every other action — and plasma prevent configures Windows enforcement
points audit-first. See Prevention and blocking.
Pushed IOCs live in Database\Rules\plasma-iocs.gen and are regenerated by
plasma whids push --apply from high-confidence events.
Plugin sensors¶
plasma plugin runs an external sensor or detector process with a manifest,
a signed payload and an NDJSON contract. Records are validated, capped and
stamped before they reach the store; responders are plan-gated. See
Plugins for the ABI, lifecycle and security model.
Identity — the Security channel¶
Audit events (4624/4625) are written by LSA directly into the Security channel and are not re-emitted to realtime ETW sessions (proven on a live host: a 75-second trace saw zero of them). Plasma therefore reads the channel through the Event Log API:
plasma identity pull --events C:\ProgramData\Plasma\data\events.jsonl --since 60
| Events | Kind | What it adds |
|---|---|---|
| 4624 / 4625 | auth |
logon success/failure, type, source, workstation |
| 4768 / 4769 / 4770 / 4771 | auth |
Kerberos TGT, service ticket, renewal, pre-auth failure (KDC only) |
| 4776 | auth |
NTLM credential validation |
| 4688 | process |
process creation with creator, parent image and command line |
Auth records carry user, dest_ip (source address), logon type,
workstation, process basename and a UTC timestamp. Success is info;
failure is medium (score 0.5). Duplicates are removed by hash. The
PlasmaIdentityPull task runs the same bounded pull every 15 minutes.
ETW tap — the on-demand microphone¶
plasma-tap.exe (krabsetw) opens a trace session for a bounded window,
matches events against 31 rules, prints JSONL matches, and exits. No
service, no persistence, no standing driver of ours.
plasma tap list # rules
plasma tap selftest # compile + self-check
plasma tap run --providers powershell,dns,wmi --for 10s --max-matches 500
Providers: PowerShell (4104 script blocks), WMI activity, DNS client,
.NET runtime, Schannel, and Security-Auditing aliases. Rules are
case-insensitive substring matches on a named field, with event_id = 0
meaning "any". Notable rules include Invoke-Mimikatz, MiniDumpWriteDump,
amsiInitFailed, IEX(New-Object Net.WebClient, Invoke-Shellcode,
__EventFilter/ActiveScriptEventConsumer, ngrok and trycloudflare
queries.
Tap exit codes are meaningful: 3 means the session could not be started
(no admin rights or ETW unavailable) — the tap never pretends.
Deep persistence probe¶
Sysmon sees persistence changes; plasma deep persistence sees the
whole picture:
plasma deep persistence --json-out C:\ProgramData\Plasma\deep-persistence.json
It reads, in one bounded pass:
- registry Run / RunOnce keys (HKLM and HKCU),
- services with their
ImagePath, start mode and account, - scheduled-task actions and triggers (Microsoft paths excluded),
- IFEO
Debuggerhijacks, - Winlogon
Shell/Userinit, - WMI event filters, consumers and binding count.
Every binary path found gets an Authenticode check (bounded, capped). An
item is flagged suspect when it is unsigned and outside C:\Windows.
That flag is evidence for a human — never an automatic action.
DTrace — the on-demand microscope¶
The third detection layer. WHIDS and the tap are always-on and cheap;
DTrace is surgical: a reviewed script, a bounded window, then gone. It is
never installed silently by the installer — plasma trace provision is
explicit because it changes a boot setting and needs a restart.
- Reviewed scripts only (
sensors/dtrace/*.d), validated at load time. - No destructive mode:
-wis never passed andsystem()is refused. - Bounded: wall-clock window, row cap, process killed at the end.
- Rows normalize to
kind: "trace"with technique and score, so chains, watch, drift and fleet consume them unchanged. tidis emitted rather thanpid:pidis not portable across the DTrace builds found on Windows Server.
WHIDS watchdog¶
WHIDS 1.7.0 can hang in StartPending or stop after a manual restart; SCM
failure actions only cover crashes. The installer registers
PlasmaWhidsWatchdog (SYSTEM, every two minutes) to run
plasma whids ensure, which force-stops a hung service and starts it
again. plasma whids diagnose reports the task and its state; actions are
logged to C:\ProgramData\Plasma\logs\whids-watchdog.log.
Sensor-of-sensors¶
The health checks that watch the watchers:
| Check | Meaning |
|---|---|
sensor_heartbeat |
the events diary is still being written (newest row < 24h) |
rdp_hardening_drift |
fDenyTSConnections=0 and a sane SecurityLayer — the lockout-incident checks |
tap_sidecar |
the ETW tap binary is present |
whids_service / sysmon_feed |
the detection stack is alive |