| name | macos-enumeration |
| description | macOS system enumeration, information gathering, and troubleshooting. Use this skill whenever the user needs to gather system information on macOS, enumerate users and processes, check network configuration, list installed applications, troubleshoot system issues, or perform administrative tasks on macOS. Trigger for any request involving macOS commands, system_profiler, launchctl, networksetup, brew, or general macOS system exploration. |
macOS Enumeration & System Information
A comprehensive guide to macOS system commands for enumeration, troubleshooting, and administration.
Quick Start
For rapid system overview, run these core commands:
uname -a
system_profiler SPSoftwareDataType
launchctl list
networksetup -listallnetworkservices
lsof -i -P -n | grep LISTEN
system_profiler SPApplicationsDataType
System Information
Core System Details
date
cal
uptime
w
whoami
finger username
uname -a
cat /proc/cpuinfo
cat /proc/meminfo
free
df
System Profiler (Comprehensive)
The system_profiler command is the most powerful tool for macOS enumeration:
system_profiler -listDataTypes
system_profiler SPSoftwareDataType
system_profiler SPHardwareDataType
system_profiler SPApplicationsDataType
system_profiler SPFrameworksDataType
system_profiler SPDeveloperToolsDataType
system_profiler SPStartupItemDataType
system_profiler SPNetworkDataType
system_profiler SPFirewallDataType
system_profiler SPBluetoothDataType
system_profiler SPEthernetDataType
system_profiler SPUSBDataType
system_profiler SPAirPortDataType
system_profiler SPPrintersDataType
system_profiler SPDisplaysDataType
Tip: You can combine multiple data types:
system_profiler SPSoftwareDataType SPNetworkDataType SPHardwareDataType
User & Process Management
Launch Services (macOS equivalent to systemd)
launchctl list
launchctl print gui/<UID>
launchctl print system
launchctl print gui/<UID>/com.company.launchagent.label
atq
Find User UID
id -u
id -u username
Network Analysis
Network Configuration
networksetup -listallnetworkservices
networksetup -listallhardwareports
networksetup -getinfo Wi-Fi
networksetup -getautoproxyurl Wi-Fi
networksetup -getwebproxy Wi-Fi
networksetup -getftpproxy Wi-Fi
Active Connections & Listening Ports
lsof -i -P -n | grep LISTEN
arp -i en0 -l -a
nettop
smbutil statshares -a
Application & Package Management
Homebrew
brew list
brew search <text>
brew info <formula>
brew install <formula>
brew uninstall <formula>
brew cleanup
brew cleanup <formula>
Application Discovery
system_profiler SPApplicationsDataType
lsappinfo list
open -a <Application Name>
open -a <Application Name> --hide
open some.doc -a TextEdit
File & Data Search
Spotlight Search (mdfind)
mdfind password
mdfind -name password
mdfind "kext"
mdfind "config"
mdfind "password"
mdfind "credential"
Administrative Tasks
Service Management
sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist
sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist
sudo apachectl start
sudo apachectl stop
sudo apachectl restart
sudo apachectl status
System Maintenance
sudo purge
dscacheutil -flushcache
sudo killall -HUP mDNSResponder
caffeinate &
screencapture -x /tmp/ss.jpg
pbpaste
Security & Anti-Analysis Detection
VM/Sandbox Detection
Some macOS malware checks for virtualization to avoid analysis:
system_profiler SPHardwareDataType SPDisplaysDataType | grep -Eiq 'qemu|kvm|vmware|virtualbox'
if system_profiler SPHardwareDataType SPDisplaysDataType | grep -Eiq 'qemu|kvm|vmware|virtualbox'; then
exit 100
fi
Suspicious Activity Indicators
system_profiler SPApplicationsDataType
system_profiler SPFrameworksDataType
launchctl list
launchctl print gui/<UID>
Quick Reference by Use Case
"I need to understand this macOS system"
system_profiler SPSoftwareDataType SPHardwareDataType SPNetworkDataType
"What's running on this system?"
launchctl list
lsof -i -P -n | grep LISTEN
"What applications are installed?"
system_profiler SPApplicationsDataType
brew list
"How is the network configured?"
networksetup -listallnetworkservices
networksetup -getinfo Wi-Fi
arp -i en0 -l -a
"Who is on this system?"
w
whoami
id
Notes
system_profiler without arguments can consume significant memory and time
- Many commands require
sudo for full information
- Network interface names vary (en0, en1, Wi-Fi, etc.)
- Some commands may not be available on all macOS versions
- For automated enumeration, consider using tools like MacPEAS or SwiftBelt
External Tools