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.
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.db | The database |
edb.log | The current transaction log |
Older edb*.log files with numbers | Earlier transaction logs; Mandiant notes that three are typically present |
| Anything else | Copy 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.dbshows the state. Recovery withesentutl /rreplays 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.
| Offset | Size | Field | Notes |
|---|---|---|---|
| 0 | 4 | Type | See values below |
| 4 | 4 | Priority | See values below |
| 8 | 4 | State | See values below |
| 12 | 4 | Unknown | |
| 16 | 16 | Job ID | The GUID that bitsadmin /list shows |
| 32 | Variable | Name | The display name |
| Variable | Description | Free text | |
| Variable | Notify program | Full path of the program to run | |
| Variable | Notify parameters | The whole command line; Microsoft requires the program as first parameter | |
| Variable | Owner SID | Text form, such as S-1-5-21-…-1119 | |
| 4 | Notify flags | Bit mask | |
| Variable | Further data | ANSSI calls it access_token; its content is not described | |
| 16 | XFER marker | {7756DA36-516F-435A-ACAC-44A248FFF34D} | |
| 4 | File count | ||
| 16 each | File GUIDs | Match the Id column of Files | |
| 16 | XFER marker | Again | |
| Variable | Metadata | Errors, 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.
| Value | Type | Priority |
|---|---|---|
| 0 | Download | Foreground |
| 1 | Upload | High |
| 2 | Upload-reply | Normal |
| 3 | Low |
| Value | State (BG_JOB_STATE) | What it tells you |
|---|---|---|
| 0 | Queued | Waiting to run. Microsoft notes that a job goes back to this state when its owner logs off during a transfer |
| 1 | Connecting | Contacting the server |
| 2 | Transferring | Moving data |
| 3 | Suspended | Every job starts here until it is resumed. Files and a notify command can already be set |
| 4 | Error | A non-recoverable error. A notify command runs when the job enters this state |
| 5 | Transient error | A recoverable error. BITS retries after the minimum retry delay, and moves the job to Error when the no-progress timeout expires |
| 6 | Transferred | Every file transferred, waiting for Complete. A notify command runs when the job enters this state |
| 7 | Acknowledged | Complete was called. A final state |
| 8 | Cancelled | Cancel 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
| Bit | Value | Meaning |
|---|---|---|
| 0 | 1 | Job transferred |
| 1 | 2 | Job error |
| 2 | 4 | Notifications disabled |
| 3 | 8 | Job modified |
| 4 | 16 | File 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
| Field | Size | ANSSI name | Velociraptor name |
|---|---|---|---|
| Error count | 4 | error_count | ErrorCount |
| Errors | 25 bytes each | code (8 bytes), four 32-bit values, one byte | |
| Transient error count | 4 | transient_error_count | TransientErrorCount |
| Retry delay, in seconds | 4 | retry_delay | RetryDelay |
| No-progress timeout, in seconds | 4 | timeout | NoProgressTimeout |
| Creation time | 8 | ctime | CreationTime |
| Modification time | 8 | mtime | ModificationTime |
| A time | 8 | other_time0 | Not read |
| Unknown | 14 | Padding | |
| A time | 8 | other_time1 | Not read |
| A time | 8 | other_time2 | ExpirationTime |
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
| Field | Encoding | Notes |
|---|---|---|
| Destination path | Length-prefixed UTF-16 | The local file name |
| Source URL | Length-prefixed UTF-16 | HTTP, HTTPS or an SMB path |
| Temporary path | Length-prefixed UTF-16 | A BIT*.tmp file in the destination folder |
| First byte count | 64-bit | BitsParser's DownloadByteSize |
| Second byte count | 64-bit | BitsParser's TransferByteSize |
| Unknown | 1 byte | |
| Drive | Length-prefixed UTF-16 | |
| Volume GUID | Length-prefixed UTF-16 | |
| A time | FILETIME, 29 bytes after the volume string | BitsParser: 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. ItsInJobsTablecolumn 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.
Related articles
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.