Course contentsShow
← Security
Lesson 2396 of 3,05246. Incident ResponseFree lesson

Registry and File System in Memory

Analyzing registry hives loaded in memory and recovering file objects, handles, and cached file data.

Registry and File System in Memory

What You'll Learn

You'll learn how to analyze registry hives that are loaded in memory and recover file system artifacts like open file handles, cached data, and file objects that exist only in RAM.

Why Memory Contains Registry and File System Artifacts

When a Windows system runs, it doesn't constantly read from disk—that would be too slow. Instead, the operating system loads critical registry hives into memory and caches frequently-accessed file data. These memory-resident structures are gold mines during incident response because they reveal:

  • Which registry keys were recently accessed (even if deleted from disk)
  • Open files and their handles (what processes are touching which files right now)
  • Cached file contents that may no longer exist on disk
  • File metadata like timestamps and attributes

Think of it like a library: the disk is the archive, but memory is the reading room where books currently in use sit on tables. An attacker might remove a book from the archive, but if it's still on a table in memory, you can find it.

What You Can Recover

Registry Hives in Memory: Major hives (SYSTEM, SOFTWARE, SAM, NTUSER.DAT) are partially or fully loaded. You can extract registry keys that reveal recently run programs, mounted devices, or user activity—even if the attacker modified or deleted registry entries on disk afterward.

File Objects and Handles: Every open file has a kernel object. By parsing these structures, you identify which processes have which files open, revealing malware configuration files, exfiltrated documents being staged, or persistence mechanisms.

Cached File Data: Windows caches file contents in memory. You may recover entire files—scripts, executables, documents—that were opened, executed, and then deleted from disk.

Analysis Approach

Use memory forensics tools to scan for _FILE_OBJECT structures and registry hive signatures, then reconstruct the data into usable formats for investigation.

Key Takeaway: Memory forensics lets you recover registry data and file system artifacts that persist in RAM even after disk modifications, providing a real-time snapshot of system state during compromise.