courses

Timeline Analysis

Timeline analysis is the process of reconstructing the sequence of events on a system from timestamp evidence scattered across dozens of artifact sources. A single compromised Windows host can contain tens of millions of timestamped events: file system metadata, event log entries, registry writes, browser history records, prefetch execution times, USB connection logs, and more. The investigator’s task is to assemble those events into a coherent chronological narrative, identify the attacker’s actions, and determine what data may have been exposed or destroyed.

A super-timeline is a unified, time-sorted record of events drawn from all available artifact sources simultaneously — file system, event logs, registry, browser history, prefetch, LNK files, and more — as opposed to analyzing each source separately. Combining sources matters because an attacker action (e.g., running a tool) may leave a trace in only one artifact type; cross-correlating artifact types both increases detection probability and allows independent corroboration of the same event.

This page covers the theory and methodology. Tool references:


Timestamps and What They Record

A timestamp records when an event occurred according to the system clock at the time. This sounds simple. In practice it is not, because:

Understanding what each timestamp actually measures — and its limitations — is a prerequisite to interpreting a timeline correctly.

MACB: The Four Filesystem Timestamps

File system metadata typically provides four timestamps per file, referred to collectively as MACB:

Letter Name Updated when
M Modified File contents were last written
A Accessed File contents were last read
C Changed (MFT/inode) File metadata was last changed (permissions, ownership, timestamps themselves)
B Born (Created) File was first created in this location

Common misconceptions:

NTFS: Two Timestamp Sets per File

NTFS stores timestamps in two separate attributes, and this asymmetry is the foundation of timestomping detection:

Attribute Contains Updated by
$STANDARD_INFORMATION ($SI) M, A, C, B User-space calls (SetFileTime, scripting tools, timestomping tools)
$FILE_NAME ($FN) M, A, C, B NTFS kernel driver only — not accessible from user space

When a file is created, both attribute sets are written with the same timestamps. Afterward:

This means a file that was created at T=100, used until T=200, then timestomped at T=300 to make it look like T=50 will show:

$SI timestamps:  M=T+50  A=T+50  C=T+300  B=T+50
$FN timestamps:  M=T+100 A=T+100 C=T+100  B=T+100

The $SI C timestamp reveals when the timestomp was performed. The $FN timestamps are unaffected. A $SI B timestamp earlier than the corresponding $FN B timestamp is the canonical timestomping indicator — files cannot exist before they were created.

Use istat from The Sleuth Kit, or the MFT parser in Plaso, to see both attribute sets for any file.


Timestamp Sources by Platform

A complete investigation draws from every available source. No single source tells the full story.

Windows

Windows is the richest environment for timeline evidence. Dozens of subsystems record timestamps independently, which is why Windows investigations benefit most from super-timeline tools like Plaso.

File System (NTFS)

Source What it records Tools
$MFT MACB timestamps for every file and directory, including deleted ones TSK fls/istat, Plaso mft parser
$LogFile NTFS transaction log — file creates, deletes, renames TSK fsstat, Plaso
$UsnJrnl:$J USN change journal — chronological record of all file operations with reason codes Plaso usnjrnl, MFTECmd

The USN journal is particularly valuable: unlike $MFT timestamps (which are overwritten on reuse), the journal entries are append-only and include the reason for each change (FILE_CREATE, RENAME_OLD_NAME, RENAME_NEW_NAME, DATA_OVERWRITE, FILE_DELETE, etc.). It does not retain data indefinitely — the journal is a circular buffer, typically 32–64 MB — but it often covers the past several days of file activity.

Windows Event Logs

Event logs are timestamped to 100-nanosecond precision in UTC. They are the most direct record of security-relevant system events.

