The ukg.db Schema and Timestamps in Readable Stores
Recall's ukg.db as public research documents it: WindowCapture events, apps, URLs, OCR text, image tokens, epoch-millisecond times, and what is still unknown.
TL;DR. In a readable Recall store, ukg.db is an ordinary SQLite database. The centre is WindowCapture: one row per window event, with the event type in Name (WindowCaptureEvent for a snapshot), the window's title and ID, a TimeStamp in Unix epoch milliseconds, UTC, and, for snapshots, an ImageToken that names the JPEG in ImageStore\. The application comes from App through WindowCaptureAppRelation; the OCR text is column c2 of WindowCaptureTextIndex_content, joined on c0. Each JPEG repeats much of its row's metadata in an EXIF MakerNote. This article documents what CyberCX, BDO, Kaspersky and TotalRecall found, and marks what nobody has published. The tool on this site reads these tables, with the WAL, into a timeline.
Which stores this applies to
Only stores that open as SQLite: in practice, the pre-release builds of May and June 2024 that researchers enabled on test machines. Released builds keep the file name, but the file is encrypted (Recall's versions). Every source below worked on the 2024 builds, except Hagenah's 2026 list, which he extracted from strings in the enclave binary of a released build and could not read from a database file.
Microsoft does not document ukg.db. Table and column names come from the files and from that binary. Read sqlite_schema in the database you have and check each column before you rely on it.
The tables
| Table | What it holds | Columns seen in 2024 stores | Also in Hagenah's 2026 list |
|---|---|---|---|
WindowCapture | One row per window event | Id, Name (event type), WindowId, WindowTitle, TimeStamp, ImageToken, IsForeground, WindowBounds | Properties, IsProcessed, Retry, ActivationUri, ActivityId, FallbackUri, DwellTime |
App | Programs whose windows were seen | Id, Name, Path | WindowsAppId, IconUri, TileId, Properties |
WindowCaptureAppRelation | Links an event to an application | WindowCaptureId, AppId | IsBackground |
WindowCaptureTextIndex_content | Content of the full-text index | c0 (WindowCapture Id), c1, c2 (OCR text) | The index is declared as FTS5 over WindowCaptureId, WindowTitle, OcrText |
AppDwellTime | Time spent per application | WindowsAppId, DwellTime, time fields | HourOfDay, DayOfWeek, HourStartTimestamp |
Web, WindowCaptureWebRelation | URLs and domains, linked to events | CyberCX reports URLs in the database without listing the columns | Web: Domain, Uri, IconUri; relation: WindowCaptureId, WebId, IsBackground |
File, Topic | Files and topics | Present but empty in CyberCX's tests | With relation tables to WindowCapture |
Hagenah's list also has ScreenRegion, WebDomainDwellTime, SearchHistory and SearchFeedback (the user's own searches in Recall), IdTable and _MigrationMetadata. Whether the 2024 stores have them is not published; Kaspersky counted 20 tables in the 2024 beta. If you meet a readable store with a SearchHistory table, its rows say what the user looked for in their own history, which is worth reading.
Event types
WindowCapture.Name holds the event type:
| Event | Meaning | Notes |
|---|---|---|
WindowCreatedEvent | A window appeared | First row for a WindowId; can be linked to a process |
WindowChangedEvent | A window changed, for example its title | Follow one window through its WindowId: a browser window's title changes as the user moves between pages |
WindowCaptureEvent | A snapshot was taken | Has the ImageToken; the OCR text is indexed for these rows only |
WindowDestroyedEvent | A window closed | No title (BDO) |
ForegroundChangedEvent | Focus moved | Kaspersky found little of use in it |
Two consequences. First, the window events give a finer timeline than the snapshots: a title change can be recorded without a snapshot. CyberCX found that the title changes of a private browser window were still recorded, although the window itself was cut out of every image. Second, OCR text exists only for snapshots, so a text search misses what was on screen between them.
Joining events to applications
WindowCaptureAppRelation does not link every event. CyberCX's method, also used in the Velociraptor artifact Windows.System.Recall.AllWindowEvents, finds the application once per WindowId and applies it to every event of that window:
-- Window events with the application, attributed per WindowId
SELECT datetime(wc.TimeStamp / 1000, 'unixepoch') AS time_utc,
wc.Name AS event, wc.WindowId, wc.WindowTitle, wc.ImageToken,
app.Name AS app_name, app.Path AS app_path
FROM WindowCapture AS wc
LEFT JOIN (
SELECT DISTINCT c.WindowId, r.AppId
FROM WindowCapture AS c
JOIN WindowCaptureAppRelation AS r ON r.WindowCaptureId = c.Id
WHERE c.WindowId IS NOT NULL
) AS wa ON wa.WindowId = wc.WindowId
LEFT JOIN App AS app ON app.Id = wa.AppId
ORDER BY wc.TimeStamp;
If one WindowId is linked to two applications, this returns the event twice; check for duplicates before you count. For the OCR text:
-- Snapshots with their OCR text
SELECT datetime(wc.TimeStamp / 1000, 'unixepoch') AS time_utc,
wc.WindowTitle, wc.ImageToken, t.c2 AS ocr_text
FROM WindowCaptureTextIndex_content AS t
JOIN WindowCapture AS wc ON wc.Id = t.c0
WHERE t.c2 IS NOT NULL
ORDER BY wc.TimeStamp;
Run queries on a copy, never on the original: opening a database in WAL mode with a normal SQLite client can checkpoint the WAL into it and change both files.
CyberCX's test shows what the OCR text can hold: commands typed in Windows Terminal, with their output, searchable as text. Expect OCR errors (l for 1, merged words), and check every hit against the image.
Timestamps
| Value | Format | Notes |
|---|---|---|
WindowCapture.TimeStamp | Unix epoch milliseconds, UTC | CyberCX converts with datetime(TimeStamp/1000, 'unixepoch'); TotalRecall divides by 1000 |
| MakerNote times in the JPEG | Windows FILETIME (100 ns since 1601, UTC) | CyberCX's type 0x0E |
AppDwellTime times | Not documented | BDO found it hard to tell when these rows are created |
File system times of ImageStore files | NTFS, UTC | No published comparison with TimeStamp; compare them yourself |
An example: 1789377127412 is 2026-09-14 09:12:07.412 UTC. In SQLite, datetime(1789377127412 / 1000, 'unixepoch') gives 2026-09-14 09:12:07; keep the milliseconds when you order events.
Two traps. The 2024 TotalRecall script converts with Python's datetime.fromtimestamp, which gives the local time of the analysis machine, not UTC: a report built from its output can be off by the analyst's offset. And a snapshot's time is when Recall took it, not when the content appeared: a window that opened at 09:12:05 may first appear in a snapshot at 09:12:09.
The images
In the 2024 stores, ImageStore\ holds one file per snapshot, named after its image token (a GUID), with no extension. The files are JPEG; TotalRecall adds .jpg to its copies so that a viewer opens them. Do not rename the originals.
CyberCX found that each JPEG carries the snapshot's metadata in the EXIF MakerNote tag (0x927C), as a list of key-value pairs: a length-prefixed UTF-8 key, then a typed value.
| Type | Value |
|---|---|
0x04, 0x05 | 32-bit integer |
0x06, 0x07 | 64-bit integer |
0x0B | One byte, a boolean |
0x0C | UTF-8 string with a length prefix |
0x0D | Unknown: a GUID followed by two integers |
0x0E | 64-bit FILETIME |
0x13 | 32-bit float |
Kaspersky lists what the MakerNote holds: the foreground window's bounds, the capture time, the window title and ID, the full path of the process, and in some cases the browser URI and domain. So an image found without its database can still be dated and attributed. Microsoft's documented export format, for users in the EEA, uses the same tag for the metadata of exported snapshots (Decrypt exported snapshots).
A snapshot is an image of the screen, not of one window: other windows and the taskbar can be in it. IsForeground and the title say which window the row is about.
The WAL and deleted rows
When ukg.db-wal exists, it can hold committed transactions that are not yet copied into the database: often the most recent snapshots. A reader that ignores the WAL stops early. Copy ukg.db, ukg.db-wal and ukg.db-shm together, in one pass, and keep them side by side.
Rows deleted by the user, by retention or by policy may survive in free pages or in older WAL frames until they are overwritten, as in any SQLite database. Nobody has published a study of what Recall's deletions leave behind, so treat a recovered row as a lead and say how you found it. Older copies of the whole store can also sit in Volume Shadow Copies.
Checks on a readable store
- Schema. List the tables and columns from
sqlite_schema. Note any table or column that differs from the lists above. - Counts. Compare the number of
WindowCaptureEventrows with the number of files inImageStore\. Tokens without a file and files without a row both need an explanation: retention, deletion or an incomplete copy. - Range. Note the first and last
TimeStamp, and look for gaps in hours when the user was known to work. A gap can be a pause, a filter, a locked screen or a deletion. - Attribution. The store sits in one user's profile. The folder path is your attribution; note it.
For a complete case on this kind of store, see the FIN-WKS-07 walk-through.
FAQ
What time format does ukg.db use?
The TimeStamp column of the WindowCapture table holds Unix epoch milliseconds, which are UTC by definition. CyberCX's queries divide it by 1000 and convert it with SQLite's unixepoch modifier. Watch the tool you use: the 2024 TotalRecall script prints it in the local time of the machine that runs the script.
Which table holds the OCR text?
WindowCaptureTextIndex_content, the content table of a full-text index. Column c0 is the Id of the WindowCapture row and c2 is the OCR text of the snapshot. Column c1 most likely holds the window title, from the column order Hagenah found in later builds; the 2024 write-ups do not describe it.
How do I find the screenshot for a row?
Take the ImageToken of a WindowCaptureEvent row and open the file of the same name in the ImageStore folder next to ukg.db. In the 2024 stores, the files are JPEG images without an extension.
Is the schema the same in released builds?
The core tables have the same names in the list Hagenah extracted from a 2026 build, with more columns. That does not help offline, because released builds encrypt the file. On a readable store, read the schema from the file itself rather than assuming any column exists.
Related articles
Frequently asked questions
What time format does ukg.db use?
The TimeStamp column of the WindowCapture table holds Unix epoch milliseconds, which are UTC by definition. CyberCX's queries divide it by 1000 and convert it with SQLite's unixepoch modifier. Watch the tool you use: the 2024 TotalRecall script prints it in the local time of the machine that runs the script.
Which table holds the OCR text?
WindowCaptureTextIndex_content, the content table of a full-text index. Column c0 is the Id of the WindowCapture row and c2 is the OCR text of the snapshot. Column c1 most likely holds the window title, from the column order Hagenah found in later builds; the 2024 write-ups do not describe it.
How do I find the screenshot for a row?
Take the ImageToken of a WindowCaptureEvent row and open the file of the same name in the ImageStore folder next to ukg.db. In the 2024 stores, the files are JPEG images without an extension.
Is the schema the same in released builds?
The core tables have the same names in the list Hagenah extracted from a 2026 build, with more columns. That does not help offline, because released builds encrypt the file. On a readable store, read the schema from the file itself rather than assuming any column exists.