Skip to content

Blog11 min read

The qmgr.db Format: BITS Jobs, Files and Times

How BITS stores jobs in qmgr.db on Windows 10 and 11: ESE tables, job and file records, states, notify command lines, retry settings, times and deleted records.

by Published on

TL;DR. qmgr.db is an ESE database with two tables that matter, Jobs and Files. Each row is a GUID and an undocumented binary blob. A job blob holds the type, priority and state, the job GUID, the name, description, notify program, notify parameters and owner SID as length-prefixed UTF-16 strings, the notify flags, a list of file GUIDs, then error counts, retry delay, no-progress timeout and FILETIME times. A file blob holds the destination path, source URL and temporary BIT*.tmp path, two byte counts, the drive and the volume. Rows of completed or cancelled jobs are deleted but stay in free pages and transaction logs until overwritten, so they can be carved. Microsoft documents none of this: the layout comes from ANSSI, Mandiant and the parsers built on their work. BITS Parser decodes both tables and the legacy files in the browser.

The folder

File in C:\ProgramData\Microsoft\Network\Downloader\Role
qmgr.dbThe database
edb.logThe current transaction log
Older edb*.log files with numbersEarlier transaction logs; Mandiant notes that three are typically present
Anything elseCopy it with the rest; parsers and carvers can use it

Where this folder sits in the wider picture, and what replaced it before Windows 10, is in where Windows keeps BITS evidence.

An ESE database

ESE, the Extensible Storage Engine, is the engine behind SRUM, Active Directory and Exchange. Two of its properties matter here:

  • Changes go to the transaction logs first. A copy taken from a running system is usually in a dirty-shutdown state, and the newest records may be only in the logs. On a copy, esentutl /mh qmgr.db shows the state. Recovery with esentutl /r replays the logs into the database; do it on a second copy, so that the originals stay available for carving.
  • The file is locked while BITS runs. Mandiant found that the service opens it without sharing. See collecting BITS evidence.

Generic ESE viewers show the two tables, but the useful content is inside the blobs, so a BITS-aware parser is needed.

Two tables

Mandiant describes the Jobs and Files tables, each with two columns: Id, a GUID, and Blob, binary data. Each blob starts with a 16-byte GUID that marks the kind of record:

  • file records start with {519ECFE4-D946-4397-B73E-268513051AB2};
  • job records start with one of six GUIDs Mandiant observed, among them {E10956A1-AF43-42C9-92E6-6F9856EBA7F6}.

Why there are six job markers is not documented. BitsParser and Velociraptor's Windows.Forensics.BITS use the same seven values to find records, including in free space.

The job record

Offsets start after the 16-byte marker. Strings are a 32-bit character count followed by UTF-16LE text.

OffsetSizeFieldNotes
04TypeSee values below
44PrioritySee values below
84StateSee values below
124Unknown
1616Job IDThe GUID that bitsadmin /list shows
32VariableNameThe display name
VariableDescriptionFree text
VariableNotify programFull path of the program to run
VariableNotify parametersThe whole command line; Microsoft requires the program as first parameter
VariableOwner SIDText form, such as S-1-5-21-…-1119
4Notify flagsBit mask
VariableFurther dataANSSI calls it access_token; its content is not described
16XFER marker{7756DA36-516F-435A-ACAC-44A248FFF34D}
4File count
16 eachFile GUIDsMatch the Id column of Files
16XFER markerAgain
VariableMetadataErrors, retry settings, times

The control block layout up to the name is Mandiant's. The order of the strings, the notify flags and the metadata come from ANSSI's bits_parser structures, which BitsParser reuses for Windows 10 records.

Type, priority and state

The values match Microsoft's enumerations, and ANSSI's and Velociraptor's parsers agree on them.

