Attackers Use Fake Codex Ads to Target Macs
On August 24, 2026, Cato Networks researchers documented a macOS malware campaign using sponsored Google Search ads that impersonated an OpenAI Codex download page. The ads directed users to a Google Sites lure that instructed them to paste a malicious command into Terminal, a ClickFix technique. Cato assessed the multistage delivery chain as likely related to Atomic macOS Stealer activity.
Attackers are using sponsored Google Search advertisements for Codex-related queries to direct macOS users to a fake OpenAI Codex download experience that persuades victims to paste a malicious command into Terminal, according to research published August 24 by Cato Networks.
Cato's CTRL threat research team found that ads for queries including "codex macos download" appeared above OpenAI's legitimate search result. The advertisements led to a Google Sites page imitating a Codex download portal, including macOS and Linux download options. Cato observed active payload delivery for macOS, but not Linux.
A ClickFix delivery chain
The attack relies on ClickFix, a social-engineering technique in which a user, rather than an installer, performs the command execution. Cato reported that the Google Sites page itself did not host malicious code. Instead, attacker-controlled content was embedded in an iframe, allowing the operators to update the fake installer content without modifying the visible Google Sites page.
According to Cato, the fake installer directs a victim to open Terminal and paste a command beginning with a plausible npm install string associated with Codex. The command decodes a Base64-encoded URL and pipes remotely retrieved content into zsh.
SiliconANGLE's account of Cato's findings describes a multistage sequence after execution:
- •A shell-script loader uses dead code, unused variables, and an encoded blob that is decoded and executed through eval.
- •The script sends a request containing event=pasted to an attacker-controlled endpoint before retrieving the final payload.
- •The final payload is downloaded to /tmp/helper, has extended attributes cleared with xattr -c, is made executable, and is launched.
Clearing extended attributes can remove macOS download-quarantine metadata, which would otherwise contribute to warning prompts for files obtained from the internet. Cato also reported changes between loader versions: earlier samples compressed and Base64-encoded a second stage, while newer samples used an AES-encrypted gzip container and reconstructed a decryption key from variables distributed through the script.
Infrastructure designed to evade inspection
Cato identified three infrastructure sets and reported that some served benign content to non-macOS visitors. In one set, the active lure was hosted at /codexx/, while the more intuitive /codex/ path returned a harmless product page. This behavior can complicate validation by analysts and automated scanners because a request to the expected URL may not receive the malicious content.
Cato found strong overlap with publicly documented Atomic macOS Stealer, or AMOS, activity and assessed the campaign as likely related to the same operation. The report also cited newly introduced malicious advertising and reuse of infrastructure in that assessment.
For security teams, the incident illustrates a recurring delivery pattern: legitimate advertising platforms, trusted hosting services, and familiar developer brands can be combined with user-assisted execution to bypass controls focused only on downloaded executables.
Key Points
- 1Cato documented fake Codex search ads that turn trusted search placement and Google Sites hosting into a macOS ClickFix malware path.
- 2The pasted command retrieves multistage shell payloads and clears macOS quarantine metadata, reducing warnings before executing /tmp/helper.
- 3The campaign shows how a trusted search result, legitimate hosting service, and familiar developer brand can form a credible path to malware execution.
Scoring Rationale
The campaign is relevant to endpoint-security and developer-platform teams because it combines sponsored search, a trusted hosting service, and user-assisted execution.
Sources
Primary source and supporting public references used for this report.
Practice interview problems based on real data
1,625 SQL & Python problems across 15 industry datasets — the exact type of data you work with.
Try 250 free problems


