Skip to main content

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.
This content is for authorized red team operations only. Always operate strictly within the defined scope of your engagement.

Abusing MDM Solutions

Enumerating MDM Configuration

JAMF PRO Attacks

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.
The jamf binary historically contained a shared keychain secret: jk23ucnq91jfu9ajJAMF persists as a LaunchDaemon at:
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:
Requirements for impersonating JAMF communications:
  1. Device UUID: ioreg -d2 -c IOPlatformExpertDevice | awk -F" '/IOPlatformUUID/{print $(NF-1)}'
  2. JAMF keychain: /Library/Application Support/Jamf/JAMF.keychain (contains device certificate)
With these, create a VM with the stolen UUID and cloned keychain.
Monitor /Library/Application Support/Jamf/tmp/ for custom admin scripts — they are placed, executed, and removed. They often contain credentials:
Use JamfExplorer.py to listen for new files and process arguments.

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:

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
Compromising macOS credentials often means compromising all connected cloud services simultaneously.

Safari Automatic Extraction

When a file is downloaded in Safari, “safe” file types are automatically opened. A downloaded ZIP is automatically decompressed, potentially exposing the user to malicious content without an explicit open action.

macOS Remote Access and Protocols

References