#windows-registry #registry #windows #forensics #cybersecurity #parser #security

frnsc-hive

Implements RegistryReader from forensic-rs to access the windows registry from Hive files

3 releases (breaking)

new 0.13.0 Apr 5, 2024
0.9.0 Feb 18, 2024
0.8.0 Feb 4, 2024

#1862 in Parser implementations

Download history 81/week @ 2024-02-12 66/week @ 2024-02-19 22/week @ 2024-02-26 7/week @ 2024-03-11 147/week @ 2024-04-01

154 downloads per month

MIT license

135KB
3K SLoC

Hive Reader [Alpha]

crates.io documentation MIT License Rust

Open Hive registry for forensic purpouses. Uses ForensicRs framework.

Status

Still not usable, and a WIP.

https://github.com/msuhanov/regf/blob/master/Windows%20registry%20file%20format%20specification.md

Working with Hives

let mut reader = HiveRegistryReader::new();
// Add a registry key extracted from a REG file
reader.add_reg_key(r"HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System", r"Identifier", RegValue::SZ(r"AT/AT COMPATIBLE".into()));
// Now the key is mounted and can be accesses like its in a Hive
let key = reader.open_key(HKLM, r"HARDWARE\DESCRIPTION\System").unwrap();
assert_eq!(RegHiveKey::Hkey(1407374883553280), key); // Cache -1 and type 5 => Mounted
assert_eq!(RegValue::SZ(r"AT/AT COMPATIBLE".into()), reader.read_value(key, "Identifier").unwrap());
reader.close_key(key);

Dependencies

~350–590KB
~13K SLoC