Blog7 min read
Collecting BITS Evidence: Live, Dead-Box and Triage
How to collect qmgr.db or qmgr0.dat and qmgr1.dat, the Bits-Client event log and live job listings: locked files, shadow copies, KAPE, Velociraptor and your own traces.
TL;DR. Take the whole folder C:\ProgramData\Microsoft\Network\Downloader\: qmgr.db and its edb*.log files on Windows 10 and 11, qmgr0.dat and qmgr1.dat before. Add the Microsoft-Windows-Bits-Client%4Operational.evtx log and, on a live system, the output of bitsadmin /list /allusers /verbose and Get-BitsTransfer -AllUsers. On Windows 10 and 11, qmgr.db is locked: copy it from a shadow copy or let a raw-copy tool such as KAPE or Velociraptor read it. Never complete, cancel or take ownership of a job before it is recorded: Cancel deletes the job's files and taking ownership removes its notify command line. Then drop the folder or archive on BITS Parser; the How to get your data guide on the home page has the same commands.
What to collect
| Item | Path | Why |
|---|---|---|
| Downloader folder | C:\ProgramData\Microsoft\Network\Downloader\, every file | The job queue: qmgr.db with its transaction logs, or qmgr0.dat and qmgr1.dat |
| Bits-Client log | C:\Windows\System32\winevt\Logs\Microsoft-Windows-Bits-Client%4Operational.evtx | History, URLs, the process that created each job |
| Live listings | Output of bitsadmin and Get-BitsTransfer | What BITS reports now, with account names |
| Temporary files named by jobs | BIT*.tmp in each job's destination folder | The data of transfers that were never completed |
| Context | Prefetch; Security, Sysmon and PowerShell logs; SOFTWARE and SAM hives; $MFT and $UsnJrnl | Who ran bitsadmin or PowerShell, what a notify program did, which account a SID is |
Copy the Downloader folder whole. The transaction logs can hold records the database no longer has, and BitsParser's --carveall and other carvers use every file in it. Why each file matters is in where Windows keeps BITS evidence.
Before you start: your own traces
- bitsadmin writes Prefetch. Running
bitsadmin.exeon the system creates or updates its Prefetch file. If the question is whether the intruder used bitsadmin, collect Prefetch first, or at least note when you ran it. - PowerShell can log you.
Get-BitsTransferloads the BitsTransfer module, and script block or module logging may record it. - Do not change the jobs. Complete renames the temporary files and removes the job. Cancel deletes the job's transferred and partly transferred files (Microsoft). Taking ownership removes the notify command line (Microsoft).
bitsadmin /resetcancels everything. - Run elevated. Other users' jobs need administrator rights, and Microsoft's bitsadmin page notes that a job created elevated is read-only from a non-elevated window.
- Write down the time, the commands and the tools, so that nobody mistakes your actions for the intruder's.
The live listing
Two built-in views, both from an elevated prompt:
bitsadmin /list /allusers /verbose
Get-BitsTransfer -AllUsers | Format-List *
/allusers and -AllUsers need administrator rights (bitsadmin list, Get-BitsTransfer). Both show what BITS reports now, with owner account names resolved. Neither shows deleted jobs or history. Save both: the two outputs present the same jobs differently, and a court or a colleague may want to see what BITS itself said at the time.
The locked database
Mandiant found that on Windows 10 the BITS service opens the queue files without sharing, so a plain copy fails. Three ways around it:
- A Volume Shadow Copy, which Windows can make with its own tools. The script below does this.
- A raw NTFS read, as KAPE and Velociraptor do.
- Stopping the BITS service releases the files, and Mandiant mentions it for the standalone BitsParser. It stops every transfer on the host and changes the state you came to record. Use it only if nothing else works, and write it down.
A copy taken from a running system is normally a dirty ESE database. Keep the transaction logs with it; see the qmgr.db format.
Live collection by hand
In an elevated PowerShell prompt on Windows 10 or 11:
$case = 'E:\case\FIN-WKS-07'
New-Item -ItemType Directory -Force -Path "$case\bits" | Out-Null
# 1. What BITS reports now, before anything else
bitsadmin /list /allusers /verbose > "$case\bits\bitsadmin-list-allusers-verbose.txt"
Get-BitsTransfer -AllUsers | Format-List * > "$case\bits\get-bitstransfer-allusers.txt"
# 2. The Bits-Client event log
wevtutil epl Microsoft-Windows-Bits-Client/Operational "$case\bits\Microsoft-Windows-Bits-Client%4Operational.evtx"
# 3. The Downloader folder, from a shadow copy of C:
$r = Invoke-CimMethod -ClassName Win32_ShadowCopy -MethodName Create -Arguments @{ Volume = 'C:\' }
$sc = Get-CimInstance Win32_ShadowCopy | Where-Object ID -eq $r.ShadowID
cmd /c mklink /d C:\bits_vss "$($sc.DeviceObject)\"
robocopy C:\bits_vss\ProgramData\Microsoft\Network\Downloader "$case\bits\Downloader" /E /B /COPY:DAT /DCOPY:T /R:1 /W:1
# Copy any BIT*.tmp file named in the listings from C:\bits_vss\... here, before the next two lines
cmd /c rmdir C:\bits_vss
$sc | Remove-CimInstance
# 4. Hashes outside the case folder, then an archive
Get-ChildItem $case -Recurse -File -Force | Get-FileHash -Algorithm SHA256 |
Export-Csv "$case.sha256.csv" -NoTypeInformation
tar.exe -a -c -f "$case.zip" -C $case .
Notes on the script:
- The shadow copy and the
C:\bits_vsslink are changes to the system. The script removes both; record that you made them. /Bcopies in backup mode, which avoids access errors on the folder from an elevated prompt.- The script is written for Windows 10 and 11. Windows 7 ships PowerShell 2.0, which has no CIM cmdlets or
Get-FileHash, and notar.exe; use KAPE or Velociraptor there, or adapt the shadow copy step with[wmiclass]'Win32_ShadowCopy'.
KAPE
The BITS target, by Jos Clephas, copies C:\ProgramData\Microsoft\Network\Downloader\ recursively. The !SANS_Triage compound target includes it; KapeTriage, at the time of writing, does not. The EventLogs target takes every .evtx file, the Bits-Client log included. KAPE reads locked files from NTFS directly.
kape.exe --tsource C: --tdest E:\case\FIN-WKS-07 --target BITS,EventLogs
KAPE also has a BitsParser module. It downloads a compiled BitsParser.exe from a fork of Mandiant's project and runs it on qmgr.db alone, without the transaction logs or the carving options. Collect the files with the target, and parse them on the analysis side, where you control the tool.
Velociraptor
- Collection. Since Velociraptor 0.75, the triage artifact is Windows.Triage.Targets, maintained outside the main release; import it from that site or with the
Server.Import.Extrasartifact. Select theBITSandEventLogstargets, run it on the endpoint or as an offline collector, and export the collection as a ZIP for BITS Parser. - Parsing on the endpoint. Windows.Forensics.BITS parses
qmgr.dbon Windows 10 and later, including deleted and older records, with filters on the job name, the notify command and the URL. It was merged into Velociraptor's main branch on 10 November 2026, after the 0.77.3 release, so check that your server has it. Its notes say that theautoaccessor falls back to raw NTFS access for the locked file. ItsUploadDatabaseoption uploadsqmgr.dbonly; collect the logs with the triage artifact. - Events. Matt Green's exchange artifact Windows.EventLogs.Bitsadmin extracts event 59 and filters out an allowlist of domains.
From a disk image
Mount the Windows volume read-only and copy, relative to its root:
ProgramData\Microsoft\Network\Downloader\, every file;Windows\System32\winevt\Logs\Microsoft-Windows-Bits-Client%4Operational.evtx;- any
BIT*.tmpfile the jobs name.
Nothing is locked in a mounted image, but a database imaged from a running or crashed system is still dirty, so keep its logs. Volume Shadow Copies inside the image can hold older states of the queue, with jobs that have since been completed or cancelled. Disk Image Parser can hand the BITS files found in an image straight to BITS Parser, in the browser.
Handling the copies
- Keep the folder whole and the names unchanged. Parsers tell the formats apart by the files present.
- Hash on collection and work on copies.
- Do not run ESE recovery on the originals.
esentutl /rrewrites the files it repairs; use a second copy. - Write down your own actions: elevation, commands, shadow copies, times.
What to do with the result is in telling benign BITS jobs from malicious ones and in the FIN-WKS-07 walk-through.
FAQ
Why can't I copy qmgr.db?
On Windows 10 and 11 the BITS service opens the database without sharing, so a normal copy fails. Copy it from a Volume Shadow Copy, or use a tool that reads NTFS directly, such as KAPE or Velociraptor. Stopping the BITS service releases it, but changes the system you are examining.
Does KAPE collect BITS by default?
The BITS target copies the whole ProgramData Downloader folder. The !SANS_Triage compound target includes it; KapeTriage, at the time of writing, does not. Add the EventLogs target for the Bits-Client log.
Is bitsadmin /list enough?
No. It shows the jobs that exist now, as BITS reports them, and needs administrator rights for other users' jobs. It shows no deleted records and no history. Save its output, then collect the database files and the event log.
Can collecting BITS evidence change it?
Yes. Running bitsadmin.exe on the host creates or updates its Prefetch file, which can be mistaken for the intruder's use of bitsadmin, and using the BitsTransfer cmdlets can write PowerShell logs. Collect Prefetch first, note every command you run, and never complete, cancel or take ownership of a job before it is recorded.
Related articles
Collect BITS evidence from a live Windows system
Save the live job listings, export the Bits-Client event log, copy the Downloader folder from a shadow copy, hash the result, then load it in BITS Parser.
- Time
- 15 min
- Tools
- An elevated PowerShell prompt, bitsadmin, wevtutil and robocopy (built in), BITS Parser (browser)
- Result
- A folder or zip with the Downloader folder, the Bits-Client event log and the live job listings, plus SHA-256 hashes.
Open an elevated prompt
Start PowerShell as administrator, note the time, and collect Prefetch first if you need it, because running bitsadmin on the system adds its own Prefetch file.
Record the live jobs
Save the output of bitsadmin /list /allusers /verbose and of Get-BitsTransfer -AllUsers | Format-List * to text files. Do not complete, cancel or take ownership of any job.
Export the event log
Export the Microsoft-Windows-Bits-Client/Operational channel with wevtutil epl.
Copy the Downloader folder
Create a shadow copy of the system volume, link to it, and copy the ProgramData\Microsoft\Network\Downloader folder with every file in it, plus any BIT*.tmp file a job names. Remove the link and the shadow copy afterwards.
Hash and archive
Compute SHA-256 hashes of every collected file, keep them outside the case folder, and zip the folder.
Load
Drop the folder or the zip on BITS Parser, or open the files with its file picker.
Frequently asked questions
Why can't I copy qmgr.db?
On Windows 10 and 11 the BITS service opens the database without sharing, so a normal copy fails. Copy it from a Volume Shadow Copy, or use a tool that reads NTFS directly, such as KAPE or Velociraptor. Stopping the BITS service releases it, but changes the system you are examining.
Does KAPE collect BITS by default?
The BITS target copies the whole ProgramData Downloader folder. The !SANS_Triage compound target includes it; KapeTriage, at the time of writing, does not. Add the EventLogs target for the Bits-Client log.
Is bitsadmin /list enough?
No. It shows the jobs that exist now, as BITS reports them, and needs administrator rights for other users' jobs. It shows no deleted records and no history. Save its output, then collect the database files and the event log.
Can collecting BITS evidence change it?
Yes. Running bitsadmin.exe on the host creates or updates its Prefetch file, which can be mistaken for the intruder's use of bitsadmin, and using the BitsTransfer cmdlets can write PowerShell logs. Collect Prefetch first, note every command you run, and never complete, cancel or take ownership of a job before it is recorded.