Setup API Log

The Setup API log is a persistent plain-text record of every device driver installation event on a Windows system. Each time a USB device, peripheral or hardware component is connected for the first time, the Plug and Play (PnP) subsystem writes detailed entries into this log. For investigators, it creates an accurate and often overlooked historical record of every external device that was ever plugged into a machine, complete with timestamps.

General

The Setup API log is stored in two log files located at C:\Windows\INF\setupapi.dev.log and C:\Windows\INF\setupapi.setup.log. The device installation log (setupapi.dev.log) is the primary forensic target. It is a structured plain-text file where each device connection event creates a block containing the device's hardware ID, the driver installed, the timestamp and the connection status. Critically, this file is not easily overwritten by typical anti-forensics tools since it is managed by the Windows kernel and not exposed through standard UI controls. The timestamps recorded are in the local system time at the moment of installation.

Traces

When we parse the Setup API log, we look for device installation blocks with these key data points:

Forensic Value

We use the Setup API log to build device connection histories and track external media:

For more Info check out these Articles: USB Registry