CyberKit

macOS Artifacts

macOS forensic artifacts, indexed by the question each one answers.

macOS gives you a few unusually rich artifacts and then makes some of them hard to reach. The unified log answers most questions and ages out fastest. The quarantine database says where a file came from better than anything on Windows.

Before you read the table

  • Collect the unified log first. Retention depends on volume and is often only days.
  • System Integrity Protection blocks some reads even as root. The system TCC database is readable from an image, not from the live system.
  • KnowledgeC, Safari history and other SQLite stores count seconds from 2001-01-01, not the Unix epoch.

17 rows.

macOS artifacts
PathQuestionWhat it records
/var/db/diagnostics/ (unified log)What happened on this machine, at system level?The unified log: process execution, network activity, authentication, kernel and security events, all in one stream. On modern macOS this is the primary source and it replaces most of what used to be scattered text logs.
/var/log/install.logWhat software was installed, and when?Installer and software update activity with timestamps. Retained far longer than the unified log, which makes it useful for older windows.
~/Library/LaunchAgents/ · /Library/LaunchAgents/ · /Library/LaunchDaemons/What runs automatically, and as whom?launchd property lists, the primary macOS persistence mechanism. The three locations differ in privilege: the user one runs as that user at login, /Library/LaunchAgents runs as any user at login, and /Library/LaunchDaemons runs as root at boot. Read ProgramArguments, RunAtLoad and StartInterval.
~/Library/Preferences/com.apple.loginitems.plist · Background Task ManagementWhat launches when this user logs in, outside launchd?Login items. On Ventura and later these are surfaced through Background Task Management, which also records items registered by applications, and the user is prompted when one is added.
/etc/periodic/ · /usr/local/bin · cronIs anything scheduled the old way?Periodic scripts and any surviving cron entries. Cron still works on macOS and is less watched than launchd precisely because launchd is the documented mechanism.
~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2Where did this file come from?The quarantine database: what was downloaded, the URL it came from, which application fetched it, and when. One of the most directly useful artifacts on the platform for establishing how something arrived.
com.apple.quarantine extended attributeIs this specific file marked as downloaded?The per-file quarantine flag, carrying the same provenance data as the database but attached to the file itself, which survives being moved.
/.fseventsd/What filesystem activity happened, including on files now deleted?Filesystem event records: creations, renames, deletions and modifications, per volume. Survives the deletion of the files themselves, which makes it one of the few places to see what was there.
~/Library/Application Support/com.apple.knowledgestore/KnowledgeC.dbWhich applications were used, when, and for how long?Application focus and usage events with timestamps and durations. Effectively the macOS equivalent of UserAssist, and considerably richer.
~/.zsh_history · ~/.bash_historyWhat commands did this user type?Shell history. zsh is the default shell on modern macOS, so check that first.
~/Library/Preferences/com.apple.recentitems.plist · sfl2 filesWhat documents, servers and applications were used recently?Recent items, including mounted servers and connected shares, which is where outbound lateral movement shows up.
.DS_StoreWhat files were in a folder that no longer has them?Finder view metadata, which incidentally records the names of files present when the folder was last viewed. It survives the files themselves and is frequently copied onto shares and USB media by accident.
~/Library/Safari/History.db · Chrome and Firefox profilesWhat was browsed, and what was downloaded?Browsing and download history. Safari stores it as SQLite in the user library, with the same Mac-absolute-time caveat as KnowledgeC.
/Library/Application Support/com.apple.TCC/TCC.db · ~/Library/.../TCC.dbWhat was granted access to the camera, microphone, disk or automation?Transparency, Consent and Control decisions. An entry granting Full Disk Access or Accessibility to an unexpected binary is a strong finding, because those two permissions are what malware needs to be useful.
System Integrity Protection statusAre the OS protections still on?Whether SIP is enabled. Disabling it requires a reboot into recovery and physical or remote-management access, so a disabled SIP is a significant finding in itself.
/var/db/ConfigurationProfiles/Is a configuration profile installed?Configuration profiles, which can set proxies, install trusted certificates, add login items and restrict settings. A malicious profile is a durable and often-missed foothold that needs no code on disk.
/etc/localtime · systemsetup -gettimezoneWhat timezone is this machine in?The timezone local-time entries are written in. Read it before building a timeline.

Related

All references