Shirudo makes root ask permission before it loads BPF. Once it starts, the kernel accepts BPF from userspace only inside a loader signed with the operator’s ML-DSA-87 key, and the TPM records every load so you can prove what the machine runs. You can try it today in a test VM, but not on a stock Ubuntu or RHEL server, because a Shirudo target needs a patched bpf-next kernel and a TPM 2.0.
OpenAI and Cisco open-sourced Shirudo on 23 November 2026 as a rewrite of Isovalent’s Tetragon for AI agents. You’ll build it, boot the protected test target, sign and load a upatch, verify the target with its TPM, then try to get around it as root. Every command below was run in November 2026 on an Ubuntu 26.04 LTS operator VM against Shirudo commit 154afeea and its CI test kernel.
How a Shirudo shield gets into the kernel
A shield in Shirudo is a upatch: a small BPF C program, or for Java a signed bytecode agent, that blocks a vulnerable code path, adds a check, or only observes. You never load it directly. Four pieces stand between your source file and the running kernel:
- A loader program that clang and
shirudo buildwrap around your code - An ML-DSA-87 signature over that loader, made on the operator host
- A
.bpfkernel keyring that Shirudo fills and seals at boot - BPF LSM programs that refuse every other load, detach and pin access
Because the kernel checks the signature before the loader may run, a stolen root shell on the target is not enough to add or remove a shield. The signing key never leaves the operator, so a target holds only certificates, and that split is what lets an AI agent write shields while a human still decides which ones get signed.
The project’s own figure shows the full production path, including the OCI registry that the test VM in this guide skips. It is reproduced from the Shirudo repository (BSD-2-Clause, Copyright 2026 Authors of shirudo):

Read it left to right. The operator signs and pushes packages, called .bee files, to a registry. Targets pull them on systemd timers, since Shirudo has no daemon and opens no port on the target. Steps 5 and 6 are the part that matters for security: the kernel refuses any loader its sealed .bpf keyring can’t verify, and each accepted load extends a TPM register that the operator can check later against evidence the TPM signs.
Our lab collapses that to one operator host and one target with no registry in between, and adds the path a rogue root user would take. You’ll run this flow in the rest of the guide:

