macnoise

module
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2026 License: MIT

README

Description of image

CI Release

MacNoise

MacNoise generates real macOS telemetry: network connections, file writes, process spawns, plist mutations, TCC probes, and more. Point it at a machine running your EDR, SIEM, or firewall stack and see what actually fires - not what the vendor datasheet claims will fire.

For background on the motivation and design, see the release blog post.

Quick Start

# Build (add build-amd64 / build-arm64 to cross-compile for Darwin, or release for both)
make build

# List available modules
./macnoise list

# Run a single module
./macnoise run net_connect --param target=127.0.0.1 --param port=8080

# Preview without executing
./macnoise run svc_launch_agent --dry-run

# Run all network modules
./macnoise run --category network

# Run a scenario
./macnoise scenario configs/scenarios/edr_validation.yaml

# Emit structured JSONL output
./macnoise run --category file --format jsonl --output /tmp/events.jsonl

Telemetry Categories

Category Description Modules
network Outbound connections, DNS, beaconing, listeners, reverse shells, TLS, exfiltration net_connect, net_listen, net_beacon, net_revshell, net_dns, net_dns_exfil, net_tls, net_exfil
process Process spawning, signal delivery, dylib injection, discovery, Gatekeeper bypass, osascript proc_spawn, proc_signal, proc_inject, proc_discovery, proc_gatekeeper, proc_osascript
file File creation, modification, credential file and keychain reads, archiving, hiding file_create, file_modify, file_browser_creds, file_cred_files, file_keychain_copy, file_archive, file_hide
tcc TCC permission probes (FDA, Contacts, Keychain, Accessibility, Screen Recording) tcc_fda, tcc_contacts, tcc_keychain, tcc_accessibility, tcc_screen_recording
endpoint_security ES framework event triggers, including .dmg mount and payload execution es_file, es_process, es_mount
service LaunchAgent/Daemon persistence, cron, shell profile, Login Items svc_launch_agent, svc_launch_daemon, svc_cron, svc_shell_profile, svc_login_item
plist Plist creation and modification plist_create, plist_modify
xpc XPC service enumeration xpc_enumerate
evasion Defense evasion: log clearing, timestomping, history removal evade_log_clear

Commands

macnoise run <module> [--param key=val ...]   Run a specific module
macnoise run --category <cat>                 Run all modules in a category
macnoise run --all                            Run all modules
macnoise list [--category <cat>]              List modules
macnoise info <module>                        Show module details, params, MITRE
macnoise scenario <file.yaml>                 Run a YAML scenario
macnoise categories                           List categories with counts
macnoise version                              Print version
Global Flags
Flag Default Description
--format human Output format: human or jsonl
--output (none) Write output to file (in addition to stdout)
--verbose false Verbose output including cleanup errors
--dry-run false Preview actions without executing
--no-cleanup false Leave module artifacts in place (see below)
--timeout 30 Per-module timeout in seconds
--audit-log (none) Write OCSF 1.7.0 audit records to a JSONL file
--config (none) Load defaults from a YAML config file

Leaving Artifacts In Place

By default every module reverses itself when it finishes. That is usually what you want, but it means a detection only ever sees the install event. To validate that your stack detects the persistence itself - a LaunchAgent sitting in ~/Library/LaunchAgents, a cron entry, a modified shell profile - the artifact has to still be there when the scan runs:

./macnoise run svc_launch_agent --no-cleanup

Each module that skips cleanup prints a line naming itself, and the audit log records cleanup_result: skipped rather than ok, so a run that left persistence behind is never mistaken for one that tidied up. Use macnoise info <module> to see what a given module creates.

You are responsible for removing these yourself. Re-running the same module without the flag will clean up only what that run created, not what a previous --no-cleanup run left behind.

Audit Logging

MacNoise writes two separate streams. Telemetry events - what your EDR/SIEM actually sees - go to stdout or --output. A second, optional stream records what MacNoise itself did: which modules ran, prereq/cleanup outcomes, and MITRE mappings, in OCSF 1.7.0 JSONL.

./macnoise scenario configs/scenarios/amos_atomic_stealer.yaml --audit-log /tmp/audit.jsonl

Every telemetry event carries an outcome alongside success (schema 1.1). success says whether MacNoise worked; outcome says what happened to the action it attempted:

outcome Meaning Human marker
executed The action ran and did what the module claims [+]
denied The action ran and the environment refused it [-]
indeterminate The action ran, but nothing can be concluded [?]
error MacNoise itself failed to carry the action out [!]

A denied TCC probe or a beacon to a dead C2 is the telemetry this tool exists to generate, so those stay success: true and are told apart by outcome. Only error sets success: false. In the audit log the same value appears at unmapped.outcome, since OCSF status records a refused action and a broken tool identically.

The audit log opens in append mode, so records from multiple runs pile up in one file for batch analysis. If you're adding a module and want to know how a new event type gets classified into OCSF, see CONTRIBUTING.md.

Module Reference

Module documentation lives alongside each category:

Category README
network modules/network/README.md
process modules/process/README.md
file modules/file/README.md
tcc modules/tcc/README.md
endpoint_security modules/endpoint_security/README.md
service modules/service/README.md
plist modules/plist/README.md
xpc modules/xpc/README.md
evasion modules/evasion/README.md