Log file Key event IDs What they record
Security.evtx 4624, 4625 Successful / failed logon
Security.evtx 4634, 4647 Logoff
Security.evtx 4648 Logon with explicit credentials (runas, pass-the-hash)
Security.evtx 4688 Process creation (requires audit policy; includes command line if enabled)
Security.evtx 4698, 4702 Scheduled task created / modified
Security.evtx 4720, 4726 User account created / deleted
Security.evtx 4732, 4728 Member added to security group
System.evtx 7045, 7040 Service installed / start type changed
System.evtx 6005, 6006 Event log service started / stopped (system boot / shutdown)
Application.evtx varies Application-specific events
Microsoft-Windows-PowerShell/Operational.evtx 4103, 4104 PowerShell module/script block logging
Microsoft-Windows-Sysmon/Operational.evtx 1, 3, 7, 8, 11 Process, network, image load, remote thread, file events (if Sysmon installed)

The Security log is cleared by attackers to remove evidence; its absence is itself evidence. Security event ID 1102 records when the Security log was cleared (written to the Security log itself, so it may also be absent). System event ID 104 records the same event in the System log, which is harder to suppress simultaneously — check both.

Registry

Registry key and value timestamps record the last write time of a registry key. Only the key-level timestamp is stored — individual value timestamps are not available. This is coarser than event logs but still valuable.

Key hive locations and their forensic significance:

Hive Path Evidence
SYSTEM \Windows\System32\config\SYSTEM Services, device history, network interfaces, timezone
SOFTWARE \Windows\System32\config\SOFTWARE Installed software, Windows version, ShimCache/AppCompatCache
SAM \Windows\System32\config\SAM Local user accounts, last logon times, password hint
NTUSER.DAT \Users\<user>\NTUSER.DAT User-specific: Run keys, MRU lists, shellbags, typed paths, wallpaper
UsrClass.dat \Users\<user>\AppData\Local\Microsoft\Windows\UsrClass.dat Shellbags, OpenSaveMRU

ShimCache (AppCompatCache): Records executables that ran on the system, including their path, file size, and last-modified timestamp. Stored in SYSTEM\CurrentControlSet\Control\Session Manager\AppCompatCache. Cleared only on reboot; provides execution history across reboots.

AmCache.hve: Stores SHA-1 hashes and metadata for every executed binary. Located at \Windows\AppCompat\Programs\Amcache.hve. More complete than ShimCache; survives clearing of ShimCache.

Prefetch

Windows Prefetch files (C:\Windows\Prefetch\*.pf) record:

Prefetch is disabled on server editions of Windows and on systems with SSDs (configurable). When present, it is among the strongest execution evidence available — a prefetch file proves a binary ran, even if the binary itself has since been deleted.

Browser History

All major browsers store history in SQLite databases in the user profile:

Browser Database Location
Chrome / Edge (Chromium) History %APPDATA%\..\Local\Google\Chrome\User Data\Default\
Firefox places.sqlite %APPDATA%\Mozilla\Firefox\Profiles\<profile>\
Internet Explorer / Edge Legacy WebCacheV01.dat %APPDATA%\..\Local\Microsoft\Windows\WebCache\

Each database records URL, title, visit count, and first/last visit timestamps. Download history is separate: Chrome stores downloads in the same History database; Firefox uses downloads.sqlite. These records survive browser cache clearing in most configurations.

Windows automatically creates .lnk shortcut files when a user opens a file. These are stored in:

Each LNK file records:

LNK files survive deletion of the original file and are powerful evidence that a user accessed a specific file on a specific date. They are created automatically by the shell regardless of the application used to open the file.

Shellbags

Shellbags are registry entries (UsrClass.dat and NTUSER.DAT) that Windows creates to preserve the display preferences (icon size, sort order, column widths) of each Explorer folder a user has opened. They persist long after the folder or file is deleted.

Forensic value: shellbags prove that a specific folder path was browsed by a specific user, with timestamps. They can reveal access to USB drives, network shares, and deleted directories when no other evidence survives.

Volume Shadow Copies

VSS snapshots are point-in-time copies of an NTFS volume. They preserve the state of all files — including $MFT, event logs, registry hives, and prefetch files — at the time of the snapshot.

On a system with VSS enabled, a deleted file may be recoverable from a shadow copy even though it no longer appears in the live file system. Similarly, an event log that was cleared on the live volume may survive intact in a shadow copy taken before the clearing.

