Black Dome is a lightweight security control plane for Linux servers. Its goal is to continuously verify whether a server is behaving according to its intended security posture.
Instead of relying only on signatures or known vulnerabilities, Black Dome is designed around three complementary ideas:
- Deterministic security rules for explicit guarantees.
- Behavioral observation for suspicious activity and drift.
- Agent-native intelligence for contextual analysis and operator assistance.
At its simplest, Black Dome tries to answer two questions:
- What is this server doing right now?
- Is it supposed to be doing that?
The current repository is an early Rust prototype of that direction. It includes a local warden daemon, a deterministic TOML rule engine, a terminal operator UI, and a Docker Compose simulator for validating scenarios.
Black Dome is intended to become:
- A lightweight host security control plane for Linux servers.
- A system behavior model that unifies process, network, auth, service, privilege, and configuration signals.
- A deterministic policy engine where hard security guarantees are explicit and explainable.
- A behavioral observation layer for suspicious patterns that may not violate strict rules.
- An intelligence-assisted operator workflow for summarizing events, correlating context, and explaining risk.
- A simulator-driven project where expected security behavior can be tested repeatedly.
In the current implementation, Black Dome is:
- A Rust workspace with separate crates for core models, rule evaluation, warden daemon, operator UI, simulator, and CLI.
- A TOML-backed deterministic rule engine for process, network, and auth-style observations.
- A local Unix-socket warden daemon with JSON-line IPC.
- A Ratatui terminal operator interface.
- A Docker Compose simulator that runs scenarios, collects emitted events, evaluates assertions, and stores artifacts.
Black Dome is not currently:
- A production EDR, IDS, SIEM, SOAR, or vulnerability scanner.
- A kernel, eBPF, or auditd telemetry collector.
- A hardened enforcement agent that safely terminates processes, blocks IPs, or rewrites firewall rules.
- A distributed security platform with persistence, authentication, authorization, or multi-host coordination.
- A stable public API, stable rule schema, or installable production package.
- A system where AI decides enforcement actions.
A key design principle is that intelligence agents may assist analysis, but deterministic rules remain the authority for automated action. In the current code, enforcement actions are represented as simulator/action events; real host-level containment is not implemented yet.
Black Dome is in the prototype / pre-alpha stage.
Implemented now:
- Workspace crate layout and top-level
black-domeCLI. - Shared protocol models for observations, events, findings, intelligence notes, rule reloads, and simulator events.
- Deterministic TOML rule loading, validation, and evaluation.
- Warden daemon with a reloadable in-memory rule store.
- Operator TUI with connection status, live event log, reconnect, and deterministic rule reload shortcut.
- Simulator scenario runner backed by Docker Compose.
- Example deterministic rules.
- One runnable scenario:
process.nginx.no-shell. - Tests for protocol roundtrips, engine rules, warden IPC, and simulator behavior.
Not implemented yet:
- Real Linux process, port, service, auth, privilege, or file-permission inspection.
- Persistent storage for events or findings.
- Real enforcement backends.
- Real intelligence provider integrations.
- Remote control plane APIs or multi-host deployment.
- Stable packaging/service installation.
flowchart TD
Host[Linux server]
subgraph Runtime[Black Dome runtime]
CLI[black-dome CLI]
Operator[Operator TUI]
Warden[Warden host agent]
Engine[Security engine]
Rules[Deterministic TOML rules]
Intelligence[Intelligence layer]
Core[Core models and IPC protocol]
end
subgraph SimulatorEnv[Simulator and test scenarios]
Simulator[Simulator runner]
Scenario[Scenario TOML]
Compose[Docker Compose provider]
Target[Target service]
Events[JSONL simulator events]
Artifacts[.simulator-runs artifacts]
end
Host --> Warden
CLI --> Operator
CLI --> Warden
CLI --> Simulator
Operator -->|JSON-line IPC over Unix socket| Warden
Operator -->|reload rules| Warden
Warden --> Core
Warden --> Engine
Warden --> Intelligence
Engine --> Rules
Engine -->|findings and action events| Warden
Intelligence -->|notes and context| Warden
Simulator --> Scenario
Simulator --> Compose
Compose --> Target
Compose --> Warden
Warden --> Events
Simulator --> Events
Simulator --> Artifacts
| Component | Current implementation | Intended role |
|---|---|---|
| Warden | Local daemon in black-dome-warden |
Lightweight host authority for inspection, rule evaluation, and findings. |
| Security engine | black-dome-engine |
Deterministic rule loading/evaluation and structured security insight generation. |
| Intelligence layer | black-dome-intelligence no-op adapter |
Future contextual analysis, log correlation, anomaly interpretation, and summaries. |
| Operator interface | black-dome-operator TUI |
Administrator interface for findings, status, rule reloads, and investigation. |
| Simulator | black-dome-simulator |
Repeatable scenario execution and behavior regression testing. |
| Core protocol | black-dome-core |
Shared models, runtime paths, JSON-line IO, and IPC messages. |
| CLI | black-dome-cli |
Entry point for warden, operator, and simulator commands. |
| Crate | Purpose |
|---|---|
black-dome-cli |
Top-level black-dome command with operator, warden, and simulator subcommands. |
black-dome-core |
Shared models, JSON-line IO helpers, runtime paths, and IPC protocol types. |
black-dome-engine |
Deterministic TOML rule loading, validation, observation normalization, finding/action evaluation. |
black-dome-intelligence |
Intelligence adapter trait and current no-op implementation. |
black-dome-operator |
Terminal operator interface. |
black-dome-simulator |
Scenario parser, Docker Compose provider, event parsing, assertions, and artifact writing. |
black-dome-warden |
Local daemon that owns the rule store, serves IPC clients, and emits simulator events. |
.
├── crates/
│ ├── black-dome-cli/
│ ├── black-dome-core/
│ ├── black-dome-engine/
│ ├── black-dome-intelligence/
│ ├── black-dome-operator/
│ ├── black-dome-simulator/
│ └── black-dome-warden/
├── deploy/docker/Dockerfile
├── examples/rules/
├── scenarios/process.nginx.no-shell/
├── Cargo.toml
└── rust-toolchain.toml
Generated simulator artifacts are written under .simulator-runs/ and are ignored by git.
- Rust stable, as configured by
rust-toolchain.toml. - macOS or Linux for local development.
- Unix sockets for warden/operator IPC.
- Docker with Docker Compose for simulator scenarios.
The project is intended for Linux server security, but the current development workflow can run on macOS for local builds/tests and simulator development.
Build the workspace:
cargo build --workspaceRun all tests:
cargo test --workspaceRun targeted tests:
cargo test -p black-dome-core
cargo test -p black-dome-engine
cargo test -p black-dome-warden
cargo test -p black-dome-simulatorDuring development, run the CLI through Cargo:
cargo run -p black-dome-cli -- --helpTop-level commands:
black-dome operator
black-dome warden
black-dome simulator
The warden serves clients over a Unix socket. On Linux, the default runtime directory is /run/black-dome; on non-Linux platforms it uses the system temp directory plus black-dome.
Run with default paths:
cargo run -p black-dome-cli -- warden runRun with example deterministic rules:
cargo run -p black-dome-cli -- warden run \
--rules-dir examples/rulesEmit simulator-compatible JSONL events to a file:
cargo run -p black-dome-cli -- warden run \
--rules-dir examples/rules \
--simulator-event-output file \
--simulator-event-file simulator-events.jsonlEmit simulator events to stdout:
cargo run -p black-dome-cli -- warden run \
--rules-dir examples/rules \
--simulator-event-output stdoutSupported warden run options:
--socket <SOCKET>
--ready <READY>
--rules-dir <RULES_DIR>
--simulator-event-output <disabled|stdout|file>
--simulator-event-file <SIMULATOR_EVENT_FILE>
Relevant environment variables:
| Variable | Purpose |
|---|---|
BLACK_DOME_DETERMINISTIC_RULES_DIR |
Default deterministic rules directory when --rules-dir is not supplied. |
BLACK_DOME_SIMULATOR_EVENT_OUTPUT |
Default simulator event mode: disabled, stdout, or file. |
BLACK_DOME_SIMULATOR_EVENT_FILE |
Default JSONL event file when event output mode is file. |
BLACK_DOME_SIMULATOR_EMIT_SAMPLE_PIPELINE |
When truthy, emits the sample pipeline at startup for simulator use. |
BLACK_DOME_WARDEN_SYSTEMD_UNIT |
Systemd unit name used by the operator when auto-starting the warden. |
Start the operator interface:
cargo run -p black-dome-cli -- operator tuiKeybindings:
| Key | Action |
|---|---|
q |
Quit. |
r |
Reconnect to the warden. |
l |
Request deterministic rule reload. |
If the operator cannot connect to the warden socket, it attempts to start black-dome-warden.service through systemd, or the unit named by BLACK_DOME_WARDEN_SYSTEMD_UNIT.
cargo run -p black-dome-cli -- warden systemd-startUse a custom unit name:
cargo run -p black-dome-cli -- warden systemd-start --unit my-black-dome-warden.serviceRun the included scenario:
cargo run -p black-dome-cli -- simulator run process.nginx.no-shellRun all scenarios under scenarios/:
cargo run -p black-dome-cli -- simulator run --allUse an explicit run id:
cargo run -p black-dome-cli -- simulator run process.nginx.no-shell --run-id local-testKeep the Docker Compose environment running when a scenario fails:
cargo run -p black-dome-cli -- simulator run process.nginx.no-shell --keep-env-on-failSimulator artifacts are written to:
.simulator-runs/<run-id>/<scenario-id>/
Artifacts can include:
run-summary.jsonassertions.jsonevents.raw.jsonlevents.parsed.jsonlevents.malformed.logblackdome.logs.txttarget.logs.txtcompose.ps.txt
Deterministic rules define strict security guarantees. Violations are hard findings and are the only class of policy intended to authorize automated actions.
Rules are TOML files containing [[deterministic_rules]] entries. The engine currently supports these rule kinds:
processnetworkauth
Supported assertion operators:
eqnecontainsnot_containsinnot_in
Example:
[[deterministic_rules]]
id = "process.nginx.no-shell"
kind = "process"
enabled = true
severity = "high"
mode = "detect"
description = "Nginx must not spawn shell processes"
[deterministic_rules.match]
process = "nginx"
kind = "process_spawn"
[[deterministic_rules.assert]]
field = "details"
op = "contains"
value = "/bin/sh"
[deterministic_rules.action]
type = "alert"
enabled = trueSee examples/rules/ and scenarios/process.nginx.no-shell/rules/main.toml for current examples.
Rule load failures are reported through RuleLoadReport and can be surfaced by the operator after pressing l to reload deterministic rules.
The project vision includes behavioral observation and agent-native intelligence:
- Behavioral observation should detect suspicious activity such as unusual process spawning, abnormal network activity, unexpected login patterns, and configuration drift.
- Intelligence agents should analyze logs, correlate events, interpret anomalies, summarize incidents, and assist operator investigation.
- Intelligence can eventually run through cloud APIs, remote self-hosted models, or local models depending on deployment needs.
Current status: the repository has the model boundaries for this architecture, but the intelligence crate currently contains a no-op adapter and the warden does not yet collect real Linux telemetry.
Scenarios are directories containing a scenario.toml, scripts, optional local rules, and provider configuration. The included scenario is scenarios/process.nginx.no-shell.
A scenario defines:
- An environment provider, currently
docker_compose. - A target service and Black Dome service.
- Rule paths mounted into the warden container.
- Setup and trigger scripts.
- An observation window.
- Expected findings and optional expected actions.
- Artifact collection preferences.
Example fields from the included scenario:
schema_version = 1
id = "process.nginx.no-shell"
category = "process"
timeout = "30s"
[environment]
provider = "docker_compose"
compose_file = "compose.yml"
target_service = "target"
[blackdome.events]
mode = "file"
file_path = "events/events.jsonl"
[[expect.findings]]
rule_id = "process.nginx.no-shell"
severity = "high"
count = 1A representative target workflow is a web service unexpectedly spawning a shell:
- The warden observes the process activity.
- The security engine evaluates deterministic process rules.
- A violated rule produces a finding.
- The intelligence layer analyzes surrounding context and logs.
- The operator interface displays the finding, explanation, and evidence.
- If a deterministic rule explicitly permits enforcement, an action backend may respond.
The current process.nginx.no-shell scenario simulates the rule/finding portion of this workflow.
Useful commands:
cargo fmt --all
cargo clippy --workspace --all-targets
cargo test --workspaceThere is also a sync.sh helper that syncs tracked and untracked, non-ignored files to a hard-coded remote development VM. Review and edit it before use.
Near-term:
- Add real Linux telemetry ingestion for processes, ports, services, users, and auth events.
- Expand deterministic rule schema documentation and validation errors.
- Add more simulator scenarios for process, network, auth, privilege, and configuration drift behavior.
- Make simulator output easier to inspect from the CLI.
- Add formatting/lint CI and documented release/build steps.
Mid-term:
- Use rule scope metadata for host, role, and environment targeting.
- Add persistent event/finding storage and historical querying.
- Implement safe action backends for explicitly authorized deterministic enforcement.
- Harden IPC behavior and define protocol compatibility expectations.
- Add real intelligence providers for log analysis, event correlation, anomaly interpretation, and incident summaries.
Longer-term:
- Support distributed monitoring across multiple servers.
- Add remote APIs and richer operator interfaces, including a possible web interface.
- Add authentication, authorization, and audit logging for control-plane operations.
- Package the warden as a system service with installable config and rule directories.
- Grow the simulator into a regression suite for security-control behavior.
- Explore local, remote self-hosted, and cloud API modes for intelligence execution.