The demo that made the news used the same mechanism one layer up. A Codex-generated Java bytecode shield on java.util.Base64$Decoder.decode0 blocked the Java4Shell exploit (CVE-2026-114938) against a running Elasticsearch 9.5.5 without a restart, and that shield ships in the repo as upatches/java-base64. Its own README calls it a mitigation and says a patched JVM is the durable fix.
Can you run Shirudo on your servers today?
No. Shirudo is pre-release, its FAQ answers “Is shirudo ready for production?” with “Not yet”, and a target needs a kernel no distribution ships. There is no fallback mode for an older kernel and no mode without a TPM, so shirudo init simply fails its pre-flight checks on a stock box. The table compares a stock Ubuntu 26.04 server with what the system requirements ask of a target, with the last row taken from the Shirudo FAQ:
| Requirement | Stock Ubuntu 26.04 server | Shirudo target |
|---|---|---|
| Kernel | Ubuntu 7.0 generic kernel | bpf-next with the signed-loader ABI plus carried patches (tpm_command and mm_read_access LSM hooks, and 31ac959c915c on x86-64) |
| Boot command line | Defaults | bpf.keyring_unsealed=1 dm_verity.keyring_unsealed=1, BPF LSM active |
| TPM | Optional | TPM 2.0 at /dev/tpmrm0, NV index 0x01818E00 free |
| Boot chain | GRUB, stock initrd | dracut systemd initrd that runs shirudo init, unified kernel image under systemd-stub |
| Falco, Cilium, bpftrace | Run as usual | Fail at their first unsigned map or program load |
Most teams will trip on the last row. Shirudo admits only BPF that arrives inside a signed loader, so every BPF tool you already run on that host stops working until its logic is rebuilt and shipped as a signed upatch. We confirmed it on the test target further down: bpftrace fails on a one-line probe. If your fleet leans on Cilium for networking or Falco for detection, plan Shirudo for a separate class of machine, not as an add-on. For now the honest use is a lab, a pilot on hardware you can rebuild, or the Isovalent browser lab if you have no KVM host at all.
Prepare the Ubuntu 26.04 operator host
You need one Linux machine that plays the operator and runs the target as a nested QEMU guest. We used an Ubuntu 26.04 VM on Proxmox with the CPU type set to host so nested KVM works. Ubuntu 26.04 is the easy choice because it already ships OpenSSL 3.5, which Shirudo needs for ML-DSA signing. Ubuntu 24.04 ships OpenSSL 3.0, so on 24.04 you would build OpenSSL 3.5 first, following the project’s developer guide. The host needs:
- x86-64 or arm64 with a writable
/dev/kvm(nested virtualization on a VM) - 4 vCPUs and 8 GB of RAM, the size of Shirudo’s own Lima profile; the test target alone takes 4 CPUs and 4 GB
- Free disk for packages, the checkout and the target images: our root disk went from 2.6 GB to 11 GB used, and the Lima profile allocates 100 GB
- Internet access for the cloud image, the CI kernel and apt.llvm.org
Our VM had 6 vCPUs, 16 GB of RAM and a 120 GB disk, which is more than the run used. On a Proxmox VM, check KVM first, because a VM created with the default kvm64 CPU type has no /dev/kvm inside it and nothing later in this guide will boot:
ls -l /dev/kvm
A character device owned by the kvm group is what you want:
crw-rw---- 1 root kvm 10, 232 Nov 24 11:02 /dev/kvm
Install the build toolchain, QEMU, swtpm and the TPM libraries. This is the package list from Shirudo’s own Lima profile for Ubuntu 26.04, with qemu-system-x86 in place of the arm64 QEMU and without the GitHub CLI, which the quickstart doesn’t need:
sudo apt update
sudo apt install -y --no-install-recommends \
build-essential pkg-config python3 git curl ca-certificates gpg jq \
openssl libssl-dev libcurl4-openssl-dev libelf-dev libluajit-5.1-dev \
libtpms-dev libtss2-dev zlib1g-dev libzstd-dev \
autoconf autoconf-archive automake libtool libltdl-dev \
bc bison flex cpio debhelper dpkg-dev fakeroot kmod libdw-dev \
libncurses-dev pahole rsync xz-utils zstd \
qemu-system-x86 qemu-utils swtpm swtpm-tools tpm2-tools libtss2-tcti-swtpm0t64 \
cloud-image-utils libguestfs-tools dracut-core cryptsetup-bin e2fsprogs file \
openssh-client iproute2 isc-dhcp-client docker.io
Shirudo’s binaries lock all their memory and refuse to start without an unlimited locked-memory limit, so raise it for login sessions and for systemd user services:
echo '* - memlock unlimited' | sudo tee /etc/security/limits.d/90-shirudo-memlock.conf
sudo mkdir -p /etc/systemd/system.conf.d /etc/systemd/user.conf.d
printf '[Manager]\nDefaultLimitMEMLOCK=infinity\n' | sudo tee /etc/systemd/system.conf.d/90-shirudo-memlock.conf /etc/systemd/user.conf.d/90-shirudo-memlock.conf
Ubuntu 26.04 mounts /tmp as a tmpfs sized from RAM, and the target images use several GB there, so move /tmp back to disk. Then add your user to the kvm and docker groups and turn on lingering. Lingering matters more than it looks: the test target runs as a systemd user service, and without it systemd kills QEMU the moment your SSH session closes, which cost us a full rebuild before we found it.
sudo systemctl mask tmp.mount
sudo usermod -aG kvm,docker "$USER"
sudo loginctl enable-linger "$USER"
Clone the repository into your home directory, because Ubuntu’s AppArmor profile for swtpm only lets it write under home, and the test VM keeps its TPM state inside the checkout. We tested commit 154afeea; check it out if you want output that matches this guide line for line, since newer commits already print some load lines differently. Shirudo pins clang and LLVM 23, which Ubuntu 26.04 doesn’t ship yet, and the repo carries the script its CI uses to add apt.llvm.org after it checks the signing key’s fingerprint. Run that, plus the script that installs the static archives the attestation quote checker links beside OpenSSL’s libcrypto.a:
cd ~
git clone https://github.com/shirudo-dev/shirudo.git
cd shirudo
git checkout 154afeea
sudo sh .github/scripts/install-clang.sh
sudo sh .github/scripts/install-static-libcrypto-deps.sh
At the end, the clang script prints the version it installed, and it must be 23:
install-clang: clang 23.1.6
Reboot so the tmpfs mask, the memlock limit and the new groups all apply, then log back in and confirm the two limits the test VM checks:
sudo reboot
After you log back in, check KVM access and the memlock limit as your own user:
test -r /dev/kvm && test -w /dev/kvm && echo kvm ok; ulimit -l
Both lines must come back like this before you build anything. A missing kvm ok means the group change has not reached your session yet, and anything other than unlimited means the memlock file did not apply, so the Shirudo binaries will exit with a memory-lock error:
kvm ok
unlimited
With both checks passing, the host is ready and the rest of the guide runs as your normal user from the checkout.
Build Shirudo and boot the test target
Fetch the patched kernel first. The script downloads the CI kernel bundle pinned in testing/vm/kernel-artifact.sh, checks its SHA-256 and stages it with its BTF, which the build compiles Shirudo’s embedded BPF objects against:
cd ~/shirudo
testing/vm/kernel-artifact.sh fetch
It took 7 seconds here. Keep the run ID it prints, because it identifies the exact kernel build your target runs, and a bug report against Shirudo is not much use without it:
downloading kernel-packages-x86-64-ci from kernel build run 45212180772
Build the shirudo binary, then the operator helper shirudo-build. The signing code lives only in the helper, so it never ends up on a target. Put both on your PATH for this shell:
make -j"$(nproc)"
make shirudo-build
export PATH="$PWD:$PWD/tools/shirudo-build:$PATH"
shirudo version
Both builds are quick (11 and 4 seconds on 6 vCPUs). The version line carries the commit you built and the release name:
shirudo (154afeea-rc0, "Social BPF Coding")
version-id: 8297130a08e2cf96e3ee0ec3525fe2b35d11fd1bae007329293becdf137819ca
Now boot a target called quickstart. The first run is the slow one, because it compiles OpenSSL, curl and tpm2-tss as static libraries for the target binary. It also builds an Ubuntu disk image, a dm-verity runtime image, signed config images and a throwaway signing key, then boots the bpf-next kernel with a software TPM:
make -C testing vm VM_NAME=quickstart
Ours took 11 minutes, most of it compiling static libraries, so the speed of your host matters far more than its network. The last lines tell you the target is up and how to reach it:
[test-vm] building an initrd with shirudo for 7.4-shirudo-ci-20261123
[test-vm] booting bzImage with 4 CPUs and 4G memory
[test-vm] VM ready: name=quickstart state=/home/josphat/shirudo/build/test-vm/vms/quickstart qemu_pid=77384 swtpm_pid=77374
[test-vm] console: make -C testing vm-console VM_NAME=quickstart
[test-vm] ssh: make -C testing vm-ssh
[test-vm] warning: the guest overlay contains an ephemeral signing key
That last warning is honest labelling, not a fault: the bundle’s signing key is a lab key, and a production operator would make its own with shirudo genkey and keep it off every target. Later boots reuse the built bundle and take about a minute.
Check enforcement on the target
Open a root shell on the target. The guide says each time whether a command runs in this target shell or on the operator host. The target sees your checkout at /workspace/shirudo, which is how files you build on the host reach it:
make -C testing vm-ssh VM_NAME=quickstart
Inside the target, first try the plain copy of the binary that sits under /usr/local/bin:
cd /workspace/shirudo
/usr/local/bin/shirudo status
Root gets refused, even though the file is readable and root normally reads anything. That is the first sign the BPF LSM is in charge, so if this command ever prints a status report on a target, enforcement is not running. The refusal looks like this:
shirudo: image state: Permission denied
Byte for byte it is the same program, but Shirudo’s LSM gives access to its state only to tasks that executed the binary from the dm-verity runtime image. The vm-ssh shell aliases shirudo to shirudo-runtime, which runs that trusted copy. Read the status report with it:
shirudo status
Every condition should read OK and the overall status ok:

