How Lilith Works
The agent has
no idea Lilith
exists.
Any agent that touches your infrastructure or config is an unsecured attack surface. Cloud credentials, SSH keys, production secrets: no runtime control exists for any of it. Tool poisoning, prompt injection, and silent exfiltration are all demonstrated in the wild. Lilith enforces at the kernel with full observability of every agent action, transparent to agents, impossible to bypass from userspace.
Lilith is a systemd daemon that enforces security at the kernel level, before any agent syscall completes, before any byte reaches the network. No SDK to install. No environment variable to set. No proxy to configure. The agent's code is never touched. The agent's config is never touched. The agent has no idea.
Transparent Interception
Every TCP connection is intercepted at the kernel, before connect() returns.
Identity is stored in IDENTITY_TASK_STORAGE keyed by task_struct*, not PID. PID reuse attacks are structurally impossible: the kernel frees the entry automatically when the task exits.
Protocol-agnostic. Cedar evaluates the same (principal, action, resource, context) tuple whether the agent speaks MCP JSON-RPC, A2A gRPC, OpenAPI HTTP/1.1, or any other protocol.
Enforcement Architecture
Three independent enforcement layers.
Eight Linux Security Module hooks run in kernel context, synchronous, before any syscall returns to userspace. Two additional cgroup BPF programs handle transparent TCP interception. All 10 programs are formally verified by the kernel's BPF verifier before loading.
Every tool call is evaluated against a Cedar policy, a non-Turing-complete, formally verified policy language (Lean 4 + Dafny). Static analysis via CVC5 1.2.1 SMT solver proves privilege non-escalation before any policy is deployed. Policies are Ed25519-signed capsules with anti-rollback watermarks.
Seccomp-BPF restricts agents to ~60 allowed syscalls. All LPE primitives are blocked at the kernel boundary. Landlock constrains filesystem access to specific ephemeral directories using kernel inode evaluation, TOCTOU-immune, composable, unprivileged.
Data Flow Tracking
Taint propagation, not detection.
A 64-bit bitmask accumulates across every tool call in a session via AtomicU64::fetch_or. Once a sensitive bit is set, it cannot be cleared, no race condition, no window for a bypass. Cedar policies read context.data_touched and structurally prohibit egress after any sensitive read.
Reliability
Fail-closed by design.
The DAEMON_HEARTBEAT BPF array receives a write every 500 ms from the daemon. The socket_connect hook checks staleness on every verdict. If the daemon crashes or is killed, all managed-process connections receive EPERM within 2 seconds, no silent bypass, no open window.
Deployment
One daemon. Any agent. Any protocol.
Lilith runs as a systemd service or Kubernetes DaemonSet. It requires CAP_BPF and CAP_PERFMON. No CAP_SYS_ADMIN, no privileged container. Operates at the host OS layer, outside every agent namespace, invisible to every agent process.
Deploy Lilith today.
Kernel-level enforcement on any Linux host in under 10 minutes.