Ir al contenido

Plaso (log2timeline.py) Concepts and Deployment

Introduction to Plaso, design and construction of forensic super timelines from digitized disk images.

0views

Plaso (formerly known as Log2Timeline) is an event extraction engine and a set of tools designed for digital forensic analysis. Its main tool, log2timeline.py, is the industry standard for creating what is known as a “super timeline”.

Its mission is to traverse a data source (such as a disk image, a directory, or specific files), identify dozens of different artifact types (Windows logs, browser history, LNK files, system logs, etc.), and extract all events with timestamps.

The result is not a human-readable text file, but a compressed database file (with the extension .plaso) that acts as a centralized repository of all found events.


A 'super timeline' is a single chronological list of all events that have occurred on a system. Instead of analyzing Chrome history separately, then Windows event logs, and then file system MAC(B) times, Plaso takes everything and puts it into a unified chronological order.

This allows the analyst to see the exact sequence of actions by an intruder or user in a unified timeline:

  1. 10:30:01 - (File System) The file malware.exe is created.
  2. 10:30:05 - (Prefetch) Execution of malware.exe is recorded.
  3. 10:30:15 - (Windows Registry) A registry key is created for threat persistence.
  4. 10:30:20 - (Chrome History) The user visits http://malicious-c2-server.com.

This correlated view is fundamental to understanding the complete timeline of a security incident.


Plaso is included by default in most digital forensics distributions (such as SIFT or Tsurugi). For a manual installation in a debugging or analysis environment in your Linux workspace:

Ventana de terminal
# Instalación básica de las herramientas de plaso
pip install plaso-tools
# O instalación completa con todas las dependencias opcionales integradas
pip install plaso-tools[all]

The fundamental syntax of log2timeline.py is:

Ventana de terminal
log2timeline.py [OPCIONES] <archivo_salida.plaso> <fuente_de_datos>
  • [OPCIONES]: Parameters used to refine and optimize data extraction.
  • <archivo_salida.plaso>: The name of the compressed database file you want to generate. It is mandatory to contain the extension .plaso.
  • <fuente_de_datos>: The source of digital evidence. It supports both forensic image files (E01, DD, RAW) and local system directories mounted.
Ventana de terminal
log2timeline.py /opt/forensics/cases/case-001/my_timeline.plaso /mnt/evidence_drive/
Ventana de terminal
log2timeline.py /opt/forensics/cases/case-001/my_timeline.plaso /opt/forensics/cases/case-001/image.E01

By default, Plaso attempts to automatically run all available analyzers against the disk data. This can drastically slow down the operation on large disks. If you are looking for a specific vector, filter during ingestion:

Ventana de terminal
# Listar todos los parsers registrados en el sistema
log2timeline.py --list-parsers
# Caso de uso: Extraer exclusivamente artefactos del Registro de Windows, Prefetch y LNK
log2timeline.py --parsers "windows_registry,prefetch,lnk" /opt/forensics/cases/case-001/my_win_timeline.plaso /opt/forensics/cases/case-001/image.E01
# Caso de uso: Procesar todo excepto el historial del navegador web (reducción de ruido)
log2timeline.py --parsers "all,!chrome_history,!firefox_history" /opt/forensics/cases/case-001/my_timeline.plaso /opt/forensics/cases/case-001/image.E01

File system timestamps are usually stored internally in UTC, but many corporate logs use the local time of the target system. You must instruct Plaso about the original time zone of the computer under analysis:

Ventana de terminal
# Ejemplo de sistema local de Madrid (España)
log2timeline.py -z "Europe/Madrid" /opt/forensics/cases/case-001/my_timeline.plaso /opt/forensics/cases/case-001/image.E01
  • To list all time zones supported by the platform: log2timeline.py --list-timezones

Windows snapshots or Volume Shadow Copies (VSS) are vital for recovering files modified or deleted by the attacker at past dates:

Ventana de terminal
# Caso de uso: Procesar la evidencia principal y TODAS las copias ocultas detectadas en el disco
log2timeline.py --vss-stores all /opt/forensics/cases/case-001/my_timeline_with_vss.plaso /opt/forensics/cases/case-001/image.E01
# Caso de uso: Analizar solo instantáneas seleccionadas (VSS 1, 3 y 5)
log2timeline.py --vss-stores 1,3,5 /opt/forensics/cases/case-001/my_timeline.plaso /opt/forensics/cases/case-001/image.E01

Extracting large volumes of data can take hours. Change the status display to linear mode if you are collecting logs in an automated environment:

Ventana de terminal
log2timeline.py --status_view linear /opt/forensics/cases/case-001/my_timeline.plaso /opt/forensics/cases/case-001/image.E01

Plaso features hundreds of built-in analyzers to collect and structure high-value forensic evidence:

  • ✔ File System: MACB timestamps for all physical files, MFT (Master File Table) information, USN Journal, and $LogFile transactions of NTFS partitions.
  • ✔ Windows Registry: Initialization and persistence keys (Run/RunOnce), list of installed programs, USB device connection metadata (USBSTOR), historical WiFi keys, and RDP connection activity.
  • ✔ Application Execution Artifacts: Prefetch history, LNK link files, desktop Jumplist access records, and Amcache and Shimcache application compatibility databases.
  • ✔ Web Browsing History: Downloads made, visited URL history, active cookies, and form data.
  • ✔ System Logs: Windows EVTX event logs, Ubuntu syslog and auth.log files, and macOS ASL logs.

Once the execution of log2timeline.py is completed, you will obtain the structured compressed database (for example: my_timeline.plaso). This file is not directly human-readable nor can it be opened in conventional text editors.

This file is an indexed SQLite database specifically designed to be queried, structured, and exported. To make the most of it, we will use:

  1. pinfo.py: To inspect the status of the .plaso file (view executed parsers, total alerts, and confirm errors).
  2. psort.py: To filter, sort and export data into readable formats (CSV, JSON) or integrate it into visual platforms like Timesketch.