Read the tamper counters as well as the green rows. A minute after boot, the policy had already refused 15 program loads that were not signed loaders and 12 other bpf() commands. None of them were ours: they came from other software on the guest as it booted. On a real fleet those counters are the first thing worth alerting on, because a sudden jump means something on the box is trying to load BPF it was never given. shirudo status exits 0 whatever the verdict; scripts should read shirudo status --json or use --check, which exits 1 on tampered.
Keep init --check-only handy. Its pre-flight checks are the exact list a production kernel has to pass, so it is the first thing to run on a target kernel you build yourself:
shirudo init --check-only
On the CI kernel all twelve pass:
Pre-flight checks:
OK root
OK bpf_lsm_active
OK bpffs_supported
OK signed_loader_kernel_abi
OK kernel_lsm_hooks
OK module_signatures
OK cert_on_disk
OK cert_algorithm
OK cert_kernel_support
OK kernel_keyring
OK embedded_loader
OK tpm2_reachable: TCTI from the config: device:/dev/tpmrm0
12 of 12 passed
A failed check prints FAIL with the reason and stops shirudo init before it attaches anything, so a target on the wrong kernel boots without enforcement rather than refusing to boot. Only shirudo status and attestation will tell you, which is one more reason to attest every target you run.
Sign a upatch on the operator host
Leave the target shell open and open a second terminal on the operator host. A new terminal doesn’t inherit the earlier export, so change into the checkout and set PATH again:
cd ~/shirudo
export PATH="$PWD:$PWD/tools/shirudo-build:$PATH"
The test bundle generated the signing key the target trusts and stored it outside the checkout, in a directory only your user can read. Point a variable at it:
KEYS=/tmp/shirudo-test-vm-private-$(id -u)/operator-keys/keys
ls -l "$KEYS"
It holds the ML-DSA-87 private key and its certificate, both mode 600. The checkout is shared read-only with the target, so a key kept inside it would be readable from the very machine it is meant to control, which is why the bundle keeps it out:
total 16
-rw------- 1 josphat josphat 7457 Nov 24 11:16 cert.der
-rw------- 1 josphat josphat 6774 Nov 24 11:16 signing_key.pem
For a lab you plan to keep, put the keys somewhere more durable than /tmp. Set TEST_VM_HOST_PRIVATE_DIR to a directory outside the checkout before the first make -C testing vm, and point KEYS at $TEST_VM_HOST_PRIVATE_DIR/operator-keys/keys instead. A bundle rebuild always makes a new key, and the target only trusts the key from the bundle it booted.
The first upatch is the repo’s test fixture testing/fixtures/basic.bpf.c. It attaches an fentry program to the kernel’s do_nanosleep() and returns 0, so it changes nothing and is safe to load anywhere:
// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
#include "vmlinux.h"
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>
char _license[] SEC("license") = "Dual BSD/GPL";
SEC("fentry/do_nanosleep")
int BPF_PROG(shirudo_test_basic)
{
return 0;
}
Build and sign it. The helper compiles against the target kernel’s types in vendor/linux/vmlinux.h, turns the object into a loader program that performs the load inside the target’s kernel, and signs the loader and its data:
shirudo build testing/fixtures/basic.bpf.c --keys-dir "$KEYS" --vmlinux vendor/linux/vmlinux.h -o basic.upatch
Post-quantum signing shows in the numbers: the signature section is 4,853 bytes, where an Ed25519 signature is 64. The loader is 992 bytes, which is 124 BPF instructions, wrapped around your one-line program:
wrote basic.upatch (insns=992 sig=4853 data=2400 sections=2 maps=0 progs=1 decoders=0 name=basic)
Inspect the artifact and keep its payload digest, which the target records with the load and which the TPM register measures:
shirudo upatch info basic.upatch
PAYLOAD=$(shirudo upatch info --json basic.upatch | jq -r .payload_sha256)
The info output names the upatch, its type and the payload hash:
File: basic.upatch
Name: basic
Type: LOAD
Payload type: bpf
Version: 1
Payload sha256: 38a9c20e55a0d50548677b47503b54cda9a4dfc448dec903dece3239e902dfef
File size: 8605 bytes
Loader:
Instructions: off=360 len=992
Log buffer size: 1048576
Metadata: (none)
Data: off=6205 len=2400
Signature:
Offset: 1352
Length: 4853 bytes
Signed sections:
Name: basic
Attach metadata: 176 bytes
Unload payload: (none)
Decoders:
(none)
Build the unload directive now, while you are on the operator side. An unload is a signed artifact too, and it names the exact payload it removes, so nobody can unload a shield by replacing it with a different program under the same name:
shirudo build --unload basic --payload-sha256 "$PAYLOAD" --keys-dir "$KEYS" -o basic.unload.upatch
It reports the UNLOAD type at the end of the line:
wrote basic.unload.upatch (insns=1320 sig=4853 data=2816 sections=2 maps=1 progs=1 decoders=0 name=basic UNLOAD)
You now hold two signed files in the checkout, basic.upatch and basic.unload.upatch, and the target can read both through the shared folder.
Load the upatch on the target
Back in the target shell, load the file. It is already there, because basic.upatch sits in the shared checkout:
shirudo upatch load basic.upatch
Each line is one gate passing. The kernel accepted the loader’s signature against the .bpf keyring serial from the status report, the loader ran and created one program, Shirudo pinned its link in a private bpffs, and the TPM register moved to a new value:
upatch load: signed loader accepted, keyring 584657318, 124 instructions
upatch load: loader ran, 0 maps and 1 programs
upatch load: program 0 (raw_tracepoint) pinned at /run/shirudo/bpffs/upatches/basic/link
upatch load: basic loaded, 1 programs, keyring 584657318
upatch load: basic measured, register d130905214ff69eeefce3a24eb3375ba7fa5f615c207a80f88d2962cbc0cffea
Check what the target thinks it runs. shirudo upatch list shows the archived copy, which the target loads again on the next boot:
shirudo upatch list
Its payload prefix matches the digest from the operator side, so you know the target runs the bytes you signed and not something with the same name. Check this whenever two people sign upatches with the same name, because the unload directive will refuse a payload it does not name:
Archived upatches (/var/lib/shirudo/upatches):
NAME LOADED TYPE KIND PAYLOAD
basic yes load bpf 38a9c20e55a0d505..
Now the full status report lists the hook, and its TPM section shows the register has moved from its boot value to the one the load printed, with two entries in the eventlog:
shirudo status --show-full
These are the parts that changed after the load:
Loaded upatches (1):
NAME LOCATION MAPS MISSED STATUS AGE
basic fentry/do_nanosleep 0 0 success 9s
TPM measurement:
TPM: reachable (device:/dev/tpmrm0)
NV index: 0x01818E00 (anchored in PCR 9)
Chain: d130905214ff69eeefce3a24eb3375ba7fa5f615c207a80f88d2962cbc0cffea
Bound in: initrd
Chain vs eventlog: matches
Eventlog: /var/lib/shirudo/eventlog (2 entries, 2311 bytes)
Eventlog:
TIME TYPE DIGEST DETAIL
2026-11-24T11:19:04Z init 4e7e93e4457e set_digest=e3b0c44298fc..
2026-11-24T11:20:07Z upatch_load 65524dd4ace6 basic payload=38a9c20e55a0..
The eventlog is what makes the register checkable: anyone holding it can replay the entries and arrive at the same chain value, which is exactly what attestation does next.
Verify the target with its TPM
Everything so far is the target describing itself, and a compromised target can lie. Attestation closes that gap. You send a fresh nonce, the target’s TPM signs a quote and a certification of the register over it, and you check the result on the operator host against a value you predict from the artifacts you shipped. Make the nonce on the operator host:
NONCE=$(openssl rand -hex 32)
echo "$NONCE"
On the target, ask for evidence that answers it. Paste the nonce value you just printed in place of the example below; /mnt/shirudo-out is a folder the test VM shares with the host:
shirudo attest --nonce=53692067e4c85c10a9dfe4769f3cab030e98da5353f0c213ebef4979569ba906 --output=/mnt/shirudo-out/ev.json
Back on the operator host, predict the register. The boot event covers both certificates the test VM enrolled (the bundle’s own and a second one, own.der, that it vouches for), and the load event covers your payload:
EV=build/test-vm/vms/quickstart/result/ev.json
OWN=build/test-vm/host-bundle-bpf-next-verity/fixtures/own.der
shirudo attest predict --cert="$KEYS/cert.der" --cert="$OWN" --event=load:basic="$PAYLOAD"
Its last line matches the register the load printed on the target, before you have looked at any evidence:
set_digest: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
init_event: 4e7e93e4457ecd607801e7efdf82c79d7df8779e24c51cefe5defc90633bbb49
register_at_boot: d521ee8da7e7811c927981718a6e326f18f0ba2a275ae79c3615e4a25e2fc7f5
register_after_events: d130905214ff69eeefce3a24eb3375ba7fa5f615c207a80f88d2962cbc0cffea
Verify the evidence against the nonce and that prediction:
EXPECT=$(shirudo attest predict --cert="$KEYS/cert.der" --cert="$OWN" --event=load:basic="$PAYLOAD" | awk '/register_after_events/{print $2}')
shirudo attest verify --evidence="$EV" --nonce="$NONCE" --ak-name="$(jq -r .ak.name "$EV")" --expect-chain="$EXPECT"
Twenty-seven checks came back OK, four were informational notes, and the verdict is ok:
OK nonce matches the request
OK attestation key: restricted, fixed to this TPM
OK attestation key: name matches its public area
OK attestation key: the pinned key
OK endorsement key: name matches its public area
OK endorsement key: TCG default template under the endorsement policy
OK quote: ECDSA signature by the attestation key
OK quote: signed by the key as an endorsement primary
OK quote: carries the nonce
OK quote: covers the PCRs the document lists
OK quote: PCR digest matches the listed values
OK register: ECDSA signature by the attestation key
OK register: signed by the key as an endorsement primary
OK register: carries the nonce
OK register: certification names the listed index
OK register: certified contents match the listed value
OK quote and certification are of one TPM boot
OK config: config root history matches the quoted PCR
NOTE config root has no operator approval; use --expect-config-root with --expect-config-pcr
NOTE config records a selection; operation completion depends on trusted runtime guards
OK eventlog: this boot has an init record
OK register: the document names index 0x01818E00 and PCRs 9 and 11
OK register: public area is bound to PCRs 9 and 11 as recorded
NOTE binding: made in the initrd
OK eventlog: one init record for this TPM reset (1 this boot)
OK register: init record is of the TPM's current reset count
OK eventlog: 2 records replay to the certified value
OK anchor: record digest matches the index name
OK anchor: PCR 9 equals the recorded value extended by the anchor
OK state: register equals the expected value
NOTE event after boot: upatch_load basic
verdict: ok
To see that the nonce does real work, we replayed the same evidence file with a new random nonce. Every signature check still passed, because the evidence itself was genuine, but the first check failed and so did the verdict. A captured evidence file can’t be reused to vouch for a target later:
FAIL nonce matches the request
NOTE config root has no operator approval; use --expect-config-root with --expect-config-pcr
NOTE config records a selection; operation completion depends on trusted runtime guards
NOTE binding: made in the initrd
NOTE event after boot: upatch_load basic
verdict: fail
One caveat the docs are upfront about: taking --ak-name from the evidence itself proves nothing about which TPM signed it. In a real deployment you pin each target’s attestation key once, with a challenge only that TPM can answer, which the docs cover under attesting a target. The same TPM ideas show up in disk encryption, if you want a gentler place to learn them, such as unlocking LUKS with a TPM2 chip on Fedora.
Try to load BPF as root without the key
Root on the target must not be able to do what the operator does, so we tried the three moves an intruder with a root shell would make:
- Load a upatch signed with a different ML-DSA-87 key
- Run a one-line bpftrace probe, which loads unsigned BPF
- Unmount Shirudo’s private BPF file system to drop its pins
For the first one, generate a rogue key on the operator host and sign the same harmless program with it:
shirudo genkey --keys-dir /tmp/rogue
shirudo build testing/fixtures/basic.bpf.c --keys-dir /tmp/rogue --vmlinux vendor/linux/vmlinux.h -o rogue.upatch
The build succeeds, since the operator tools sign with any ML-DSA-87 key you give them. Now run all three attempts in the target shell:
shirudo upatch load rogue.upatch
bpftrace -e 'BEGIN { exit(); }'
umount /run/shirudo/bpffs
All three fail, and none of them because of missing root:

