The attack begins with a deceptively simple search query. When macOS users type "Claude mac download" into Google, they encounter sponsored ads that appear to link directly to claude.ai - Anthropic's legitimate domain. This isn't a typosquatting campaign or a lookalike domain scheme; the attackers have weaponized trust itself by hosting their malicious instructions within Claude's own shared chat feature. (Source: BleepingComputer)
The genius of this approach lies in its exploitation of platform legitimacy. Google Ads provides the initial credibility through paid placement at the top of search results, while Claude.ai's shared chat feature serves as the perfect trojan horse - a legitimate URL that security tools won't flag as suspicious.
Once victims click the ad, they land on what appears to be an official "Claude Code on Mac" installation guide, complete with attribution to "Apple Support." The shared chat walks users through opening Terminal and executing a base64-encoded command that initiates the infection chain. This social engineering tactic specifically targets macOS users' confidence in their platform's security - a demographic that historically faces fewer threats than Windows users and may be less vigilant about terminal commands.
The technical sophistication becomes apparent in the payload delivery mechanism. The base64 instructions download an encoded shell script called loader.sh from attacker-controlled infrastructure. Security researcher Berk Albayrak identified domains like customroofingcontractors[.]com serving these payloads, while BleepingComputer discovered additional infrastructure at bernasibutuwqu2[.]com. Each request to these servers returns a uniquely obfuscated version of the payload - a polymorphic delivery technique that prevents security tools from creating reliable signatures.
The loader.sh script itself employs multiple evasion techniques. It runs entirely in memory through Gunzip compression, leaving minimal forensic traces on disk. Before deploying its payload, the malware performs geographic profiling by checking for Russian or CIS-region keyboard layouts. Systems with these configurations receive a "cis_blocked" status ping and the script exits harmlessly - a common tactic among cybercriminal groups to avoid targeting certain regions.
For systems that pass this check, the script harvests detailed victim information including external IP addresses, hostnames, OS versions, and keyboard locales. This profiling data flows back to command servers before the second-stage payload deploys through osascript, macOS's built-in scripting engine. This native tool provides remote code execution capabilities without dropping traditional binaries that might trigger security alerts.
The final payload represents a variant of the MacSync infostealer, designed specifically for macOS environments. It systematically harvests browser credentials, cookies, and most critically, macOS Keychain contents - the encrypted vault where Apple stores passwords, certificates, and secure notes. The malware packages this sensitive data and exfiltrates it to attacker-controlled servers.
What makes this campaign particularly dangerous is its targeting of AI-curious users who may lack technical expertise. Unlike previous campaigns that targeted developers searching for Homebrew package managers, this operation casts a wider net. Users exploring AI tools represent a diverse demographic - from creative professionals to business executives - who might paste terminal commands without understanding their implications. The combination of trusted platforms (Google Ads and Claude.ai) with social engineering that mimics official support creates a perfect storm for successful infections.
Business Impact: What Beagle Actually Does to Compromised Systems
Once MacSync or its variants establish themselves on a compromised Mac, the malware begins systematic data harvesting operations that extend far beyond simple file theft. The malware immediately targets browser credentials stored across Chrome, Safari, Firefox, and other browsers - extracting saved passwords, authentication tokens, and session cookies that grant access to corporate accounts without triggering two-factor authentication challenges.
The browser credential theft represents just the first wave of compromise. MacSync then pivots to macOS Keychain contents, where organizations often store VPN credentials, Wi-Fi passwords, certificate-based authentication tokens, and application-specific secrets. This Keychain extraction provides attackers with persistent access pathways that survive password resets and can compromise entire corporate networks through stolen VPN credentials.
What makes this malware particularly damaging for businesses is its selective targeting mechanism. The payload performs victim profiling before full deployment, collecting external IP addresses, hostnames, OS versions, and keyboard locales. This intelligence gathering allows attackers to identify high-value targets - distinguishing between personal users and corporate machines based on naming conventions, network configurations, and installed software profiles.
The geographic filtering that excludes Russian and CIS-region keyboard inputs suggests organized criminal operations with specific targeting parameters. Your organization's intellectual property, customer databases, and strategic communications become commodities in underground markets where corporate credentials sell for thousands of dollars depending on the access level and company profile.
Financial services and technology companies face amplified risks from this campaign. Stolen developer credentials provide access to source code repositories, CI/CD pipelines, and production environments. A single compromised developer machine can expose API keys, database credentials, and cloud service tokens embedded in configuration files - turning one infected Mac into a gateway for supply chain attacks affecting downstream customers.
The polymorphic delivery mechanism ensures each victim receives a uniquely obfuscated payload, defeating signature-based detection systems. Traditional endpoint protection tools struggle to identify the threat because the malware runs entirely in memory through osascript, macOS's built-in scripting engine. This living-off-the-land technique means no malicious binaries touch the disk, leaving minimal forensic artifacts for incident responders to analyze.
Remote access capabilities extend beyond passive data collection. The second-stage payload establishes command-and-control channels that enable attackers to execute arbitrary commands, deploy additional malware, or pivot laterally through corporate networks. Your compromised Mac becomes a beachhead for broader network infiltration, potentially exposing shared drives, internal wikis, and collaboration platforms accessible from the infected endpoint.
The timing of this campaign - targeting users searching for AI tools like Claude - captures organizations at their most vulnerable moment: during technology adoption phases when security controls may be relaxed to facilitate rapid deployment. Early adopters and innovation teams often operate with elevated privileges and broader network access, making them prime targets for credential harvesting operations that can compromise entire departments.
Recovery from MacSync infections requires comprehensive credential rotation across all systems the infected user accessed. Organizations must assume total compromise of any credentials stored on or entered through the infected machine, including those protected by keychain encryption. The persistence of stolen session cookies means attackers maintain access even after password changes, requiring invalidation of all active sessions across corporate applications.
Immediate Detection and Response Actions
Security teams must act within the first hour to determine exposure. Start by searching Terminal history on all macOS systems for base64-encoded commands containing domains customroofingcontractors.com or bernasibutuwqu2.com. The malware's polymorphic delivery means traditional hash-based detection won't work - each victim receives a uniquely obfuscated payload.
Check your network logs for connections to these command-and-control servers during the past 30 days. The malware sends distinctive profiling beacons containing cis_blocked status pings when it encounters Russian or CIS-region keyboards, creating a unique network signature even on systems where the payload didn't fully execute.
Hunt for these specific indicators across your fleet:
- Processes spawned through
osascriptthat connect to external IPs immediately after execution - Shell scripts running entirely in memory via Gunzip decompression without disk artifacts
- Sudden bursts of Keychain access requests from Terminal or unknown processes
- Network connections transmitting hostname, OS version, and keyboard locale data in rapid succession
- Browser credential databases being accessed by non-browser processes
If you discover infected systems, immediate containment requires disconnecting them from network access while preserving forensic evidence. The malware operates entirely in memory for its initial stages, so a simple reboot might eliminate active processes but won't remove persistence mechanisms if the attack progressed beyond initial execution.
Within the first four hours, isolate any Mac that shows Terminal commands referencing /debug/loader.sh or base64 strings beginning with "H4sI". These systems require full forensic imaging before remediation since the attackers already harvested credentials and may have established secondary persistence.
Deploy these detection rules immediately to catch ongoing attacks:
- Monitor for Terminal processes spawning curl or wget commands with base64 parameters
- Alert on any osascript execution that follows within 60 seconds of a curl download
- Flag Keychain access attempts from processes running under /tmp or /var/folders directories
- Track outbound HTTPS connections to newly-registered domains (less than 30 days old)
For systems showing compromise indicators, rotate all stored credentials within 24 hours - starting with administrative accounts, then VPN credentials, followed by application-specific tokens. The malware's Keychain extraction capabilities mean any secret stored on the compromised Mac should be considered breached.
Key Insight: The malware's Keychain extraction capabilities mean any secret stored on the compromised Mac should be considered breached.
Block access to Claude.ai's shared chat feature at your network perimeter until Anthropic implements additional security controls. While the main Claude.ai domain remains safe, the shared chat URLs (claude.ai/share/*) serve as active malware distribution points. Configure your web proxy to allow the main domain but block the /share/ path pattern.
Document all Terminal command history from the past seven days on every Mac in your environment. The attackers rely on users not remembering or checking what commands they've run, making command history logs your most reliable detection source for this campaign.
Technical Deep Dive: Beagle's Capabilities and Persistence Mechanisms
The malware's execution chain reveals sophisticated evasion techniques designed specifically to bypass macOS's built-in security architecture. When victims paste the base64-encoded command from the Claude chat, it initiates a multi-stage infection process that operates entirely in memory, leaving minimal forensic artifacts on disk.
The initial loader.sh script employs Gunzip compression to obfuscate its true payload, a technique that bypasses signature-based detection since the compressed data appears as random bytes to security scanners. Each request to the attacker's server returns a polymorphically generated version of this loader - the server dynamically repackages the same malicious code with different obfuscation patterns, ensuring no two downloads share the same cryptographic hash.
The script's geofencing capability demonstrates selective targeting sophistication. Before deploying its full payload, the malware examines configured keyboard input sources through macOS's system preferences API. Systems with Russian or CIS-region keyboards trigger an immediate abort sequence, sending a distinctive cis_blocked status beacon back to the command-and-control infrastructure. This geographic filtering suggests either politically motivated targeting or attempts to avoid scrutiny from Eastern European cybercrime enforcement.
Victim profiling extends beyond geographic boundaries. The malware harvests the target's external IP address, hostname, OS version, and keyboard locale configuration before proceeding with second-stage deployment. This reconnaissance data flows back to attacker infrastructure, enabling operators to make real-time decisions about which systems receive the full MacSync infostealer payload versus those that get benign decoy code.
The execution mechanism leverages osascript, Apple's native scripting interpreter, to run the second-stage payload. This choice provides several advantages: osascript executes with the user's full privileges without requiring sudo elevation, bypasses Gatekeeper since it's a trusted system binary, and appears legitimate in process monitoring tools. The script runs as an AppleScript or JavaScript for Automation (JXA) payload, languages that security tools rarely scrutinize as closely as traditional executables.
MacSync's data harvesting capabilities target the crown jewels of user authentication. The malware extracts browser credential stores using each browser's native decryption APIs - Chrome's Login Data SQLite database, Firefox's logins.json, and Safari's Keychain integration. Cookie theft enables session hijacking attacks where attackers can impersonate victims on authenticated websites without knowing passwords or triggering multi-factor authentication prompts.
The Keychain extraction represents the most severe compromise vector. macOS Keychain stores not just website passwords but also secure notes, certificates, encryption keys, and application-specific secrets. MacSync appears to leverage security framework APIs to request Keychain access, potentially prompting users with legitimate-looking authorization dialogs that blend with normal macOS security prompts.
Network communication patterns reveal careful operational security. The malware uses HTTPS for all command-and-control traffic, blending with normal web browsing. Exfiltration occurs through standard POST requests to seemingly benign endpoints like /debug/ or /curl/, paths chosen to mimic development traffic. The polymorphic delivery infrastructure spans multiple domains - customroofingcontractors.com and bernasibutuwqu2.com in observed samples - with additional backup servers likely waiting in reserve.
Unlike traditional Mac malware that drops persistent launch agents or modifies login items, this campaign achieves its objectives through smash-and-grab tactics. The entire operation - from initial execution through credential theft to data exfiltration - completes within minutes, reducing the window for behavioral detection systems to identify and block the attack.
Defending Against Supply Chain Threats via Advertising Platforms
The weaponization of advertising platforms represents a fundamental shift in how attackers compromise trusted digital infrastructure. When legitimate platforms like Google Ads and Claude.ai become delivery mechanisms for malware, traditional security boundaries dissolve.
Key Insight: The weaponization of advertising platforms represents a fundamental shift in how attackers compromise trusted digital infrastructure.
This campaign demonstrates how attackers have evolved beyond creating fake websites or typosquatting domains. They're embedding malicious content directly within platforms that organizations explicitly trust - turning your own approved vendor list against you.
The Advertising Trust Paradox
Google processes over 8.5 billion searches daily, with sponsored results appearing above organic listings. These paid placements carry implicit trust - Google's verification processes suggest legitimacy, and users assume advertised links undergo scrutiny. Yet the campaign targeting Claude users proves this assumption wrong.
The attackers purchased ads displaying claude.ai as the destination URL while simultaneously hosting malicious instructions within Claude's shared chat feature. This dual-platform approach creates a verification nightmare: the advertised domain is genuine, the SSL certificate is valid, and the content appears on Anthropic's infrastructure.
Organizations face an uncomfortable reality: blocking Google Ads entirely would cripple legitimate business operations, yet allowing them creates an unfiltered pathway for sophisticated attacks. The same applies to AI chat platforms - blocking Claude or ChatGPT might protect against this specific threat but eliminates valuable productivity tools.
Verifying Download Authenticity Beyond Domain Names
Traditional verification methods fail when attackers operate within legitimate platforms. Checking the URL bar shows claude.ai. Examining the SSL certificate confirms Anthropic's ownership. Even inspecting the page source reveals standard Claude interface elements.
The malicious content exists as user-generated material within these platforms - shared chats that masquerade as official installation guides. The chat interface displays "Apple Support" as the author, exploiting users' trust in both Claude and Apple simultaneously. This attribution spoofing requires no technical sophistication, just social engineering creativity.
Security teams must establish new verification protocols that go beyond domain validation. Direct navigation to vendor websites eliminates the advertising attack vector, but doesn't address weaponized content within those sites. Official software should come from designated download pages, not shared chat interfaces or collaborative documents.
Browser-Level Controls and Endpoint Hardening
Modern browsers offer granular control over advertising content through enterprise policies. Chrome's Group Policy templates allow administrators to block specific ad networks or disable sponsored search results entirely for managed devices. Firefox's Enterprise Policy Engine provides similar capabilities through JSON configuration files.
Content Security Policy (CSP) headers can restrict which scripts execute on trusted domains, though this requires cooperation from platform owners. Browser extensions like uBlock Origin operate at the network request level, intercepting ad calls before they render - but introducing third-party extensions creates its own supply chain risks.
Terminal execution represents the final defensive boundary. macOS's Gatekeeper and notarization requirements should theoretically prevent unsigned code execution, but the campaign bypasses these protections by delivering commands through osascript rather than traditional binaries. Restricting Terminal access for non-technical users eliminates this vector entirely, though it may impact legitimate automation workflows.
Threat Intelligence Integration for Campaign Detection
The polymorphic nature of this campaign - unique payloads per victim, rotating infrastructure, platform-agnostic delivery - demands intelligence-driven defense. Static indicators like domain names or file hashes provide limited value when attackers change them hourly.
Behavioral patterns offer more durable detection opportunities. The campaign's consistent use of base64-encoded Terminal commands, requests to specific URL patterns, and distinctive profiling beacons create a behavioral fingerprint that transcends individual indicators.
Weaponized Platform Trust Attack Chain
Attribution and Threat Actor Profile: Berk Albayrak
A critical distinction emerges when examining this campaign's attribution landscape: Berk Albayrak is not the threat actor behind these attacks, but rather the security researcher who discovered and exposed them. Albayrak, a security engineer at Trendyol Group, identified the malicious Claude.ai shared chats and published his findings on LinkedIn, alerting the security community to this active threat.
The actual threat actors behind this campaign remain unattributed, operating through carefully constructed infrastructure designed to obscure their identity. Their operational security demonstrates sophisticated tradecraft - from polymorphic payload delivery to selective victim targeting based on keyboard locales.
The campaign's infrastructure reveals deliberate operational choices that suggest experienced actors. The use of domains like customroofingcontractors.com and bernasibutuwqu2.com follows established patterns of leveraging compromised legitimate businesses or rapidly provisioned infrastructure for command-and-control operations. Each domain serves uniquely obfuscated payloads, preventing security researchers from easily tracking the full scope of victims through hash-based searches.
The actors' decision to exclude Russian and CIS-region keyboards from infection represents a calculated risk management strategy commonly observed in Eastern European cybercrime operations. When the malware detects these keyboard layouts, it sends a distinctive "cis_blocked" status ping before terminating - a breadcrumb that suggests either geographic origin constraints or deliberate avoidance of certain jurisdictions.
Their victim profiling methodology indicates selective targeting rather than indiscriminate malware distribution. Before deploying second-stage payloads, the operators collect external IP addresses, hostnames, OS versions, and keyboard locales. This intelligence gathering phase allows them to filter out security researchers, honeypots, or systems that don't match their targeting criteria.
The choice to abuse Claude.ai's shared chat feature demonstrates strategic platform selection. Unlike previous campaigns targeting technical users through Homebrew package manager searches, pivoting to Claude casts a wider net across non-technical users curious about AI capabilities. These victims are less likely to scrutinize terminal commands or recognize base64-encoded payloads as suspicious.
The financial motivation appears straightforward - harvesting browser credentials, cookies, and Keychain contents provides immediate monetization opportunities through account takeovers, cryptocurrency theft, or sale on dark web marketplaces. The MacSync infostealer variant's focus on credential extraction aligns with current underground market demands where validated corporate access commands premium prices.
The campaign's timing and evolution suggest an organized group rather than individual actors. The parallel infrastructure maintaining multiple variants, rapid adaptation to include AI platforms in their delivery mechanisms, and sophisticated evasion techniques point to a resourced operation with dedicated development capabilities.
Without definitive attribution markers like code similarities to known groups, unique infrastructure patterns, or intelligence agency disclosures, this campaign joins the growing category of financially motivated macOS threats operating below the attribution threshold. Your organization becomes a potential target if you maintain significant macOS deployments, particularly among executives or departments handling financial transactions, intellectual property, or authentication credentials that could facilitate further network compromise.