A command-line tool for efficiently searching files, directories, and alternate data streams directly from NTFS image files.
ntfsfind allows digital forensic investigators and incident responders to search NTFS file system records in disk images using regular expressions, without mounting the images.
By leveraging powerful backend libraries, it supports common forensic image formats such as RAW, E01, VHD/VHDX, and VMDK, and reliably parses NTFS structures.
- Direct Search: Search files directly from NTFS partitions without mounting the image.
- Multiple Image Formats: Read
RAW,E01,VHD,VHDX, andVMDKimages. - Regex Queries: Search file paths with regular expressions. Partial matching is used by default, similar to
grep. - Alternate Data Streams (ADS): Find hidden alternate data streams.
- CLI and Python Module: Use it from the command line or integrate it into your own automation tools.
- Python: Compatible with Python 3.13+.
- Precompiled Binaries: Available for both Windows and Linux in the GitHub releases section.
# From PyPI
pip install ntfsfind
# From GitHub Releases (Precompiled Binaries)
chmod +x ./ntfsfind
./ntfsfind --help
# On Windows
ntfsfind.exe --help- Image formats:
RAW,E01,VHD,VHDX,VMDK. - File system:
NTFS. - Partition tables:
GPTis supported.MBRmay be auto-detected depending on the image.
You can pass arguments directly to the CLI. Search queries are matched against normalized NTFS paths using forward slashes (/).
ntfsfind [OPTIONS] <IMAGE> [SEARCH_QUERY]Options:
--help,-h: Show help message.--version,-V: Display program version.--volume,-n: Target specific NTFS volume number (default: auto-detects main OS volume).--format,-f: Image file format (default:raw). Options:raw,e01,vhd,vhdx,vmdk.--ignore-case,-i: Enable case-insensitive search.--fixed-strings,-F: Interpret search query as a literal fixed string instead of a regular expression.--multiprocess,-m: Enable multiprocessing for the operation.--out-mft: Export the parsed$MFTraw bytes to the specified file path.
Find Eventlogs:
$ ntfsfind ./path/to/your/image.raw '.*\.evtx'
/Windows/System32/winevt/Logs/Setup.evtx
/Windows/System32/winevt/Logs/Microsoft-Windows-All-User-Install-Agent%4Admin.evtx
/Logs/Windows PowerShell.evtx
/Logs/Microsoft-Windows-Winlogon%4Operational.evtx
/Logs/Microsoft-Windows-WinINet-Config%4ProxyConfigChanged.evtx
...Find the original $MFT file and files in its path:
$ ntfsfind ./path/to/your/image.raw '\$MFT'
/$MFT
/$MFTMirrFind alternate data streams:
$ ntfsfind ./path/to/your/image.raw '.*:.*'Export $MFT and search it directly for faster repeated queries:
A dumped $MFT file can also be used as input for faster repeated searches.
# 1. Export MFT from the image (search query can be omitted)
$ ntfsfind --out-mft /tmp/my_mft.bin ./path/to/your/image.raw
# 2. Later you can query the dumped MFT file instead of the heavy image!
$ ntfsfind /tmp/my_mft.bin '.evtx'When combined with ntfsdump, matching files can be dumped directly from the image via standard input.
ntfsfind and ntfsdump are compatible if they share the same major and minor versions (e.g. they can be used together if both are version 3.0.x).
$ ntfsfind ./path/to/imagefile.raw '.*\.evtx' | ntfsdump -o ./dump ./path/to/imagefile.rawYou can incorporate ntfsfind logic into your own scripts.
from ntfsfind import ntfsfind
# image: str
# search_query: str
# volume: Optional[int] = None
# format: Literal['raw', 'e01', 'vhd', 'vhdx', 'vmdk'] = 'raw'
# multiprocess: bool = False
# ignore_case: bool = False
# fixed_strings: bool = False
# out_mft: Optional[str] = None
#
# -> List[str]
records = ntfsfind(
image='./path/to/your/imagefile.raw',
search_query=r".*\.evtx",
volume=2,
format='raw',
multiprocess=False,
ignore_case=True,
fixed_strings=False,
out_mft='/tmp/dumped_mft.bin'
)
for record in records:
print(record)We welcome bug reports, issues, and feature requests. Please do so on the GitHub repository. 🍣 🍣 🍣
Released under the MIT License.
Powered by:
The standalone binaries distributed via GitHub Releases bundle the following third-party libraries.
The libyal libraries (libewf, libvhdi, libvmdk) and pytsk3 are pulled in transitively via ntfsdump, but they are physically bundled inside the ntfsfind binary, so their notices are reproduced here as well.
The following libyal libraries are licensed under the GNU Lesser General Public License v3.0 or later (LGPL-3.0-or-later). You may obtain, modify, and rebuild them from their upstream sources in accordance with the LGPL.
- libewf / libewf-python
- Bundled version:
libewf-python==20240506(source: https://github.com/libyal/libewf/releases/tag/20240506) - License text: https://github.com/libyal/libewf/blob/main/COPYING.LESSER
- Bundled version:
- libvhdi / libvhdi-python
- Bundled version:
libvhdi-python==20251119(source: https://github.com/libyal/libvhdi/releases/tag/20251119) - License text: https://github.com/libyal/libvhdi/blob/main/COPYING.LESSER
- Bundled version:
- libvmdk / libvmdk-python
- Bundled version:
libvmdk-python==20240510(source: https://github.com/libyal/libvmdk/releases/tag/20240510) - License text: https://github.com/libyal/libvmdk/blob/main/COPYING.LESSER
- Bundled version:
- pytsk / pytsk3 — licensed under the Apache License 2.0.
- Bundled version:
pytsk3==20250801 - License text: https://github.com/py4n6/pytsk/blob/master/LICENSE
- Bundled version:
- pymft-rs / mft — licensed under the MIT License.
- Bundled version:
mft==0.7.0 - License text: https://github.com/omerbenamram/pymft-rs/blob/master/pyproject.toml
- Bundled version: