In this blog post How Python Info-Stealers Are Targeting macOS Endpoints in 2026 we will walk through whatโs driving the surge, how these stealers operate on Macs, and the practical controls that reduce risk fast.
High level: info-stealers are โsmash-and-grabโ malware. They donโt need to encrypt your files or maintain long-term access to cause damage. They aim to quickly collect credentials, browser session tokens, cookies, and wallet data, then exfiltrate it. The twist is that macOS endpoints are now a consistent target, and Python has become a popular way for attackers to build and ship flexible stealers that can evolve quickly. Microsoft reported seeing macOS-focused stealer campaigns increase since late 2025, using social engineering (including ClickFix-style prompts), malicious DMGs, and native utilities like AppleScript to harvest secrets from browsers, keychains, and developer environments.
If you manage a fleet of Macs, the key takeaway is simple: these attacks often look like normal user activity (installing software, pasting commands, granting prompts). You canโt rely on โMacs donโt get malware.โ You need layered controls that catch suspicious execution paths, unusual credential prompts, and exfiltration patterns.
Why Python shows up in modern macOS info-stealers
Python itself isnโt the โvulnerability.โ Itโs the delivery and execution benefits attackers get:
- Fast development and easy reuse: Python lets threat actors iterate quickly, borrow modules, and change behavior to dodge signatures.
- Cross-platform tooling: the same stealer codebase (or large chunks of it) can target Windows, macOS, and Linux with environment-specific branches.
- Packaging hides intent: attackers often bundle Python payloads into a standalone executable so the victim doesnโt need Python installed.
A common packaging approach is PyInstaller, which wraps Python code and dependencies into a self-contained executable. Researchers have documented macOS infostealer samples that reveal PyInstaller fingerprints at runtime (for example, extraction to a temporary directory and the presence of common PyInstaller indicators). This matters because it changes what โnormalโ looks like: a single Mach-O binary can unpack an entire Python runtime and a stealer in-memory or into temp folders, run quickly, then clean up traces.
The core technology behind macOS targeting
Most macOS stealer campaigns succeed by combining three things:
- Social engineering to get initial execution (fake installers, fake browser checks, โfix your computerโ prompts).
- Native macOS utilities to interact with the system in a trusted-looking way (especially AppleScript via
osascript). - Credential and session harvesting from browsers, Keychain, and developer tooling, then quick exfiltration.
Microsoftโs February 2, 2026 research highlighted macOS stealer campaigns using ClickFix-style prompts and malicious DMG installers to deploy Mac-focused stealers, with heavy use of โliving off the landโ behaviors and AppleScript automation to access sensitive data. The same research also noted Python-based stealers delivered via phishing and exfiltration via services like Telegram in some campaigns.
How the attack chain typically works on a Mac
1) Initial access via trust abuse, not exploits
In many real-world incidents, users are tricked into doing one of these:
- Installing a trojan DMG that looks like a legitimate app (productivity tools, โAIโ tools, browsers, crypto utilities).
- Running a copy-paste โfixโ in Terminal. ClickFix-style lures can hide extra commands by forcing users to click a โcopyโ button, so they donโt see the full payload. Pen Test Partners described a 2025 pattern where attackers used typosquatted lookalike sites and appended Base64-encoded commands after a legitimate-looking command.
- Following a fake verification step in the browser that instructs them to paste commands or download โrequiredโ tools.
2) Execution using familiar system tools
Once launched, macOS stealers often try to blend in. A common pattern is invoking AppleScript through:
/usr/bin/osascript
Why? Because AppleScript dialogs can look like normal system prompts. Attackers use them to request passwords or permissions in a way that feels routine. Malwarebytes notes that Atomic Stealer (AMOS) uses macOS shell scripts launched with osascript, which aligns with this broader trend.
3) Prompting for secrets and bypassing user caution
Info-stealers donโt always need a kernel exploit. They often rely on the fact that users will enter credentials when prompted, especially if:
- the prompt appears immediately after they tried to install or open something,
- the dialog resembles a real macOS authentication request,
- the user is under time pressure (โyour browser is corrupted,โ โupdate required,โ โverify to continueโ).
4) Collecting the โhigh valueโ data sets
Stealers focus on data that leads to instant account takeover:
- Browser passwords and autofill
- Session cookies and tokens (often more valuable than passwords because they can bypass MFA)
- Keychain items (where available via user interaction, permissions, or scripting)
- Crypto wallet files and browser extensions
- Developer secrets like cloud CLI credentials, SSH keys, source-control tokens, and environment files
Microsoft specifically called out macOS stealer activity targeting browser and keychain secrets plus developer environments, reflecting how attackers follow the money and the access pathways.
5) Exfiltration and cleanup
After harvesting, many stealers exfiltrate quickly and try to remove artifacts. Exfiltration may go to attacker infrastructure or via platforms that blend into normal traffic. Microsoft documented Python-based stealer campaigns using Telegram for exfiltration in 2025 investigations, a good example of โtrusted serviceโ abuse.
Practical detection ideas for IT and security teams
Focus on behaviors that map to how stealers actually operate:
- Unexpected Terminal-driven installs: shell scripts initiated from browsers, especially right after visiting ad-driven or lookalike domains.
- AppleScript credential prompts: frequent or out-of-context authentication dialogs, or
osascriptexecution chains that originate from a newly installed app. - Access to browser data paths: sudden read bursts across Chrome/Edge/Brave/Firefox profiles followed by compression (zip) and outbound network traffic.
- Suspicious temporary extraction: large temp folders created and removed quickly, especially for unsigned or ad-hoc signed binaries.
- Outbound exfil patterns: small-to-medium POSTs to unfamiliar domains, or traffic to messaging/CDN platforms not expected for that endpoint role.
Hardening steps that reduce risk quickly
1) Tighten software installation and execution paths
- Use MDM to enforce installing from trusted sources and known developers where possible.
- Block or heavily monitor unsigned apps and newly downloaded executables launching from user-writable locations.
- Restrict who can install browser extensions, especially wallet-related extensions.
2) Reduce โbrowser as a password managerโ exposure
- Encourage a managed password manager with strong policies.
- Where feasible, disable or limit browser password storage on corporate devices.
- Use phishing-resistant MFA (FIDO2/WebAuthn) for critical systems to reduce the blast radius of password theft.
3) Protect developer environments like production
- Rotate and scope tokens (Git, CI/CD, cloud). Prefer short-lived credentials.
- Store secrets in a vault, not in dotfiles or plaintext env files on disk.
- Monitor for anomalous use of cloud CLIs and source-control tokens from new IPs.
4) Add telemetry that answers โwhat ran, from where, and what did it touch?โ
- Enable endpoint detection that captures process trees and script execution.
- Alert on
osascriptspawned by untrusted apps, and on unusual read access to browser and wallet directories. - Record DNS and egress traffic for Macs, not just servers.
5) Make user prompts harder to weaponise
- Train users on the specific trick: โcopy this command into Terminal to fix a problemโ is a major red flag.
- Teach a simple rule: if a webpage tells you to paste commands, stop and escalate.
- Run periodic โprompt literacyโ exercises using screenshots of fake system dialogs.
What to do if you suspect a macOS info-stealer incident
- Isolate the endpoint from the network (donโt just close the window).
- Preserve evidence: collect process trees, recent downloads, mounted volumes, persistence items, and network logs.
- Assume credential compromise: reset passwords and revoke sessions/tokens. Prioritise email, SSO, VPN, source control, cloud consoles, and password managers.
- Rotate developer and cloud secrets (API keys, access keys, CI tokens) and review logs for anomalous access.
- Hunt laterally: look for the same lure domain, installer hash, or execution pattern across other Macs.
Closing thoughts
Python-based info-stealers targeting macOS are a clear signal that endpoint protection has to follow attacker behavior, not old assumptions. The good news is that these attacks are often detectable because theyโre operationally noisy: social engineering, scripted prompts, rapid data access, then exfiltration. If you tighten installation paths, reduce stored secrets, and monitor for osascript and suspicious packaged executables, you can materially cut both likelihood and impact.
If youโd like, I can tailor a control checklist for your environment (Jamf/Intune, Defender for Endpoint, CrowdStrike, or another EDR) and map detections to MITRE techniques for macOS-focused stealers.
Discover more from CPI Consulting -Specialist Azure Consultancy
Subscribe to get the latest posts sent to your email.