<?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>Cve-2017-7170 — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/cve-2017-7170/</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>Fri, 26 Jan 2024 18:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/cve-2017-7170/feed.xml" rel="self" type="application/rss+xml"/><item><title>macOS Local Privilege Escalation via CVE-2017-7170</title><link>https://feed.craftedsignal.io/briefs/2024-01-26-macos-privesc-cve-2017-7170/</link><pubDate>Fri, 26 Jan 2024 18:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-26-macos-privesc-cve-2017-7170/</guid><description>CVE-2017-7170 is a local privilege escalation vulnerability in macOS stemming from insecure use of the `AuthorizationExecuteWithPrivileges` API, allowing unprivileged users to execute arbitrary code as root by sniffing authorization references.</description><content:encoded><![CDATA[<p>CVE-2017-7170 is a now-patched, but historically significant, local privilege escalation vulnerability affecting macOS. The vulnerability resides in the insecure implementation of the <code>AuthorizationExecuteWithPrivileges</code> API. This API, intended for executing binaries with elevated privileges after user authentication, lacks proper validation of the binary path.  An unprivileged attacker could potentially manipulate the binary executed via <code>AuthorizationExecuteWithPrivileges</code>, or more subtly, sniff the externalized authorization reference passed to <code>security_authtrampoline</code> and reuse it to perform actions as root. The issue was disclosed in March 2020, although the CVE was assigned earlier. While this vulnerability has been patched, understanding its exploitation provides valuable insight into macOS security mechanisms and potential attack vectors.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An unprivileged user executes a legitimate application (e.g., an installer) that utilizes the <code>AuthorizationExecuteWithPrivileges</code> API.</li>
<li>The <code>AuthorizationExecuteWithPrivileges</code> function externalizes the authorization reference via <code>AuthorizationMakeExternalForm</code> creating an <code>AuthorizationExternalForm</code>.</li>
<li>The application invokes <code>AuthorizationExecuteWithPrivilegesExternalForm</code>, passing the externalized authorization reference.</li>
<li><code>AuthorizationExecuteWithPrivilegesExternalForm</code> executes the setuid binary <code>/usr/libexec/security_authtrampoline</code>.</li>
<li>The <code>security_authtrampoline</code> process invokes <code>AuthorizationCopyRights</code>, generating an XPC message to <code>authd</code>.</li>
<li>The system prompts the user for authentication via the Security Agent.</li>
<li>An attacker sniffs the externalized authorization reference passed to the <code>security_authtrampoline</code> process.</li>
<li>The attacker re-uses the captured authorization reference to execute arbitrary commands with root privileges, bypassing intended security controls.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of CVE-2017-7170 allows a local, unprivileged attacker to gain complete control of the affected macOS system. This could lead to arbitrary code execution as root, installation of malware, data theft, or denial of service. While the vulnerability has been patched, systems that have not been updated remain vulnerable.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the Sigma rule &ldquo;Detect Execution of Security Authtrampoline&rdquo; to identify potential exploitation attempts even on patched systems by monitoring for unusual invocations of <code>/usr/libexec/security_authtrampoline</code>.</li>
<li>Enable process monitoring with command-line argument logging to facilitate the detection of suspicious activity related to privilege escalation (reference the logsource in the Sigma rules).</li>
<li>While a direct fix isn&rsquo;t possible given the patch status, monitor for applications using deprecated APIs such as <code>AuthorizationExecuteWithPrivileges</code> within your environment.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>privilege-escalation</category><category>macos</category><category>cve-2017-7170</category></item></channel></rss>