macOS: cover xattr -c in the Gatekeeper bypass rule, add ClickFix stage-3 dropper - #6205
Open
raimurokko wants to merge 2 commits into
Open
macOS: cover xattr -c in the Gatekeeper bypass rule, add ClickFix stage-3 dropper#6205raimurokko wants to merge 2 commits into
xattr -c in the Gatekeeper bypass rule, add ClickFix stage-3 dropper#6205raimurokko wants to merge 2 commits into
Conversation
…-3 dropper The existing Gatekeeper bypass rule requires both '-d' and 'com.apple.quarantine' on the xattr command line. A macOS ClickFix chain observed on 2026-08-04 used 'xattr -c' instead, which clears every extended attribute including quarantine and therefore achieves the same bypass without matching the rule. Added a second selection for '-c', '-cr' and '-rc'. Also adds an emerging-threats rule for the stage-3 dropper sequence of that campaign. It requires the xattr step together with a temporary path and a shell parent: curl and chmod against /tmp are too common in developer workflows to alert on by themselves, and six existing macOS rules already touch curl. Sample: https://bazaar.abuse.ch/sample/29be0f56275f051181ea3ec37ddc3d3807cde34cb65de855709fae0e13786a40/
Author
|
Small housekeeping note, not a nudge for review. This PR seems to have missed the triage automation: it carries no labels, and no workflow runs are reported on the branch. Every neighbouring PR from the same days (#6200, #6201, #6203, #6206, #6208) picked up Flagging it only because an unlabelled PR is easy to lose. No urgency at all, and happy to rebase, split, or drop parts if that suits the review better. |
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.
1. Gap in an existing rule
proc_creation_macos_xattr_gatekeeper_bypass.ymlrequires both-dandcom.apple.quarantineon the command line. A macOS ClickFix chain we analysed on2026-08-04 used
xattr -cinstead, which clears every extended attribute — quarantineincluded — and therefore achieves the same bypass without matching the rule.
Added a second selection for
-c,-crand-rc. Level and false positives areunchanged;
xattr -cis about as common in legitimate use as-d com.apple.quarantinealready was.
2. New emerging-threats rule
The stage-3 dropper sequence of the same campaign: a Mach-O fetched into a temporary
directory, dequarantined, marked executable and run, all from a shell the victim pasted
into themselves.
Deliberately narrower than it could be — matching requires the xattr step and a
temporary path and a shell parent.
curlandchmodagainst/tmpon their ownare ordinary developer activity, and six existing macOS rules already cover
curl.Related existing coverage
While checking for duplicates I found
rules-emerging-threats/2025/Malware/Atomic-MacOS-Stealer/proc_creation_macos_malware_amos_curl_post.yml,which already matches
curlPOSTs carryinguser:andBuildID. Our stage 2 sendsexactly that header pair, which we had observed independently and, until finding that
rule, believed to be undocumented. Neither rule proposed here overlaps it: that one keys
on the exfiltration POST, these key on the dequarantine step and the dropper sequence.
It is also the best corroboration we have for the family assessment, so — thank you to
its authors.
Context
Analysis, indicators and the decoded chain:
https://github.com/raimurokko/macos-threat-tracking/blob/main/campaigns/2026-08-04-cloudflare-clickfix/payload_analysis.md
Sample:
https://bazaar.abuse.ch/sample/29be0f56275f051181ea3ec37ddc3d3807cde34cb65de855709fae0e13786a40/
What these rules do not do
The dropper rule will not fire if the operator drops the
xattrstep — which is areasonable thing for them to do next, since Gatekeeper only evaluates quarantined
binaries and a payload delivered by other means may never carry the attribute.
The family behind this chain is assessed as AMOS lineage but not confirmed: the
stage-3 binary is a self-decrypting loader whose payload was not recovered, and
Microsoft reports the same infrastructure cluster delivering MacSync as well. The rules
therefore describe behaviour, not a family.
tests/test_rules.py,tests/test_logsource.pyandsigma checkall pass.