ValueTypePriority
0DownloadForeground
1UploadHigh
2Upload-replyNormal
3Low
ValueState (BG_JOB_STATE)What it tells you
0QueuedWaiting to run. Microsoft notes that a job goes back to this state when its owner logs off during a transfer
1ConnectingContacting the server
2TransferringMoving data
3SuspendedEvery job starts here until it is resumed. Files and a notify command can already be set
4ErrorA non-recoverable error. A notify command runs when the job enters this state
5Transient errorA recoverable error. BITS retries after the minimum retry delay, and moves the job to Error when the no-progress timeout expires
6TransferredEvery file transferred, waiting for Complete. A notify command runs when the job enters this state
7AcknowledgedComplete was called. A final state
8CancelledCancel was called. A final state

Jobs in a final state no longer appear in a job enumeration, as Microsoft's life cycle page says, and their rows are removed. A record with state 7 or 8 is a carved remnant or an older copy.

Notify flags

BitValueMeaning
01Job transferred
12Job error
24Notifications disabled
38Job modified
416File transferred

A notify command line only runs for the first two: Microsoft's registration page says the modification flag is ignored for it. The default is 1 and 2 together; the Start-BitsTransfer documentation gives it as 1|2.

Metadata: errors, retries and times

FieldSizeANSSI nameVelociraptor name
Error count4error_countErrorCount
Errors25 bytes eachcode (8 bytes), four 32-bit values, one byte
Transient error count4transient_error_countTransientErrorCount
Retry delay, in seconds4retry_delayRetryDelay
No-progress timeout, in seconds4timeoutNoProgressTimeout
Creation time8ctimeCreationTime
Modification time8mtimeModificationTime
A time8other_time0Not read
Unknown14Padding
A time8other_time1Not read
A time8other_time2ExpirationTime

Compare the retry settings with Microsoft's defaults: a minimum retry delay of 600 seconds and a no-progress timeout of 1,209,600 seconds (14 days). Other values were set by whoever created the job, which matters for persistence.

ANSSI leaves the last three times unnamed. Velociraptor's artifact reads the last one as the time after which BITS cancels the job if it is not completed, 90 days by default. Microsoft's API also exposes a transfer completion time; which stored value holds it, if any, has not been shown.

The file record

FieldEncodingNotes
Destination pathLength-prefixed UTF-16The local file name
Source URLLength-prefixed UTF-16HTTP, HTTPS or an SMB path
Temporary pathLength-prefixed UTF-16A BIT*.tmp file in the destination folder
First byte count64-bitBitsParser's DownloadByteSize
Second byte count64-bitBitsParser's TransferByteSize
Unknown1 byte
DriveLength-prefixed UTF-16
Volume GUIDLength-prefixed UTF-16
A timeFILETIME, 29 bytes after the volume stringBitsParser: it "appears to correlate to creation time"; Velociraptor calls it CreationTime

The layout up to the volume is the same in Mandiant's write-up and ANSSI's code. Three cautions:

  • The byte counts. A value of -1 means unknown size, BITS's BG_SIZE_UNKNOWN, and BitsParser hides it. Which count is the total and which the transferred part is not settled: ANSSI's comment describes the first as the downloaded byte count, while the Windows Forensics BITS page reads the pair as expected and transferred sizes. Read them together.
  • Upload jobs. The public descriptions are written from download jobs. For an upload job, check which field holds the URL before you report a direction.
  • The temporary path is where the data really is until the job is completed. See where Windows keeps BITS evidence.

Joining jobs and files

The job record lists its file GUIDs; a file record does not name its job. Velociraptor's artifact spells out the consequence: once a job row is gone, its file records cannot be tied to it. BitsParser outputs such file records as entries of their own. Its source carries a comment saying that jobs and files cannot be correlated on Windows 10, but its code does join them through that GUID list, as Mandiant's article describes.

Times

The times are FILETIME values, in UTC. Microsoft's BG_JOB_TIMES describes what the job's times mean through the API, and parsers assume the stored values are the same:

  • Creation time: when the job was created.
  • Modification time: the last change. Adding files, any set method, a state change, suspending, resuming, cancelling, completing and transferring bytes all move it.

