ReclaiMe’s Research – Determining Timestamps On BTRFS

ReclaiMe Data Recovery Company announces that they have completed the research devoted to determining the reliability and accuracy of various file metadata like creation, modification, and access timestamps in modern filesystems using copy-on-write (CoW).Old filesystems like NTFS, FAT, and EXT, which do not use copy-on-write, have one single instance of the file metadata. All file metadata is not necessarily stored in one place, but there is no more than one copy of each metadata piece on a disk. When deleting a file, a filesystem does not actually erase the metadata. Instead, it just marks the space previously allocated to the file and its metadata as free for reuse. Previous metadata thus remains intact until the next write, which happens to use the same space.

During normal operation on these filesystems (FAT/NTFS/EXT), there is only one place where metadata of a particular file is stored. There are few exceptions when more than one copy of metadata can exist:

• Journal on NTFS or EXT. Metadata copy gets into a journal for a short time resulting in the existence of two copies of metadata for a that (short) period of time.
• Defragmentation may create the copies of metadata. When the defragmenter moves metadata to a more optimal location, old copies are not zeroed and therefore can exist long enough to be discovered, until their space is used for a new write operation.

Generally, non-CoW filesystems store a single copy of file metadata; even journaling and defragmentation cannot produce many copies.

Get The Latest DFIR News!

Top DFIR articles in your inbox every month.


Unsubscribe any time. We respect your privacy - read our privacy policy.

As for filesystems using copy-on-write, the situation with file metadata was not that clear because copy-on-write implies that every file modification generates a new copy of file metadata. In the current research, a file was created and modified on BTRFS, modern filesystem using in NETGEAR NASes. Once all the changes were written to the disk, search for the metadata revealed that there are at least four old, not yet reused, metadata blocks, and two groups of new blocks, which give different timestamps. From all this variety of metadata blocks, the filesystem driver finds a metadata block with correct timestamp by traversing filesystem trees. If a filesystem fails or the file is deleted, some metadata blocks can be destroyed or become unreachable because pointers to these blocks are damaged. Data recovery tools have to sort all the different metadata and generally, timestamps cannot be determined reliably. Taking the latest timestamps is a good assumption but in general case it is not possible to prove that a block with the latest timestamp was not destroyed during the data loss event.

The research formed the basis of their latest data recovery lesson available at www.data.recovery.training. This also includes the detailed description of the experiment and the corresponding disk image files, using which you can repeat the experiment.

Leave a Comment

Latest Videos

Quantifying Data Volatility for IoT Forensics With Examples From Contiki OS

Forensic Focus 22nd June 2022 5:00 am

File timestamps are used by forensics practitioners as a fundamental artifact. For example, the creation of user files can show traces of user activity, while system files, like configuration and log files, typically reveal when a program was run. 

Despite timestamps being ubiquitous, the understanding of their exact meaning is mostly overlooked in favor of fully-automated, correlation-based approaches. Existing work for practitioners aims at understanding Windows and is not directly applicable to Unix-like systems. 

In this paper, we review how each layer of the software stack (kernel, file system, libraries, application) influences MACB timestamps on Unix systems such as Linux, OpenBSD, FreeBSD and macOS.

We examine how POSIX specifies the timestamp behavior and propose a framework for automatically profiling OS kernels, user mode libraries and applications, including compliance checks against POSIX.

Our implementation covers four different operating systems, the GIO and Qt library, as well as several user mode applications and is released as open-source.

Based on 187 compliance tests and automated profiling covering common file operations, we found multiple unexpected and non-compliant behaviors, both on common operations and in edge cases.

Furthermore, we provide tables summarizing timestamp behavior aimed to be used by practitioners as a quick-reference.

Learn more: https://dfrws.org/presentation/a-systematic-approach-to-understanding-macb-timestamps-on-unixlike-systems/

File timestamps are used by forensics practitioners as a fundamental artifact. For example, the creation of user files can show traces of user activity, while system files, like configuration and log files, typically reveal when a program was run.

Despite timestamps being ubiquitous, the understanding of their exact meaning is mostly overlooked in favor of fully-automated, correlation-based approaches. Existing work for practitioners aims at understanding Windows and is not directly applicable to Unix-like systems.

In this paper, we review how each layer of the software stack (kernel, file system, libraries, application) influences MACB timestamps on Unix systems such as Linux, OpenBSD, FreeBSD and macOS.

We examine how POSIX specifies the timestamp behavior and propose a framework for automatically profiling OS kernels, user mode libraries and applications, including compliance checks against POSIX.

Our implementation covers four different operating systems, the GIO and Qt library, as well as several user mode applications and is released as open-source.

Based on 187 compliance tests and automated profiling covering common file operations, we found multiple unexpected and non-compliant behaviors, both on common operations and in edge cases.

Furthermore, we provide tables summarizing timestamp behavior aimed to be used by practitioners as a quick-reference.

Learn more: https://dfrws.org/presentation/a-systematic-approach-to-understanding-macb-timestamps-on-unixlike-systems/

YouTube Video UCQajlJPesqmyWJDN52AZI4Q_i0zd7HtluzY

A Systematic Approach to Understanding MACB Timestamps on Unixlike Systems

Forensic Focus 21st June 2022 5:00 am

This error message is only visible to WordPress admins

Important: No API Key Entered.

Many features are not available without adding an API Key. Please go to the YouTube Feed settings page to add an API key after following these instructions.

Latest Articles

Share to...