Back to Intelligence

AmnesiaStealer macOS Malware: ClickFix Delivery and Browser Session Hijacking — Detection and Response Guide

SA
Security Arsenal Team
August 16, 2026
12 min read

Security researchers have disclosed a new information-stealing malware family targeting macOS users, dubbed AmnesiaStealer. What elevates this campaign above the steady drumbeat of macOS stealer families (Atomic Stealer/AMOS, Poseidon, Cthulhu, and their successors) is the inclusion of a streaming module that gives the operator live, interactive control of the victim's web browser. This is not passive credential theft — it is real-time session hijacking, where an attacker can ride an authenticated browser session, interact with web applications as the victim, and bypass many controls that stop replay of stolen cookies.

Delivery follows the now-dominant ClickFix social engineering pattern: victims land on a compromised or attacker-controlled page presenting a fake CAPTCHA, browser update, or "verification" dialog that instructs them to open Terminal and paste a command. That command — typically a base64-obfuscated one-liner piped from a remote URL into a shell — pulls down and executes the stealer. No exploit, no zero-day, no CVE. The vulnerability is the user, and the attack surface is the fact that macOS users are increasingly instructed to run Terminal commands as part of "normal" troubleshooting flows.

If your organization has macOS endpoints — executive laptops, developer workstations, creative teams — this threat is directly relevant to you. Browser session theft is the fastest path to SaaS compromise (M365, Google Workspace, Okta, AWS consoles, banking), and the interactive streaming module means the attacker does not need to exfiltrate and replay tokens later. They act while the session is live.

Technical Analysis

Affected Platforms

  • macOS endpoints (both Intel and Apple Silicon) — ClickFix lures are platform-agnostic social engineering, but AmnesiaStealer payloads are compiled for macOS.
  • No CVE is associated with this campaign. There is no vendor patch because there is no software vulnerability being exploited — execution relies on the user pasting and running a command in Terminal.