# List available VSS snapshots on a Windows image
vshadowinfo evidence.dd

# Mount a specific VSS snapshot for examination
vshadowmount -o <offset> evidence.dd /mnt/vss

Linux

Linux systems record less structured metadata than Windows but provide detailed textual logs.

Artifact Location Content
syslog / journal /var/log/syslog, journalctl System events, authentication, kernel messages
auth.log /var/log/auth.log sudo, SSH, PAM authentication events
wtmp / btmp /var/log/wtmp, /var/log/btmp Login/logout history; failed logins
lastlog /var/log/lastlog Most recent login for each account
.bash_history ~/.bash_history Commands typed (not timestamped by default; HISTTIMEFORMAT enables timestamps)
cron.log /var/log/cron.log Scheduled task execution
dpkg.log / apt/history.log /var/log/dpkg.log Package install/remove/update history
Filesystem MACB stat <file> Per-file timestamps; A often unreliable (noatime mount option common)

Inode timestamps on ext4: ext4 stores M, A, C timestamps with nanosecond precision and a separate “creation time” (crtime) that is preserved in the inode but not exposed by stat — use debugfs to retrieve it:

debugfs -R 'stat <inode_number>' /dev/sda1

macOS

macOS uses a combination of HFS+/APFS filesystem metadata and the Unified Log.

Artifact Content
APFS timestamps Created, modified, changed, accessed (nanosecond precision); stored per-file and per-extended-attribute
unified log Structured binary log replacing all legacy /var/log files; covers kernel, daemons, apps; query with log show
.bash_history / .zsh_history Shell history; zsh timestamps with HISTTIMEFORMAT
spotlight metadata kMDItemLastUsedDate, kMDItemUsedDates: tracks when each file was opened
FSEvents /System/Volumes/Data/.fseventsd/ — kernel-generated log of all file system events for Spotlight indexing; survives file deletion
quarantine xattr com.apple.quarantine — set by browsers/email on downloaded files; records download timestamp and source URL
KnowledgeC /Library/Application Support/Knowledge/knowledgeC.db — app usage, device plugged, screen lock, user active events

The quarantine extended attribute is often underutilized. A binary delivered via browser download retains the URL it was fetched from:

xattr -p com.apple.quarantine /path/to/downloaded/file
# Output: 0083;65f1a3b2;Safari;uuid
# The second field is a hex timestamp (seconds since 2001-01-01)

Timestamp Reliability

Clock Skew

All timestamps are only as accurate as the system clock. If a machine’s clock was wrong when an event occurred, every timestamp from that period is offset by the same amount. To measure skew:

All timestamps in your final timeline should be normalized to UTC. Note the evidence system’s configured time zone and record it explicitly in your case notes — it affects every timestamp interpretation.

FAT Timestamp Precision and the Two-Second Anomaly

FAT32 stores M timestamps with 2-second granularity. Created (B) timestamps on FAT include a 10ms precision field, making them more precise. Accessed (A) timestamps on FAT are date-only (no time component).

A common scenario: a file is copied from a FAT-formatted USB drive to an NTFS volume. The M timestamp is preserved from FAT (rounded to 2 seconds) while the B timestamp is newly set to the current time. If the B timestamp is more recent than M, and M has a suspiciously even-second value, the file likely came from a FAT source.

Timestamp Anti-Forensics

Timestomping: Manually setting file timestamps to mislead investigators. Tools like touch (Linux/macOS) and SetFileTime-based utilities (Windows) can set all four MACB timestamps to arbitrary values.

Detection:

Log clearing: Event logs can be cleared with wevtutil cl Security. Indicators:

Log tampering: Individual EVTX records can be deleted with tools like Invoke-Phant0m or danderspritz. The result is a gap in event record numbers within the log file. The istat output for the EVTX file’s $MFT record will show a C timestamp update at the time of tampering.

Clock manipulation: Changing the system clock before performing malicious actions shifts all subsequent timestamps. Cross-reference with network packet timestamps (PCAPs use the NIC’s hardware clock), NTP event logs, and external sources like firewall logs.


