Security Answers (Current Code)
This FAQ is the student-friendly, code-accurate version of Mutant security behavior.
This FAQ is the student-friendly, code-accurate version of Mutant security behavior.
1) Is encryption password-based or deterministic?#
Both are supported.
- If password is provided (
-passwordor-pwd), password-based KDF path is used. - If password is omitted, deterministic mode is used.
In both modes, runtime decrypts before execution and does not rely on plaintext bytecode files.
2) How is authenticity enforced?#
Mutant signs and verifies artifacts using Ed25519-based signing flow.
Secure mode behavior:
- Secure mode is default.
- Signer-auth is optional and can be explicitly enforced with
--signer-auth. - Without
--signer-auth, secure mode keeps runtime hardening gates but does not run signer pinning verification. - Trusted key pinning uses
MUTANT_TRUSTED_PUBLIC_KEY_HEX(with local bootstrap fallback if unset).
Compatibility/dev behavior:
- More permissive by default.
- Still supports policy-driven handling through tamper response configuration.
3) What are secure/compat/dev modes?#
- Secure mode (
--secure, default): fail-closed defaults. - Compat mode (
--compat): warn-oriented defaults. - Dev mode (
--dev): compat posture plus local convenience defaults.
CLI rule: last mode flag wins when multiple are passed.
4) Is anti-debugging implemented?#
Yes.
- Platform-specific detection exists in
security/antidebug_*.go. - Runner enforces anti-debug checks at:
- pre-decode
- pre-execution
- Action is policy-driven (
warn,delay,terminate).
5) Is sandbox detection implemented?#
Yes.
- Platform-specific detectors exist for Windows, Linux, and macOS with stubs where needed.
- Runner enforces sandbox checks at pre-decode and pre-execution.
- Builtin diagnostics can report sandbox type, confidence, and indicators.
6) Is process injection detection implemented?#
Yes, as anti-tamper process-protection probes.
Important gates:
MUTANT_ENABLE_ANTITAMPER_PROBE=1must be set to run probes.MUTANT_ENABLE_PROCESS_PROTECTIONcontrols runner enforcement once probes are enabled.
Runner enforcement probes:
- process_injection
- trampoline
- iat_got
- module_integrity
- memory_page_anomaly
Threshold:
detected=truewithconfidence >= 80is treated as process protection event.
Remote scan status:
- Remote scan manager integration exists behind
MUTANT_ENABLE_REMOTE_PROCESS_SCAN. - Mode gate is
MUTANT_REMOTE_SCAN_MODE=off|observe|enforce. - Current Windows scanner is scaffolding-safe no-op, so integration is present while detector depth is still partial.
7) Are polymorphic mutations fully active?#
Yes, for every transform that exists.
Current state:
- Polymorphic engine is integrated and marker/tagging is active.
- Mutation level and seed flags are wired through CLI paths.
- All four transforms -- NOP insertion, dead-code insertion, constant-pool
randomization and opcode remapping -- run at any non-zero mutation level,
including the CLI default of 5.
--mutation 0is the only setting that leaves the program byte-identical. ReorderInstructionshas been removed fromMutationConfig. Reordering a stream needs a reverse mapping the VM has no way to carry; leaving the name in place made it read as a transform that was merely switched off.
Until this was fixed, constant-pool randomization was the only transform that ran and it was gated at level 6 while the CLI defaulted to 5 -- so the default ran the engine and shipped unmutated bytecode. Two builds of the same source at the default level were byte-identical.
Practical meaning: mutant gen and mutant release now emit a structurally
different program on every build unless a fixed --seed is given, and the same
--seed reproduces a build exactly.
8) Is memory security implemented?#
Partially, with two layers:
- Active VM path: object encryption/decryption via
mutil.EncryptObjectandmutil.DecryptObjectin runtime storage/use paths. - Additional wrappers:
object/secure_memory.goprovides SecureGlobal/SecureStack/SecureConstantPool primitives.
Important: secure_memory wrappers are available utilities, not the primary VM storage path today.
9) How does tamper policy work?#
Policy input:
MUTANT_TAMPER_RESPONSE=warn,delay, orterminateMUTANT_TAMPER_DELAY_MSfor delay modeMUTANT_PROTECTION_PROFILE(minimal,standard,paranoid) for defaults
Precedence:
- Explicit env override wins.
- Profile controls defaults.
10) What telemetry is available?#
Key counters include:
- debugger_detected
- sandbox_detected
- process_protection_detected
- integrity_failed
- signature_failed
- anti_tamper_probe_invoked
- anti_tamper_probe_error
- command_attempt, command_blocked, command_succeeded, command_failed
Export:
- Set
MUTANT_SECURITY_TELEMETRY_FILEto export JSON at process exit. - Set
MUTANT_SECURITY_AUDIT=1for stderr audit lines.
11) What should students remember?#
- Mutant security is policy-driven, not hardcoded to always kill the process.
- Probes are evidence producers; runner decides enforcement.
- Mode/profile/env combinations matter as much as cryptography.
- Read confidence + detail together before drawing conclusions.