You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add synchronous fast-path blocklist enforcer (EPP) and update README
Implement a synchronous blocklist evaluator in the processor hot loop that
blocks known-bad IPs, CIDRs, domains, process names, file paths, and chain
patterns in sub-millisecond time — skipping both graph writes and LLM analysis.
README updates: new EPP section, Usage Guide (response modes, recommended
workflow, API examples), updated architecture diagram, pipeline flow, security
framework (9 defense-in-depth layers), Prometheus metrics, project structure,
test count (~550), and corrected default mode (passive). Retake three
screenshots with live agent data showing fast-path blocking in action.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2.**Normalize** — Raw events are standardized to OCSF (Open Cybersecurity Schema Framework)
60
-
3.**Extract & Graph** — Entities (processes, IPs, domains, files) and relationships are written to a Kuzu property graph
60
+
3.**Extract & Enforce** — Entities are extracted and checked against the synchronous fast-path blocklist. Matches are blocked instantly. Non-blocked entities are written to the Kuzu property graph
61
61
4.**Analyze** — An LLM with tool-use capabilities investigates novel behaviors using graph context, threat intel, and external APIs
62
62
5.**Respond** — A policy engine maps severity to actions, checks baselines/allowlists, requests approval, executes, and audits everything
63
63
@@ -163,6 +163,21 @@ A three-mode response engine that maps LLM severity verdicts to automated or sup
163
163
164
164
**Protected process list** prevents the agent from terminating system-critical processes (`launchd`, `csrss.exe`, `systemd`, `sshd`, etc.) regardless of severity.
165
165
166
+
### Synchronous Fast-Path Blocklist (EPP)
167
+
168
+
The fast-path enforcer evaluates blocklist rules **synchronously in the processor pipeline**, immediately after entity extraction — before the event reaches the graph database or LLM analyzer.
169
+
170
+
**How it works:**
171
+
172
+
- Blocklist rules are compiled into O(1) in-memory structures: IP hash sets, domain hash sets, CIDR prefix lists, and glob pattern lists
173
+
- On every event, entities are checked in evaluation order: **IPs → CIDRs → domains → process names → file paths → chain patterns**
174
+
- On match: a CRITICAL finding is generated and the response engine is triggered immediately, **skipping both the graph write and LLM analysis**
175
+
- The compiled rule set is thread-safe with periodic SQLite refresh (5s default) and instant invalidation when rules are added or removed via the dashboard
176
+
177
+
**Why it matters:** Known-bad indicators (C2 IPs, malicious domains, prohibited process chains) are blocked in sub-millisecond time — no waiting for the LLM analysis cycle. This turns the EDR from a detect-and-alert system into a real-time enforcement point for known threats.
178
+
179
+
The dashboard shows a **fast-blocked event counter** on the Overview tab when events have been blocked by this path.
180
+
166
181
### User Identity Enrichment
167
182
168
183
Every process in the graph is linked to the user who spawned it. The agent resolves the owning user for each process via OS-level APIs (`stat /proc/<pid>` on Linux, `ps -o user=` on macOS, token query on Windows) and writes `(:User)-[:SPAWNED]->(:Process)` edges into the graph.
@@ -283,6 +298,7 @@ edr_llm_call_latency_seconds
283
298
edr_llm_verdicts_total{severity}
284
299
edr_dga_detections_total
285
300
edr_persistence_detections_total{type}
301
+
edr_events_fast_blocked_total
286
302
edr_response_actions_total{action, result}
287
303
edr_tamper_detections_total{event_type}
288
304
edr_agent_uptime_seconds
@@ -311,19 +327,26 @@ macOS system tray icon provides live status, native notifications for HIGH/CRITI
7.**Behavioral Baseline** — Learning mode builds a profile of normal behavior; active mode only responds to deviations
326
-
8.**Self-Protection** — Tamper detection, protected process list, heartbeat monitoring
344
+
4.**Real-Time Detection** — DGA, persistence, IOC, and fast-path blocklist detectors catch known patterns immediately
345
+
5.**Fast-Path Enforcement** — Synchronous blocklist evaluates IPs, domains, CIDRs, process names, file paths, and chain patterns in the processor hot loop — blocking known threats instantly without LLM analysis
346
+
6.**AI Reasoning** — LLM analyzes novel behaviors with graph context and external intelligence
sudo .venv/bin/python3 -m agent.main --config config.yaml --log-level INFO
361
384
```
362
385
363
-
Dashboard opens at `http://localhost:9200`. The agent starts in **learning mode** by default — switch to **active** mode via the Settings tab when ready to enforce response actions.
386
+
Dashboard opens at `http://localhost:9200`. The agent starts in **passive** mode by default — switch to **learning** to build a behavioral baseline, then **active** to enforce.
387
+
388
+
---
389
+
390
+
## Usage Guide
391
+
392
+
### Response Modes
393
+
394
+
The agent operates in one of three modes, switchable at runtime via the dashboard **Settings** tab or the API:
395
+
396
+
| Mode | What happens on a threat | When to use |
397
+
|------|-------------------------|-------------|
398
+
|**Learning**| Records all observed behaviors to a baseline. No alerts, no enforcement. | First deployment — build a profile of normal activity before enabling detection. |
399
+
|**Passive**| Generates findings and alerts (dashboard + tray notifications). No enforcement actions. | Day-to-day monitoring when you want visibility without automated response. |
400
+
|**Active**| Evaluates findings against blocklist → allowlist → baseline → policy, then executes response actions (suspend, terminate, isolate, etc.) with approval gates. | Production enforcement — the agent actively responds to threats. |
401
+
402
+
### Recommended Workflow
403
+
404
+
1.**Start in Learning mode** — Let the agent observe normal behavior and build a baseline.
405
+
-**Development machines**: 24 hours is usually sufficient
406
+
-**Servers / production hosts**: 1–7 days to capture periodic jobs, maintenance windows, and varied workloads
407
+
2.**Switch to Passive mode** — Review findings in the dashboard. Add allowlist rules for known-good behaviors that generate false positives. Add blocklist rules for known-bad indicators you want blocked immediately.
408
+
3.**Switch to Active mode** — The agent now enforces. Baselined behaviors are silently passed, allowlisted behaviors are skipped, blocklisted behaviors are blocked instantly (via the fast-path enforcer), and novel threats go through the LLM → policy → approval → action pipeline.
Rule types: `dst_ip`, `dst_cidr`, `domain`, `process_name`, `file_path`, `chain_pattern`. See [Chain-Aware Allow/Block Rules](#chain-aware-allowblock-rules) for the full chain pattern syntax.
444
+
445
+
### What Happens When a Threat Is Detected
446
+
447
+
| Stage | Learning | Passive | Active |
448
+
|-------|----------|---------|--------|
449
+
| Fast-path blocklist match | Skipped | Alert only |**Block immediately** — CRITICAL finding + response action |
if(!data||Object.keys(data).length===0){document.getElementById('settings-content').innerHTML='<div class="empty-state">Settings not available</div>';return;}
0 commit comments