Authors: Ton van Deursen, Sjouke Mauw, and Saša Radomirović (University of Luxembourg)
Introduction
In digital forensics, "carving" traditionally refers to the recovery of deleted or fragmented files from raw memory dumps. However, modern forensic challenges often require locating specific data fields—such as a user ID, a balance, or a timestamp—within the structured memory of embedded systems like smart cards and IoT devices. This paper introduces mCarve, an approach focused on "attribute carving." By analyzing sets of memory dumps alongside observed external data, mCarve mathematically pinpoints the exact memory locations where specific information is stored.
Methodology
The core of mCarve lies in analyzing how memory changes in relation to an attribute's value across multiple snapshots, or "dump sets." The authors formalize this using two primary concepts:
- Commonalities: Identifying bits that remain identical across all dumps where the attribute value is the same. This establishes an upper bound for the data's location.
- Dissimilarities: Finding the minimal set of bits that must change when the attribute value changes, providing a lower bound.
- Cyclic Attribute Mapping: To handle wear leveling (where data rotates through memory slots), the authors create "derived attributes" to track data history and transform dynamic storage problems into static ones.
This methodology is encoding-agnostic; it does not require prior knowledge of whether data is stored in Big Endian, Little Endian, or a custom format. The mathematical relationship between value changes and bit transitions is sufficient to isolate the field.
Experimental Evaluation
The authors evaluated mCarve using both synthetic and real-world datasets:
- Synthetic Test Suite: Dumps ranging from 8KB to 256KB were used to measure performance and convergence (the number of dumps needed to isolate an attribute).
- The E-go Case Study: A real-world dataset of 68 memory dumps from seven Luxembourg "e-go" public transportation cards (MIFARE Classic 1k tags). This included data from ticket charging and bus validation events.
Key Findings and Results
Using mCarve, the researchers successfully reverse-engineered the e-go card's memory layout, identifying functional areas for product data, transaction logs, and internal pointers.
- Convergence Speed: For a typical 1KB smart card, only about 12 dumps (representing roughly 5 different attribute values) are required to uniquely identify a field's location.
- Cryptographic Detection: High-entropy fields like CRCs or hashes cause the "dissimilarity window" to jump frequently. This heuristic allowed the authors to identify a 16-bit CRC and determine its specific polynomial.
- Performance: The Python prototype handles 32KB dumps in seconds. However, as shown in the performance data, execution time increases significantly with larger dump sizes due to the quadratic complexity of the dissimilarity algorithm.
Limitations and Future Work
While powerful, mCarve currently faces challenges with noise; a single incorrectly recorded attribute value can cause the mathematical intersection to fail. Additionally, while the tool locates the data, analysts must still manually determine the specific encoding. Future work aims to automate encoding recovery and improve scalability for larger memory dumps, such as those from modern smartphones, by migrating the core algorithms to lower-level languages like C++.
Summary updated