macOS leaves execution and usage traces in many places at once, and the strength of a macOS finding is usually corroboration across two or more of them. A program that ran leaves a Unified Log entry, a quarantine record, and often a Spotlight or FSEvents trace; a file that was opened leaves a TCC decision, a Recent Items entry, and a metadata store record. This skill covers the offline workflow: extract the artifacts from a forensic image or triage package, parse them on your workstation, normalize every timestamp to UTC, and build the story from the artifacts that agree. Scope is authorized forensic work only: analyze systems you are authorized to examine, treat log and database contents as sensitive because they record user behavior in detail, and work on a copy, never on the original evidence.
Quick Workflow
- Preserve first: image the disk or take a triage package, hash the image, and record the collection method, tool, and time.
- Inventory the artifact set before parsing: Unified Logs, Spotlight stores, FSEvents files, TCC databases, browser profiles, Time Machine data, and quarantine records.
- Normalize timestamps to UTC and record the source timezone offset for every artifact class, because macOS stores times in different epochs and formats.
- Parse each artifact class with a dedicated tool, not by hand, and keep the raw output beside the parsed output.
- Build a single timeline, then corroborate: a finding counts as strong only when two independent artifacts agree on it.
- Resolve conflicts explicitly: when artifacts disagree, say which one you trust and why, usually recency and write path.
- Write the report from the timeline, with artifact paths, hashes, and exact query predicates so another analyst can reproduce it.
1. Unified Logs
Unified Logs are the richest macOS artifact and the hardest to use well.
On a live host, log show queries the log store with predicates; on a
collected logarchive, the same predicates run against the archive. The
log store is voluminous, so always scope by time window and predicate,
never dump everything.
log show --archive /path/to/collected.logarchive \
--predicate 'process == "launchd"' --start "2026-10-20 00:00:00" --end "2026-10-27 00:00:00" \
--style syslog 2>/dev/null | head -100
log show --archive /path/to/collected.logarchive \
--predicate 'subsystem == "com.apple.TCC" AND eventMessage CONTAINS "auth"' \
--last 24h --style json 2>/dev/null | jq -r '.timestamp, .eventMessage' | head -100
What to look for: process executions and their arguments, TCC allow and deny decisions with the requesting app and service, launchd service starts, Gatekeeper assessments, and authentication events. A single log line proves little; a sequence (download, quarantine, Gatekeeper check, first launch, TCC prompt, TCC grant) proves a chain. Record the exact predicate in the report, because a finding without its query is not reproducible.
2. Spotlight metadata stores
Spotlight indexes file metadata in per-volume stores, and those stores
survive file deletion longer than the files themselves. A deleted file
may still appear in the Spotlight store with its name, path, kind,
timestamps, and content keywords. The store lives under
.Spotlight-V100 on each volume, with a store.db that can be parsed
offline.
ls -la /Volumes/evidence/.Spotlight-V100/ 2>/dev/null
mdutil -s /Volumes/evidence 2>/dev/null
mdfind -onlyin /Volumes/evidence "kMDItemKind == 'Application'" 2>/dev/null | head -50
On a live host, mdfind queries the running index; on an image, parse
the store with a dedicated parser on your workstation and treat the
results as lead evidence, not proof of current existence. Corroborate a
Spotlight hit with an FSEvents record or a filesystem entry before
claiming the file existed at a given time, because the index can lag
behind filesystem changes and can retain stale entries.
3. FSEvents timelines
FSEvents records filesystem changes per volume in a compressed log under
.fseventsd. It is the macOS equivalent of a filesystem journal for
timeline purposes: it tells you which paths changed and when, but not
the content of the change. Parse it into a timeline and join it against
the Unified Logs and the filesystem metadata.
ls -la /Volumes/evidence/.fseventsd/ 2>/dev/null
python3 -c "import gzip, sys; data = gzip.open(sys.argv[1], 'rb').read(); print(len(data), 'bytes decompressed')" /Volumes/evidence/.fseventsd/0000000000000001 2>/dev/null
In practice, use a dedicated FSEvents parser on your workstation rather than hand-rolling decompression, and feed its output into the same timeline tool as the log output. What FSEvents answers best: when a directory tree changed, when a new application appeared, and when a persistence location (LaunchAgents, LaunchDaemons) was written. What it cannot answer: who made the change or what the new content was, which is why it must be joined with logs and file hashes.
4. TCC.db permission analysis
The TCC database records which apps were granted or denied access to protected services, and it is a direct record of user consent and of abuse. There is a system database and a per-user database; collect both, and note that the system database requires elevated access to read on a live host, which is itself a reason to work from an image.
sqlite3 /path/to/collected/TCC.db \
"SELECT service, client, client_type, auth_value, last_modified FROM access ORDER BY last_modified DESC;" | head -100
sqlite3 /path/to/collected/TCC.db \
"SELECT service, client, auth_value FROM access WHERE service IN ('kTCCServiceSystemPolicyAllFiles', 'kTCCServiceAccessibility', 'kTCCServiceScreenCapture', 'kTCCServiceMicrophone', 'kTCCServiceCamera');"
Interpretation guide: auth_value 2 means allowed and 3 means allowed
with additional scope in recent macOS versions, while 0 means denied;
always confirm the mapping against the macOS version of the evidence,
because the values have shifted across releases. A broad grant (Full
Disk Access) to an unusual app, a grant timestamped just before an
incident window, or a grant to an app whose bundle no longer exists on
disk are all findings worth reporting. Join each grant against the
Unified Log TCC decisions for the same service to confirm it was
exercised, not merely granted.
5. Safari and Chrome artifacts
Browser artifacts answer what the user did on the web: pages visited, files downloaded, searches run, and credentials or sessions that may have been abused. Safari stores history in a SQLite database under the user Library, Chrome stores history, downloads, and cookies in its profile directory. Parse both on the workstation, never by opening the browser against the evidence.
sqlite3 /path/to/collected/History.db \
"SELECT datetime(visit_time + 978307200, 'unixepoch') AS visited, url, title FROM history_visits JOIN history_items ON history_visits.history_item = history_items.id ORDER BY visited DESC LIMIT 50;"
sqlite3 /path/to/collected/ChromeHistory \
"SELECT datetime(last_visit_time/1000000 - 11644473600, 'unixepoch') AS visited, url, title FROM urls ORDER BY visited DESC LIMIT 50;"
sqlite3 /path/to/collected/ChromeHistory \
"SELECT datetime(start_time/1000000 - 11644473600, 'unixepoch') AS downloaded, target_path, tab_url FROM downloads ORDER BY downloaded DESC LIMIT 50;"
The epoch offsets matter and are a classic error source: Safari timestamps are seconds since 2001-01-01, Chrome timestamps are microseconds since 1601-01-01, and the queries above already apply those offsets. Verify one known timestamp by hand (a visit you can confirm from another artifact) before trusting the whole table. Join download paths against FSEvents and quarantine records to confirm the file actually landed on disk and was then executed.
6. Time Machine and local snapshots
Time Machine backups and APFS local snapshots are a time machine in the literal sense: they let you recover earlier versions of files, earlier TCC databases, and earlier persistence locations. Enumerate backups and snapshots before concluding that a deleted artifact is gone.
tmutil listbackups /Volumes/TimeMachine 2>/dev/null
tmutil listlocalsnapshots / 2>/dev/null
tmutil listbackups -d /Volumes/TimeMachine 2>/dev/null | head -20
For each backup in the incident window, extract the same artifact set (TCC.db, LaunchAgents, browser history) and diff it against the current state. A LaunchAgent present in an old backup but absent now, or a TCC grant that existed then and was revoked later, is evidence of cleanup and belongs in the timeline with both timestamps. Treat backup timestamps with the same UTC normalization as every other artifact.
7. Quarantine and execution artifacts
macOS marks downloaded files with a quarantine extended attribute, and Gatekeeper records its assessment. The quarantine attribute names the origin application and, often, the download URL, which ties a file on disk to a browser download and to a Gatekeeper decision.
xattr -l /path/to/suspect.app 2>/dev/null
xattr -p com.apple.quarantine /path/to/suspect.app 2>/dev/null
spctl -a -vv /path/to/suspect.app 2>&1 | head -20
ls -la ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2 2>/dev/null
A quarantine record plus a Gatekeeper allow plus a first-launch log line is a complete execution chain. A file with no quarantine attribute that arrived by a non-browser path (a script, a mounted disk image, a package installer) is also informative: it tells you the delivery vector was not a normal download, and the investigation should pivot to installer logs and mount records.
Edge cases
- Unified Logs rotate and age out: the default retention window may not cover the incident, so check the logarchive date range first and say plainly when the window is missing, rather than treating absence as proof nothing happened.
- Spotlight stores are per-volume and rebuild on demand, so an index rebuilt after the incident loses stale entries; note the store creation time when you rely on it.
- FSEvents files are gzip-compressed and paged, and the earliest pages may already be overwritten on a busy volume; the timeline start date is the earliest FSEvents page, not the incident start.
- TCC database schema and
auth_valuemeanings change across macOS versions; confirm the schema against the evidence host version before interpreting values. - Safari and Chrome epoch offsets differ from each other and from Unix time; a single wrong offset shifts every timestamp by years, so verify one timestamp by hand before trusting a parsed table.
- Time Machine backups may be encrypted or stored on a network volume you cannot mount offline; record the backup set you could and could not access, and do not claim completeness you do not have.
- APFS snapshots and clones share blocks, so a file that appears in a snapshot may be the same data as the current file; hash before claiming two copies are two versions.
- Quarantine attributes are stripped by some transfer methods (archived copies, certain sync tools), so a missing quarantine attribute does not prove a file was never downloaded.
Key references
- Apple Platform Security Guide, logging, TCC, and Gatekeeper documentation: https://support.apple.com/guide/security/welcome/web
- Unified Logs reference and log show predicate syntax in Apple developer documentation: https://developer.apple.com/documentation/os/logging
- MITRE ATT&CK macOS data sources for log, file, and process artifacts: https://attack.mitre.org/matrices/enterprise/macos/
- The companion privesc skill privesc-macos for the TCC abuse and launchd vectors whose traces this skill recovers, and the companion hardening skill defensive-macos-hardening for the controls that preserve these artifacts (log retention, TCC auditing, backup policy) on a managed fleet.
