Abstract illustration of a long row of square tiles in which a few small, dense gold blocks unfold back into full-size tiles

Most of the Windows machines I see as an examiner arrive as a disk image. There is no memory image, because nobody captured one before the machine was shut down. What a full disk image usually does have is pagefile.sys, the file Windows writes memory out to when it runs short. For years the pagefile was a useful place to search: run strings over it and you might find a URL, a chat fragment or a path that never reached the file system.

On Windows 10 and 11 that search misses a lot. Windows now keeps a memory compression store: it compresses pages and keeps them in memory, and when memory stays short it writes those compressed pages out to the pagefile. A compressed page keeps only scraps of its text in readable form, so a keyword search mostly walks straight past it.

Today I am publishing a tool that carves those compressed pages back out of a Windows 11 pagefile, with no memory image, together with the experiment that measured the format it relies on. The repository is win-pagefile-carve [1]. It is research code, it has not been validated for casework, and I am putting it out so that other people can check it.

What was already known

People have worked on compressed memory before. Aleksander Østerud’s 2018 master’s thesis at NTNU built a proof-of-concept tool for recovering data from compressed memory in Windows 10 memory samples and page files [2]. Researchers at FireEye’s FLARE team described the Windows 10 store in detail at Black Hat USA 2019 [3]. MemProcFS analyzes a memory dump together with its page files, and its change log records work on recovering compressed memory [4].

What I could not find was a description of how compressed pages are laid out inside pagefile.sys on Windows 11, measured rather than assumed, and a way to get them out when all you have is the pagefile. So I measured it.

Planting pages I already know

The method is a chosen-text study, named after the chosen-plaintext attack in cryptanalysis: you pick the input and study the output. I built about 33,000 pages of content I control, each with a known SHA-256. Most carry a unique 16-byte random marker, so that wherever a page lands in the pagefile, compressed or not, I can find it. The synthetic pages were designed around the edge cases of the LZ4 format, and a set of real-file pages was held out entirely, never looked at while I worked out the format, so that it could test the carver later.

In a Windows 11 virtual machine, the pages were streamed into one block of private memory, never written to a file. Then a second program filled memory with incompressible data until Windows pushed the store out to disk. The VM’s disk was captured at that moment and again after a clean shutdown, and pagefile.sys was copied out of each capture.

What the pagefile looked like

Across three seeded runs, 58,099 planted pages came back as compressed blocks that decoded byte for byte to what was planted. Every one of them looked the same way:

  • One compressed page is one raw LZ4 block. There is no header, no length field and no end marker.
  • All 58,099 blocks started on a 16-byte boundary of the file, and all ended on a literal run of 5 bytes or more. That end rule is what lets a decoder find where a block stops without any metadata: decode until exactly 4096 bytes have come out.
  • Blocks were mostly packed one after another, padded with zeros to the next 16-byte boundary.
  • Pages that did not compress well, such as random data, were stored plain inside the store, also on 16-byte boundaries and rarely at a 4 KiB offset.
  • With memory compression turned off, all 24,576 marker pages went to the pagefile plain, at 4 KiB offsets, and none compressed.

The pagefile captured after a clean shutdown was identical, by SHA-256, to the one captured under memory pressure, in every run where both were taken.

The carver

pfcarve is one C file with no dependencies. At every 16-byte offset of a pagefile it tries a strict LZ4 decode that must produce exactly 4096 bytes, and it prints a row for each block that does: offset, length, the SHA-256 of the page and a few structural flags. It knows nothing about the planted pages.

The important part is how it was scored. I worked out the format from the first run, froze the carver, and only then ran a new experiment with a different random seed to test it. After a review found problems in the first version, I froze the corrected version and tested it on a third seed. On that last test it recovered 19,383 of the 19,390 planted pages that were in the pagefile in compressed form. The 7 it missed appear to be blocks cut at a 4 KiB boundary of the file, where the rest of the block is somewhere else. It also recovered 7,563 of 8,192 held-out real-file pages it had never seen, which is a lower bound.

Over everything planted, recovery was about 79 percent, because the carver does not touch pages the store kept plain. Those are already readable to an ordinary search of the pagefile, so the two approaches complement each other.

One stream for the tools you already use

Most of the tools an examiner points at a pagefile read it from one end to the other: a file carver, strings, bulk_extractor. Run on the pagefile, they miss most of what is inside a compressed block. Run on the decoded pages alone, they miss everything Windows stored plain. So version 0.3.0 adds a pass-through mode. pfcarve --expand writes the pagefile back out in order, with every block it decodes swapped in place for the 4096 bytes it decodes to and every other byte copied through unchanged:

pfcarve --expand - --index carved.tsv --map expanded.map pagefile.bin | strings -n 8 | grep -i cat

Offsets in that stream are not offsets in the pagefile, so pfcarve also writes a map that ties every stretch of the stream back to the bytes it came from. Anything another tool finds in the stream can be traced to a place in the original file.

