Skip to content

Blog10 min read

Where Windows Keeps BITS Evidence, by Version

What BITS leaves on Windows 7 to 11: qmgr0.dat and qmgr1.dat, the qmgr.db database, the Bits-Client event log and BIT*.tmp files, and what each one proves.

by Published on

TL;DR. The Background Intelligent Transfer Service keeps its job queue in C:\ProgramData\Microsoft\Network\Downloader\. Up to Windows 8.1 the queue is two binary files, qmgr0.dat and qmgr1.dat. On Windows 10 and 11 it is an ESE database, qmgr.db, with its transaction logs. The queue holds the jobs that still exist: name, owner SID, URLs, destination and temporary paths, state, times and any notify command line. Finished jobs are removed, but their records can often be carved. The Microsoft-Windows-Bits-Client/Operational event log keeps the history, the URLs and, on recent builds, the process that created each job, but not where the file went. Downloads are written to a BIT*.tmp file in the destination folder first. BITS Parser reads both queue formats and the event log in the browser.

Four places to look

SourceLocationWhat it gives
Job queue, Windows 10 and 11C:\ProgramData\Microsoft\Network\Downloader\qmgr.db and edb*.logCurrent jobs with their files, owner, state, times and notify command; remnants of deleted jobs
Job queue, Windows 7 to 8.1C:\ProgramData\Microsoft\Network\Downloader\qmgr0.dat and qmgr1.datThe same job and file data, in a custom binary format
Event logC:\Windows\System32\winevt\Logs\Microsoft-Windows-Bits-Client%4Operational.evtxJob creation, transfer start and stop with the URL, completion, errors, failed notify launches
Transferred filesThe job's destination folderA BIT*.tmp file during the transfer and until the job is completed, then the final file

BITS has been part of Windows since XP, as Mandiant's write-up recalls. Windows Update, other Windows components and third-party updaters such as Acrobat Reader's use it, so every system has a queue and a busy event log. Attackers use it for the same reasons: the transfer runs inside a svchost.exe service process, survives reboots, and a job can start a program when it finishes (ATT&CK T1197).

By Windows version

WindowsJob queueFormatParsers
7, 8, 8.1 (and older, back to XP)qmgr0.dat, qmgr1.datCustom binary, undocumentedANSSI's bits_parser; Mandiant's BitsParser, which uses ANSSI's code
10, 11qmgr.dbESE database, tables Jobs and FilesBitsParser; Velociraptor's Windows.Forensics.BITS

ANSSI's parser, published in 2018, knows a job delimiter for each BITS version from NT 5.1 (Windows XP) to NT 6.3 (Windows 8.1). In 2021 Mandiant found that the queue had become an ESE database on Windows 10, and wrote BitsParser to read it. The sources tie the change to Windows 10 without naming a build, so let the files decide: a folder with qmgr.db uses the ESE format, a folder with qmgr0.dat and qmgr1.dat uses the old one. BitsParser makes the same choice.

The event log is present on both generations. Secureworks found the 2016 case it describes through the Bits-Client log of a Windows 7 host (republished by Sophos), and Roberto Nardella's SANS paper tests it on Windows 7 and Windows 10.

The job queue

qmgr.db on Windows 10 and 11

  • An ESE database. Mandiant describes two tables, Jobs and Files, each with an Id column holding a GUID and a Blob column holding an undocumented binary record. The record layouts are in the qmgr.db format.
  • Transaction logs in the same folder. The newest is edb.log, and Mandiant notes that three older logs with numerical suffixes are typically present. They can hold job records that the database no longer has. Collect the folder whole.
  • Locked while BITS runs. Mandiant found that on Windows 10 the BITS service opens the queue files without sharing, so a plain copy fails. Use a shadow copy or a raw NTFS reader, as described in collecting BITS evidence.
  • Usually dirty when copied live. A copy of an ESE database taken from a running system is normally in a dirty-shutdown state. Some generic ESE tools refuse it. BitsParser carries its own ESE reader, adapted from Impacket.

qmgr0.dat and qmgr1.dat on Windows 7 and 8

  • Two files, and no documented reason why. Dor Azouri, quoted in Nardella's paper, wrote that one is an alternate backup of the other and that the exact model is not clear. Mandiant found that the second file "largely contains duplicate job and file information", with some unique or older entries. Parse both.
  • A fixed size. Nardella saw files of about 4.2 MB with only the first few thousand bytes in use after his tests; the listing in Xavier Mertens's ISC diary shows two 4 MB files. Their size says nothing about activity.
  • Remnants in the unused part. ANSSI's tool carves deleted jobs from the files and can scan a whole disk image, with noisier results, as its README warns.

What a job record holds

FieldContent
Job IDA GUID
Name, descriptionChosen by whoever created the job: "System update" in Mandiant's KEGTAP case
TypeDownload, upload or upload-reply
PriorityForeground, high, normal or low
StateQueued, connecting, transferring, suspended, error, transient error, transferred, acknowledged, cancelled
OwnerSID of the account that created the job, or of an administrator who took ownership
Notify commandProgram and parameters BITS starts when the job is transferred or fails
FilesSource URL, destination path, temporary path, byte counts, drive and volume
TimesCreation and modification, as FILETIME values in UTC
Errors and retriesError counts, retry delay and no-progress timeout

What a record does not hold: the process or command line that created the job, and a history of its states. Those come from the event log and from process creation logs.

The Bits-Client event log

The channel is Microsoft-Windows-Bits-Client/Operational, stored in Microsoft-Windows-Bits-Client%4Operational.evtx. It was populated by default in the tests and cases cited on this page. The events that matter most:

IDMeaning
3The BITS service created a new job
59BITS started a transfer, with the URL
60BITS stopped a transfer, with the URL and a status code
61BITS stopped a transfer with an error
4The transfer job completed
64BITS could not launch a job's notify program

