macOS: cover launchctl bootstrap, add AMOS LaunchDaemon install and wallet replacement rules - #6209
Open
raimurokko wants to merge 2 commits into
Open
Conversation
…replacement Four changes, from reverse engineering the payload of a macOS ClickFix chain in August 2026. The payload turned out to be AMOS, and comparing it against the two existing Atomic-MacOS-Stealer rules showed both what they already cover and two gaps. proc_creation_macos_launchctl_execution.yml matches submit, load and start, but not bootstrap. bootstrap is the modern replacement for load and is what current macOS malware uses - the AMOS variant analysed here installs its daemon with "launchctl bootstrap system". This gap is not AMOS-specific, which is why the change is in rules/ rather than in the emerging-threats directory. file_event_macos_malware_amos_persistence.yml pins the plist to the literal com.finder.helper.plist. Samples from 2026-08 use labels that imitate genuine Apple services instead - com.apple.accountsd.helper and com.apple.metadata.mds.worker, neither of which exists on a clean system, the real services carrying no .helper or .worker suffix. Generalised to a prefix and a list of known label suffixes, and extended with the dot-prefixed staging directories under ~/Library/Application Support/ that the same builds use. Two new rules: proc_creation_macos_malware_amos_launchdaemon_install.yml covers the escalation step rather than the artefacts. AMOS phishes the user's password with a fake system dialog, validates it with dscl, then pipes it into sudo to place and bootstrap the daemon. The piped credential is the durable observable: tooling that legitimately installs a LaunchDaemon already holds the privileges and does not feed a password to sudo -S. Keyed on the sequence, not on a label, because labels vary per build. proc_creation_macos_malware_amos_wallet_app_replacement.yml has no equivalent upstream. AMOS does not only read wallet data, it terminates Ledger Wallet, Trezor Suite and Exodus, deletes the bundles as root and unpacks attacker- supplied builds into /Applications. The archive names app.zip, apptwo.zip and appex.zip under a /zxc/ path have been constant across at least three unrelated hosts since 2025-11, so the path segment is matched independently of the domain. The distinction matters operationally: a user who enters a seed phrase after this has entered it into the operator's code, so the wallet is lost rather than exposed. tests/test_rules.py and the schema validator pass. Analysis and reproduction tooling: https://github.com/raimurokko/macos-threat-tracking/blob/main/campaigns/2026-08-04-cloudflare-clickfix/stage4_payload.md Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four changes to macOS coverage, from reverse engineering the payload of a ClickFix chain in August 2026. The payload decrypted to AMOS, and diffing it against the two existing
Atomic-MacOS-Stealerrules showed what they already cover and where the gaps are.I want to be explicit that most of the behaviour here is not a new discovery — the LaunchDaemon persistence, the wallet replacement and the
/zxc/paths are documented by Moonlock and IRU, and the existing rules by Gen Digital already cover part of it. What is new is a variant whose labels have moved, and two behaviours with no rule attached yet.1.
launchctl bootstrapis not matched (rules/macos/)proc_creation_macos_launchctl_execution.ymlmatchessubmit,loadandstart. It does not matchbootstrap, which is the modern replacement forloadand what the sample uses (launchctl bootstrap system <plist>).This is not AMOS-specific, which is why the change is in
rules/rather than emerging-threats.modified:bumped, author untouched.2. AMOS persistence rule pins a label that has changed
file_event_macos_malware_amos_persistence.ymlmatches the literal/Library/LaunchDaemons/com.finder.helper.plist. Samples from 2026-08 imitate genuine Apple service names instead:com.apple.accountsd.helpercom.apple.accountsd, no.helpercom.apple.metadata.mds.workercom.apple.metadata.mds, no.workerGeneralised to a
startswithon the directory plus a list of known suffixes, and extended with the dot-prefixed staging directories the same builds use (~/Library/Application Support/.com.apple.accountsd/,.com.apple.metadata.mds/). Original author anddate:preserved,modified:added.3. New —
proc_creation_macos_malware_amos_launchdaemon_install.ymlCovers the escalation step rather than the artefacts, so it survives the label churn in point 2.
AMOS phishes the password with a fake "System Preferences" dialog, validates it with
dscl . authonly, then pipes it intosudo -Sto copy the payload,chown root:wheelit and bootstrap it. The piped credential is the durable observable — tooling that legitimately installs a LaunchDaemon already holds the privileges and does not feed a password tosudo -Son stdin.Complements the file_event rule rather than replacing it; both are worth running.
4. New —
proc_creation_macos_malware_amos_wallet_app_replacement.ymlNo equivalent upstream that I could find. AMOS does not only read wallet data — it terminates Ledger Wallet, Trezor Suite and Exodus, deletes the bundles as root and unpacks attacker-supplied builds into
/Applicationswithditto.The archive names
app.zip,apptwo.zip,appex.zipunder a/zxc/path have been constant across at least three unrelated hosts since 2025-11 (isnimitz[.]com,wusetail[.]com, and the host in our case), so the path segment is matched independently of the domain.The distinction is operational: a user who enters a seed phrase after this has entered it into the operator's code. The wallet is lost, not exposed — different advice to the victim than "rotate your credentials".
Testing
tests/test_rules.py— 11 tests, OK. Schema validator — clean.Related
Analysis, IOCs and the emulation tooling used to decrypt the payload: stage4_payload.md. Sample on MalwareBazaar.
Separate from #6205, which covers the delivery chain rather than the payload. No file overlap between the two.
🤖 Generated with Claude Code