I also tested 0.3.0 as a compiled tool on Ubuntu 24.04: a clean build with -Wall -Wextra -Werror, runs under AddressSanitizer and UndefinedBehaviorSanitizer over two real 2 GB pagefiles with no reports, and a second decode of every block with the LZ4 project’s own library. Every block with the strict flag set decoded to the same SHA-256 both ways [5].

Cat pictures in a private window

Planted test pages are one thing. I wanted to see what happens with something an examiner might actually be asked about, so I opened a gallery of 16 cat photographs, all CC0 from Wikimedia Commons, in a Chrome Incognito window in the same Windows 11 virtual machine. An Incognito window is meant to keep what it loads out of the browser’s files on disk, so if those pictures turned up anywhere on the disk, the pagefile is the likely place. Then I filled memory until almost nothing was free, captured the disk, shut Windows down and captured it again. Four more cat photos were never shown, as a control.

The cat gallery open in a Chrome Incognito window in the lab virtual machine

The first time, with the Incognito window left open on screen and three minutes of pressure, the pagefile held nothing at all of the cats: not a 32-byte fragment of any picture, and not one line of the gallery’s text. The pictures had not gone anywhere. A memory image taken just after the pressure was released still held fragments covering all 16 files. An empty pagefile is not evidence that nothing was viewed.

The second time, I minimized the window before filling memory, as someone would who had moved on to something else, and held the pressure for ten minutes instead of three. This time fragments covering every one of the 16 picture files were in the pagefile, nearly all of them readable without decompressing anything, which fits the store keeping already-compressed JPEG and PNG data as it is. Each picture was scattered across 10 to 59 places, and no file carver I ran put a cat back together.

What --expand added was most of the rest. The decoded pixels of one of the pictures were inside compressed blocks: the expanded stream held 642 fragments of them, against 251 that happened to be readable in the raw pagefile. So were most of the gallery’s text hits: 12 of the 18 marker strings I had put on the page turned up in the expanded stream, against 2 in the raw pagefile. On the decoys, the only hit in either run was a piece of the standard sRGB color profile that many files carry.

The repository has the full tables, the controls and the limits [5]. The two runs differed in more than the window, and it was one run of each on one virtual machine, so they show what can happen, not why or how often it does. If you want to look for yourself, the pagefile from the second run is attached to the release (a 782 MB zip; SHA-256 of the pagefile inside is e0f81194...da49, the full value is on the release page).

To see it on a machine that was actually used, try Arsenal Recon’s TechHive Scenario, a published image of a Windows-on-ARM laptop at the same build as my virtual machine, with the BitLocker key included. Its pagefile gave pfcarve 1,105,988 blocks on the 16-byte grid and 666 off it, and every strict block decoded the same way under the LZ4 project’s own library. The Windows 11 image from Magnet’s 2023 Virtual Summit CTF, an older 22H2 build, gave 43 on the grid and 40 off it: nothing to carve, which fits the warning that builds before 24H2 may not use LZ4 at all. The details are in the repository [6].

What it does not prove

This is the part I most want readers to take away.

A block that decodes is a structural fact, not proof of a real page. About nine in ten of the blocks the carver decoded in the test run were not pages I planted. They are Windows’ own pages or false decodes, and nothing in the study can tell which. Precision on pages nobody planted is not measured. I found real examples of data that is not a compressed page but decodes as one anyway, and they are described in the repository.

The carver gives no process, no address and no time for a page, and it cannot tell a page Windows could still use from a stale one. Everything was measured on one Windows 11 build (25H2, 26200.6584), on one virtual machine, with a store that had just been filled. Earlier Windows 11 builds were not tested and may not use LZ4 at all, and a machine that has been in use for days may look different.

If you use pfcarve, validate it and your own results on your own data first. The analysis document sets out the study’s method, its runs and its controls [7]. I wrote it so that the study can be repeated on another build or another machine.

Try it, and tell me what breaks

The user guide [8] covers building the tool, getting pagefile.sys out of a disk image with The Sleuth Kit, running the carver, and reading its output. The analysis document has every count, every control and every limit.

What I would most like back: results from other Windows builds, a pagefile the carver gets wrong, a flaw in how the numbers were scored, or a published description of the Windows 11 layout that I missed. Please open an issue on the repository.

References

[1] Lucid Truth Technologies, win-pagefile-carve, GitHub, 2026.

[2] A. Østerud, Windows 10 Memory Compression in Digital Forensics: Uncovering Digital Evidence in Compressed Swap, master’s thesis, NTNU, 2018.

[3] O. Sardar et al., Paging All Windows Geeks: Finding Evil in Windows 10 Compressed Memory, Black Hat USA, 2019.

[4] U. Frisk, MemProcFS, GitHub.

[5] Lucid Truth Technologies, The cat-gallery demonstration, GitHub, 2026.

[6] Lucid Truth Technologies, pfcarve on public disk images, GitHub, 2026.

[7] Lucid Truth Technologies, How the chosen-text analysis was done, GitHub, 2026.

[8] Lucid Truth Technologies, pfcarve user guide, GitHub, 2026.