Execution
hiberfil.sys (hibernation file)
hiberfil.sys cheat sheet: what hibernation and Fast Startup save, compression by Windows version, converting it to a raw memory image and what it can reveal.
- Location
- C:\hiberfil.sys
- Proves
- Memory state at the last hibernation or Fast Startup: processes, connections, code
- Timestamps
- File modification time (NTFS, UTC) marks the last hibernation or Fast Startup; in-memory structures hold mostly FILETIME, UTC
- Retention
- Overwritten at each hibernation or hybrid shutdown; partly invalidated after resume; deleted when hibernation is disabled
- Access
- Administrator; file locked live: collect via raw NTFS (KAPE, FTK Imager) or from a disk image
- Evidence of
- ExecutionNetwork & remote access
- Type
- File / file system
- Windows
- XPVista / 78 / 8.11011
- KAPE target
- MemoryFiles
- Velociraptor
- Windows.Triage.Targets:MemoryFiles
Tools
Compare all toolsWhat it is
When Windows hibernates, it compresses the contents of physical memory into C:\hiberfil.sys so the session can be restored at next power-on. Since Windows 8, Fast Startup (hybrid shutdown) also writes to it at every normal "Shut down": user sessions are logged off, and the kernel session and drivers are saved. For an investigator, the file is a memory image frozen at a past moment, available even when a live RAM capture was not possible.
Location
| Windows version | Path | Notes |
|---|---|---|
| XP / Vista / 7 | C:\hiberfil.sys | Written on hibernation only |
| 8 / 8.1 / 10 / 11 | C:\hiberfil.sys | Written on hibernation and, with Fast Startup enabled, on shutdown (kernel session only) |
The file exists only when hibernation is enabled (powercfg /h on). powercfg /h off deletes it.
What it proves
- A full hibernation image contains what RAM contained: running processes and command lines, loaded drivers and DLLs, network connections, injected code, registry data in memory, and fragments of user data.
- A Fast Startup image contains only the kernel session, but still holds drivers, kernel structures and some system state; user processes are gone.
- It proves the state at one moment: the last hibernation or hybrid shutdown, which may be days before the incident was noticed.
- Data from the in-memory ShimCache and other caches not yet flushed to disk can be recovered from it.
Key fields
| Element | Meaning |
|---|---|
| Header | Signature, page size, system time of hibernation and table of compressed sets |
| Compressed page sets | Memory pages, compressed (Xpress LZ77, and LZ77+Huffman on recent Windows 10/11 builds) |
| Kernel / user sections | Recent versions store the kernel section and the rest separately |
Timestamps
| Timestamp | Set when | Format | Pitfalls |
|---|---|---|---|
| File $SI modification time | Last hibernation or hybrid shutdown | NTFS, UTC | On resume, the header is updated, so the file no longer describes a restorable image |
| Timestamps inside memory structures | Process creation, connection times, etc. | Per structure (mostly FILETIME, UTC) | Reflect the moment of hibernation, not the time of analysis |
Retention and clearing
- The file is overwritten at each hibernation or hybrid shutdown, so it only ever holds the last one.
- After a successful resume, the content is partly invalidated; older data may remain in slack pages and can be carved.
- Disabling hibernation deletes the file; the deleted clusters may still be recovered from a disk image.
Collection
- KAPE target:
MemoryFiles(raw copy ofhiberfil.sys,pagefile.sys,swapfile.sysand minidumps) - Velociraptor (
Windows.Triage.Targets):MemoryFiles - Built-in: the file is locked; collect it with raw NTFS access or from a disk image. Record the configuration:
powercfg /a
reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /v HiberbootEnabled
HiberbootEnabled = 1 means Fast Startup is on.
Parsing tools
- Volatility 3: recent releases include a hibernation layer and the
windows.hibernation.Info/windows.hibernation.Dumpplugins, which convert modern hibernation files into a raw memory image for the usualwindows.*plugins. - Hibr2Bin (Comae, open source): converts hibernation files to raw images.
- Hibernation Recon (Arsenal Recon): decompresses active and slack content.
- bulk_extractor / YARA: indicator searches once the file is decompressed.
The RAM Parser runs its plugins on raw memory images: convert hiberfil.sys to a raw image first, then load the result.
Investigation tips
- Always collect
hiberfil.sysfrom laptops: it may hold the only memory image from before the incident was contained. - Check
HiberbootEnabled: on Fast Startup systems every normal shutdown refreshes the file, so a "clean" shutdown by the user overwrites it. - Compare process lists from the hibernation image with disk execution artifacts (Prefetch, Amcache) to find processes that left no trace on disk.
- Extract executables from the image and triage them as PE files.
- For wider memory coverage add pagefile.sys and crash dumps.
Related artifacts
- pagefile.sys and swapfile.syspagefile.sys and swapfile.sys cheat sheet: paged-out memory on disk, what can be recovered, ClearPageFileAtShutdown, compression caveats and carving tools.
- Crash dumps (MEMORY.DMP, minidumps)Crash dump cheat sheet: MEMORY.DMP and minidump locations, CrashControl dump types, user-mode dumps, LSASS dumping traces and tools to analyse them.
- ShimCache (AppCompatCache)ShimCache (AppCompatCache) cheat sheet: SYSTEM hive location, entry limits per Windows version, ordering, timestamp meaning and execution caveats.
- PE files (Windows executables)PE file triage cheat sheet: hashes, imphash and Rich header, compile timestamp caveats, sections and entropy, version info, signatures, PDB paths and tools.
Glossary terms
- Order of VolatilityThe principle of collecting the most volatile evidence first, before it is lost, as described in RFC 3227.
- File carvingRecovering files from raw disk data using content signatures such as headers and footers, without relying on file system metadata.
- Anti-forensicsTechniques used to destroy, hide or falsify evidence, such as log clearing, timestomping, wiping and deleting shadow copies or the USN journal.