shirudo documentation#

shirudo (Japanese シールド, pronounced “shee-roo-doh”) means “shield”.

shirudo is a BPF-based security platform: Linux targets run only the BPF their operator signed, every change is measured into the TPM, and functionality ships as signed upatches that targets pull from OCI registries.

Use cases#

shirudo is a platform. It does not understand what a upatch does; it makes sure that only signed upatches run and that every change is on record. Custom functionality ships as upatches that users and developers write on top of shirudo.

Live patching for kernel and userspace

Security mitigations that block vulnerable code paths. They complement traditional kernel live patching with a faster rollout and bridge kernel and userspace deployment cycles.

System hardening

Sandboxes for containers, Kubernetes Pods and LLM agents, and kernel hardening implemented as upatches.

Runtime security and observability

For kernel and userspace applications, LLM agents included. Data is collected and aggregated in BPF maps and pushed over OpenTelemetry into collectors.

Embedded and edge devices

Devices that are hard to patch get upatches the same way servers do. shirudo runs on x86-64, arm64 and riscv64 and adds little to the trusted computing base beyond the kernel.

Properties#

  • Always on: the platform is part of the trusted computing base and starts from initrd in early boot

  • Signed and sealed: BPF is admitted only through loaders signed against the sealed BPF keyring, and the platform guards its own assets against a root user who does not hold the signing key

  • In-kernel control plane: every load and unload is a signed loader the kernel verifies before it runs

  • Measured: a TPM-backed register records every operation on upatches, and the TPM signs it for a remote verifier

  • Lightweight core: shirudo protects its own assets and nothing else. Everything else ships as upatches

  • Plain BPF C: upatches are small BPF C programs that engineers and agents can read, generate and maintain. Commands take and produce structured data

  • Pull in, push out: targets pull upatches from OCI registries and push telemetry to collectors; nothing on a target listens for connections

The Threat model states where each of these mechanisms stops.

Defense in depth#

shirudo is only one layer of a target’s defense. It decides which BPF runs and records every change, and it trusts the kernel it runs on for everything else. A kernel bug that gives an attacker code execution or arbitrary writes in the kernel potentially bypasses every check made in that kernel, shirudo’s included: nothing that runs inside the kernel can police it once an attacker controls it, and detecting damage afterwards comes too late.

Hardening a target therefore starts in the kernel, from first principles: reduce attack surface to what the workload needs, and build the kernel so that bugs that remain are hard or impossible to exploit. Both take effect before an attack succeeds, not after. upatches can take part in the first: they can remove attack surface and block a known vulnerable code path until a fixed kernel is deployed. They do not replace mitigations built into the kernel that make memory corruption hard to exploit.

By role#

Specifications#

  • Beefile: the Beefile that describes a package

  • .upatch format: the signed .upatch container

  • upatch tree: the operations, segments and publication document of a upatch tree

  • Keepalive: the record a target sends its collector, its body and its TPM quote

Documentation#

Note: BPF and eBPF are two names for the same technology (eBPF on Wikipedia). This documentation uses BPF throughout, the term the Linux kernel community uses.

  • Start: build shirudo, boot a protected test target and take one upatch through its whole life, then install it

  • Concepts: the mechanisms shirudo builds on, from BPF signing and the BPF LSM to dm-verity, TPM 2.0 and post-quantum cryptography, and a glossary

  • Operate: system requirements, deployment, attestation, monitoring, upgrades, troubleshooting and incident response for targets in production

  • upatches: write, test, package and publish upatches

  • Security: the security model, the threat model and the threats still to resolve, cryptography and tamper counters

  • Internals: how shirudo works inside the kernel and on the target, and why it is built this way

  • Reference: every command, format, setting, event, failure category, file and unit, and a cheat sheet

  • Contribute: work on shirudo itself, its tests and its documentation