Attack Chain (Defender's View)

  1. Initial lure: Victim encounters a fake CAPTCHA/verification page (malvertising, SEO poisoning, compromised legitimate site, or phishing link). The page instructs the user to press Cmd+Space, open Terminal, and paste a command that the page has silently copied to the clipboard.
  2. Execution: The pasted command is characteristically a curl ... | bash or osascript -e ... one-liner, often base64-wrapped to defeat casual inspection and email/web filtering of the clipboard content.
  3. Payload staging: The dropper retrieves the AmnesiaStealer binary, typically to a user-writable location (/tmp, ~/Library/, /Users/Shared/), and executes it — often bypassing Gatekeeper because the user-initiated shell execution does not carry the quarantine attribute on the staged binary.
  4. Collection: Standard stealer behavior — browser cookies, saved credentials, Keychain material (often via user-facing password prompts spoofed through osascript dialogs), cryptocurrency wallets, Telegram/session data, files matching target extensions.
  5. Streaming module (the differentiator): The malware establishes an outbound connection to attacker infrastructure and streams the victim's browser session, accepting interactive input. From the network side, this looks like a persistent outbound session from a browser-adjacent or unsigned process to an unfamiliar host — often over standard TLS ports to blend in.
  6. Persistence (where observed in comparable families): LaunchAgents/LaunchDaemons plist drops under ~/Library/LaunchAgents/ are the most common macOS persistence mechanism for stealer-class malware.

Why This Matters More Than a Typical Stealer

Traditional infostealers sell logs — cookies and tokens that defenders can partially neutralize with short token lifetimes, token binding, and forced re-authentication. An interactive browser streaming capability defeats time-based mitigations: the attacker operates inside the victim's live, authenticated session with the victim's device fingerprint, IP (via the victim's own machine), and TLS client characteristics. Conditional access policies keyed to device or network may not fire. This effectively converts a commodity stealer into a hands-on-keyboard intrusion capability.

Exploitation Status

  • Actively distributed in the wild via ClickFix social engineering campaigns.
  • No CISA KEV entry (no CVE exists).
  • macOS stealer-as-a-service ecosystems have matured rapidly since 2024; expect this capability to be adopted across competing families.

Detection & Response

The defensive center of gravity here is process lineage on macOS: Terminal/iTerm spawning shells that pull remote content, osascript invocation with encoded payloads, unsigned binaries executing from user-writable paths, and unexpected LaunchAgent drops. If you are not collecting macOS process execution telemetry (Endpoint Security Framework via your EDR, or Unified Logs forwarded to your SIEM), that gap is your first remediation item.

Sigma Rules

These rules target the ClickFix execution pattern and stealer staging behavior. Note the macOS logsource — you will need a Sigma backend that maps macOS process creation events (most EDR-to-SIEM pipelines can provide this).

YAML
---
title: macOS ClickFix Shell Pipe Execution via Terminal
description: Detects curl/wget piped directly to a shell interpreter from Terminal or iTerm, the hallmark of ClickFix-style paste-and-run lures.
references:
  - https://www.bleepingcomputer.com/news/security/new-amnesiastealer-macos-malware-hijacks-browser-sessions-via-remote-control/
  - https://attack.mitre.org/techniques/T1059/004/
  - https://attack.mitre.org/techniques/T1204/
author: Security Arsenal
date: 2026/04/06
id: 3f8a1c54-2b7e-4d91-a6c0-9e5f2d8b4a71
status: experimental
tags:
  - attack.execution
  - attack.t1059.004
  - attack.t1204
logsource:
  category: process_creation
  product: macos
detection:
  selection_parent:
    ParentImage|endswith:
      - '/Terminal'
      - '/iTerm2'
      - '/Terminal.app/Contents/MacOS/Terminal'
  selection_cmd:
    CommandLine|contains:
      - 'curl'
      - 'wget'
  selection_pipe:
    CommandLine|contains:
      - '| bash'
      - '| sh'
      - '| zsh'
      - '|bash'
      - '|sh'
      - '|zsh'
  condition: selection_parent and selection_cmd and selection_pipe
falsepositives:
  - Developer bootstrap scripts (Homebrew installs, dev environment setup) — tune by parent process and destination domain
level: high
---
title: macOS Base64 Encoded Command Execution via osascript or Shell
description: Detects execution of base64-decoded commands through osascript or shell interpreters, a common ClickFix obfuscation layer used to stage AmnesiaStealer-style payloads.
references:
  - https://www.bleepingcomputer.com/news/security/new-amnesiastealer-macos-malware-hijacks-browser-sessions-via-remote-control/
  - https://attack.mitre.org/techniques/T1027/
  - https://attack.mitre.org/techniques/T1059/002/
author: Security Arsenal
date: 2026/04/06
id: 8c2e5b19-4f6a-47d3-b1e8-3a9c7d5f2e60
status: experimental
tags:
  - attack.defense_evasion
  - attack.t1027
  - attack.execution
  - attack.t1059.002
logsource:
  category: process_creation
  product: macos
detection:
  selection:
    CommandLine|contains:
      - 'base64 -d'
      - 'base64 --decode'
      - 'base64 -D'
      - 'echo '
  selection_interpreter:
    Image|endswith:
      - '/osascript'
      - '/bash'
      - '/zsh'
      - '/sh'
      - '/python3'
  condition: selection and selection_interpreter
falsepositives:
  - Legitimate automation and MDM scripts — whitelist known management tool parent processes
level: medium
---
title: Unsigned Binary Execution from User-Writable macOS Paths
description: Detects execution of binaries from /tmp, /var/tmp, /Users/Shared, or hidden directories in user home folders — typical staging locations for macOS stealers dropped via shell one-liners.
references:
  - https://www.bleepingcomputer.com/news/security/new-amnesiastealer-macos-malware-hijacks-browser-sessions-via-remote-control/
  - https://attack.mitre.org/techniques/T1036/
author: Security Arsenal
date: 2026/04/06
id: 5d1a9f36-7c48-4e2b-83a1-6b4e0c9d5f83
status: experimental
tags:
  - attack.defense_evasion
  - attack.t1036
  - attack.execution
logsource:
  category: process_creation
  product: macos
detection:
  selection:
    Image|contains:
      - '/tmp/'
      - '/var/tmp/'
      - '/Users/Shared/'
      - '/Library/Caches/'
      - '/.'
  filter_apps:
    Image|startswith:
      - '/Applications/'
      - '/System/'
      - '/usr/'
      - '/bin/'
      - '/sbin/'
  condition: selection and not filter_apps
falsepositives:
  - Some installer and updater frameworks stage in /tmp — correlate with parent process and code-signing status from EDR
level: medium

KQL — Microsoft Sentinel / Defender

The first query hunts ClickFix-style process lineage on macOS endpoints onboarded to Defender for Endpoint. The second hunts for the streaming module's network behavior — long-lived outbound connections from shell-spawned or unsigned processes on macOS devices.

KQL — Microsoft Sentinel / Defender
// Hunt 1: ClickFix-style shell pipe execution and encoded commands on macOS endpoints
DeviceProcessEvents
| where TimeGenerated > ago(7d)
| where DeviceOSPlatform has "macOS"
| where ProcessCommandLine has_any ("| bash", "| sh", "| zsh", "base64 -d", "base64 -D", "base64 --decode")
    or (FileName in~ ("curl", "wget") and ProcessCommandLine has "http" and ProcessCommandLine has "|")
    or (FileName =~ "osascript" and ProcessCommandLine has_any ("curl", "base64", "do shell script"))
| project TimeGenerated, DeviceName, AccountName, FileName, ProcessCommandLine,
          InitiatingProcessFileName, InitiatingProcessCommandLine, SHA256, ReportId
| order by TimeGenerated desc
;

// Hunt 2: Suspicious outbound connections from shell-spawned processes on macOS (streaming module behavior)
DeviceNetworkEvents
| where TimeGenerated > ago(24h)
| where DeviceOSPlatform has "macOS"
| where InitiatingProcessFileName in~ ("bash", "zsh", "sh", "python3", "osascript")
    or InitiatingProcessFolderPath has_any ("/tmp/", "/var/tmp/", "/Users/Shared/", "/Library/Caches/")
| where RemotePort in (443, 8443, 8080, 80)
| where RemoteIPType == "Public"
| summarize ConnectionCount = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated),
            RemoteIPs = make_set(RemoteIP, 20), URLs = make_set(RemoteUrl, 20)
    by DeviceName, InitiatingProcessFileName, InitiatingProcessCommandLine
| where ConnectionCount > 5
| order by ConnectionCount desc

Velociraptor VQL

This artifact hunts macOS endpoints for the two most reliable forensic artifacts of this campaign: suspicious process lineage (live) and recently created LaunchAgent persistence plists (durable). Run it as a hunt across your macOS fleet.

VQL — Velociraptor
-- AmnesiaStealer / ClickFix hunt: process lineage, staged binaries, and LaunchAgent persistence on macOS
-- Section 1: Live processes matching ClickFix execution or staging paths
SELECT Pid, Ppid, Name, CommandLine, Exe, Username, CreateTime
FROM pslist()
WHERE CommandLine =~ '(?i)(\|\s*(bash|sh|zsh)|base64\s+(-d|-D|--decode)|osascript.*do shell script)'
   OR Exe =~ '(?i)^(/tmp/|/var/tmp/|/Users/Shared/|/Users/[^/]+/Library/Caches/)'

-- Section 2: Recently created or modified LaunchAgents/LaunchDaemons (persistence check)
SELECT FullPath, Mtime, Btime, Size,
       read_file(filename=FullPath, length=2048) AS PlistHead
FROM glob(globs=['/Users/*/Library/LaunchAgents/*.plist',
                 '/Library/LaunchAgents/*.plist',
                 '/Library/LaunchDaemons/*.plist'])
WHERE Mtime > now() - (7 * 24 * 3600)
ORDER BY Mtime DESC

Remediation / Hardening Script (Bash for macOS)

This script is designed for IR responders and MDM-driven deployment (Jamf, Kandji, Intune shell scripts). It audits a macOS host for the indicators above: suspicious LaunchAgents, staged executables in user-writable paths, unsigned binaries, and shell histories showing curl-pipe-shell patterns.

Bash / Shell
#!/bin/bash
# AmnesiaStealer / ClickFix macOS triage and hardening script
# Run as root via MDM or during IR triage. Read-only audit — no destructive actions.

REPORT="/var/tmp/amnesiastealer_triage_$(date +%Y%m%d_%H%M%S).txt"
echo "=== AmnesiaStealer/ClickFix Triage — $(date) ===" | tee "$REPORT"

# 1. Audit LaunchAgents/LaunchDaemons created in the last 14 days
echo -e "\n[+] Recent persistence plists (last 14 days):" | tee -a "$REPORT"
find /Users/*/Library/LaunchAgents /Library/LaunchAgents /Library/LaunchDaemons \
  -name "*.plist" -mtime -14 -exec ls -la {} \; 2>/dev/null | tee -a "$REPORT"

# 2. Flag plists pointing at suspicious executable paths
echo -e "\n[+] Plists referencing suspicious paths:" | tee -a "$REPORT"
grep -rlE "(/tmp/|/var/tmp/|/Users/Shared/|curl|base64)" \
  /Users/*/Library/LaunchAgents /Library/LaunchAgents 2>/dev/null | tee -a "$REPORT"

# 3. Find executables staged in user-writable locations
echo -e "\n[+] Executables in staging paths:" | tee -a "$REPORT"
find /tmp /var/tmp /Users/Shared -type f -perm +111 -mtime -14 2>/dev/null | tee -a "$REPORT"

# 4. Check code-signing status of anything found (unsigned = high suspicion)
echo -e "\n[+] Signature check on staged executables:" | tee -a "$REPORT"
find /tmp /var/tmp /Users/Shared -type f -perm +111 -mtime -14 2>/dev/null | while read -r f; do
  sig=$(codesign -dv "$f" 2>&1 | head -1)
  echo "$f :: $sig" | tee -a "$REPORT"
done

# 5. Scan shell histories for ClickFix indicators (curl-pipe-shell, base64, osascript abuse)
echo -e "\n[+] Shell history ClickFix indicators:" | tee -a "$REPORT"
for h in /Users/*/.zsh_history /Users/*/.bash_history; do
  [ -f "$h" ] && grep -nE "(curl.*\|.*(bash|sh|zsh)|base64 -(d|D)|osascript.*do shell script)" "$h" 2>/dev/null \
    | sed "s|^|$h:|" | tee -a "$REPORT"
done

# 6. List active network connections from non-standard processes
echo -e "\n[+] Established outbound connections (non-system processes):" | tee -a "$REPORT"
lsof -iTCP -sTCP:ESTABLISHED -P -n 2>/dev/null | grep -vE "(rapportd|mDNSResponder|StudentD|system_)" | tee -a "$REPORT"

# 7. Hardening check: verify Gatekeeper and XProtect are enabled
echo -e "\n[+] Gatekeeper status:" | tee -a "$REPORT"
spctl --status 2>&1 | tee -a "$REPORT"
echo -e "\n[+] XProtect version:" | tee -a "$REPORT"
/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" \
  /Library/Apple/System/Library/CoreServices/XProtect.app/Contents/Info.plist 2>&1 | tee -a "$REPORT"

# 8. Check for Full Disk Access grants to unexpected apps (stealers abuse TCC)
echo -e "\n[+] TCC Full Disk Access grants (review for anomalies):" | tee -a "$REPORT"
/usr/libexec/PlistBuddy -c "Print" /Library/Application\ Support/com.apple.TCC/MDMOverrides.plist 2>/dev/null | tee -a "$REPORT"
sqlite3 "/Library/Application Support/com.apple.TCC/TCC.db" \
  "SELECT client FROM access WHERE service='kTCCServiceSystemPolicyAllFiles' AND auth_value=2;" 2>/dev/null | tee -a "$REPORT"

echo -e "\n=== Triage complete. Report: $REPORT ===" | tee -a "$REPORT"
echo "Next steps if indicators found: isolate host from network, revoke all SaaS sessions for the affected user, rotate credentials, and image or rebuild the endpoint."

Remediation and Defensive Measures

Because there is no patchable vulnerability, remediation is architectural and behavioral:

Immediate (if compromise is suspected):

  1. Isolate the endpoint from the network — the streaming module means the attacker may be live in a session right now.
  2. Revoke all active sessions for the affected user across SaaS platforms: M365 (revoke sign-in sessions in Entra ID), Google Workspace (reset sign-in cookies), Okta (clear sessions), AWS (revoke IAM/SSO sessions), and any financial or admin consoles. Do not assume token expiry will save you — assume the attacker is interactive.
  3. Rotate credentials stored in the browser and any credentials entered since initial infection, including those protected by the Keychain (assume spoofed password prompts succeeded).
  4. Rebuild the endpoint. Stealer cleanup by deletion is not reliable; reimage from known-good media.

Preventive controls:

  1. User education targeted at ClickFix specifically. Generic phishing training does not cover "paste this into Terminal" lures. Show macOS users exactly what a fake CAPTCHA-to-Terminal flow looks like. This single control addresses the entire intrusion vector.
  2. Deploy EDR on macOS endpoints with Endpoint Security Framework-based process lineage. If your macOS fleet is unmanaged or AV-only, you are blind to this entire attack class.
  3. Restrict or alert on Terminal/iTerm usage for non-technical users via MDM configuration profiles where feasible, or at minimum alert on shell-pipe execution patterns per the detections above.
  4. Enforce phishing-resistant MFA (FIDO2/passkeys) with token binding where supported. While the streaming module can ride a live session, bound tokens materially reduce the value of exfiltrated cookies and raise the attacker's cost.
  5. Block paste-to-Terminal abuse via browser/clipboard controls in managed browsers where available, and consider web filtering rules for newly registered domains serving fake CAPTCHA/update pages.
  6. Monitor TCC grants — stealers on macOS frequently request Full Disk Access or Accessibility permissions via spoofed prompts; alert on new grants to unsigned or unexpected applications.

Strategic:

  • Treat macOS as a first-class citizen in your SOC. Most mature SOCs still have a telemetry gap on macOS relative to Windows; infostealer operators know this and are pricing macOS logs at a premium on criminal markets.
  • Reduce SaaS session lifetimes and enforce continuous access evaluation so that a hijacked session has a shorter useful life even when the attacker is interactive.

Related Resources

Security Arsenal Managed SOC Services AlertMonitor Platform Book a SOC Assessment soc-mdr Intel Hub

Is your security operations ready?

Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.