courses

Windows Forensics

Windows systems leave a remarkably complete record of user activity. This document covers the principal forensic evidence sources in Windows: the Registry, event logs, link files, the Recycle Bin, application metadata, browser history, e-mail archives, installed programs, and forensic timelines.

A key principle runs through all of this: it is easy to forge data in one place, but very difficult to forge it consistently in every place it is recorded. The Registry and event logs should tell the same story. Application metadata timestamps, file system metadata timestamps, and Registry entries should be mutually consistent. Unexplained discrepancies are a strong indicator of tampering.


Windows Registry

The Registry is Windows’ persistent configuration store. If Windows remembers something across a reboot, it is in the Registry. It records user activity, hardware history, installed software, recently accessed files, and much more.

Storage: Registry data is stored in binary files called hives, located at:

Structure: a Registry hive is a hierarchy of keys (analogous to directories) and values (analogous to files). Values can be binary, plaintext, or hexadecimal. Every key has a last written timestamp — not shown by the default regedit.exe, but visible in tools like Registry Commander or via export to plaintext.

Root Keys

Hive Contents
HKEY_LOCAL_MACHINE (HKLM) System-wide hardware, software, and security settings
HKEY_CURRENT_USER (HKCU) Settings for the currently logged-in user
HKEY_USERS Settings for all user accounts on the system
HKEY_CLASSES_ROOT File type associations and COM registrations
HKEY_CURRENT_CONFIG Current hardware profile

User Log-on and Log-off

To identify the last account that logged in:

Hive:  HKLM\SOFTWARE
Key:   Microsoft\Windows\CurrentVersion\Authentication\LogonUI
Value: LastLoggedOnUser       (username)
Value: LastLoggedOnSAMUser    (domain\username)

To find the last shutdown time:

Hive:  HKLM\SYSTEM
Key:   <CurrentControlSet>\Control\Windows
Value: ShutdownTime   (binary timestamp)

Cross-referencing the shutdown time with the last write time on each user’s ntuser.dat can identify which account was logged in when the machine was shut down.

USB Device History

Every USB device ever connected to the machine leaves a Registry entry:

HKLM\SYSTEM\CurrentControlSet\Enum\USBSTOR

Under USBSTOR, there are two levels of subkeys:

  1. Device class key — named with the device type description (e.g., “Cruzer micro 1GB flash storage”)
  2. Instance key — named with the device’s serial number (or a pseudorandom ID prefixed with & if the device has no serial number)

This lets an investigator link a specific physical device to this machine, and link the device to a time period.

First installation time: search for the device serial number in C:\Windows\setupapi.dev.log. The log records the date and time the device was first connected.

Last attachment time: the last written timestamp on the key at HKLM\SYSTEM\CurrentControlSet\Enum\USB\<hardware ID> indicates the last time the device was attached.

All-time device history (Vista/7): HKLM\Software\Microsoft\Windows Portable Devices\Devices — lists all devices ever connected, with display names.

Caution: connecting a confiscated USB device to a forensic workstation will create a new entry on that workstation. Use a software write blocker before connecting any evidence device.

Other Forensically Interesting Registry Keys

Key Forensic Value
HKCU\Software\Microsoft\MediaPlayer\Player\RecentURLList URLs of files most recently played in Windows Media Player (persists after browser history deletion)
HKCU\Software\Microsoft\Internet Explorer\TypedURLs Last 25 URLs manually typed into Internet Explorer’s address bar (proves intent)
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AppPaths Paths to installed executables (survives uninstallation)
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall Recently uninstalled applications with timestamps

Event Logs

Windows provides a centralized event logging service. Applications and the OS write timestamped records to log files stored at C:\Windows\system32\winevt\logs\. Since Vista, logs use the well-documented .evtx (XML-based) format.

Each event record includes: date/time, user account, computer name, event ID, and a description.

Forensic value: event logs and Registry data should be mutually consistent. They record the same activity independently. Discrepancies between them are a strong signal of tampering.

Security Audit Policy

The volume and detail of event log data depends on the local security audit policy. Home versions of Windows log very little by default; server versions log extensively. The audit policy itself is a forensic artifact — a machine with auditing disabled may have been deliberately configured that way.

Viewing Event Logs

Event logs can be opened in Windows Event Viewer (on the original system or on another Windows machine running the same OS version). Since descriptions are assembled from Registry entries and application DLLs, viewing logs on a different system may yield incomplete descriptions.

Options for offline analysis:

  1. Collect on the live system before shutdown (shutdown itself adds events to the logs)
  2. Open on a machine running the same Windows version (system event descriptions will be correct; application descriptions may not be)
  3. Boot the forensic image in a virtual machine to ensure the application DLLs are present

Log-on Attempts

The security event log, filtered by task category (Logon/Logoff) and keyword (Audit Success / Audit Failure), shows a timestamped record of all login attempts. A sequence of rapid failed logons is a classic brute-force indicator. Correlate with network traffic for the same time window to trace the source.


Link files (.lnk files) are created automatically by Windows when:

Each link file contains:

Forensic significance:


Recycle Bin

