Privilege Escalation via Insecure PID Check in Android ServiceManager
CVE-2017-13209 is a local privilege escalation vulnerability in Android 8.0 and 8.1, specifically in the ServiceManager::add function of the hardware service manager. The vulnerability arises from an insecure permissions check that relies solely on the PID of the caller. This flaw allows a local application or service to register or replace a Hardware Abstraction Layer (HAL) service with its own, potentially malicious, implementation. As a result, an attacker can execute code as a privileged process without requiring additional execution privileges or user interaction.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
Successful exploitation allows a local attacker to gain elevated privileges by replacing a HAL service, leading to arbitrary code execution as a privileged process. This can compromise the integrity and security of the device, potentially allowing further attacks or persistence mechanisms.
If you can’t patch tonight, do this now.
Restrict the ability of untrusted applications to interact with the hardware service manager. Employ SELinux policies to limit access to privileged interfaces. Monitor for abnormal service registrations or replacements as an indicator of compromise until a patch can be applied.
Patch, then assume compromise.
Upgrade to a patched version of Android (post-8.1) where the permissions check in ServiceManager::add has been corrected to properly authenticate and authorize service registration requests. Apply security updates provided by the device manufacturer or Google.
1 exploit validated by Mallory's analysis. Hidden: 1 not yet analyzed, such as Exploit-DB entries.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
No public activity tracked yet. Mallory keeps watching.
No public activity observed for this vulnerability.