Overview
macOS red teaming differs significantly from Windows-focused engagements. Enterprise Macs are almost always managed by MDM solutions (JAMF, Kandji, Mosyle), frequently integrated with Active Directory, and often used with cloud service credentials. This page covers the most relevant attack paths.Abusing MDM Solutions
Enumerating MDM Configuration
JAMF PRO Attacks
JAMF Self-Enrollment
JAMF Self-Enrollment
Check for self-enrollment at:
https://<company-name>.jamfcloud.com/enroll/If self-enrollment is enabled, it may ask for credentials. Use JamfSniper.py for password spraying.JAMF Device Authentication Secrets
JAMF Device Authentication Secrets
The
jamf binary historically contained a shared keychain secret: jk23ucnq91jfu9ajJAMF persists as a LaunchDaemon at:JAMF Device Takeover
JAMF Device Takeover
The JAMF server URL is stored in:An attacker can drop a malicious package that overwrites this file, redirecting the device to a Mythic C2 listener:
JAMF Impersonation
JAMF Impersonation
Requirements for impersonating JAMF communications:
- Device UUID:
ioreg -d2 -c IOPlatformExpertDevice | awk -F" '/IOPlatformUUID/{print $(NF-1)}' - JAMF keychain:
/Library/Application Support/Jamf/JAMF.keychain(contains device certificate)
Harvesting Secrets from JAMF Scripts
Harvesting Secrets from JAMF Scripts
Monitor Use JamfExplorer.py to listen for new files and process arguments.
/Library/Application Support/Jamf/tmp/ for custom admin scripts — they are placed, executed, and removed. They often contain credentials:Using MDM as C2
Active Directory Integration
Many macOS systems are bound to Active Directory. Standard AD enumeration applies, plus macOS-specific tools.Domain Information
User Enumeration
macOS AD Attack Tools
MacHound
BloodHound extension for macOS — collects AD relationships including CanSSH, CanVNC, and CanAE edges.
Bifrost
Objective-C tool using native macOS Heimdal Kerberos APIs. No additional frameworks required on target.
Orchard
JXA (JavaScript for Automation) tool for Active Directory enumeration from macOS.
Kerberos Attacks on macOS
BloodHound MacHound Edges
MacHound adds three new edges beyond standard HasSession and AdminTo:| Edge | Meaning |
|---|---|
CanSSH | Entity allowed to SSH to host |
CanVNC | Entity allowed to VNC to host |
CanAE | Entity allowed to execute AppleEvent scripts |
Accessing the macOS Keychain
The Keychain stores sensitive information that can facilitate lateral movement:External Service Integration
macOS environments frequently use:- OneLogin — synchronized credentials across services
- GitHub, AWS — accessed via OneLogin
- Okta, Azure AD — SSO integration