Unlock Windows Forensics with AmCacheParser CLI
A powerful Python tool for extracting and analyzing metadata from the Windows Amcache.hve registry hive. Tailored for digital forensics, incident response, and system auditing.
AmCacheParser is a Python-based CLI tool designed to extract and analyze metadata from the Windows Amcache.hve registry hive (C:\Windows\AppCompat\Programs\Amcache.hve). It transforms raw Amcache data into actionable insights, revealing application histories, file artifacts, device connections, and driver details. With support for live and offline analysis, multiple output formats (SQLite, JSON, CSV), and robust error handling, it’s an essential tool for security professionals and system administrators.
The Amcache.hve file, introduced in Windows 7, is a registry hive that stores metadata about applications, executables, devices, and drivers. Located at C:\Windows\AppCompat\Programs\Amcache.hve, it supports Windows' Application Compatibility Database. Key subkeys include:
Amcache persists data even after files are deleted, making it a goldmine for reconstructing system activity, detecting malware, and auditing software.
Why It Matters: Amcache’s persistence makes it ideal for uncovering hidden threats and auditing systems, even when files are gone.
Live: Parses the live Amcache.hve file on Windows 7+ (requires admin privileges).
Offline: Analyzes user-specified Amcache.hve files for post-mortem investigations.
SQLite (amcache.db): Structured database with tailored tables.
JSON (amcache.json): Human-readable format with LCID-mapped language names.
CSV (amcache.csv): Spreadsheet-compatible with comprehensive headers.
Auto-creates a virtual environment (venv_amcache_parser) and installs dependencies (python-registry, tqdm).
Checks for admin rights and provides PowerShell elevation commands if needed.
Uses python-registry and Windows API calls to access locked hives via SeBackupPrivilege and RegLoadAppKeyW.
Converts Language Code Identifiers (e.g., 1033 → English (United States)) for 40+ languages.
Stores data in SQLite with duplicate prevention and timestamp tracking.
Retries hive loading, logs errors to C:\Amcache\amcache_parser.log, and validates inputs.
Displays a tqdm progress bar for parsing large datasets (e.g., 27 subkeys).
Interactive: Menu-driven interface.
Non-Interactive: Command-line arguments for automation.
Filters subkeys (e.g., --search-keys InventoryApplication) to optimize performance.
Ensures Windows 7+ compatibility for live analysis.
Uses temporary files with auto-deletion for secure hive exports.
git clone https://github.com/Ghassan-elsman/AmCache-Parser-CLI.git
cd AmCache-Parser-CLI
Requires Python 3.6+. Automatically sets up a virtual environment and installs python-registry and tqdm.
For live analysis:Start-Process powershell -Verb RunAs -ArgumentList "-NoProfile -ExecutionPolicy Bypass -Command \"python amcache_parser.py --live\""
Launch without arguments for a user-friendly menu:python amcache_parser.py
Options:
1. Live Analysis
2. Offline Analysis
3. Select Output Format (sqlite, json, csv)
4. Exit
Run with command-line arguments:python amcache_parser.py --live --output json --search-keys InventoryApplication,InventoryApplicationFile
Arguments:
--live
: Analyze live Amcache.hve.--offline <path>
: Specify offline Amcache.hve file.--output <format>
: Choose sqlite, json, or csv.--search-keys <keys>
: Comma-separated subkeys.--non-interactive
: Skip menu.Live analysis with JSON output:python amcache_parser.py --live --output json
Offline analysis with CSV output:python amcache_parser.py --offline C:\path\to\Amcache.hve --output csv
subkeys table:CREATE TABLE subkeys (
subkey_name TEXT PRIMARY KEY,
parsed_timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
InventoryApplicationFile table:CREATE TABLE InventoryApplicationFile (
entry_id TEXT PRIMARY KEY,
ProgramId TEXT,
FileId TEXT,
LowerCaseLongPath TEXT,
Name TEXT,
Publisher TEXT,
Version TEXT,
LanguageName TEXT,
Usn TEXT,
parsed_timestamp TIMESTAMP
);
{
"InventoryApplicationFile": [
{
"entry_id": "00000001",
"data": {
"ProgramId": "12345678",
"FileId": "abcdef123456",
"LowerCaseLongPath": "c:\\program files\\example\\app.exe",
"Name": "app.exe",
"Publisher": "Example Corp",
"Version": "1.0.0",
"LanguageName": "English (United States)",
"Usn": "123456789"
}
}
]
}
subkey_name,entry_id,ProgramId,FileId,LowerCaseLongPath,Name,Publisher,Version,LanguageName,Usn
InventoryApplicationFile,00000001,12345678,abcdef123456,c:\program files\example\app.exe,app.exe,Example Corp,1.0.0,English (United States),123456789
Pro Tip: Combine Amcache data with Prefetch and Event Logs for a comprehensive forensic timeline.
Live analysis requires Windows 7+. Offline analysis works on any system with Python 3.6+.
Live analysis accesses the locked Amcache.hve file, requiring SeBackupPrivilege.
Yes, use --search-keys
(e.g., InventoryApplication,InventoryApplicationFile) to focus on relevant data.
Outputs are saved to C:\Amcache (e.g., amcache.db, amcache.json, amcache.csv).
Retries hive loading, logs errors to amcache_parser.log, and validates inputs.