Scenarios

Scenarios chain modules into ordered sequences - a single YAML file that replays a multi-stage intrusion pattern against your detections.

File Description
network_only.yaml All network modules
edr_validation.yaml Comprehensive EDR detection coverage
full_sweep.yaml All categories
lazarus_group.yaml Lazarus Group: dylib injection, service discovery, reverse shell, plist persistence
amos_atomic_stealer.yaml AMOS / Atomic Stealer: MaaS infostealer, Gatekeeper bypass, keychain dump, ZIP exfil, backdoor persistence
clickfix.yaml ClickFix: obfuscated one-liner pasted into Terminal, base64 decode, second-stage fetch, LaunchAgent persistence

The two APT scenarios follow real documented intrusion sequences, technique by technique - each YAML file cites the actual threat intel it's built from and annotates every step with the MITRE technique it exercises, so start there for the full breakdown rather than a retelling here.

Dry-run first:

./macnoise scenario configs/scenarios/<scenario>.yaml --dry-run

Cross-reference with your SIEM/EDR: each step comment names the technique it should trigger. No matching alert after a real run is a gap in your coverage.

Writing your own:

name: My Custom Scenario
steps:
  - module: net_connect
    params:
      target: "192.168.1.1"
      port: "443"
  - category: file
    params:
      base_dir: "/tmp/test"

Contributing

See CONTRIBUTING.md for adding new modules, code style, and the full PR process.

Releases are automated - release-please cuts a new version straight from your Conventional Commit PR title, so feat: add net_tls module or fix: correct beacon jitter is both your PR title and your changelog entry.

Disclaimer

MacNoise is intended for authorized security testing, EDR validation, and detection engineering on systems you own or have explicit written permission to test. The authors assume no liability for misuse.

AI Code Policy

AI Code contributions are fine, but please keep in mind that code review is currently going to be a human-led process which means there is only so much code we can review. Please limit PRs to a specific fix, or new telemetry module. PRs with extensive changes are likely going to be closed.

Directories

Path Synopsis
cmd
macnoise command
MacNoise - macOS telemetry noise generator for EDR testing and security research.
MacNoise - macOS telemetry noise generator for EDR testing and security research.
internal
audit
Package audit provides OCSF 1.7.0-aligned structured audit logging for MacNoise runs.
Package audit provides OCSF 1.7.0-aligned structured audit logging for MacNoise runs.
config
Package config handles loading and validation of MacNoise configuration.
Package config handles loading and validation of MacNoise configuration.
output
Package output handles structured telemetry event formatting and emission.
Package output handles structured telemetry event formatting and emission.
prereqs
Package prereqs provides helpers for validating runtime prerequisites such as OS type, privilege level, and command availability.
Package prereqs provides helpers for validating runtime prerequisites such as OS type, privilege level, and command availability.
runner
Package runner orchestrates the execution of macnoise telemetry modules.
Package runner orchestrates the execution of macnoise telemetry modules.
modules
endpoint_security
Package endpointsecurity provides telemetry modules that trigger Endpoint Security framework event types.
Package endpointsecurity provides telemetry modules that trigger Endpoint Security framework event types.
file
Package file provides telemetry modules for file system activity simulation, covering file creation and modification patterns that trigger EDR file events.
Package file provides telemetry modules for file system activity simulation, covering file creation and modification patterns that trigger EDR file events.
network
Package network provides telemetry modules for network activity simulation, covering TCP connections, listening sockets, HTTP beaconing, DNS resolution, and reverse shell patterns used for EDR and detection engineering validation.
Package network provides telemetry modules for network activity simulation, covering TCP connections, listening sockets, HTTP beaconing, DNS resolution, and reverse shell patterns used for EDR and detection engineering validation.
plist
Package plistmod provides telemetry modules for plist file creation and modification, generating file write events and defaults-system activity observed by EDR sensors.
Package plistmod provides telemetry modules for plist file creation and modification, generating file write events and defaults-system activity observed by EDR sensors.
process
Package process provides telemetry modules for process activity simulation, covering process spawning, dylib injection, and signal delivery patterns used by macOS malware and targeted attack tooling.
Package process provides telemetry modules for process activity simulation, covering process spawning, dylib injection, and signal delivery patterns used by macOS malware and targeted attack tooling.
service
Package service provides telemetry modules for LaunchAgent and LaunchDaemon persistence simulation.
Package service provides telemetry modules for LaunchAgent and LaunchDaemon persistence simulation.
tcc
Package tcc provides telemetry modules for TCC (Transparency, Consent, and Control) permission probing.
Package tcc provides telemetry modules for TCC (Transparency, Consent, and Control) permission probing.
xpc
Package xpc provides a telemetry module for XPC service enumeration via launchctl, generating IPC discovery activity observable by macOS security tooling.
Package xpc provides a telemetry module for XPC service enumeration via launchctl, generating IPC discovery activity observable by macOS security tooling.
pkg
module
Package module defines the core Generator interface and supporting types used by all MacNoise telemetry modules.
Package module defines the core Generator interface and supporting types used by all MacNoise telemetry modules.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL