Skip to content

Artifact Analysis: Windows Registry Forensics

The Registry is not a single file. It is composed of multiple binary files known as Hives, stored in specific locations on the disk. During a “Dead-Disk” forensic analysis or KAPE triage, analysts must extract these files directly.

The System Hives (C:\Windows\System32\config\)

Section titled “The System Hives (C:\Windows\System32\config\)”
  • SYSTEM: The core OS configuration. It contains Windows Services, timezone data, USB connection history (USBSTOR), and critical execution artifacts like the Background Activity Moderator (BAM) and Shimcache.
  • SOFTWARE: Information about installed applications, OS versioning, and system-wide autostart persistence (e.g., Run and RunOnce keys).
  • SAM (Security Account Manager): Local accounts, groups, and local password hashes (NTLM). This is the hive attackers target to dump local credentials.
  • SECURITY: Local security policies and cached LSA secrets.
  • NTUSER.DAT: Located in C:\Users\<User>\. This is the absolute goldmine for user attribution. It tracks what the user interacted with, storing UserAssist, MRU Lists, and user-level persistence.
  • UsrClass.dat: Located in C:\Users\<User>\AppData\Local\Microsoft\Windows\. It contains file extension associations and a significant portion of the Shellbags artifacts.

2. DFIR Cheat Sheet: Artifact Index by Hive

Section titled “2. DFIR Cheat Sheet: Artifact Index by Hive”

To accelerate triage, analysts map specific forensic questions to specific hives.

Execution Evidence

  • UserAssist: (NTUSER.DAT) Proves a user launched an app via the GUI (includes run counts).
  • BAM: (SYSTEM) Proves execution explicitly linked to a User SID.
  • Amcache: (Amcache.hve) Provides the SHA1 hash of executed binaries.

User Activity & Intent

  • Shellbags: (NTUSER.DAT & UsrClass.dat) Reconstructs the exact folder navigation history.
  • MRU Lists: (NTUSER.DAT) Reveals files opened, saved, or commands typed in the “Run” dialog.

Adversarial Persistence

  • Run Keys: (SOFTWARE & NTUSER.DAT) Malware executing at boot or logon.
  • Windows Services: (SYSTEM) Look under CurrentControlSet\Services\ for malicious services (Event 7045).

3. The Forensic Superpower: Last Write Time

Section titled “3. The Forensic Superpower: Last Write Time”

Unlike a standard text log, every single key within the Windows Registry possesses a Last Write Time timestamp, akin to a file’s modification date.

This is arguably the most critical feature of the registry for DFIR analysts. If an analyst discovers a malicious persistence entry in the HKCU\Software\Microsoft\Windows\CurrentVersion\Run key, the Last Write Time of that key reveals the exact millisecond the threat actor established persistence. This timestamp can then be used to pivot to the USN Journal or Event 4688 logs to see what else the attacker was doing at that precise moment.

Manually browsing binary hive files using an offline viewer is inefficient. DFIR teams rely on automated parsing tools that ingest the hives, replay the transaction logs, and generate consolidated timelines.

parse_registry_hives.cmd
:: RECmd (Registry Explorer Command Line) by Eric Zimmerman
:: Extracts data using pre-defined Batch files tailored for DFIR
RECmd.exe -d "C:\Forensics\Export\RegistryHives" --bn BatchExamples\Kroll_Batch.reb --csv "C:\Forensics\Results"

Note: The GUI version, Registry Explorer, features built-in “Bookmarks” that instantly highlight UserAssist, BAM, and Run keys, automatically decoding obfuscated values (like ROT13).