Перейти к основному содержимому
Browser Artifacts (SQLite/Cache) & Super-Timeline Analysis
Урок 6 из 12

Browser Artifacts (SQLite/Cache) & Super-Timeline Analysis

Extract and convert timestamps from Chromium and Firefox SQLite databases, correlate browser activity with NTFS MACB timestamps, and build searchable super-timelines using Plaso and Timesketch.

Продвинутый 28 мин Форензика и IR
Этого урока пока нет на выбранном языке — показана версия на другом языке. Перевод готовится.

Цели обучения

  • Extract browser history, download records, and cookies safely from SQLite databases with WAL files
  • Convert Chromium WebKit and Firefox PRTime timestamps to UTC using SQLite queries
  • Compare NTFS $STANDARD_INFORMATION and $FILE_NAME MACB timestamps to spot timestomping
  • Generate and query a super-timeline across disk and browser artifacts with Plaso and Timesketch

Рекомендуется заранее: Disk & Deleted-File Forensics with Autopsy & Sleuth KitFile Signatures, Metadata (EXIF) & Steganography Triage

#Why this matters

In many intrusion and insider cases, the initial entry point happens inside a web browser: a user opens a phishing portal, downloads a staged payload, or authenticates to an unfamiliar cloud panel. Individual file artifacts rarely tell the full story alone. A downloaded archive deleted minutes later leaves clues across browser history, download tables, cache objects, and file system timestamps.

By combining browser SQLite analysis with a super-timeline, you anchor every web request, file creation, and process execution onto a single UTC clock. That makes it possible to separate routine user noise from the exact chain of events around an incident.

#Browser storage architecture and SQLite forensics

Modern browsers store user profiles in structured SQLite databases plus binary cache directories. On Windows and Linux workstations, you typically encounter two families:

  • Chromium-based browsers (Chrome, Edge, Brave): Profile artifacts live under User Data\Default\ (or Profile 1\). Key files include History, Cookies (inside Network\Cookies on modern Windows builds), Login Data, Web Data, and the Cache directory.
  • Mozilla Firefox: Profile directories use a random prefix (<id>.default-release). Key SQLite files include places.sqlite (history and bookmarks), cookies.sqlite, and formhistory.sqlite.
Browser family History database Key tables Timestamp format & epoch
Chromium / Edge History urls, visits, downloads, downloads_url_chains Microseconds since 1601-01-01 00:00:00 UTC
Firefox places.sqlite moz_places, moz_historyvisits, moz_annos PRTime: microseconds since 1970-01-01 00:00:00 UTC
Chromium / Edge Cookies cookies (creation_utc, last_access_utc) Microseconds since 1601-01-01 00:00:00 UTC
Firefox cookies.sqlite moz_cookies (creationTime, lastAccessed) Microseconds since 1970-01-01 00:00:00 UTC

Because SQLite frequently runs in Write-Ahead Logging (WAL) mode, recent browser visits sit inside History-wal until a checkpoint merges them into History. If you extract only History from an image with icat or Autopsy and leave History-wal behind, recent browsing records vanish from your query results. When inspecting a copied profile directory, pass -readonly to sqlite3 (or open a copied file after merging WAL safely in a disposable copy) so the tool never modifies evidence bytes.

#Querying browser SQLite databases and cache

Converting raw integer timestamps inside SQL makes browser triage fast and repeatable. For Chromium WebKit timestamps (microseconds since 1601), divide by 1000000 to reach seconds, then subtract 11644473600 (the exact number of seconds between 1601-01-01 and the Unix epoch 1970-01-01). For Firefox PRTime values, divide by 1000000 directly.

Querying copied Chromium History and downloads in UTC
$ cp /case/extracted/Default/History* /tmp/work/
$ sqlite3 -readonly /tmp/work/History "
SELECT datetime(v.visit_time / 1000000 - 11644473600, 'unixepoch') AS visit_utc,
       u.url,
       u.title
FROM visits v
JOIN urls u ON v.url = u.id
ORDER BY v.visit_time DESC
LIMIT 5;
"
2026-04-12 09:41:18|https://portal.example.test/login|Partner Login
2026-04-12 09:40:52|https://docs.example.test/index.html|Portal Docs
$ sqlite3 -readonly /tmp/work/History "
SELECT datetime(d.start_time / 1000000 - 11644473600, 'unixepoch') AS dl_utc,
       d.target_path,
       c.url AS source_url,
       d.total_bytes
FROM downloads d
JOIN downloads_url_chains c ON d.id = c.id;
"
2026-04-12 09:42:03|C:\Users\analyst\Downloads\update.zip|https://cdn.example.test/update.zip|482910

