The [mutant](https://mudocs.aoiflux.xyz) Programming Language
mutant is an open source programming language for security research and digital forensics.
mutant is an open source programming language for security research and digital forensics. Programs compile to encrypted bytecode, run in the Mutant VM, and can be packed into standalone binaries for other platforms.
Current release: 2.6.1 -- see CHANGELOG.md for what changed and docs/advisories for the security advisories.
Why mutant#
- Small language. Simple enough to learn in under an hour.
- Encrypted bytecode. A compiled program is protected on disk and in memory.
- Runs anywhere, ships anywhere. One VM on every platform, and standalone binaries cross-compiled for others.
- Batteries included. A 694-builtin standard library in pure Go (no cgo): data handling, networking, cryptography, detection, graphs and a deep forensic suite. See the Capability Reference.
- Real tooling. A formatter, a test runner, a debugger, and the
mlsplanguage server behind the VS Code extension.
Install#
Download a binary from this repository's releases, or build from source with Go:
git clone https://github.com/aoiflux/mutant
cd mutant
./scripts/build.sh --host-only # Linux, macOS, WSL
./scripts/build.ps1 -HostOnly # Windows
A plain go install also works, but its binary cannot run mutant release:
that needs the runtime assets the build scripts embed.
Quick start#
mutant # start the REPL
mutant hello.mut # compile to encrypted bytecode: hello.mu
mutant hello.mu # run the bytecode
mutant test ./lib # run every *_test.mut file
mutant help # every command, and `mutant help <command>`
Compiling and running both ask for a password. By default it is prompted for, never typed on the command line:
| Option | Use it for |
|---|---|
| (nothing) | Interactive use. Prompts with terminal echo disabled. |
--password-file <path> |
Unattended runs. Refused if the file is readable by other users. |
--password-stdin |
Pipelines: mutant hello.mu --password-stdin < secret. |
--dev |
Local development only. Uses a built-in key that is not secret. |
--password-insecure <v> |
Only if you accept that other local users can read it from ps. |
A bare --password is refused since 2.6.0. There is deliberately no
environment-variable form; see
docs/CONFIGURATION_POLICY.md.
New to mutant? Start with the 30-minute tutorial.
Standalone binaries#
mutant release hello.mut --os windows --arch amd64
Targets: darwin/amd64; linux/amd64, linux/386, linux/arm64,
linux/arm; windows/amd64, windows/386 (x86 is accepted as 386). Any
other pair is refused.
A program runs in secure mode by default: a hit from the runtime's security
probes ends the run. --compat warns and continues instead. See
docs/EXECUTION_MODES.md.
Examples#
- examples/ -- runnable programs by area, from text matching to filesystems, network recon and registry triage
- examples/workshop/ -- QUILLDROP, a two-hour guided investigation built for the DFRWS APAC 2026 workshop
- A browser REPL built to WebAssembly (experimental): docs/WASM_REPL_REFERENCE.md
Documentation#
The official website covers all things mutant. Guides in this repository:
- Learn: Tutorial · Cookbook · What is mutant · Comparison with other tools
- Reference: Language · Builtins · Structured data · Interchange schemas · Graph database · Secure networking · Runtime integration
- Tools: Testing · Debugging · Language server design · Language server onboarding
- Security: Advisories · Reporting a vulnerability
Featured in#
- Gopherlabs Conference 2021 by CloudNativeFolks
- Nullcon Goa Sep 2022 (video)
- DEFCON AppSec Village 1st Place Winning Entry
- Hackaday - This Week in Security
Contributing#
See CONTRIBUTING.md for building, the pure-Go and cross-platform rules, and the release gate. Please also read the Code of Conduct.
License#
Mutant, including the language implementation and the language server in this repository, is licensed under GNU AGPL v3.0 only. See LICENSE.