DataUsage.sqlite and netusage.sqlite on iOS
Per-process network usage on iOS in DataUsage.sqlite and netusage.sqlite: process names, first and last seen times, bytes, and spyware indicators.
- Location
- /private/var/wireless/Library/Databases/DataUsage.sqlite and /private/var/networkd/netusage.sqlite (older: /private/var/networkd/db/netusage.sqlite)
- Evidence area
- Proves
- Which processes and apps used cellular (and on some builds Wi-Fi) data, when each was first and last seen, and how many bytes they moved
- Timestamps
- Cocoa time in seconds (ZFIRSTTIMESTAMP, ZTIMESTAMP), UTC
- Acquisition
- DataUsage.sqlite reaches an iTunes / Finder backup (WirelessDomain), as MVT's backup checks rely on. netusage.sqlite needs a full file system extraction
- Retention
- Process rows persist for long periods, often months; usage rows are aggregated and pruned. The database is reset by Reset Network Settings or a restore
- Collection
- idevicebackup2, Full file system extraction
Tools
Compare all toolsWhat it is
iOS keeps two Core Data SQLite databases that account for network traffic per process. DataUsage.sqlite, maintained by the wireless stack, is what feeds the cellular data list in Settings. netusage.sqlite, maintained by networkd, tracks usage and connection performance more broadly. Both share the same core tables: ZPROCESS names each process or app, and ZLIVEUSAGE records its traffic.
For most cases they show which apps used mobile data. For compromise investigations they are much more important: they record process names, not only app bundles, so a daemon that never appears in the app list can still leave its name here. Several published mercenary spyware indicators were first found in these tables, and MVT checks both.
Where it lives
| Source | Path | Notes |
|---|---|---|
| Full file system | /private/var/wireless/Library/Databases/DataUsage.sqlite (+ -wal, -shm) | Cellular data accounting |
| Full file system | /private/var/networkd/netusage.sqlite | Older builds: /private/var/networkd/db/netusage.sqlite |
| iTunes / Finder backup | WirelessDomain, Library/Databases/DataUsage.sqlite | Stored as 0d/0d609c54856a9bb2d56729df1d68f2958a88426b |
netusage.sqlite is not in backups. Resolve the backup copy through Manifest.db rather than trusting the hashed name blindly.
What it proves
- That a process or app with a given name existed on the device and generated network traffic.
- When the process was first recorded (
ZFIRSTTIMESTAMP) and last updated (ZTIMESTAMP). - Approximate volumes: bytes in and out over cellular (WWAN) and, on some builds, Wi-Fi.
- Processes that have a name but no bundle ID, which is normal for system daemons and worth reviewing against known lists.
It does not give destinations, domains or IP addresses. Volumes are aggregated and do not map to individual sessions.
Key fields
| Table / column | Meaning |
|---|---|
ZPROCESS.ZPROCNAME | Process name, e.g. com.apple.WebKit.Networking or a bare daemon name |
ZPROCESS.ZBUNDLENAME | Bundle ID when the process belongs to an app; can be empty |
ZPROCESS.ZFIRSTTIMESTAMP, ZTIMESTAMP | First seen and last updated |
ZLIVEUSAGE.ZHASPROCESS | Foreign key to ZPROCESS.Z_PK |
ZLIVEUSAGE.ZWWANIN, ZWWANOUT | Cellular bytes in and out |
ZLIVEUSAGE.ZWIFIIN, ZWIFIOUT | Wi-Fi bytes, absent on recent builds |
ZLIVEUSAGE.ZTIMESTAMP | Last update of the usage row |
ZLIVEUSAGE.ZKIND | Row kind; values are not documented |
MVT's own code notes that recent phones lack the Wi-Fi columns: check with .schema ZLIVEUSAGE before running a canned query.
Timestamps
All date columns are Cocoa time in seconds, UTC.
SELECT p.ZPROCNAME, p.ZBUNDLENAME,
datetime(p.ZFIRSTTIMESTAMP + 978307200, 'unixepoch') AS first_seen_utc,
datetime(p.ZTIMESTAMP + 978307200, 'unixepoch') AS last_seen_utc,
u.ZWWANIN, u.ZWWANOUT,
datetime(u.ZTIMESTAMP + 978307200, 'unixepoch') AS usage_updated_utc
FROM ZPROCESS p
LEFT JOIN ZLIVEUSAGE u ON u.ZHASPROCESS = p.Z_PK
ORDER BY p.ZFIRSTTIMESTAMP;
Also list processes with no usage row at all (WHERE p.Z_PK NOT IN (SELECT ZHASPROCESS FROM ZLIVEUSAGE)): MVT treats them as a separate set, and a deleted usage row can leave its process behind.
Retention
Process rows can survive for months, which makes these databases valuable for historical compromise checks. Usage totals are rolled up and pruned. Resetting network settings, restoring the device or migrating to a new phone can reset them. Report the earliest ZFIRSTTIMESTAMP you found as the practical start of coverage.
Collection
- A standard backup gives
DataUsage.sqlite; MVT'scheck-backupreads it directly. - A full file system adds
netusage.sqliteand the WAL files. Collect all three files of each database together. - Keep the iOS version with the evidence: the Wi-Fi columns and
ZKINDvalues change between releases.
Parsing
- MVT extracts both databases (
Datausagein backup and file system mode,Netusagein file system mode) and matches process names against indicator files. It also flags process rows whose usage row is missing. - iLEAPP and APOLLO (
datausage_*,netusage_*modules) produce timelines, including route performance data fromnetusage.sqlite. sqlite3with the query above for a quick review.
Investigator tips
- A short, odd process name with no bundle ID is a lead, not a finding. Compare against a baseline device on the same iOS build before calling it suspicious.
- Correlate a suspicious name with shutdown.log, crash reports and JetsamEvent files: the same name in several independent sources is far stronger than one hit.
- App bundle IDs here also show apps that were used and later deleted; cross-check with installed apps.
- Follow the spyware triage guide for the full workflow and the limits of indicator matching.