Detect Elevated Execution with Prompt in Splunk
Adversaries exploit the macOS AuthorizationExecuteWithPrivileges API to request elevated execution with a user credential prompt. Applications calling this deprecated API can escalate privileges by prompting users for their admin password. The API does not validate that the requesting binary is authorized to request elevation, allowing malicious applications to leverage it. ProtonB malware used this technique. The API has been deprecated by Apple but remains available for compatibility.
MITRE ATT&CK
- Technique
- T1548 Abuse Elevation Control Mechanism
- Sub-technique
- T1548.004 Elevated Execution with Prompt
- Canonical reference
- https://attack.mitre.org/techniques/T1548/004/
SPL Detection Query
index=mac_logs (sourcetype="macos:syslog" OR sourcetype="macos:unified_log" OR sourcetype="syslog")
| eval detection_type=case(
match(_raw, "(?i)(AuthorizationExecuteWithPrivileges|AuthExecWithPrivileges)"),
"AuthExecWithPriv_API_Usage",
match(_raw, "(?i)osascript") AND
match(_raw, "(?i)(administrator privileges|do shell script|with administrator)"),
"Osascript_Admin_Request",
match(_raw, "(?i)(SecurityAgent|SecurityAgentPlugin)") AND
match(_raw, "(?i)(authoriz|elevation)"),
"SecurityAgent_Authorization_Request",
true(), null()
)
| where isnotnull(detection_type)
| table _time, host, user, detection_type, _raw
| sort - _time Detects macOS elevated execution via syslog and unified log entries. AuthorizationExecuteWithPrivileges API usage in log entries, osascript commands requesting administrator privileges, and SecurityAgent authorization requests indicate potential elevation prompt abuse.
Data Sources
Required Sourcetypes
False Positives & Tuning
- Legacy applications using deprecated authorization API for legitimate elevation
- AppleScript automation with documented administrative use cases
- macOS installer packages requesting authorized elevation
Other platforms for T1548.004
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Execute Command with Administrator Privileges via osascript
Expected signal: macOS Unified Log: SecurityAgent authorization request from osascript. Syslog: osascript process with administrator privileges in command. If approved: root-owned process for whoami.
- Test 2Check AuthorizationExecuteWithPrivileges Usage in Running Processes
Expected signal: macOS log command execution. No system changes.
- Test 3Test Gatekeeper and Authorization Status
Expected signal: Process creation for spctl and csrutil commands. macOS unified log entries.
References (4)
- https://attack.mitre.org/techniques/T1548/004/
- https://developer.apple.com/documentation/security/1540038-authorizationexecutewithprivileg
- https://www.welivesecurity.com/2017/07/20/osx-proton-new-mac-malware-signed-handbrake/
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1548.004/T1548.004.md
Unlock Pro Content
Get the full detection package for T1548.004 including response playbook, investigation guide, and atomic red team tests.