The researchers — Yanick Fratantonio of the University of California, and Chenxiong Qian, Simon Pak Ho Chung and Wenke Lee, all from the Georgia Institute of Technology — called it a Cloak and Dagger attack as it happened without the owner of the smartphone being aware that any attack had taken place.
The attack does not exploit any vulnerability, but takes advantage of two permissions that are allowed for apps to use certain features on Android.
The attacks use system_alert_window ("draw on top") and bind_accessibility_service ("a11y"), both of which are in all Android versions including the most recent.
The researchers listed the following attacks as being possible:
Attacks that abuse the “draw on top” permission
- Context-aware clickjacking and context hiding: two techniques that make luring the user to enable the accessibility service practical, even when the latest security mechanisms (eg, "obscured flag") are correctly implemented and enabled.
- Invisible grid attack, allowing unconstrained keystroke recording, including password, private messages, etc.
Attacks that abuse the “accessibility service” permission
- Unconstrained keystroke recording, including passwords. According to the documentation, this should not be possible.
- Security PIN stealing
- Device unlock through PIN injection + perform arbitrary actions while keeping the screen off.
- Stealing two-factor authentication tokens (SMS-based, Google Authenticator, and other app-based tokens).
- Ad hijacking.
- Web exploration.
Attacks that abuse both permissions
- Silent installation of God-mode app (with all permissions enabled).
- Stealthy phishing (for which the user finds herself logged in, as she would expect).
They said that Google had implemented a partial fix for the overlay issue. "On top overlays do not appear anymore whenever an app's permission list is shown. However, this is only used for 'normal' permissions, and not for 'special' permissions, such as 'draw on top' and a11y.
"This is problematic: since the 'clickjacking → a11y' is still possible, a malicious app can use the 'Phone Unlocking (while keeping the screen off) attack' to enable these permissions while keeping the screen off, thus making the silent installation of a God-mode app still practical."
Additionally, they said that though Google had marked their bug report as "won't fix", they had noticed that the Google keyboard actually received an update that, at first glance, seemed to avoid leaking passwords.
"In fact, when typing passwords, the accessibility events generated by the Keyboard app itself now contains 'Dot' instead of the actual character. However, we found a workaround for our attack: each accessibility event has access to the 'hashcode' of the node generating the event. Since it's possible to enumerate the widgets and their hashcodes (which are designed to be pseudo-unique), the hashcodes are enough to determine which keyboard's button was actually clicked by the user."