Living Off the Orchard: Apple Script is a library of AppleScript and JXA tests mapped to the MITRE ATT&CK® framework. Security teams can use LOAS to quickly, portably, and reproducibly test their macOS environments using multiple execution methods, each generating different endpoint security logs. This makes it ideal for:
- Security testing and validation
- Endpoint detection rule development
- Red team operations
- Security research and education
Download pre-compiled tests from the latest release. Each test is available in multiple formats:
.scpt- AppleScript file.swift- Swift executable.app- macOS application- Binary executable
# Clone the repository
git clone https://github.com/cyberbuff/loas.git
cd loas
# Install dependencies
uv sync
# Validate YAML files
uv run main.py validate
# Build all test files
uv run main.py buildLOAS provides multiple execution methods, each generating different endpoint security logs. These methods are documented in the Red Canary Threat Detection Report.
Execute commands directly from the command line:
osascript -e "the clipboard"Execute a script file with osascript:
osascript get_clipboard_content_using_applescript_defaults.scptExecute using Swift (requires XCode Developer Tools):
swift get_clipboard_content_using_applescript_defaults.swiftExecute as a macOS application:
open -n get_clipboard_content_using_applescript_defaults.appExecute as a compiled binary:
./get_clipboard_content_using_applescript_defaultsLOAS implements various MITRE ATT&CK techniques using AppleScript and JXA. View the interactive coverage map:
We welcome contributions! To add new tests:
- Create a YAML file in the appropriate technique directory under
yaml/ - Follow the YAML structure with required fields: name, language, description, command
- Run validation:
uv run main.py validate - Submit a pull request
For complete documentation, visit loas.dev:
- Execution Methods - Different ways to execute tests
- Contributing Guide - How to write YAML test files
- ATT&CK Coverage - Interactive technique coverage
- macOS
- uv (if you are building from source)
- XCode Developer Tools (for Swift execution method)
This project is intended for authorized security testing, research, and educational purposes only. Users are responsible for ensuring they have proper authorization before running these tests on any system.
See LICENSE file for details.