So the creation time anchors when someone set the job up. The modification time of a job that keeps failing and retrying follows its last state change, and can be hours or days after the intrusion. Do not read it as the time of the attacker's last command.

Deleted and older records

BITS deletes a job's rows when the job is completed or cancelled. Mandiant points out that deleted entries are not immediately overwritten, and that the transaction logs can hold older records too.

  • BitsParser carves the database with --carvedb, and every other file in the folder, the logs included, with --carveall. Carved entries carry "Carved": true, and entries without any useful field are dropped.
  • Velociraptor's Windows.Forensics.BITS, added to the main branch in November 2026, scans the whole file by signature. Its InJobsTable column tells live rows from remnants, and the same job can come back several times with different states, which shows how it progressed.
  • Limits. A record split across two database pages may come back incomplete or not at all, the artifact notes. Carved file records usually cannot be tied to a job.

The legacy files

qmgr0.dat and qmgr1.dat hold the same kind of data in a different container. In ANSSI's structures, a file starts with a header and a job count, and jobs follow one another, separated by a delimiter that depends on the BITS version; ANSSI knows five, from Windows XP to 8.1. Each job carries the same control block and metadata as above, but its file records sit inside the job, between the two XFER markers, instead of in a separate table. ANSSI's tool parses the files and carves the rest of their content.

What is still unknown

  • the four bytes at offset 12, the data after the notify flags, and the single byte in the file record;
  • three of the five times in the metadata, one of which Velociraptor reads as an expiration time;
  • the meaning of the values stored with each error;
  • why there are six job markers;
  • whether Windows 11 changed anything: no public source reports a change, and Velociraptor's artifact describes the format as Windows 10 and later.

Parsers that agree on the known fields can still disagree on the rest. Report unknown values as raw data, not as meaning.

FAQ

What tables does qmgr.db contain?

Two that matter: Jobs and Files. Each has an Id column with a GUID and a Blob column with an undocumented binary record. The job record lists the GUIDs of its file records, and that list is the only link between a job and its files.

Are the times in qmgr.db UTC?

Yes. They are FILETIME values, which count 100-nanosecond intervals since 1 January 1601 UTC. BitsParser and Velociraptor read them as UTC. The first two are read as the job's creation and modification times.

Can deleted BITS jobs be recovered from qmgr.db?

Often, for a while. BITS deletes a job's rows when the job is completed or cancelled, but the bytes stay in free database pages and in the transaction logs until they are overwritten. BitsParser carves them with --carvedb and --carveall, and Velociraptor's Windows.Forensics.BITS scans the whole file.

Is the qmgr.db format documented by Microsoft?

No. The layout comes from ANSSI's work on the older qmgr0.dat format, Mandiant's BitsParser write-up for Windows 10, and the parsers built on them. Some bytes and three timestamps are still unexplained.

Frequently asked questions

What tables does qmgr.db contain?

Two that matter: Jobs and Files. Each has an Id column with a GUID and a Blob column with an undocumented binary record. The job record lists the GUIDs of its file records, and that list is the only link between a job and its files.

Are the times in qmgr.db UTC?

Yes. They are FILETIME values, which count 100-nanosecond intervals since 1 January 1601 UTC. BitsParser and Velociraptor read them as UTC. The first two are read as the job's creation and modification times.

Can deleted BITS jobs be recovered from qmgr.db?

Often, for a while. BITS deletes a job's rows when the job is completed or cancelled, but the bytes stay in free database pages and in the transaction logs until they are overwritten. BitsParser carves them with --carvedb and --carveall, and Velociraptor's Windows.Forensics.BITS scans the whole file.

Is the qmgr.db format documented by Microsoft?

No. The layout comes from ANSSI's work on the older qmgr0.dat format, Mandiant's BitsParser write-up for Windows 10, and the parsers built on them. Some bytes and three timestamps are still unexplained.