Overview
macOS provides a mix of standard Unix tools and Apple-specific utilities. This reference covers the most useful commands for security assessments and post-exploitation on macOS systems.Automated Enumeration Tools
MacPEAS
The macOS version of PEASS — automated privilege escalation enumeration for Mac.
Metasploit enum_osx
Metasploit post-exploitation module for macOS enumeration.
SwiftBelt
macOS enumeration tool written in Swift for operational security.
System Information
Comprehensive system_profiler Commands
Searching for Interesting Files
Network Commands
User Process Enumeration
Installed Software and Services
Miscellaneous Useful Commands
Privileged Operations
Homebrew Package Management
Anti-Analysis / VM Detection Check
Some macOS malware and stealers usesystem_profiler to detect virtual machine environments and abort execution to evade sandboxes:
Malware may exit with a specific exit code (e.g., 100) to signal sandbox detection to the operator, helping distinguish sandbox runs from real victim execution.