Methodology: Building a Timeline

Phase 1 — Establish the Incident Window

Before collecting anything, establish a rough time window. Sources:

This window drives collection priorities. A 2-week window may produce 50 million events; a 4-hour window after focused triage may produce 5,000. Work from the specific toward the general — start tight and expand.

Phase 2 — Collect Artifacts by Source Type

Extract all relevant artifacts before building the timeline. Preserve originals; work from copies.

Priority order for Windows (most to least time-sensitive):

  1. Memory image (volatile; if not already captured, capture first)
  2. $MFT, $LogFile, $UsnJrnl:$J (file system metadata)
  3. Event logs (*.evtx from \Windows\System32\winevt\Logs\)
  4. Registry hives (SYSTEM, SOFTWARE, SAM, NTUSER.DAT for each user)
  5. Prefetch files (\Windows\Prefetch\*.pf)
  6. Browser history databases
  7. LNK and Jump List files
  8. VSS snapshots (if relevant to the window)
  9. Full image for Plaso processing

Phase 3 — Normalize to UTC

Every artifact source must be in UTC before merging. Common pitfalls:

When in doubt, cross-reference two events whose relative order is known (e.g., a process creation event in the Security log and the same process’s prefetch file creation) to verify timezone alignment.

Phase 4 — Merge and Sort

Once normalized, merge all sources into a single chronological stream. Tools:

For targeted analysis, a Plaso export filtered to the incident window is usually the right starting point. For a full investigation, run Plaso against the entire image and use psort filters to extract windows of interest.

Phase 5 — Reduce Noise

A raw Windows super-timeline may contain 5–50 million rows. Strategies:

Filter by time window. If you know the incident occurred between March 10 and March 12, filter to that range with a ±12-hour buffer.

Filter by data type. Separate filestat events (file system timestamps) from winevtx events (Windows logs) from winreg events (registry). Analyze each category focused on its own patterns before merging.

Eliminate known-good files. Any file whose SHA-256 hash appears in the NSRL (National Software Reference Library) is a known system or application file. Events involving these files during normal system operation are almost always noise.

Focus on user profile paths first. Malware that persists via user-space mechanisms (Run keys, %APPDATA%) and attacker activity involving user accounts will be visible in user profile paths before it appears in system paths.

Look for temporal clustering. A burst of unusual activity in a 2-minute window is more interesting than isolated events spread over hours. Look for clusters of events that do not match the normal baseline rhythm of the system (see patterns below).


Analysis Techniques

Pivot-Point Analysis

Once you have any known-bad event — a detected malware execution, a suspicious process creation, an IOC match — use it as a pivot point and work outward.

What happened immediately before? The minutes before a known malicious event often reveal initial access (phishing email opened, browser exploit, lateral movement from another host).

What happened immediately after? Post-execution activity shows the malware’s first actions: persistence installation, discovery commands, credential access.

What else involves the same process? Filter the timeline to the process’s PID or executable name. What files did it touch? What network connections did it make? Did it spawn children?

What else involves the same file paths? If a suspicious file was written to %TEMP%\svchost.exe, search the entire timeline for that path — when was it first created, when was it executed (prefetch), when was it accessed (LNK), when was it deleted (USN journal)?

Pattern Identification

Attackers and their tools leave recognizable patterns:

Beaconing: Regular network connections at fixed intervals (e.g., DNS queries every 60 seconds). In a file system timeline, regular writes to a log file or temp file at fixed intervals may indicate the same pattern without network visibility.

Staging and exfiltration: A sudden spike in file reads from document directories followed by archive creation (zip, rar, 7z) followed by a large file appearing in a staging path. The USN journal will show the reads; the MFT will show the archive’s creation timestamp.

Lateral movement preparation: Discovery commands cluster together: net user, net group, net view, ipconfig /all, tasklist. These appear in prefetch or process creation events. Lateral movement itself follows within minutes to hours.

Defense evasion: Look for event log clears (event ID 1102), firewall rule additions (audit policy for MPSSVC), AV exclusion additions (registry writes to Defender exclusion paths), or a sudden gap in file system activity that should be continuous.

Living-off-the-land (LOLBins): Legitimate Windows binaries (certutil.exe, bitsadmin.exe, mshta.exe, regsvr32.exe, wscript.exe) used for malicious purposes. Their presence in prefetch or event ID 4688 is not suspicious by itself — but certutil with a -decode or -urlcache argument, or mshta loading a remote URL, is a strong indicator.

Correlation Across Sources

The most compelling timeline entries are those supported by multiple independent sources. A single prefetch file proves execution; a prefetch file plus an event ID 4688 plus a matching registry run key write within the same 30-second window proves intentional persistence installation.

Build a table of corroborating evidence for each suspicious event:

Timestamp (UTC) Event Source
2025-03-10 14:31:47 outlook.exe spawns cmd.exe Event ID 4688
2025-03-10 14:31:48 WSCRIPT.EXE-12345678.pf created Prefetch (MFT)
2025-03-10 14:31:49 C:\Users\victim\AppData\Temp\update.vbs created USN journal, MFT
2025-03-10 14:32:01 wscript.exe spawns powershell.exe Event ID 4688
2025-03-10 14:32:03 Encoded PowerShell command Event ID 4104 (Script Block Logging)
2025-03-10 14:32:05 DNS query for update.evil.example.com DNS log / Sysmon event ID 22
2025-03-10 14:32:07 TCP connection to 185.x.x.x:443 Sysmon event ID 3
2025-03-10 14:32:15 Run key write: HKCU\...\Run\Updater Registry (Plaso winreg parser)

Each row in this table is a link in the chain of evidence. Multiple sources corroborating the same sequence make the reconstruction resistant to challenge.


Connecting Timeline Analysis to ATT&CK

Every event in a timeline can be annotated with an ATT&CK technique. This transforms a chronological list into a behavioral narrative aligned with a shared vocabulary.

Timeline event ATT&CK technique
Phishing attachment opened T1566.001 — Spearphishing Attachment
cmd.exe spawned by outlook.exe T1059.003 — Windows Command Shell
Prefetch for certutil.exe with URL argument T1105 — Ingress Tool Transfer
Run key persistence installed T1547.001 — Registry Run Keys
Encoded PowerShell in Script Block log T1059.001 — PowerShell; T1027 — Obfuscated Files
LSASS access event (event ID 10, Sysmon) T1003.001 — LSASS Memory
Lateral movement via SMB T1021.002 — SMB/Windows Admin Shares
Large ZIP created in staging directory T1074.001 — Local Data Staging
File transfer to external IP T1041 — Exfiltration Over C2 Channel

The ATT&CK Navigator can then visualize the technique coverage of your timeline, making the attack pattern visible at a glance and identifying gaps where additional investigation is needed.


Tools Quick Reference

Tool Platform Purpose
TSK fls + mactime Linux Filesystem-only body file and timeline generation
Plaso (log2timeline, psort) Linux Multi-source super-timeline
Timeline Explorer Windows GUI for browsing CSV timelines
Timesketch Web Collaborative multi-analyst timeline analysis
MFTECmd Windows Fast MFT and USN journal parsing (Eric Zimmerman)
RECmd Windows Registry hive parsing (Eric Zimmerman)
PECmd Windows Prefetch file parsing (Eric Zimmerman)
LECmd Windows LNK / Jump List parsing (Eric Zimmerman)
SBECmd Windows Shellbag parsing (Eric Zimmerman)
AppCompatCacheParser Windows ShimCache / AppCompatCache extraction
AmcacheParser Windows Amcache.hve parsing
Browser History Viewer Windows GUI for all major browser SQLite databases
vshadowinfo / vshadowmount Linux VSS snapshot enumeration and mounting

The Eric Zimmerman tools (MFTECmd, PECmd, LECmd, etc.) each output CSV and are designed to feed directly into Timeline Explorer. They are collectively known as EZTools and are the standard for Windows artifact parsing on Windows analysis machines.


Further Reading