Digital Forensic Tools
Home / Workflows / Program execution on Windows
Case workflow

Which programs were run on this Windows computer?

Windows records program activity in several places, and each record means something slightly different. This workflow shows where to look, which free tool reads each record, and how strong each one is as evidence.

This workflow was written from the tools' documentation and published references. It has not yet been checked step by step on the practice data. If a step does not match what you see, please report it.

What you will be able to answer

  • Whether a given program was run
  • When it was last run, and how many times
  • Which user account ran it
  • Where the program file was stored
  • Whether the file was only present on the computer

What you need

  • A forensic image of the Windows computer, or a practice image (see the practice section on this page)
  • A Windows workstation for the analysis tools. Eric Zimmerman's tools need the .NET 10 runtime, or .NET Framework 4.7.2 for the command-line versions
  • The time zone of the computer (SYSTEM\ControlSet001\Control\TimeZoneInformation)

Steps

  1. 1

    Get a first list with Autopsy

    Add the image to a case and run the Recent Activity module. Open the result list named Run Programs. Use it as a starting list of program names to confirm in the next steps. Autopsy describes this module as a view of recent activity, so older programs may be missing from the list.

    ToolsAutopsy
  2. 2

    Export the files that hold the evidence

    Export the Prefetch folder, the registry hives with their transaction logs (names ending .LOG1 and .LOG2, which hold the newest changes), and the two databases listed below. Export one NTUSER.DAT for each user profile. Also export SOFTWARE, which SRUM tools use to name network profiles and which maps user SIDs to profile folders.

    Windows\Prefetch\*.pfWindows\System32\config\SYSTEM (and SYSTEM.LOG1, SYSTEM.LOG2)Windows\System32\config\SOFTWAREUsers\<user name>\NTUSER.DAT (and its .LOG files)Windows\AppCompat\Programs\Amcache.hve (and its .LOG files)Windows\System32\sru\SRUDB.dat
  3. 3

    Read the Prefetch files

    Run PECmd on the exported Prefetch folder. It writes two CSV files: one row per Prefetch file, and a timeline file with one row per run time. Each file is named program-HASH.pf, and the hash comes from the path, so one program run from two folders has two files. You get the run count, the last run times (up to eight on Windows 8 and later) and the files the program loaded. Prefetch is the strongest single sign that a program ran.

    PECmd.exe -d "C:\case\export\Prefetch" --csv "C:\case\out" --csvf prefetch.csv

    Windows 7 and older keep up to 128 files, Windows 8 and later up to 1,024. Windows 10 and 11 files are compressed, and PECmd reads them. Prefetch watches a program for about ten seconds, so the file created time can be about ten seconds after the run. It can be switched off, which is common on Windows Server.

  4. 4

    Check UserAssist for programs started by the user

    Open each NTUSER.DAT in Registry Explorer and go to UserAssist. Each GUID folder has a Count key. One GUID is for programs opened by their file and one for shortcuts. Each entry has a run count, a focus count and a last run time (UTC), for that user only. Names are stored in a simple letter-shift code (ROT13), so a text search of the raw hive can miss them. The tool decodes them for you.

    NTUSER.DAT\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\<GUID>\Count
  5. 5

    On Windows 10 and later, check BAM

    The Background Activity Moderator in the SYSTEM hive has one key per user SID. Each value name is the full path of a program, written with a device name such as \Device\HarddiskVolume3\Windows\..., and the value data starts with the last run time (UTC). Find which user a SID belongs to under ProfileList in SOFTWARE or in the SAM hive. BAM exists on Windows 10 after version 1709 and keeps only recent entries.

    SYSTEM\ControlSet001\Services\bam\State\UserSettings\<user SID>SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
  6. 6

    Read ShimCache as supporting evidence

    Run AppCompatCacheParser on the SYSTEM hive. Each row has a path and the file's last modified time (UTC), and the newest entries come first. That time is the file's time, not the run time. An Executed column is filled only for formats that carry such a flag, and shows NA otherwise. ShimCache proves that Windows saw the file. It is a hint, not proof of running.

    AppCompatCacheParser.exe -f "C:\case\export\SYSTEM" --csv "C:\case\out" --csvf appcompat.csv
    SYSTEM\ControlSet001\Control\Session Manager\AppCompatCache

    If the hive is dirty and its .LOG files are missing, the tool stops. The option --nl skips the logs, but then the result may be incomplete.

  7. 7

    Read Amcache for file hashes

    Run AmcacheParser on Amcache.hve. By default it writes the file entries that are not linked to a program. Add -i to include the program entries and the file entries linked to them. Entries have the path, a SHA-1 hash and times. On Windows 10 and 11 the data is under keys that start with Inventory. Windows 11 version 26H1 and later also use Inventory database files next to the hive, which AmcacheParser can read when you point it at the folder.

    AmcacheParser.exe -f "C:\case\export\Amcache.hve" -i --csv "C:\case\out"
    Windows\AppCompat\Programs\Amcache.hve

    Amcache shows that a file was present or installed. It does not give a run count, so use it as supporting evidence.

  8. 8

    On Windows 8 and later, add SRUM

    The SRUM database records, for roughly the last 30 days, which programs used processor time and network data, under which user account. Parse it with SRUM-Dump: give it the database with -i, the SOFTWARE hive with -r and an empty output folder with -o. It writes an Excel report. Chainsaw can parse SRUM too, which gives you a second tool (command below).

    chainsaw analyse srum --software C:\case\export\SOFTWARE C:\case\export\SRUDB.dat --output C:\case\out\srum.json
    Windows\System32\sru\SRUDB.dat
  9. 9

    Cross-check and write it down

    Put your findings in one table: program, source, time, user. A program in Prefetch and in UserAssist or BAM with matching times is well supported. One only in ShimCache or Amcache needs more evidence. If the Security log was set to audit process creation, event 4688 gives a very direct record. Record the tool, version, source file and time zone for every value.

