Amcache & RecentFileCache Forensic Analysis
Executive Summary
Section titled โExecutive SummaryโThe Amcache (on Windows 8 and later) and its predecessor, the RecentFileCache (on Windows 7), are critical artefacts generated by the Windows Application Compatibility service. For DFIR analysts, they act as the โidentity cardโ of executable files, providing metadata such as full file paths, installation dates, andโmost importantlyโthe SHA1 hash of the binaries.
Objective and Mechanism
Section titled โObjective and MechanismโThese artefacts are not security-oriented; they exist to ensure application compatibility across Windows updates.
How it Works:
Section titled โHow it Works:โ- When a program is executed, the application compatibility service extracts metadata from the Portable Executable (PE) header.
- This information, including the file path and cryptographic hashes, is stored in a database.
- On modern Windows, this database is the
Amcache.hvefile, which is structured as a Registry Hive.
Location and Structure
Section titled โLocation and StructureโThe location of these artefacts varies by OS version:
- Windows 8/10/11:
- Artefact:
Amcache.hve - Path:
C:\Windows\appcompat\Programs\Amcache.hve - Format: Registry Hive (requires specialized parsing tools).
- Artefact:
- Windows 7:
- Artefact:
RecentFileCache.bcf - Path:
C:\Windows\AppCompat\Programs\RecentFileCache.bcf
- Artefact:
Forensic Utility
Section titled โForensic UtilityโAmcache is highly complementary to Prefetch and Shimcache. While Prefetch provides execution history, Amcache provides the definitive identification of the file.
- Cryptographic Identification: The SHA1 hash allows analysts to uniquely identify binaries and correlate them with threat intelligence databases (e.g., VirusTotal), even if the malware has been renamed.
- Path Verification: Analysts can identify masqueraded threats by comparing the executableโs path in Amcache against the legitimate system location.
- Duo Analysis (The โWinning Duoโ):
- Use Prefetch to determine execution timestamps.
- Use Amcache to determine the SHA1 hash and full file path.
- Combine these for a positive identification of a threat and a solid timeline.
- Removable Media Tracing: Amcache often tracks programs launched from external storage, assisting in tracing physical infection vectors.
Analysis Tools
Section titled โAnalysis ToolsโSince these files are binary or registry hives, manual inspection is not feasible. Use these standard tools:
- AmcacheParser.exe (Eric Zimmerman): The industry-standard tool for extracting and parsing the
Amcache.hvefile into readable CSV formats. - RegRipper: An alternative tool with dedicated plugins for registry hive analysis, including Amcache.
Detection and Hunting
Section titled โDetection and HuntingโFor effective threat hunting, correlate Amcache data with: