Powered by Pagefind — search only works after pnpm build
Lesson 5 of 6 · 30 min read
Plaso Super-Timeline — Correlating Host Artifacts Across Time
A memory dump shows you what’s running now. The super-timeline shows you how the attacker got there — every step, every file, every action, correlated by timestamp across the full forensic artifact set. Together they reconstruct the complete attack narrative.
This is a complete attack reconstruction from a single timeline.
The Plaso Workflow
Step 1: Image Acquisition (via Velociraptor)
# Velociraptor artifact for targeted disk acquisitionname: Custom.Collect.TriageImagesources: - name: CriticalArtifacts query: | -- Collect MFT, Event Logs, Prefetch, Registry hives SELECT OSPath, Size, upload(file=OSPath) AS Upload FROM glob(globs=[ "C:/$MFT", "C:/Windows/System32/winevt/Logs/**", "C:/Windows/Prefetch/**", "C:/Windows/System32/config/SAM", "C:/Windows/System32/config/SYSTEM", "C:/Windows/System32/config/SOFTWARE", "C:/Windows/System32/sru/SRUDB.dat" ])
Step 2: Plaso Parsing
# Parse disk image (takes 30–120 min for 100GB image)log2timeline.py \ --storage-file output.plaso \ --parsers win7,win10 \ disk_image.dd# Or parse a directory of collected artifactslog2timeline.py \ --storage-file output.plaso \ --parsers winevt,mft,prefetch,winreg,lnk,srum \ /path/to/collected_artifacts/# Convert to timeline CSVpsort.py \ --output-format l2tcsv \ --write timeline.csv \ output.plaso
Step 3: Timesketch Analysis
# Import into Timesketch for collaborative analysistsctl import \ --username analyst \ --sketch-id 42 \ --name "jsmith_workstation_2024-09-02" \ timeline.csv
In Timesketch, search queries narrow the timeline:
# Find all events within 2 minutes of the macro executiontimestamp:>"2024-09-02 14:21:00" AND timestamp:<"2024-09-02 14:26:00"# Find all persistence artifact writesdata_type:"windows:registry:key_value" AND key_path:*Run*# Find all new executable filesdata_type:"fs:stat" AND filename:*.exe AND timestamp:>"2024-09-02 00:00:00"
Timestomping Detection: MFT Analysis
When a file’s SI timestamps look suspicious (too old for a recent attack), check FN timestamps:
# Plaso includes both SI and FN timestamps# In timeline.csv, look for:# data_type: windows:ntfs:mft:attribute — contains attribute_type field# Filter for timestomping indicatorsgrep "ntfs:mft" timeline.csv | \ awk -F',' '{print $1, $5, $6}' | \ # timestamp, SI_mtime, FN_mtime awk '{if ($2 < $3) print "TIMESTOMPED: " $0}'
Timestomping indicator in timeline:
MFT Record: C:\Users\jsmith\AppData\Temp\svcupd.exe $STANDARD_INFORMATION (SI): Created: 2019-03-15 08:00:00 ← attacker set to 5 years ago Modified: 2019-03-15 08:00:00 Accessed: 2024-09-02 14:24:07 ← access time updates (can't be backdated this way) $FILE_NAME (FN): Created: 2024-09-02 14:24:02 ← NTFS driver recorded true creation Modified: 2024-09-02 14:24:02
SI_Created (2019) is 5 years before FN_Created (2024). Timestomping confirmed.
Prefetch Analysis for Deleted Binaries
Prefetch files survive 28 days and persist even after the source binary is deleted:
# Parse all prefetch filesvol.py -f memory.raw windows.prefetch.Prefetch# Or from disk with Plaso# Prefetch output in timeline:# 2024-09-02 14:24:07 | Prefetch | svcupd.exe — run count: 1, last run: 14:24:07# 2024-09-02 14:30:00 | MFT | svcupd.exe DELETED (attacker cleanup)# Prefetch entry remains, proving svcupd.exe executed even though binary is gone