File & folder access
OneDrive sync client
OneDrive cheat sheet: account registry keys, SyncEngineDatabase.db and <CID>.dat metadata, ODL logs, SafeDelete.db, Files On-Demand and how to parse them.
- Location
- C:\Users\<user>\AppData\Local\Microsoft\OneDrive\
- Proves
- Which cloud account was linked and which files synced, uploaded or deleted
- Timestamps
- Sync DB lastChange and SafeDelete notificationTime as Unix epoch, UTC; ODL log entry times; account key LastWrite as FILETIME, UTC
- Retention
- Sync database rewritten continuously, removed items vanish; ODL logs rotate and compress with limited history; keys often survive unlinking
- Access
- User profile files; databases open while OneDrive runs: stop it or copy via VSS; keep general.keystore to decrypt ODL logs
- Evidence of
- File & folder accessNetwork & remote access
- Type
- File / file system
- Windows
- 1011
- KAPE target
- OneDrive_MetadataCloudStorage_OneDriveExplorer
- Velociraptor
- Windows.Triage.Targets:OneDrive_MetadataCloudStorage_OneDriveExplorer
Tools
Compare all toolsWhat it is
OneDrive is built into Windows 10 and 11 and is the default place where Microsoft 365 users keep documents. The sync client (OneDrive.exe) runs per user and records three kinds of evidence: account configuration in the user's registry, a metadata database describing every file and folder it knows about (including files that exist only in the cloud), and detailed binary logs of its operations.
This makes OneDrive a key source for data-theft cases: it shows which personal or business account was linked, what was synced to the machine, and when files were uploaded, downloaded or deleted.
Location
| Item | Path | Notes |
|---|---|---|
| Account configuration | NTUSER.DAT\Software\Microsoft\OneDrive\Accounts\Personal and ...\Accounts\Business1 (Business2…) | UserFolder, UserEmail, cid/UserCid; Tenants subkeys list synced libraries and shared folders |
| Settings | %LOCALAPPDATA%\Microsoft\OneDrive\settings\Personal\ and settings\Business1\ | <CID>.ini, <CID>.dat and <CID>.dat.previous (older clients) |
| Sync database | settings\<account>\SyncEngineDatabase.db | SQLite, used by current clients instead of <CID>.dat |
| Deletion database | settings\<account>\SafeDelete.db | SQLite, items the client sent to the Recycle Bin |
| Logs | %LOCALAPPDATA%\Microsoft\OneDrive\logs\Common\, logs\Personal\, logs\Business1\ | .odl, .odlgz, .odlsent, .aodl; general.keystore for decrypting obfuscated strings |
| Synced files | %USERPROFILE%\OneDrive\ or %USERPROFILE%\OneDrive - <Organisation>\ | Real path is in UserFolder |
What it proves
- Account link: which Microsoft account (e-mail, CID) or tenant was connected under this Windows user, and where it synced.
- Cloud inventory: names, sizes, hashes and status of files and folders in the account, even those never downloaded (Files On-Demand placeholders).
- Activity: ODL logs record uploads, downloads, renames, deletions and sync sessions.
- Deletions:
SafeDelete.dband the Recycle Bin show files the client deleted locally. - It does not show activity performed only on the web (OneDrive in a browser) or on another device, except as changes that later synced down. Use Microsoft 365 audit logs for that.
Key fields
| Source | Field | Meaning |
|---|---|---|
Registry Accounts\<account> | UserFolder | Local root of the synced folder |
Registry Accounts\<account> | UserEmail, cid/UserCid | Account identity; the CID also names the settings files |
SyncEngineDatabase.db → od_ClientFile_Records | fileName, resourceID, size, lastChange, fileStatus, sharedItem, localHashDigest | One row per file; fileStatus distinguishes local, online-only and excluded files |
SyncEngineDatabase.db → od_ClientFolder_Records | folderName, resourceID, folderStatus | Folder tree |
SyncEngineDatabase.db → od_GraphMetadata_Records | Created by / modified by | Who created and last modified the file in the cloud |
SyncEngineDatabase.db → od_HydrationData | First hydration | When an online-only file was first downloaded to the device |
SafeDelete.db → items_sent_to_recycle_bin | itemName, notificationTime | Deleted item and when it was sent to the Recycle Bin |
| ODL log entries | Timestamp, code file, function, parameters | Operation-level trace of the client |
Timestamps
| Timestamp | Set when | Format | Pitfalls |
|---|---|---|---|
lastChange (od_ClientFile_Records) | Last change the client recorded for the item | Unix epoch, UTC | Reflects sync state, not necessarily the user's edit time |
notificationTime (SafeDelete.db) | Item sent to the Recycle Bin by the client | Unix epoch, UTC | Pair with the $I file in the Recycle Bin |
| ODL entry time | Log line written | Stored in each entry | Logs roll over and older files are compressed to .odlgz; check the time zone your parser applies |
| Key last write time | Account key updated | FILETIME, UTC | Updated whenever the client writes to the key, not only at sign-in |
| Placeholder file times | Sync from cloud | NTFS, UTC | Dates may come from the cloud copy, not local activity |
Retention and clearing
- The sync database is rewritten continuously; removed items disappear from it, so keep older copies from volume shadow copies.
- ODL logs rotate and are compressed; only a limited history is kept on disk.
- Since around April 2022, sensitive strings in ODL logs are AES-encrypted with the key in
general.keystore(older versions used anObfuscationStringMap.txtdictionary). Collect the keystore with the logs. - Unlinking the account or uninstalling OneDrive removes much of
settings\; registry keys and logs often survive. Signing out does not delete synced files. - Files On-Demand (Windows 10 1709+) means a file visible in the folder may never have been on the disk; check
fileStatusor hydration data before claiming the user had a local copy.
Collection
- KAPE target:
OneDrive_Metadata(the whole%LOCALAPPDATA%\Microsoft\OneDrivefolder);CloudStorage_OneDriveExploreraddsRegistryHivesUserandRecycleBinfor OneDriveExplorer.OneDrive_UserFilescollects the synced files themselves. - Velociraptor (
Windows.Triage.Targets):OneDrive_Metadata,CloudStorage_OneDriveExplorer. - Built-in: stop OneDrive or copy from a shadow copy (the databases are open while it runs).
robocopy C:\Users\alice\AppData\Local\Microsoft\OneDrive E:\case\OneDrive /E /COPY:DAT
reg query "HKU\<SID>\Software\Microsoft\OneDrive\Accounts" /s
Parsing tools
- OneDriveExplorer (Brian Maloney, open source): rebuilds the OneDrive folder tree from
<CID>.datorSyncEngineDatabase.db, adds registry, Recycle Bin and ODL log data, and exports CSV, JSON or HTML. - odl.py (Yogesh Khatri, open source): parses
.odl,.odlgz,.odlsentand.aodllogs and decrypts strings withgeneral.keystoreor deobfuscates them with the older string map. - Registry Explorer / RECmd (Eric Zimmerman): review the
OneDrive\Accountskeys in NTUSER.DAT. - DB Browser for SQLite: query
SyncEngineDatabase.dbandSafeDelete.dbdirectly.
Investigation tips
- A personal account (
Accounts\Personal) on a corporate laptop is a classic exfiltration channel: list its files and search the ODL logs for uploads in the relevant window. - Correlate uploads with SRUM bytes sent by
OneDrive.exeand with the USN journal entries for files copied into the sync folder. - Online-only files carry cloud metadata; use
od_HydrationDatato show when one was first opened on this device. - Mass deletions in
SafeDelete.dband the Recycle Bin can point to anti-forensics or ransomware activity. - Check the web side too: browser artifacts show OneDrive or SharePoint access in a browser, and Microsoft 365 audit logs cover activity from other devices.
Related artifacts
- Recycle BinRecycle Bin cheat sheet: $Recycle.Bin $I and $R files, $I version 1 vs 2, XP INFO2, deletion time, original path and size, emptying and Shift+Delete traces.
- USN Journal ($UsnJrnl:$J)USN journal cheat sheet: $UsnJrnl:$J and $Max, record fields, reason flags, parent references, default size, rollover, fsutil and MFTECmd parsing.
- Master File Table ($MFT)$MFT cheat sheet: FILE records, $SI vs $FN timestamps, resident data, deleted records, sequence numbers, timestomping checks and MFTECmd parsing.
- Browser artifacts (Chrome, Edge, Firefox)Browser forensics cheat sheet: Chromium and Firefox profile files, History and places.sqlite tables, WebKit and PRTime timestamps, downloads, cookies, cache.
- Registry hivesRegistry hives cheat sheet: SYSTEM, SOFTWARE, SAM, SECURITY, NTUSER.DAT, UsrClass.dat, transaction logs, RegBack, LastWrite times and collection.
- Microsoft Teams (classic and new client)Microsoft Teams cheat sheet: classic vs new Teams data folders, IndexedDB LevelDB messages and call logs, logs, and Purview or Graph exports as the reference.
Glossary terms
- NTUSER.DATThe per-user registry hive stored in each Windows profile and loaded as HKEY_CURRENT_USER, rich in user activity and persistence traces.
- UTC vs local time in Windows artifactsWhy some Windows artifacts record UTC and others local time, and how the TimeZoneInformation registry key helps normalize a forensic timeline.
- Triage collectionTargeted acquisition of high-value artifacts (hives, event logs, $MFT, Prefetch) instead of a full disk image, using KAPE or Velociraptor.
- Anti-forensicsTechniques used to destroy, hide or falsify evidence, such as log clearing, timestomping, wiping and deleting shadow copies or the USN journal.