Apple's Screen Sharing service — a component many Mac admins leave enabled for remote support and forget about — is being actively exploited in the wild. According to reporting from Malwarebytes, attackers are abusing a vulnerability in macOS Screen Sharing to escalate to root access and deploy Monero (XMR) cryptominers on compromised machines.
This is not a theoretical exercise. Active exploitation means every unmanaged, unpatched, or unnecessarily exposed Mac in your environment is a target. Cryptomining is the visible payload today, but root access on an endpoint is a beachhead — once an attacker owns the box at the kernel-adjacent level, miner deployment may simply be the monetization step before lateral movement, credential theft, or sale of the access to a ransomware affiliate.
If your organization runs Macs — developer fleets, executive laptops, creative teams — treat this as an emergency patch event.
Technical Analysis
Affected Component
The vulnerability resides in macOS Screen Sharing, Apple's built-in VNC-based remote desktop service. The relevant components on disk include:
screensharingd— the Screen Sharing daemon (/System/Library/CoreServices/RemoteManagement/screensharingd.app)- The Apple Remote Desktop / Remote Management stack (
ARDAgent,ScreensharingAgent) - TCP port 5900 (VNC) — the standard listening port when Screen Sharing or Remote Management's VNC options are enabled
Screen Sharing is frequently enabled in enterprise environments for IT support, and — critically — is also enabled by MDM misconfiguration, by shadow IT, or by users who toggle it on and never turn it off. Many organizations have no inventory of which endpoints are listening on 5900.
Attack Chain (Defender's View)
Based on the reported campaign, the attack chain looks like this:
- Discovery — Attackers scan for hosts with TCP/5900 exposed. This includes internet-facing Macs, but in enterprise environments the more common scenario is an attacker who has already gained a foothold (phishing, another exploited service) pivoting internally to Macs with Screen Sharing enabled.
- Exploitation — The Screen Sharing vulnerability is triggered remotely, yielding code execution in the context of the service.
- Privilege escalation to root — The exploited service context is leveraged to gain root privileges. Root on macOS means the attacker can disable or weaken built-in controls (Gatekeeper checks, XProtect behavior where writable, TCC database tampering) and install persistent payloads.
- Payload delivery — A Monero cryptominer (XMRig or a variant) is downloaded and executed, typically via
curlor a shell stager. - Persistence — Miners on macOS almost universally persist via LaunchDaemons (
/Library/LaunchDaemons/) or LaunchAgents (~/Library/LaunchAgents/), with property lists using innocuous names that mimic Apple or legitimate vendor plists. - Monetization — The miner connects to a mining pool over the Stratum protocol (commonly TCP 3333, 5555, 7777, or 443) and begins consuming CPU/GPU cycles.
Exploitation Status
- Status: Confirmed active exploitation in the wild
- CVE: No CVE identifier has been published in the reporting at time of writing. Track Apple's security release notes and the CISA Known Exploited Vulnerabilities (KEV) catalog — if a CVE is assigned and exploitation is confirmed, KEV inclusion typically follows quickly and carries a remediation deadline for federal agencies (and a de facto deadline for everyone else).
- Payload: Monero (XMR) cryptominer
- Privilege level achieved: root
Why Root + Miner Is Worse Than It Sounds
Cryptominers are often dismissed as a nuisance. That is a mistake in an IR context:
- Root access means arbitrary follow-on payloads. The same access channel can deliver infostealers targeting Keychain, browser credentials, SSH keys, and developer secrets (Mac fleets are disproportionately developer machines).
- Miners are a smoke signal for broken controls. If a remote exploit-to-root chain landed on an endpoint, your patch management, attack surface reduction, and EDR coverage on macOS all failed simultaneously.
- Performance and hardware impact. Sustained 100% CPU on laptops causes thermal throttling, battery degradation, and user-visible slowdowns — often how these infections are first noticed.
Detection & Response
The detections below target the observable behaviors of this campaign: Screen Sharing exploitation and anomalous child processes, shell-based payload staging, miner execution, launchd persistence, and Stratum pool connections. They assume you have process creation telemetry on macOS — via Microsoft Defender for Endpoint on Mac, an EDR with macOS support, or Apple's Endpoint Security framework feeding a SIEM.
Sigma Rules
---
title: macOS Screen Sharing Daemon Spawning Shell or Script Interpreter
id: 3f8a2c41-7b9d-4e6f-a1c2-5d8e9f0a1b2c
status: experimental
description: Detects screensharingd or ARDAgent spawning shells or script interpreters, consistent with post-exploitation activity following exploitation of the macOS Screen Sharing service reported in August 2026.
references:
- https://www.malwarebytes.com/blog/bugs/2026/08/update-your-mac-screen-sharing-vulnerability-exploited-in-the-wild
- https://attack.mitre.org/techniques/T1059/
author: Security Arsenal
date: 2026/08/10
tags:
- attack.execution
- attack.t1059
- attack.initial_access
logsource:
category: process_creation
product: macos
detection:
selection_parent:
ParentImage|endswith:
- '/screensharingd'
- '/ARDAgent'
- '/ScreensharingAgent'
selection_child:
Image|endswith:
- '/sh'
- '/bash'
- '/zsh'
- '/python'
- '/python3'
- '/osascript'
- '/curl'
- '/wget'
condition: selection_parent and selection_child
falsepositives:
- Legitimate remote administration tooling invoked via Apple Remote Desktop (rare for interactive shells; investigate context)
level: high
---
title: macOS LaunchDaemon Persistence Created by Shell or Downloader
id: 9c1d4e72-3a6b-4f58-b2d1-7e0a3c5f8d9e
status: experimental
description: Detects creation of LaunchDaemon/LaunchAgent plist files by shells, curl, or other download utilities, matching the persistence behavior of cryptominers deployed after the macOS Screen Sharing exploitation campaign.
references:
- https://www.malwarebytes.com/blog/bugs/2026/08/update-your-mac-screen-sharing-vulnerability-exploited-in-the-wild
- https://attack.mitre.org/techniques/T1543/001/
author: Security Arsenal
date: 2026/08/10
tags:
- attack.persistence
- attack.privilege_escalation
- attack.t1543.001
logsource:
category: file_event
product: macos
detection:
selection_path:
TargetFilename|contains:
- '/Library/LaunchDaemons/'
- '/Library/LaunchAgents/'
- '/LaunchAgents/'
selection_ext:
TargetFilename|endswith: '.plist'
selection_process:
Image|endswith:
- '/sh'
- '/bash'
- '/zsh'
- '/curl'
- '/wget'
- '/python'
- '/python3'
- '/osascript'
condition: selection_path and selection_ext and selection_process
falsepositives:
- Software installers and MDM agents writing plists (typically signed installer/pkg processes, not interactive shells or curl)
level: high
---
title: macOS Cryptominer Execution and Stratum Pool Indicators
id: 6b2e7a15-8c4d-4f19-a3e5-2b9d1e6f0c7a
status: experimental
description: Detects execution of known Monero miner binaries and command-line indicators of Stratum mining protocol usage, matching the cryptomining payload reported in the macOS Screen Sharing exploitation campaign.
references:
- https://www.malwarebytes.com/blog/bugs/2026/08/update-your-mac-screen-sharing-vulnerability-exploited-in-the-wild
- https://attack.mitre.org/techniques/T1496/
author: Security Arsenal
date: 2026/08/10
tags:
- attack.impact
- attack.t1496
logsource:
category: process_creation
product: macos
detection:
selection_img:
Image|contains:
- 'xmrig'
- 'xmr-stak'
- 'minerd'
- 'cpuminer'
selection_cli:
CommandLine|contains:
- 'stratum+tcp://'
- 'stratum+ssl://'
- '--coin=monero'
- '--algo=rx/'
- '--donate-level'
- 'xmrpool'
- 'nanopool'
- 'supportxmr'
- 'hashrate'
condition: 1 of selection_*
falsepositives:
- Legitimate mining activity (rare in enterprise environments; should be policy-prohibited regardless)
level: critical
KQL — Microsoft Sentinel / Defender (MDE on macOS)
This query hunts the full kill chain across macOS endpoints enrolled in Microsoft Defender for Endpoint: exploitation staging from remote-access daemons, miner execution, and launchd persistence. MDE for Mac surfaces macOS process/file events into DeviceProcessEvents and DeviceFileEvents.
// Hunt: macOS Screen Sharing post-exploitation & cryptominer activity
let TimeWindow = 14d;
let SuspiciousParents = dynamic(["screensharingd", "ARDAgent", "ScreensharingAgent"]);
let ShellsAndDownloaders = dynamic(["sh", "bash", "zsh", "curl", "wget", "python", "python3", "osascript"]);
let MinerIndicators = dynamic(["xmrig", "xmr-stak", "minerd", "cpuminer", "stratum+tcp", "stratum+ssl", "--donate-level", "--algo=rx/", "supportxmr", "xmrpool", "nanopool"]);
// Stage 1: Screen Sharing / ARD daemons spawning shells or downloaders
let Stage1 = DeviceProcessEvents
| where TimeGenerated > ago(TimeWindow)
| where InitiatingProcessFileName in~ (SuspiciousParents)
| where FileName in~ (ShellsAndDownloaders)
| project Stage1Time=TimeGenerated, DeviceName, DeviceId, InitiatingProcessFileName, FileName, ProcessCommandLine, AccountName;
// Stage 2: Miner execution or Stratum CLI indicators
let Stage2 = DeviceProcessEvents
| where TimeGenerated > ago(TimeWindow)
| where ProcessCommandLine has_any (MinerIndicators) or FileName has_any (MinerIndicators)
| project Stage2Time=TimeGenerated, DeviceName, DeviceId, FileName, ProcessCommandLine, SHA256, AccountName;
// Stage 3: Launchd persistence written by shells/downloaders
let Stage3 = DeviceFileEvents
| where TimeGenerated > ago(TimeWindow)
| where FolderPath has_any ("/Library/LaunchDaemons/", "/Library/LaunchAgents/") and FolderPath endswith ".plist"
| where InitiatingProcessFileName in~ (ShellsAndDownloaders)
| project Stage3Time=TimeGenerated, DeviceName, DeviceId, FolderPath, InitiatingProcessFileName, InitiatingProcessCommandLine;
Stage1
| union Stage2
| union Stage3
| sort by DeviceName, coalesce(Stage1Time, coalesce(Stage2Time, Stage3Time))
For network-layer hunting of Stratum pool connections from Macs (useful if you ingest firewall or Syslog/CEF data rather than MDE):
// Network hunt: macOS endpoints connecting to common mining pool ports
let MiningPorts = dynamic([3333, 4444, 5555, 7777, 8888, 14444, 45700]);
DeviceNetworkEvents
| where TimeGenerated > ago(14d)
| where RemotePort in (MiningPorts)
| where InitiatingProcessFileName !in~ (dynamic(["firefox", "Google Chrome", "Safari", "Microsoft Edge"]))
| summarize Connections=count(), RemoteIPs=make_set(RemoteIP), FirstSeen=min(TimeGenerated), LastSeen=max(TimeGenerated)
by DeviceName, InitiatingProcessFileName, InitiatingProcessCommandLine, RemotePort
| order by Connections desc
Velociraptor VQL — Endpoint Hunt Artifact
Velociraptor runs natively on macOS and is an excellent DFIR triage tool for Mac fleets. This artifact triages a suspect endpoint: suspicious process lineage, launchd persistence, and active Stratum connections.
-- macOS Screen Sharing Exploitation / Cryptominer Triage
-- Combines process, persistence, and network artifacts in one hunt
-- 1. Processes: miners, shells spawned near remote-access daemons, Stratum CLI flags
SELECT Pid, Ppid, Name, CommandLine, Exe, Username, CreateTime,
'process' AS ArtifactType
FROM pslist()
WHERE CommandLine =~ '(?i)(xmrig|xmr-stak|minerd|stratum\+tcp|stratum\+ssl|donate-level|algo=rx/|supportxmr|xmrpool|nanopool)'
OR Name =~ '(?i)(xmrig|minerd|cpuminer)'
UNION ALL
-- 2. LaunchDaemon/LaunchAgent plists modified in the last 14 days
SELECT 0 AS Pid, 0 AS Ppid, OSPath AS Name, '' AS CommandLine,
OSPath AS Exe, '' AS Username, Mtime AS CreateTime,
'persistence_plist' AS ArtifactType
FROM glob(globs=['/Library/LaunchDaemons/*.plist',
'/Library/LaunchAgents/*.plist',
'/Users/*/Library/LaunchAgents/*.plist'],
accessor='file')
WHERE Mtime > (now() - 14 * 24 * 3600)
UNION ALL
-- 3. Established connections to common mining pool ports
SELECT Pid, 0 AS Ppid, Name, '' AS CommandLine,
Raddr AS Exe, '' AS Username, now() AS CreateTime,
'network_stratum' AS ArtifactType
FROM netstat()
WHERE Status =~ 'ESTABLISHED'
AND Raddr =~ ':(3333|4444|5555|7777|8888|14444|45700)$'
Remediation
1. Patch Immediately
Apply the current macOS security updates on all endpoints. Apple ships fixes via rapid security responses and point releases — do not wait for your standard patch ring. Specific fixed-version numbers should be confirmed against Apple's security releases page for your macOS generation (Sonoma, Sequoia, and later), as Apple assigns the build numbers at release time:
- Apple security releases: https://support.apple.com/en-us/HT201222
- Malwarebytes reporting: https://www.malwarebytes.com/blog/bugs/2026/08/update-your-mac-screen-sharing-vulnerability-exploited-in-the-wild
Use this script to audit patch state, enumerate exposure, and disable the vulnerable service where it isn't operationally required:
#!/bin/bash
# macOS Screen Sharing Exploitation — Audit & Harden Script
# Run with sudo on each endpoint or deploy via MDM (Jamf, Kandji, Intune)
echo "=== [1] Current macOS build ==="
sw_vers
echo ""
echo "=== [2] Pending security updates (install all) ==="
softwareupdate -l 2>&1
# Uncomment to apply updates automatically:
# softwareupdate -i -a --restart
echo ""
echo "=== [3] Is anything listening on VNC port 5900? ==="
lsof -nP -iTCP:5900 -sTCP:LISTEN || echo "No listener on 5900"
echo ""
echo "=== [4] Screen Sharing / Remote Management status ==="
sudo launchctl list 2>/dev/null | grep -iE 'screenshar|ARD|RemoteDesktop' || echo "No Screen Sharing/ARD daemons loaded"
ls /Library/Application\ Support/Apple/Remote\ Desktop/ 2>/dev/null || echo "No ARD config directory"
echo ""
echo "=== [5] Disable Screen Sharing if not required ==="
# Disables Screen Sharing and Remote Management (requires root)
sudo launchctl disable system/com.apple.screensharing 2>/dev/null && echo "screensharing disabled in launchd"
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate -stop 2>/dev/null && echo "Remote Management deactivated"
echo ""
echo "=== [6] Block VNC at the Application Firewall (defense in depth) ==="
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate on
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setblockall on 2>/dev/null || \
echo "NOTE: --setblockall blocks all inbound; tune per your environment before enforcing"
echo ""
echo "=== [7] Check for miner persistence artifacts ==="
find /Library/LaunchDaemons /Library/LaunchAgents ~/Library/LaunchAgents \
-name '*.plist' -mtime -14 -exec ls -la {} \; 2>/dev/null
echo ""
echo "=== [8] Check for known miner binaries and Stratum processes ==="
ps aux | grep -iE 'xmrig|xmr-stak|minerd|stratum' | grep -v grep || echo "No obvious miner processes"
pgrep -fl xmrig || true
echo ""
echo "=== [9] Flag unsigned plists loading unsigned binaries ==="
for plist in $(find /Library/LaunchDaemons /Library/LaunchAgents -name '*.plist' 2>/dev/null); do
prog=$(/usr/libexec/PlistBuddy -c 'Print :Program' "$plist" 2>/dev/null) || \
prog=$(/usr/libexec/PlistBuddy -c 'Print :ProgramArguments:0' "$plist" 2>/dev/null)
[ -n "$prog" ] && [ -f "$prog" ] && \
codesign -v "$prog" 2>/dev/null || echo "REVIEW: $plist -> $prog (unsigned or missing)"
done
echo ""
echo "=== Audit complete. Review all REVIEW flags and unexpected listeners. ==="
2. Reduce the Attack Surface
- Disable Screen Sharing and Remote Management everywhere they are not explicitly required. This is the single highest-value action. Replace ad-hoc Screen Sharing with a managed remote support tool that has MFA, session logging, and centralized control.
- Never expose TCP/5900 to the internet. Verify this at the perimeter — scan your external ranges for 5900 and close it. There is no legitimate business reason for internet-facing VNC on macOS.
- Segment Macs from server VLANs and restrict workstation-to-workstation 5900 traffic to the IT support subnet.
3. Hunt Before You Assume You're Clean
Because exploitation is confirmed in the wild, patching alone is insufficient — a host exploited before patching stays compromised after patching. Run the KQL and VQL hunts above across your fleet, prioritizing:
- Hosts that were listening on 5900 in the last 30 days
- Hosts with recent LaunchDaemon/LaunchAgent changes not tied to a software deployment
- Hosts with sustained high CPU from an unrecognized process
4. If You Find a Compromised Host
Treat miner discovery as a full root-level compromise, not a nuisance cleanup:
- Isolate the host from the network (EDR network isolation or physical disconnect).
- Preserve evidence — capture memory and triage artifacts (Velociraptor hunt above) before remediation. The miner is the visible payload; you need to determine whether credentials, SSH keys, or browser data were also touched.
- Rotate credentials used on or stored on that machine — Keychain items, SSH private keys, cloud CLI tokens, browser-saved passwords. Root access means assume everything readable was read.
- Rebuild from known-good media rather than surgically removing the miner. Root-level persistence on macOS can survive miner deletion in ways that are hard to fully validate.
- Review outbound traffic from the host for the dwell period to identify C2 beyond the mining pool.
5. Watch for CVE Assignment and KEV Inclusion
As of publication, no CVE identifier has been formally associated with this vulnerability in the available reporting. Monitor:
- Apple's security release notes
- The CISA KEV catalog — if added, federal agencies get a binding remediation deadline, and it serves as a strong prioritization signal for everyone
- Malwarebytes' original reporting for updated technical details
Key Takeaways
- This is active exploitation, not a warning. Screen Sharing on unpatched Macs is being turned into root shells right now.
- Disable Screen Sharing unless you can articulate why a specific machine needs it. Default-deny for remote desktop services.
- Patch and hunt in parallel. Patching closes the door; hunting tells you who already walked through it.
- A cryptominer means root compromise. Respond accordingly — isolate, preserve, rotate, rebuild.
- Macs need the same EDR, telemetry, and attack-surface discipline as Windows endpoints. "Macs don't get malware" has been dead for a decade; this campaign is one more entry in the ledger.
Related Resources
Security Arsenal Penetration Testing Services AlertMonitor Platform Book a SOC Assessment vulnerability-management Intel Hub
Is your security operations ready?
Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.