Beyond SQLite history and download tables, check two complementary artifacts:

  • Cookies (cookies / moz_cookies): Prove session establishment and reveal domains visited even if history was partially cleared, using creation_utc and last_access_utc. Note that Chromium encrypted_value payloads are encrypted with OS key protection (such as Windows DPAPI), though host keys and timestamps remain readable.
  • Browser Cache (Cache_Data / cache2): Stores raw HTTP response bodies, JavaScript, and images served during a session. Even when a user deletes a downloaded script from Downloads, an identical copy or intermediate landing page HTML may persist inside cache entries.

#MACB timestamps and NTFS clock clues

File system events are recorded using MACB timestamps:

  • M (Modified): Last time file contents changed.
  • A (Accessed): Last time file contents were read (note that modern Windows disables last-access updates by default for performance).
  • C (Changed / MFT Modified): Last time file metadata (permissions, size, or MFT entry itself) changed.
  • B (Born / Created): Time the file was created on that volume.

On NTFS, each file stores timestamps in two main MFT attributes: $STANDARD_INFORMATION ($SI) and $FILE_NAME ($FN). Standard user-mode tools and Windows APIs update $SI when a file is modified or when an attacker runs a timestomping utility to backdate a binary. Modifying $FN requires kernel-level manipulation or direct disk writes, so $FN timestamps are harder to forge.

Detecting timestomping by comparing MFT attributesDetecting timestomping by comparing MFT attributesAnalystMFTAttacker drops tool.exe on 2026-04-12 and backdates $SI to 2023-01-10Inspect $STANDARD_INFORMATIONCreated = 2023-01-10 ($SI)Inspect $FILE_NAMECreated = 2026-04-12 ($FN)Mismatch reveals $SI manipulation ($FN > $SI)

Seeing a $SI Created timestamp earlier than the $FN Created timestamp (or seeing nanoseconds rounded to .0000000 on NTFS) is a classic indicator of timestamp tampering.

#Building and querying a super-timeline with Plaso and Timesketch

Manual queries per database work for a single artifact, but incidents span dozens of sources: MFT records, browser SQLite files, prefetch files, Windows Event Logs (Security.evtx), and Linux auth.log. Plaso (log2timeline.py and psort.py) automates parsing across hundreds of formats into a unified .plaso storage file.

Generating and filtering a super-timeline with Plaso
$ log2timeline.py --storage-file case04.plaso /case/evidence.E01
$ psort.py -o l2tcsv -w case04_window.csv case04.plaso \
  "date > '2026-04-12 09:30:00' AND date < '2026-04-12 10:00:00'"

When a filtered CSV still holds tens of thousands of rows, load the .plaso file into Timesketch, an open-source collaborative timeline analyzer. In Timesketch, analysts pivot around a known anchor event (such as the malicious download timestamp 09:42:03 UTC), filter by data_type (for example, chrome:history:file_downloaded or fs:stat:ntfs), star key rows, and tag events to reconstruct the exact narrative.

#Defending and common mistakes

  • Dropping -wal and -shm files: Extracting only History or places.sqlite from a disk image misses recent browsing records still sitting in the Write-Ahead Log.
  • Mixing local timezones with UTC: Browser epochs and Plaso storage use UTC internally; comparing a local-time spreadsheet against a UTC timeline introduces multi-hour skews. Normalize every source to UTC before correlating.
  • Trusting $STANDARD_INFORMATION alone: Relying exclusively on standard file explorer dates misses timestomped tools; cross-check $FILE_NAME timestamps and $LogFile or $UsnJrnl entries.
  • Assuming cleared history means zero evidence: Deleting browser history in the UI often leaves clues in Cache, Cookies, DNS resolver logs, proxy logs, NTFS $UsnJrnl, and unallocated SQLite pages.

#Summary

  • Browser forensics centers on SQLite databases (History, Cookies, places.sqlite), their companion WAL files, and binary cache directories.
  • Convert Chromium timestamps (1601 epoch) and Firefox PRTime timestamps (1970 epoch) consistently into UTC before cross-referencing other logs.
  • Compare NTFS $STANDARD_INFORMATION and $FILE_NAME MACB timestamps to detect timestamp tampering.
  • Use Plaso (log2timeline.py, psort.py) and Timesketch to merge browser, file system, and OS artifacts into a single searchable super-timeline.

Проверка знаний

Войдите, чтобы проходить тест, завершать уроки и сохранять прогресс. Войти в систему

Практика: проверьте свои знания