English | 中文
Machbox is a lightweight, native macOS sandbox for malware analysis, built on Apple native frameworks (Virtualization.framework, EndpointSecurity.framework, DTrace, etc.).
- mach-o
- Application Bundle
- Disk Image(.dmg)
- zip archive (supports password extraction)
- Apple Silicon Mac
- macOS 13+
- Lightweight Deployment: Single binary, compatible with
VirtualBuddy(.vbvm). - Native Sandbox:
Virtualization.framework+APFS Clonesnapshot & rollback. - Static Analysis: Mach-O parsing, code signing & entitlements, strings (IOC) extraction, and recursive scanning of directories, archives and app bundles.
- Dynamic Analysis:
EndpointSecurity+DTracefor process execution, file-system activity, network connections, persistence attempts, privilege escalation, and code injection detection. - Behavioral Summarization: Risk scoring, verdict generation, and a built-in Web UI to browse full analysis reports.
Prebuilt Apple Silicon binaries are available on the GitHub Releases page.
curl -L -o machbox https://github.com/ac0d3r/machbox/releases/latest/download/machbox-darwin-arm64
chmod +x machboxThe release binary is ad-hoc signed, macOS Gatekeeper will block it until you remove the quarantine attribute with
xattr -d com.apple.quarantine.
git clone https://github.com/ac0d3r/machbox.git
cd machbox
make buildThe compiled binary will be at bin/machbox.
Only needs to be done once. After setup, you can run sample analysis repeatedly.
-
Open VirtualBuddy and create a new macOS VM.
- Complete the macOS setup inside the VM (region, account, etc.).
- In VirtualBuddy, enable Boot in recovery mode for the VM.
-
Start the VM and open Utilities → Terminal from the menu bar.
-
Run:
csrutil disable
-
Restart the VM normally.
On your host machine, run:
machbox setup -m /path/to/your_Machbox.vbvmInside the VM:
- Open Finder and select
MachboxGuestfrom the sidebar. - Install
machbox-guest.pkg. - Wait for the installation to finish (Xcode Command Line Tools will be installed silently).
- Shut down the VM.
machbox analyze -m /path/to/your_Machbox.vbvm /path/to/sampleCommon options:
| Option | Description | Default |
|---|---|---|
-m, --vbvm |
Required Path to the VirtualBuddy VM bundle | — |
--timeout |
Dynamic analysis timeout (seconds) | 60 |
--password |
Password for encrypted archives | — |
--headless |
Run without a GUI window (auto-shutdown after analysis) | true |
--display |
Display resolution | 1920x1200 |
--network-mode |
Network mode (e.g., NAT) |
Disabled |
Supports passing command-line arguments to the sample:
machbox analyze [flags] <sample> [--] [sample-args...]All analysis results are automatically stored in a local database and can be viewed through the built-in Web UI:
machbox report-viewOpen your browser and visit http://127.0.0.1:8080 to browse the complete analysis reports.
| Static Analysis | Dynamic Analysis |
|---|---|
![]() |
![]() |
![]() |
![]() |
flowchart TB
User(["User: machbox analyze sample"])
subgraph Host["Host"]
Machbox["machbox"]
Snapshot["Snapshot"]
ShareDir["SharedDir<br>(tools|sample)"]
Report["Report(Web UI)"]
end
subgraph Guest["Guest VM"]
Agent["Guest Agent"]
Analysis["static and dynamic<br>analysis"]
Sample["malware sample"]
end
User --> Machbox
Machbox --> |read-only|ShareDir
ShareDir --> |APFS clone|Snapshot
Snapshot --> Agent
Agent <--> Analysis
Analysis --> Sample
Machbox <--> Report