Its strengths: it keeps the history after a job has left the queue, it names every URL, and on recent builds event 3 names the program that created the job. JPCERT's analysis sheet shows powershell.exe there. Its limits: Nardella found that the event data gives neither the local destination of a file nor its final name, the notify command appears only when a launch fails, and the log can be cleared or roll over. Each ID is covered in Bits-Client event IDs.

The files BITS writes

Microsoft's documentation of GetTemporaryName explains that BITS downloads into a temporary file created in the destination folder. That file stays until the job is completed or cancelled, or until the inactivity timeout cancels the job. Complete renames the temporary files to their final names and removes the job from the queue.

  • The name. Public cases show BIT followed by hexadecimal characters and .tmp: BIT68A6.tmp in the Secureworks case, BIT[Number].tmp in JPCERT's sheet. ANSSI notes that the temporary name always ends with .tmp.
  • A job that is never completed keeps its download in that temporary file. The destination name may not exist at all, or may belong to an older file.
  • File times. JPCERT's test recorded a Sysmon event 2, "File creation time changed", on the temporary file. Do not read the file's creation time as the download time without checking $MFT and the USN journal, which also record the rename.

Traces outside BITS

TraceWhat it shows
bitsadmin.exe process creation (Security 4688 with command-line auditing, Sysmon 1) and PrefetchWho ran bitsadmin, when, and with which arguments
PowerShell script block and module logging, PSReadLine historyStart-BitsTransfer and Set-BitsTransfer commands
A process whose parent is svchost.exe -k netsvcs -p -s BITSA notify program started by BITS. Atomic Red Team shows this command line; ATT&CK writes it without -p
Proxy and firewall logsTransfers made by the BITS service host, not by the client program (Mandiant), with a User-Agent starting Microsoft BITS/ (Mertens)
$MFT, USN journalCreation, growth and rename of BIT*.tmp

Retention

WhatHow long
A job in the queueUntil it is completed or cancelled. By default BITS cancels a job after 90 days without activity, the JobInactivityTimeout policy; transfer progress or property changes reset the timer (Microsoft)
Records of finished jobsIn free database space and transaction logs until overwritten (Mandiant)
EventsUntil the channel rolls over or is cleared
Older states of the queueVolume Shadow Copies may hold older copies of the Downloader folder

A changed inactivity timeout is a Group Policy setting. Microsoft stores configured BITS policies under HKLM\Software\Policies\Microsoft\Windows\BITS, and only configured ones appear there.

Which source answers which question

QuestionLook at
What will BITS run, and as whom?The notify command and owner in the job queue
Where was the file saved?The file record in the job queue; BIT*.tmp in $MFT and the USN journal
Which program created the job?Event 3 on recent builds, process creation logs, Prefetch
When did transfers happen, and to which URL?Events 59, 60, 61 and 4
Did the notify program run?Process creation with the BITS svchost.exe as parent, Prefetch for the program; event 64 records failed launches only
Was a job deleted?Carved records in the database and logs; the event log

The Windows Forensics reference has a one-page BITS jobs cheat sheet with the same locations.

Reading it in the browser

BITS Parser reads qmgr.db, the legacy qmgr0.dat and qmgr1.dat, and the Bits-Client event log when you provide it. Drop the files, a folder, or a zip or tar.gz collection, or take the files handed over by Disk Image Parser. It lists jobs with their files, owners, notify command lines and times, flags persistence and suspicious transfers, and exports CSV, JSON or Markdown. It runs in the browser and uploads nothing. How to get the files is on the home page under How to get your data.

FAQ

Where is the BITS job database on Windows 10 and 11?

In C:\ProgramData\Microsoft\Network\Downloader\qmgr.db, an ESE database, with its edb transaction logs in the same folder. The BITS service holds the database open without sharing, so a live copy needs a shadow copy or a tool that reads NTFS directly.

What are qmgr0.dat and qmgr1.dat?

The BITS job queue on Windows 7, 8 and 8.1, and on older versions back to XP, in a custom binary format that ANSSI reverse-engineered. Microsoft does not document why there are two files. Researchers describe the second as a backup that mostly duplicates the first but can hold older or unique records, so parse both.

Does the BITS database keep a history of downloads?

No. It holds the jobs that still exist, plus remnants of deleted ones until they are overwritten. A job is removed when it is completed or cancelled, and BITS cancels it after 90 days without activity by default. The Bits-Client event log and the file system keep more of the history.

Which BITS source shows the notify command line?

The job record in qmgr.db or in the qmgr .dat files, for as long as the job exists. The event log shows it only in event 64, which BITS writes when it fails to launch the program.

Frequently asked questions

Where is the BITS job database on Windows 10 and 11?

In C:\ProgramData\Microsoft\Network\Downloader\qmgr.db, an ESE database, with its edb transaction logs in the same folder. The BITS service holds the database open without sharing, so a live copy needs a shadow copy or a tool that reads NTFS directly.

What are qmgr0.dat and qmgr1.dat?

The BITS job queue on Windows 7, 8 and 8.1, and on older versions back to XP, in a custom binary format that ANSSI reverse-engineered. Microsoft does not document why there are two files. Researchers describe the second as a backup that mostly duplicates the first but can hold older or unique records, so parse both.

Does the BITS database keep a history of downloads?

No. It holds the jobs that still exist, plus remnants of deleted ones until they are overwritten. A job is removed when it is completed or cancelled, and BITS cancels it after 90 days without activity by default. The Bits-Client event log and the file system keep more of the history.

Which BITS source shows the notify command line?

The job record in qmgr.db or in the qmgr .dat files, for as long as the job exists. The event log shows it only in event 64, which BITS writes when it fails to launch the program.