T1548.004

Abuse Elevation Control Mechanism: Elevated Execution with Prompt

Adversaries may leverage the AuthorizationExecuteWithPrivileges API to escalate privileges by prompting the user for credentials.[1] The purpose of this API is to give application developers an easy way to perform operations with root privileges, such as for application installation or updating. This API does not validate that the program requesting root privileges comes from a reputable source or has been maliciously modified.
攻撃者は、ユーザーに認証情報の入力を促すことで 権限の昇格を行うために AuthorizationExecuteWithPrivileges API を利用すること ができます。このAPIの目的は、アプリケーションのインストールやアップデートなど、root権限での作戦を実行する簡単な方法をアプリケーション開発者に提供することです。この API は、root 権限を要求するプログラムが信頼できるソースからのものであるか、または悪意を持って変更されているかどうかを検証しません。

Although this API is deprecated, it still fully functions in the latest releases of macOS. When calling this API, the user will be prompted to enter their credentials but no checks on the origin or integrity of the program are made. The program calling the API may also load world writable files which can be modified to perform malicious behavior with elevated privileges.

Adversaries may abuse AuthorizationExecuteWithPrivileges to obtain root privileges in order to install malicious software on victims and install persistence mechanisms.[2][3][4] This technique may be combined with Masquerading to trick the user into granting escalated privileges to malicious code.[2][3] This technique has also been shown to work by modifying legitimate programs present on the machine that make use of this API.[2]

ID: T1548.004
Sub-technique of:  T1548
Platforms: macOS
Permissions Required: Administrator, User
Effective Permissions: root
Contributors: Erika Noerenberg, @gutterchurl, Carbon Black; Jimmy Astle, @AstleJimmy, Carbon Black
Version: 1.0
Created: 30 January 2020
Last Modified: 19 October 2022

Procedure Examples

ID Name Description
S0402 OSX/Shlayer

OSX/Shlayer can escalate privileges to root by asking the user for credentials.[3]

Mitigations

ID Mitigation Description
M1038 Execution Prevention

System settings can prevent applications from running that haven't been downloaded through the Apple Store which may help mitigate some of these issues. Not allowing unsigned applications from being run may also mitigate some risk.

Detection

ID Data Source Data Component Detects
DS0009 Process OS API Execution

Monitoring OS API callbacks for the execution can also be a way to detect this behavior but requires specialized security tooling.

    Process Creation

Consider monitoring for /usr/libexec/security_authtrampoline executions which may indicate that AuthorizationExecuteWithPrivileges is being executed. MacOS system logs may also indicate when AuthorizationExecuteWithPrivileges is being called.

References