PISA Pakistan — Community CERT

← 🚩 CTF: Getting Started

39. Forensic Timeline Reconstruction with Plaso and Timesketch

⏱ 10 min

Forensic Timeline Reconstruction with Plaso and Timesketch

Why a Super‑Timeline Matters

In CTF forensics, a single disk image may contain thousands of events. A super‑timeline aggregates logs, file system metadata, and network artifacts into one chronological view, making it easier to spot attacker TTPs aligned with MITRE ATT&CK.

Installing Plaso and Timesketch

  1. Plaso (log2timeline)
    pip install plaso
    
  2. Timesketch
    docker run -d -p 5000:5000 --name timesketch timesketch/timesketch
    

Both tools are open‑source and work on Linux, which mirrors the lab environments you’ll encounter in Pakistani CTF competitions.

Collecting Evidence Sources

  • Disk image – acquire with dd or ewf tools.
  • Transaction logs – pull easypaisa or JazzCash logs stored in /var/log/payment/ (if the challenge scenario includes a mock payment server).
  • System logs – Syslog, auth.log, and Windows Event logs (EVTX) from a compromised host.
  • Network captures – Zeek logs already parsed into conn.log.

Creating a Super‑Timeline

log2timeline.py --storage_file timeline.db image.e01

The resulting SQLite file can be imported directly into Timesketch for interactive analysis.

Analyzing the Timeline in Timesketch

  • Search – use queries like source:type:file AND filename:*.apk to locate malicious Android packages.
  • Tagging – label events that match ATT&CK tactics (e.g., T1048 – Exfiltration Over Alternative Protocol).
  • Correlation – join Windows logon events with NADRA ID verification logs to detect unauthorized access.

Correlating with ATT&CK

Map identified artifacts to MITRE ATT&CK techniques:

  • T1070.006 – Timestomp – altered file timestamps seen in the timeline.
  • T1059.001 – PowerShell – execution entries linked to a suspicious script.
  • T1048 – Exfiltration – large outbound data transfers in network logs.

If you discover a real‑world breach during a CTF (e.g., a fake OLX APK uploading contacts), report it to NCCIA helpline 1799 and preserve the timeline for law‑enforcement.

Do

  • Normalize timestamps to UTC before ingestion.
  • Include both Windows and Linux artifacts for comprehensive coverage.
  • Tag each event with a confidence level (low/medium/high).

Don't

  • Ignore deleted files; Plaso can recover some metadata from the filesystem.
  • Overlook log rotation; older events may be archived in .gz files.
  • Skip documenting your analysis pipeline—future challenges may require reproducible results.

Takeaway

Build a super‑timeline using Plaso and Timesketch for every forensics challenge; this single view can reduce investigation time from hours to minutes and clearly exposes attacker behavior aligned with MITRE ATT&CK.

← PrevNext →