← All posts

Event logs and browser history from memory: evtlogs, evtcarve, iehistory

6 min read

Event logs and browser history are two of the first things an incident responder asks for, and both live on disk. But the EventLog service keeps its files cached, and WinINet keeps its index.dat files mapped, so a memory image usually contains a large part of both. Chapters 9 and 11 of The Art of Memory Forensics cover this with the evtlogs and iehistory plugins. This post explains how ramparser recovers the same evidence, what it flags, and where the limits are.

Two log formats

  • Vista and later .evtx: a 4 KiB file header, then 64 KiB chunks that start with ElfChnk\0. Records (**\0\0) are binary XML, and the templates they depend on are stored in the same chunk. A record can therefore only be parsed together with its chunk.
  • XP / 2003 .evt: self-contained EVENTLOGRECORDs with the magic LfLe and the record length repeated at the end.

ramparser handles both, with two plugins that complement each other.

evtlogs: rebuilding the cached log files

evtlogs follows the book's "dumpfiles, then parse" approach, but runs it inside the engine. It first takes every dumpfiles row whose name ends in .evtx or .evt and has a cached data section. It then rebuilds each file from the cache manager (_CONTROL_AREA, subsections, prototype PTEs; see recovering files from memory). Finally, it parses each .evtx chunk by chunk with the evtx crate, or each .evt record by record.

Each file is rebuilt up to 64 MiB. Pages that were not in RAM are zero-filled, so chunk checksums are not enforced here: parsing a chunk stops at the first gap, and the records before it are kept. Every row carries the time, record ID, event ID, level, provider, channel, computer, user SID, flattened EventData / UserData as key=value pairs, and the log file name.

This requires kernel symbols, because walking the file cache depends on exact structure offsets.

evtcarve: chunks and records lying in RAM

evtcarve needs no file cache. It scans physical memory for:

  • ElfChnk\0 chunks that are whole in memory. A carved chunk goes to the parser only if its header CRC32 matches, which keeps random bytes out of the parser.
  • LfLe records from XP / 2003 whose leading and trailing lengths match and whose timestamps fall between 2000 and 2100.

Carving finds records from logs whose cache map is already gone, including old chunks that can remain in freed memory after a clear. It runs on demand, works without symbols, and is also available for XP images and for Windows images where the PDB could not be fetched. The UI merges the two plugins' results and removes records that appear twice (same channel, computer, record ID, event ID and second).

What gets flagged

Most records are routine. The Activity view shows the notable ones first and lets you switch to all records, filter by log and search by event ID, account, address or service. Records flagged as notable include:

LogEvent IDsLabel
Security1102, 517 / System 104log cleared (critical)
Security4625, 529failed logon, with account and source IP
Security4624interactive, network, unlock, RDP, cached logons (machine and virtual accounts skipped)
Security4720, 4726, 4728/4732/4756account created / deleted, added to a group
Security4697 / System 7045service installed
Security4698, 4719, 4688scheduled task, audit policy change, process created
Firewall2004, 2005rule for a program in a user-writable folder
TerminalServices21, 25, 1149RDP or console logon / reconnect, with source
PowerShell4104script block (suspicious if it contains -enc, FromBase64, DownloadString, iex, bypass)

Several of these also produce findings for the whole capture:

  • Cleared logs, with time and account.
  • Brute force: five or more failed logons from one source address, or against one account. Severity is high at 20 failures, or when a network or RDP logon for the same address or account follows the failures.
  • Services installed outside the Windows folders. Severity is high when the service binary is in a user-writable path.
  • Memory acquisition drivers, such as WinPmem, DumpIt, FTK's ad_driver or Magnet RAM Capture. These are reported as low severity, since they are most likely the tool that captured this image.
  • New accounts, members added to an admin group, firewall rules opened for user-folder programs, and audit policy changes.

Only notable records go into the timeline's Logs lane, so thousands of routine records do not bury them.

iehistory: WinINet index.dat records

Internet Explorer, Explorer, and any program that uses WinINet (including many downloaders) record URLs in index.dat files. Records are aligned to 0x80-byte blocks and come in three types:

  • URL : a history or cache entry. History entries are read as Visited: user@url, which gives you the Windows user. Daily and weekly MSHist containers use :2010022520100226: user@url, and both forms are parsed. Cache entries hold the bare URL and the name of the cached copy in Temporary Internet Files.
  • LEAK: an entry whose cached file could not be deleted.
  • REDR: a redirect, with its URL.

iehistory scans physical memory for these signatures and checks the block count, the URL offset and printable strings. It keeps the last accessed and last modified FILETIMEs when they fall between 1995 and 2100. Output is capped at 20,000 unique records.

The browser model then marks a visit as a download when the URL path or the cached file name ends in a runnable extension (.exe, .scr, .hta, .js, .ps1, .jar, .lnk and similar). Only the path is checked, so www.google.com does not count as a .com program. Downloads produce a finding and are shown as suspicious in the Browser history panel and on the timeline.

Limits of the browser evidence

  • IE10 and later store history in the ESE database WebCacheV01.dat, which is not parsed. iehistory is mostly useful for XP and Windows 7 era images, and for older programs that still use index.dat.
  • Chrome, Edge and Firefox SQLite history is not parsed. The keywordhits plugin sweeps memory for HTTP(S) URLs in general, but it cannot tell you who visited them or when.
  • No process attribution. Records are carved from physical memory, not read from one process's mapping.
  • Timeline range. Visits appear in the network lane, which only keeps events between boot and capture. Older history is listed in the Activity view only.

On macOS, safari_history and cookies are string sweeps. The first collects http(s)://, file:///Users/ and applewebdata:// strings plus mentions of Safari's History.db, Downloads.plist, LastSession.plist and Bookmarks.plist. The second collects domain names that follow a Cookies.binarycookies header. They give you leads, not a parsed history with visit times.

Reading them together

A cleared Security log, a 7045 service pointing to AppData, and an index.dat entry downloading the same binary an hour earlier form a consistent story. Each item carries its source ("file cache", "chunk", "record", or the physical offset), so you can go back to the evidence behind every line.

Further reading