Data Dedup Rehydrate is a Python tool for scanning and restoring files from NTFS volumes that use Windows Data Deduplication.
It can parse a raw NTFS image, identify files represented by Dedup reparse points, locate the corresponding Dedup chunk-store records, reconstruct the original byte stream, and write restored files to disk. A Tkinter GUI and a small CLI are included.
- Pure-Python NTFS raw-image parsing
- Automatic discovery of Dedup reparse-point files
- Stream key and logical file-size extraction from Dedup reparse data
- SMAP stream-map lookup in Dedup
Streamcontainers - Chunk lookup in Dedup
Datacontainers - XPRESS decompression for compressed chunks on Windows
- GUI workflow for scanning, searching, selecting, and restoring files
- CLI workflow for scripted scan and restore operations
- Optional support for an extracted Dedup folder instead of reading chunk containers only from the image
- Python 3.10 or newer
- Windows is recommended when restoring compressed chunks, because XPRESS decompression uses
ntdll.RtlDecompressBufferEx - Tkinter for the GUI, included with most standard Python installations
No third-party Python package is required for the raw-image workflow.
This project can be run directly from its parent directory:
python -m data_dedup_rehydrateIf you are inside the package directory itself, move one directory up before running with -m:
cd ..
python -m data_dedup_rehydrateLaunch the GUI:
python -m data_dedup_rehydrateInput fields:
- Raw image: the NTFS image to scan. This is the primary required input.
- Extracted
$MFT: reserved for workflows where an extracted MFT is available. - Dedup folder: optional path to an extracted
Dedup,ChunkStore, or.ddpfolder. - Output dir: destination directory for restored files.
Basic workflow:
- Select a raw NTFS image.
- Optionally select an extracted Dedup folder.
- Click Scan.
- Use the search box to filter files by path or filename.
- Double-click a row, or select a row and press Space, to mark files for restore.
- Click Restore selected.
Scan a raw image:
python -m data_dedup_rehydrate --scan <raw-image>Scan and verify that each listed file has a matching SMAP record:
python -m data_dedup_rehydrate --scan <raw-image> --verifyRestore a file by filename or path:
python -m data_dedup_rehydrate --restore <raw-image> <filename-or-path> --out <output-directory>Use an extracted Dedup folder as the chunk-store source:
python -m data_dedup_rehydrate --restore <raw-image> <filename-or-path> --dedup <dedup-folder> --out <output-directory>The raw image path is the main input. The tool parses:
- NTFS boot sector
$MFT- file records
- resident and non-resident attributes
- data runs
- Dedup reparse attributes
- Dedup chunk-store files present inside the image
The optional Dedup folder can point to any of these layouts:
Dedup\ChunkStore\{GUID}.ddp\Stream\*.ccc
Dedup\ChunkStore\{GUID}.ddp\Data\*.ccc
ChunkStore\{GUID}.ddp\Stream\*.ccc
ChunkStore\{GUID}.ddp\Data\*.ccc
{GUID}.ddp\Stream\*.ccc
{GUID}.ddp\Data\*.ccc
When provided, the extracted folder is searched before or alongside chunk-store data found in the raw image.
The restoration pipeline is:
- Parse the NTFS image and load MFT records.
- Find files with
$REPARSE_POINTattributes. - Keep only reparse points with
IO_REPARSE_TAG_DEDUP(0x80000013). - Parse the Dedup reparse payload to recover:
- the 16-byte stream key
- the logical file size
- Search Dedup
Streamcontainers for the stream key. - Locate the associated
Smaprecord. - Parse SMAP entries to recover the ordered chunk hashes and chunk lengths.
- Search Dedup
Datacontainers for each chunk hash. - Validate each chunk record with its
Ckhrheader. - Extract each chunk payload.
- Decompress XPRESS-compressed chunks when required.
- Concatenate chunks and verify the restored size.
- Write the restored file to the selected output directory.
CLI scan output uses tab-separated fields:
<size> <stream-key-hex> <status> <path>
Common statuses:
dedup reparse: a Dedup reparse-point file was foundready: a matching SMAP record was found during verificationsmap not found: the file was detected, but no matching SMAP record was found
Restore output prints the path of the restored file on success.
Run the command from the parent directory of the package:
cd <project-root>
python -m data_dedup_rehydrateThe file was detected as a Dedup reparse point, but the matching Stream container was not found. Try providing an extracted Dedup or ChunkStore folder with --dedup.
A chunk hash from the SMAP could not be found in the available Data containers, or the corresponding chunk record did not validate.
The target file uses compressed Dedup chunks, but XPRESS decompression is unavailable in the current runtime. Run the tool on Windows with a standard CPython build.
- The raw-image workflow expects an NTFS volume image with readable MFT records.
- XPRESS decompression currently uses the Windows native
ntdllAPI. - The extracted
$MFTfield is present for workflow compatibility, but the primary implemented scanner is the raw-image scanner. - Damaged or partial chunk stores may scan successfully but fail during restore if required Stream or Data containers are missing.
This project is released under the MIT License. See LICENSE.