Home/Refreshers/macOS host triage: refresher
macOS host triage
What to capture first on a suspect Mac, where persistence hides, and which artifacts answer which question.
Remember
- Full memory capture is not practical on current Macs. Capture running state and the unified log instead.
- Capture the unified log first. A busy Mac may keep only days of it.
- Reading the system privacy database needs Full Disk Access for your terminal.
- A device management service can collect and isolate faster than hands on the machine.
| Persistence | Where |
|---|---|
| Launch agents and daemons | ~/Library/LaunchAgents/, /Library/LaunchAgents/, /Library/LaunchDaemons/ |
| Login items and background tasks | sudo sfltool dumpbtm, on macOS 13 and later |
| Configuration profiles | sudo profiles list |
| Extensions | systemextensionsctl list |
| Shell start-up | ~/.zshrc, ~/.zshenv, /etc/zshrc |
| Sign-in plug-ins | /Library/Security/SecurityAgentPlugins/ |
Collect
| The unified log | sudo log collect --last 3d --output host.logarchive |
| Processes, with start times | ps -axo pid,ppid,user,lstart,command |
| Connections | lsof -nP -i |
| Where a file came from | xattr -p com.apple.quarantine <file> |
Watch out
- The download history with addresses is in ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2.
- What was granted disk, camera, or screen access is in the TCC databases, one per user and one for the system.
Check it worked
The log archive, the persistence listings, and the TCC databases are copied off the Mac and hashed.