EQTY LabDocs

Security

What a Desktop Notary signature proves, what it does not, the known ways the binding between a process and its key can be attacked, and how each is handled.

View as Markdown

The notary binds a hardware-backed signing key to a binary identity. This page is the standing account of that binding and the known ways it could be subverted to issue a signature under a DID(H) that does not correspond to the code that ran. It is not a closed list.

The claim

A signature from DID(H) proves that code with content hash H ran on this machine and made the request.

The product collapses if an attacker can be tracked under a hash they did not exec, or sign with a key bound to a hash whose content they never ran.

What the binding covers

The identity is the executable file: the BLAKE3 hash of the main executable’s bytes. Every check the daemon makes asks “is the exe file still H?”:

  1. At registration, the daemon hashes the file through a pinned descriptor.
  2. At exec, the observer reports a process whose inode matched a registration, and the daemon re-hashes the live executable before tracking the PID. On Linux that is /proc/<pid>/exe, a handle to the file that was actually exec’d, which survives unlink, rename and in-place overwrite.
  3. At signing, the daemon re-reads the process start time, to catch PID reuse, and re-hashes the live executable again. A mismatch on either returns 403.

Fork children inherit tracking until they exec something else; the sign-time check means an inherited entry cannot sign for a different binary.

What it does not cover

The binding is to the file, never to the instruction stream. A root-equivalent local adversary can make the two diverge, and no file-content hash can detect it:

  • ptrace into a tracked process. Root attaches to a process that honestly exec’d H, and injects a connect() and /v1/sign. The PID is tracked, the start time is unchanged, and the file still hashes to H.
  • LD_PRELOAD or an injected library. Root execs the real registered binary with a preloaded object driving the request. The hash never covered the runtime closure, only the executable.
  • Debugging the daemon itself, or calling its keystore in-process. At that point the on-disk key protections are moot too: the attacker is the daemon.

What the per-binary content-addressed keys do defeat is substitution: a root attacker cannot obtain a signature under DID(H) by presenting different on-disk content, or by registering a hash whose content they do not hold. They must run code that genuinely hashes to H. The residual power, tampering with that process in memory, is inherent to root-equivalent privilege and outside what any file-identity design can assert. The macOS and Windows equivalents are the same in spirit.

The notary also does not:

  • start your processes. The daemon runs as root and does not exec client-supplied commands;
  • authenticate beyond the caller’s PID. There is no API key, OAuth or client certificate;
  • protect the signed payload’s confidentiality;
  • protect against root on the host inspecting TPM state or modifying the daemon.

Findings

IDSeverityOSStatusFinding
C1CriticalLinuxFixedIn-place overwrite of a registered binary keeps its inode, so the next exec would be tracked under the old hash. The exec-time live-hash check catches it.
C2CriticalLinuxFixedA new file landing on a deleted registration’s inode would be tracked under the old hash. Same check.
C3CriticalLinuxFixedHash-and-inode registration needs no proof the caller holds matching content. The key is minted, but nothing can exercise it without exec’ing content that hashes to it.
C4CriticalLinuxFixedThe kernel filter keyed on inode alone, without the device, so a user-mountable filesystem could collide. Same check.
H1HighmacOSOpenThe kqueue observer re-hashes by path on a 25 ms poll after exec, so a file swapped twice within that window could be tracked under the original hash. Needs hashing through the exec’d vnode rather than by path.
H2HighBothFixedAn in-process execve keeps the start time, so a stale tracked entry could sign under the old hash while the untrack event sat in a queue. The sign-time live-hash check holds regardless of event delay.
M1MediumBothInformationalThe start time is a PID-reuse guard, not a content identity. H2 covers the in-process exec case.
M2MediumBothFixedRegistration read whole files into memory. Hashing is now streamed, capped at 256 MiB, with a concurrency limit.
M3MediumLinuxFixedThe IMA entry for the daemon was found by path, so a replacement at the same path could be described in the credential. It now requires the path and the running file’s SHA-256.
L1LowBothMitigated by H2A fork child inherits its parent’s binary association unchecked.
L2LowmacOSOpenThe macOS start-time packing is not strictly unique across processes started in the same microsecond.
L3LowLinuxMitigatedA ring-buffer overflow can drop an untrack event. On a drop, every tracked PID is rechecked and stale entries evicted.

The Linux kernel filter still matches by inode alone; the content check lives at the userspace boundary in both the exec and the sign paths.

The socket is open by design

The Unix socket is mode 0666, and the TCP listeners answer any local caller. The security boundary is not who can connect, it is which binary the connecting process is running. Any local user can register a binary, read the public endpoints and fetch the notary’s credential; registering a hash you hold no content for is harmless, because no process will ever be tracked under it.

For hosts that want to restrict the connect set anyway, EQTY_SOCKET_MODE=0660 with a shared group does it. Auto-registration, on in the packages, lets any local process obtain a key of its own; turn it off where that is not acceptable.

Keys at rest

PlatformWhere the key livesWhat protects the blob
LinuxA TPM blob under /var/lib/eqty-notary/keysSealed by the chip, useless on another machine. Four independent on-disk layers: 0700 directory permissions, systemd’s UMask and StateDirectory, explicit file modes in the daemon, and the opt-in BPF LSM key guard that refuses the open even to root.
macOSA Secure Enclave-wrapped blob in the System keychainThe key never leaves the enclave. The keychain item’s ACL trusts only the daemon’s designated requirement, so another binary cannot load it. Root decrypting the keychain offline is the same position as a Linux root reading a sealed blob.
WindowsA TPM-wrapped blob under the Platform Crypto ProviderDACL’d to the service SID. An administrator on this machine can take ownership of the key file and use it; this is the known gap, and the reason an App Control policy is offered.

Every TPM blob writer creates the file with mode 0600, writes, syncs and renames atomically, so a private blob is never briefly readable and a crash leaves a .tmp rather than a corrupt file. The attestation key is restricted, so the TPM itself refuses to sign caller-supplied digests with it: any AK signature is by construction a quote or a certify.

The key guard fails open: if bpf is not in the LSM stack, the object is missing, or any load step errors, the daemon logs key-guard skipped and starts without it. Set EQTY_REQUIRE_KEY_GUARD=1 to make that a startup failure instead.

Attestation outputs

The identity credential is published at /run/eqty-notary/credential.json, mode 0644. Its contents are signed evidence, not secrets. The IMA log is read entirely into memory at startup; on a long-running host with a verbose policy it can reach hundreds of megabytes, so on a memory-constrained host use a more selective ima_policy.