From NTFS’s perspective, the Recycle Bin is just another folder. From a forensics perspective, it records deliberate deletion attempts.

When a user “deletes” a file, Windows moves it to the Recycle Bin rather than actually deleting it. The actual NTFS deletion happens only when the Recycle Bin is “emptied.”

Structure: C:\$Recycle.Bin\<SID+RID>\ — one subdirectory per user account, named with the account’s full security identifier.

Per-deleted-file pair:

Forensic significance: the presence of a file in the Recycle Bin, with a deletion timestamp and the user’s SID, shows that a specific account deliberately attempted to delete that file. If the file was relevant to the investigation, this can constitute attempted destruction of evidence.


Application Metadata

File system metadata (NTFS timestamps, file size) treat file contents as a black box. Application metadata are stored inside the file itself and describe the file’s content in much richer detail.

Properties of application metadata:

Microsoft Office Metadata

Office documents carry extensive embedded metadata, including:

Case study — metadata tampering detection: A CEO produced a safety procedures document with plausible-looking timestamps in both $STANDARD_INFORMATION and the application metadata. Registry examination revealed metadata-tampering software on his laptop. Investigators then checked the $FILE_NAME attribute timestamps (which are not updated after creation and are not affected by common tampering tools) and found they post-dated the incident. Confronted with the discrepancy, the suspect confessed to forging the document.

Multimedia File Metadata (Exif)

Digital photos (JPEG, TIFF) contain Exif metadata:

GPS coordinates have been used to locate fugitives (the John McAfee case in 2012: a Vice reporter posted an iPhone photo whose Exif GPS data revealed his location in Guatemala).

Social media platforms typically strip Exif data before publishing — but retain it internally.

Note: music files carry DRM credentials (rightful owner, download timestamp); video files embed playback licensing. These can help establish the provenance of pirated media.


Web Browser Forensics

Browsers accumulate extensive forensic evidence, much of it difficult to fully purge:

Artifact Content Location (Windows 7)
Cache Downloaded page files, images, scripts AppData\Local\Microsoft\Windows\Temporary Internet Files\
History Timestamped record of visited URLs History.IE5\ (IE) or SQLite DB (Firefox/Chrome)
Typed URLs URLs manually entered in the address bar Registry: HKCU\Software\Microsoft\Internet Explorer\TypedURLs
Cookies Session tokens, preferences, tracking IDs Per-browser directories
Saved passwords Credentials stored by the browser Browser-specific stores

Internet Explorer: uses proprietary binary index.dat files that must be parsed by a forensics tool. The cache index maps each browsing event (URL + timestamp) to the locally cached file.

Firefox, Chrome: use SQLite databases — directly queryable with standard SQL tools.

Typed URLs vs. history: history records all URLs visited (including from clicked links); typed URLs record only what the user manually typed into the address bar, proving intent to navigate to that destination.

Dynamic content limitation: server-side scripts and dynamically generated content cannot be reconstructed from the local cache, because the content was generated on the server at request time.


E-mail Forensics

E-mail leaves traces at multiple points:

Retrieval Protocols

Protocol Storage behavior Forensic implication
POP3 Mail downloaded to client and usually deleted from server Archive is on the local machine
IMAP Mail stays on server; client holds synchronized copies Archive may be on both; server is authoritative
Webmail All mail stays on server; only browser cache stored locally Subpoena the provider; check browser cache

Finding E-mail Archives

On Windows, local mail archives are typically found under C:\Users\<username>\AppData\Roaming\:

Analyzing E-mails


Installed Programs

Forensic examination of installed programs can:

Key locations:

Location Contents
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths Paths to installed executables; not always removed on uninstall
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall Recently uninstalled applications with timestamps
C:\Program Files\ Installed applications
C:\Users\<user>\AppData\ Per-user application data; often not cleaned by uninstallers
C:\ProgramData\ System-wide application data

Caution: the presence of a program does not prove that a specific user installed or knowingly used it. It could have been installed by another user with shared access, installed as a dependency of something else, or delivered by malware.

Prefetch Files

Windows uses prefetching to speed up repeated program launches. Prefetch files are stored at C:\Windows\Prefetch\*.pf (up to 128, retained by recency).

Each .pf file records:

Because prefetch files are less well-known and less likely to be targeted by a user attempting to destroy evidence, they are valuable for corroborating other findings and detecting inconsistencies.


Forensic Timelines

All the artifacts described above are most powerful when integrated into a single chronological timeline. A timeline allows an investigator to answer: what happened first, what happened next, and does the sequence make sense?

Timeline Creation Tools

Timeline Investigation Approaches

Bulk timeline: collect everything first, then analyze. Best when you don’t yet know what is relevant. Produces potentially millions of entries; requires SQL queries, Excel histograms, or automated analysis to find anomalies.

Targeted timeline: decide what artifacts matter first (e.g., file transfers and login events for an insider threat investigation), then collect only those. Faster and more focused, but risks missing unexpected evidence.

Pattern-of-life baseline: establish what the user normally does (login/logout times, applications used, network activity). Deviations from baseline are candidate anomalies worth investigating.

Timeline Pitfalls


Further Reading