What is NTFS?
NTFS (New Technology File System) é o sistema de ficheiros usado pelo Windows — desde o Windows NT, e atualmente em Windows 10, 11, Server, etc.
How are files organized?
Files are chunked into clusters (akin to ExtX’s blocks)
- Cluster 0 starts at the beginning of the file system
- At the beginning of cluster 0 is the boot sector
What is the central paradigm?
Central paradigm: Everything (everything!) is a file.
- Each byte of an NTFS file system belongs to a file
- File system data and meta data are located in files, too
What is the Master File Table (MFT)?
One file to rule them all: The Master File Table (MFT).
In NTFS, information about all files and directories is contained in the
Master File Table (MFT):
- Every file and directory has at least one entry in MFT
- Entries are 1KB in size
- First 42 bytes is a header, the remaining bytes store attributes
- Attributes: small data structures with a specific purpose
Where are the file contents stored in the NTFS?
Two cases:
1. Some small files can fit entirely within the MFT entry
2. Bigger files require allocation of extents
- Extents are contiguous clusters where file content is stored
NTFS’s data structures are stored in (special) files!
NTFS stores metadata across several metadata files
- The MFT itself is a file system metadata file
- The first 16 MFT entries are reserved for these files
- Names of metadata files begin with $ and uppercase letters
Does the TFK also support NTFS?
Yes!
Steps in the file creation example.
Steps in the file deletion example.
$DATA and Alternate data streams.
In NTFS, every file has a $DATA attribute, which contains
the file content
- A file can have more than one $DATA attribute
- Additional attributes are named Alternate Data Streams (ADS)
- The default $DATA attribute does not have an associated
name associated; additional attributes must have one
E.g., normal.txt (default $DATA attribute)
E.g., normal.txt:my_ads_data.txt ($DATA attribute of an ADS)
What are ADSes great for?
ADSes: great for hiding “files” inside “files”!
When you access a file using its default name you access the
file’s default $DATA attribute
But you can create multiple $DATA attributes in a single file
Examples:
- Create ADS streams to hide a text file and a picture:
hidden.txt > normal.txt:hidden.txt
Show the content of ADS streams:
notepad normal.txt:hidden.txt
Detection of Alternate Data Streams.
For temporal analysis, we usually resort to timestamps. True or false?
True.
Computer timekeeping (5 ways).
Real Time Clock (RTC)
- Battery powered; keeps time while computer is shut down
- Used as basis for determining time when computer boots
System clock
- SW clock set from the RTC at boot plus HW timer as oscillator
Network Time Protocol (NTP)
- Protocol for reliable synchronization of computer clocks
Network Identity and Time Zone (NITZ)
- Method to obtain time info from GSM network
Global Positioning System (GPS)
- Device sets its clock based on signals received from GPS system
What is MACtimes?
MACtimes: three time attributes attached to any file or
directory in UNIX, Windows, and other systems:
Sometimes this information is enriched with creation time.
M = Modified
A = Accessed
C = Changed
B = Created (Birthed)
How reliable are timestamps? Timekeeping accuracy.
What is clock skew?
The amount of time units (often seconds or milliseconds) by
which a clock deviates from the ‘real’ time.
What are Unnormalized timestamps?
They represent timestamps taken in different time zones.
How to detect clock skew?
Compare with the time of an NTP-synced computer
- When the device is still operational
Compare with external timestamps
- Generated outside the investigated device (e.g., call logs)
Normalization of timestamps.
If timestamps of different time zones, translate them a common time zone, e.g., UTC.
Are timestamps meant to be manipulated by the end user?
No, most are generated by OS (e.g., FS updates) and applications (e.g., email).
What is timestomping?
Timestomping: technique that modifies the timestamps of a file (the modify, access, create, and change times):
- Typically performed using software tools (timestompers) that alter FS timestamps.
This is done by an adversary so that file accesses / modifications do not appear conspicuous to forensic investigators of file analysis tools.
How to determine if timestompers have been used for anti-forensic purposes?
In NTFS, timestamps are stored as …-byte file time values
8-byte.
Represent the number of 100-nanosecond intervals that have elapsed since 12:00 A.M. January 1, 1601.
- Consequently, NTFS timestamps have 100 nanosecond precision