Trustwave's SpiderLabs Security Advisory TWSL2011-008:
Focus Stealing Vulnerability in Android
Vendor: Google http://www.android.com/
Versions affected: Tested on 2.1 - 2.3
Other versions may also be affected
Android is an open-source software stack for mobile devices which includes
an operating system, key applications, and middleware. The Android mobile
operating system is based on a modified version of the Linux kernel.
Android is currently owned and developed by Google.
Credit: Sean Schulte of Trustwave
Finding 1: Covert Focus Stealing
Android uses Intents and Activities such that the preferred application is
always used for any given content/context. For example, a URL can always
be opened with the Browser, and an image can be opened with the Gallery,
Gmail or Twitter. To make this seamless for the user, switching between
Activities always uses the same animation, whether the Activity belongs to
the same app or a different app.
Additionally, a service running in the background is able to 1) determine
which app is currently running in the foreground, and 2) display an
defined in its own app (ie, not the current foreground app).
These two "features" combine to allow a malicious developer to run a
service that looks for apps it knows how to attack, and display a login
screen to the user when those apps run. For example, when the user opens an
app which requires a login, the malicious service displays a screen that
looks identical to the legitimate login screen. Android gives no indication
that the login screen actually belongs to a different app, and the
Activity-switching animation would be the same whether the real app had
legitimately displayed its login screen. In the case of a pixel-perfect
malicious login screen, the user would have no visual indication that the
focus has switched from the legitimate screen. When the user supplies his
credentials, they can be sent to a remote server, allowing the attacker to
steal the user's credentials without his knowledge.
Any app that supplies a login screen is vulnerable to this attack.
This vulnerability has not been fixed at the time of this advisory. As an
alternative solution, users should be cautious when downloading third-party
applications. Because of the nature of the vulnerability, a malicious
application must be installed for a user to be vulnerable.
03/18/11 - Vulnerability Disclosed to Google
07/08/11 - Publication/Disclosure Discussed with Vendor
08/06/11 - Advisory Published
Trustwave is the leading provider of on-demand and subscription-based
information security and payment card industry compliance management
solutions to businesses and government entities throughout the world. For
organizations faced with today's challenging data security and compliance
environment, Trustwave provides a unique approach with comprehensive
solutions that include its flagship TrustKeeper compliance management
software and other proprietary security solutions. Trustwave has helped
thousands of organizations--ranging from Fortune 500 businesses and large
financial institutions to small and medium-sized retailers--manage
compliance and secure their network infrastructure, data communications and
critical information assets. Trustwave is headquartered in Chicago with
offices throughout North America, South America, Europe, Africa, China and
Australia. For more information, visit https://www.trustwave.com
About Trustwave's SpiderLabs:
SpiderLabs(R) is the advanced security team at Trustwave focused on
application security, incident response, penetration testing, physical
security and security research. The team has performed over a thousand
incident investigations, thousands of penetration tests and hundreds of
application security tests globally. In addition, the SpiderLabs Research
team provides intelligence through bleeding-edge research and proof of
concept tool development to enhance Trustwave's products and services.
The information provided in this advisory is provided "as is" without
warranty of any kind. Trustwave disclaims all warranties, either express or
implied, including the warranties of merchantability and fitness for a
particular purpose. In no event shall Trustwave or its suppliers be liable
for any damages whatsoever including direct, indirect, incidental,
consequential, loss of business profits or special damages, even if
Trustwave or its suppliers have been advised of the possibility of such
damages. Some states do not allow the exclusion or limitation of liability
for consequential or incidental damages so the foregoing limitation may not
This transmission may contain information that is privileged, confidential, and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format.