agentleFS
kaandgnshkaandgnsh/Claude-Blue/skills/endpoint-security/macos-triage/SKILL.md

macos-triage

Skill0 starsChanged 15 days agoMITView on GitHub

Triage a potentially compromised Mac — unified logs, running processes and code signatures, quarantine attributes, network connections, TCC permissions, installed profiles and persistence — using built-in tools and Aftermath/mac_apt. Use when investigating macOS malware alerts (infostealers, adware, backdoors), suspicious logins, or MDM/EDR detections on Apple endpoints.

  • Sends data out

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

macOS Triage

Collection

sudo log collect --last 3d --output ~/Desktop/host.logarchive     # unified log archive (preserve)
ps -axo pid,ppid,user,lstart,command > ps.txt
lsof -i -n -P > lsof_net.txt
sudo sfltool dumpbtm > btm.txt                                     # Background Task Management items (macOS 13+)
profiles list -all > profiles.txt 2>&1                             # configuration profiles (malicious MDM/proxy profiles)
ls -la ~/Library/LaunchAgents /Library/LaunchAgents /Library/LaunchDaemons > launchd_ls.txt

Aftermath (Jamf, open source) and mac_apt automate collection/parsing; Velociraptor and osquery also support macOS.

Checks

QuestionCommand
Signed/notarized?codesign -dvvv /path/to/App.app; spctl -a -vvv -t exec /path/to/App.app
Where did it come from?xattr -l file (com.apple.quarantine, com.apple.metadata:kMDItemWhereFroms); sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2 'select * from LSQuarantineEvent'
Platform protectionscsrutil status (SIP), spctl --status (Gatekeeper), fdesetup status (FileVault)
Privacy grantsTCC DBs: ~/Library/Application Support/com.apple.TCC/TCC.db, /Library/Application Support/com.apple.TCC/TCC.db (needs Full Disk Access) — see macos-persistence-review
Recent logins / authlog show --archive host.logarchive --predicate 'process == "loginwindow" OR process == "sshd" OR eventMessage CONTAINS "authentication"' --style syslog
Executions blocked by XProtect/Gatekeeperlog show --predicate 'subsystem == "com.apple.xprotect" OR process == "syspolicyd"' --last 3d

Infostealer pattern (common in 2024–2026)

Unsigned/ad-hoc signed app from a fake download or cracked software → osascript prompting for the user password (display dialog ... with hidden answer) → access to Keychain, browser profiles (~/Library/Application Support/Google/Chrome/), crypto wallets → zip and HTTP POST exfil. Hunt: osascript child of an app in /Volumes/ or ~/Downloads; curl -X POST with zip uploads; access to login.keychain-db by non-Apple processes.

Response

Assume browser session cookies, saved passwords and keychain secrets are stolen: revoke sessions and rotate credentials (token-theft-investigation), not just remove the malware.

Related skills

macos-persistence-review, osquery-investigation, token-theft-investigation, mdm-compliance-review

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.