<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Synthetic Events — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/synthetic-events/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Wed, 24 Jan 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/synthetic-events/feed.xml" rel="self" type="application/rss+xml"/><item><title>macOS Synthetic Mouse Event Vulnerabilities</title><link>https://feed.craftedsignal.io/briefs/2024-01-24-synthetic-reality/</link><pubDate>Wed, 24 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-24-synthetic-reality/</guid><description>macOS is vulnerable to synthetic mouse event attacks, allowing threat actors to bypass security mechanisms and interact with protected UI components to perform unauthorized actions like dumping keychains and loading kernel extensions.</description><content:encoded><![CDATA[<p>This brief discusses a class of vulnerabilities on macOS that can be exploited through the programmatic generation of synthetic mouse events. These vulnerabilities allow attackers to bypass security mechanisms designed to protect user privacy and system integrity. The report references historic malware examples abusing synthetic events like OSX.FruitFly and OSX.DevilRobber, discusses CVE-2017-7150, and highlights unpatched 0-day vulnerabilities as of 2018. Attackers can manipulate UI prompts, including security alerts, privacy requests, and the &ldquo;User Assisted Kernel Loading&rdquo; interface, enabling malicious activities such as keychain theft, geolocation tracking, and unauthorized kernel extension loading. The core issue lies in the OS trusting synthetic events originating from internal processes or specific input methods like &ldquo;Mouse Keys&rdquo;. This creates a significant attack surface, particularly on older macOS versions, where protections against synthetic events are incomplete.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Gain initial access to the macOS system through an unspecified method (e.g., exploiting a separate vulnerability, social engineering).</li>
<li>The attacker programmatically enables &ldquo;Mouse Keys&rdquo; via AppleScript, using <code>System Preferences</code> to reveal the <code>com.apple.preference.universalaccess</code> pane and then sending synthetic mouse clicks to enable the feature.</li>
<li>The attacker moves the mouse cursor to a target UI element (e.g., an &ldquo;Allow&rdquo; button on a security prompt) using <code>CGEventCreateMouseEvent</code> to create a mouse move event.</li>
<li>The attacker sends a &ldquo;synthetic&rdquo; keyboard event with keycode 87 (numberpad 5) via AppleScript, triggering a mouse click due to &ldquo;Mouse Keys&rdquo; being enabled.</li>
<li>The OS converts the keyboard event into a trusted mouse click, bypassing protections on the target UI component.</li>
<li>The attacker leverages the bypassed UI prompt to perform unauthorized actions, such as dismissing privacy alerts related to geolocation access.</li>
<li>The attacker programmatically accesses sensitive data (e.g., geolocation information) that would normally require user consent.</li>
<li>The attacker exfiltrates the stolen data or uses the elevated privileges to further compromise the system.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows attackers to bypass macOS security mechanisms, potentially impacting a large number of users. Attackers can steal sensitive information like keychain data, access private user data (geolocation, contacts, calendar), and load malicious kernel extensions without user consent. This can lead to complete system compromise, data theft, and persistent malware infections. The report highlights that privacy-related alerts can be trivially bypassed, raising serious concerns about user data protection. The ease of exploitation, especially with &ldquo;Mouse Keys,&rdquo; makes this a critical vulnerability.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Monitor for processes enabling &ldquo;Mouse Keys&rdquo; via AppleScript or command-line tools; create a Sigma rule based on <code>process_creation</code> events targeting <code>osascript</code> executing commands related to <code>com.apple.preference.universalaccess</code>.</li>
<li>Detect the use of <code>CGPostMouseEvent</code> or <code>CGEventCreateMouseEvent</code> API calls, especially when combined with AppleScript execution, to identify potential synthetic event generation.</li>
<li>Audit and monitor processes accessing sensitive user data (geolocation, contacts, calendar) after the execution of AppleScript or CoreGraphics functions, to identify potential exploitation of synthetic event vulnerabilities.</li>
<li>Monitor for the execution of AppleScript commands that simulate key presses (e.g., <code>key code 87</code>) especially following mouse movement events, as this may indicate abuse of the Mouse Keys feature.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">threat</category><category>macos</category><category>synthetic events</category><category>privilege escalation</category><category>defense evasion</category></item></channel></rss>