The rogue upatch dies in the kernel, not in Shirudo’s userspace. BPF_PROG_LOAD returns “Required key not available” and the verifier log reports signature verification failed: -126, which is ENOKEY. bpftrace prints only a generic load failure, and -d libbpf shows the real reason, Couldn't load trivial BPF program with -EACCES, because the probe is a plain unsigned program. bpftool map create fails with “Permission denied” the same way. The unmount error is misleading, since it says “must be superuser” to a root shell; Shirudo’s LSM refused it and the status report counts it under BpffsUmount. Run the status again and the counters show it:
shirudo status
Program loads that were not signed loaders went from 15 to 26 across the rogue upatch and the bpftrace run. The unmount got a row of its own, which is the kind of event you want a collector to page on, because nothing legitimate unmounts that file system:
Tamper attempts (this boot):
LoadNotLoader 26 program load that is not a signed loader
MapCreate 1 map creation by another executable
BpfCommand 15 detach, update, delete or unclassified bpf() command
BpffsUmount 1 unmount of the private bpffs
ObjGet 3 pin, map or link opened by another executable
This is also why Shirudo is not something you bolt onto a box that runs Cilium as the Kubernetes CNI or one of the eBPF-based agents we looked at in what an EDR agent sees on a Linux server. Tools like these load their own BPF, and on a Shirudo target that BPF lands in the same LoadNotLoader counter as an attacker’s. Shirudo’s limits are just as clear in its FAQ and threat model: root with a kernel exploit, or holding a key the kernel trusts for module signatures, gets around these checks.
Unload the upatch and clean up
Remove the shield with the signed directive you built earlier. The target runs it through the same signature check as a load and confirms the loaded payload is the one the directive names before it detaches anything:
shirudo upatch unload basic.unload.upatch
Note that the register moved forward to a third value instead of returning to the boot value. It only resets when the TPM does, at the next boot, so the history of every load and unload stays provable until then:
upatch unload: signed loader accepted, keyring 584657318, 165 instructions
upatch unload: basic carries the directive's payload
upatch unload: basic measured, register 457a6475d5e88ae208f8a178f5eaae1474be89c71d44e4b88bd870ae3468dd74
upatch unload: basic detached and unpinned
To predict the register after an unload, pass both events to attest predict: --event=load:basic="$PAYLOAD" --event=unload:basic="$PAYLOAD". When you are done with the lab, leave the target shell with exit, then stop the VM and delete its state from the operator host. A stopped target can’t boot again under the same name, so vm-clean is also what you run before booting a fresh quickstart:
make -C testing vm-stop VM_NAME=quickstart
make -C testing vm-clean VM_NAME=quickstart
The next step from here is a shield that does something. The repo ships real ones under upatches/, and each is worth reading before you write your own:
kernel-cve: prebuilt packages for kernel CVEs such as CVE-2026-31431app-sandbox: sandboxes for Apache httpd and PHP-FPMkernel-obs: observes execs, network peers and privilege changes, blocks nothingjava-base64: the Java4Shell guard from the announcement
The repo also ships agent skills and an AGENTS.md, so if you already drive a coding agent from the terminal (our Codex CLI cheat sheet covers the commands), pointing it at a CVE and asking for a upatch is the workflow the project was built around. For the BPF background itself, our list of eBPF books is a good start.
Troubleshoot the Shirudo test VM
We hit each of these in the lab, and each entry gives the cause and the fix.
Error: “VM ‘quickstart’ is not running; start it with ‘make -C testing vm VM_NAME=quickstart'”
We got this on every vm-ssh call after the first 11 minute build finished over SSH. The test VM’s qemu.log named the killer: qemu-system-x86_64: terminating on signal 15 from pid 1470 (/usr/lib/systemd/systemd). QEMU and swtpm run as transient systemd user units, and with Linger=no the user’s systemd instance stops, along with QEMU, when your last SSH session ends. Enable lingering, then clean the dead VM and boot it again, which reuses the bundle and takes about a minute:
sudo loginctl enable-linger "$USER"
make -C testing vm-clean VM_NAME=quickstart
make -C testing vm VM_NAME=quickstart
The quickstart doesn’t mention it because it assumes you sit at the host or in a Lima shell. Running the whole lab over SSH on a remote box is where it bites, and a tmux session on the host works as well as lingering.
shirudo-keepalive.service and shirudo-bpm-tree-sync.service failed
On the target console both units fail on every timer run, and systemctl --failed lists them. The journal for the keepalive says status: send the keepalive: No route to host. That is expected on the plain quickstart: the test config points the keepalive and the upatch tree at a TLS backend stack that only exists when you run the project’s local development stack. Nothing in the sign, load and attest flow depends on them, so leave them alone unless you set up the registry and collector from the docs’ “Develop locally” page.
“image: waiting for another shirudo command to release the config operation lock”
Several of our target commands printed this first, and it is not an error. Shirudo’s systemd timers run one-shot commands every few seconds on the test target, and a command you type waits for the one holding the lock, then carries on. It only matters in scripts that parse output, which should use --json where a command offers it.