Where the evidence is stored

PrefetchWindows\Prefetch
Program ran: run count, last run times, files it loaded
UserAssistNTUSER.DAT of each user
Programs the user started from the desktop: run count and last run time
BAMSYSTEM hive (Windows 10 version 1709 and later)
Program path and last run time for each user
ShimCache (AppCompatCache)SYSTEM hive
Program file was present; path and file modified time
Amcache.hveWindows\AppCompat\Programs
Program file was present; path and SHA-1 hash
SRUMWindows\System32\sru (Windows 8 and later)
Program and network usage by user, for recent weeks
MuiCacheUsrClass.dat of each user
Paths of programs that were run from Windows Explorer
Security event 4688Security.evtx, only if process auditing was on
Each process that was started, with the account

Check your result

  • Check that a program found in Prefetch also appears in UserAssist or BAM with a similar time.
  • Take the SHA-1 from Amcache and compare it with the hash of the exported program file, if the file is still on the image.
  • Open a Prefetch file's loaded-files list and check that the files named there exist on the image.
  • Run the same hive through RegRipper (for example with the appcompatcache plugin) and compare it with the AppCompatCacheParser list.

Common mistakes

  • Treating the ShimCache time as the time the program ran. It is the file's last modified time.
  • Searching raw UserAssist names for a program, when they are ROT13 coded and need decoding first.
  • Saying a program never ran because there is no Prefetch file. Prefetch may be off, or the file may have been removed.
  • Mixing UTC registry times with local-time times from other tools without writing down the time zone.
  • Exporting hives without their .LOG1 and .LOG2 files, and so missing recent entries.

Write it up

A short, careful way to state this kind of finding in a report. Change the details to match your own results.

The Prefetch file <name>.pf in the examined image (hash <hash>) records that <program path> was run <count> times, most recently on <date and time> (<time zone>). The UserAssist key of user <user name> gives a matching time. This shows the program ran under that account. It does not show who was using the account.

What this does not prove

  • These records show that a program ran under a user account. They do not show who was using the account.
  • ShimCache and Amcache show that a file was present. On their own they do not prove that it was run.
  • ShimCache is written to the registry when the computer shuts down, so recent entries can be missing from an image of a running or crashed system.
  • Prefetch can be switched off, and old Prefetch files are removed as new ones are created.
  • A program can be renamed. Match by path and hash, not only by name.
  • UserAssist only sees programs started through the desktop shell. Programs started from a command line or by a service may be missing there.
  • Which records exist depends on the Windows version. Check what applies to the version you are examining.

Practise on public data

NIST CFReDS: Data Leakage Case

by NIST

A simulated intellectual property theft on a Windows 7 computer. The PC image is about 5 GB to download as a compressed DD image, or about 7.3 GB in E01 format. NIST publishes an answer document, so you can check your result. The page was online when this workflow was reviewed.

Your task. Answer question 11 of the case: "Application execution logs." Build your table of programs with path, time and run count from Prefetch, UserAssist and ShimCache. Then look in the published answers for the anti-forensic programs run on 25 March 2015 and check that you found them in Prefetch. Times in the answers are US Eastern time.

The practice computer runs Windows 7, so BAM and SRUM will not be there, and Amcache may be missing. Prefetch, UserAssist, ShimCache and MuiCache apply. The answer document warns that run counts may be inaccurate.

Where to go next

Sources and further reading

A study guide written in our own words. It is not a legal or laboratory procedure. Follow your own lab's approved method on real cases. Last reviewed 24 Nov 2026.