Evidence at the Moment of Detection: Automatic Process-State Preservation and Tamper-Evident Anchoring on Linux Servers
When a host-based detector fires, the evidence that explains the incident is usually about to disappear: the offending process is killed or exits, its connections close, and its memory is gone before an analyst can inspect it. We describe and evaluate a design, implemented in a Linux server security daemon, that preserves evidence at the moment of detection. The containment path saves the process state (process status, command line, memory map, environment with secrets redacted, open descriptors, socket peers, ancestry, and optionally writable memory) just before the process is killed, and records the SHA-256 of the bundle's manifest in a hash chain kept outside the bundle. We add two small mechanisms to a plain hash chain: a start mark that distinguishes a truncated trailing chain entry from a bundle that predates the chain, and a witness - an off-host copy of the chain head - that detects a chain cut back or rewritten even when every remaining hash has been recomputed. We also describe an opt-in pre-roll ring of packet headers, because a packet capture started upon detection cannot observe traffic from before process isolation. In a disposable VM, all six base process artifacts were preserved in 20 of 20 runs of a reverse-shell simulation; snapshot collection began at a median of 43 ms after detection, and the process was terminated at a median of 292 ms after detection. Across six attacker capability levels, the design with an off-host witness detects all but the strongest, in which the attacker also modifies every copy of the witness; we state this boundary explicitly. In the same simulation, the pre-roll captured the first packet of the attack connection at a median of 3.2 s before detection in 10 of 10 runs, whereas a capture started upon detection captured none of the attack connection's packets in 20 of 20 runs. Our own validation found that our initial pre-roll implementation inadvertently retained payload bytes in the bundle; we describe the finding and the fix. Finally, we compare what four widely used tools (Falco, Tetragon, auditd, and Velociraptor) leave behind after the same simulated attack. The comparison evaluates what state is preserved after process termination, not detection quality.
Authors
- Tetsuharu Fujiki (ORCID: https://orcid.org/0009-0001-3251-6189)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-14
- DOI
- https://doi.org/10.5281/zenodo.24222277
- Primary Topic
- Digital and Cyber Forensics
- Type
- preprint