2018 · 28 citations · 20 references
ComputingComputer ScienceCybersecurityComputer SecurityMobile ComputingMobile SecurityBrowser SecurityMobile Application DevelopmentMobile Application VulnerabilitiesMobile Device SecurityWeb Application SecurityWeb Application VulnerabilitiesActive MessagesMalicious SecurityPostmessage CommunicationSensitive Information HandlingSensitive Information LeakageSensitive Information ProtectionWeb Message SecurityWebview Security
PostMessage is popular in HTML5 based web apps to allow the communication between different origins. With the increasing popularity of the embedded browser (i.e., WebView) in mobile apps (i.e., hybrid apps), postMessage has found utility in these apps. However, different from web apps, hybrid apps have a unique requirement that their native code (e.g., Java for Android) also needs to exchange messages with web code loaded in WebView. To bridge the gap, developers typically extend postMessage by treating the native context as a new frame, and allowing the communication between the new frame and the web frames. We term such extended postMessage "hybrid postMessage" in this paper. We find that hybrid postMessage introduces new critical security flaws: all origin information of a message is not respected or even lost during the message delivery in hybrid postMessage. If adversaries inject malicious code into WebView, the malicious code may leverage the flaws to passively monitor messages that may contain sensitive information, or actively send messages to arbitrary message receivers and access their internal functionalities and data. We term the novel security issue caused by hybrid postMessage "Origin Stripping Vulnerability" (OSV). In this paper, our contributions are fourfold. First, we conduct the first systematic study on OSV. Second, we propose a lightweight detection tool against OSV, called OSV-Hunter. Third, we evaluate OSV-Hunter using a set of popular apps. We found that 74 apps implemented hybrid postMessage, and all these apps suffered from OSV, which might be exploited by adversaries to perform remote real-time microphone monitoring, data race, internal data manipulation, denial of service (DoS) attacks and so on. Several popular development frameworks, libraries (such as the Facebook React Native framework, and the Google cloud print library) and apps (such as Adobe Reader and WPS office) are impacted. Lastly, to mitigate OSV from the root, we design and implement three new postMessage APIs, called OSV-Free. Our evaluation shows that OSV-Free is secure and fast, and it is generic and resilient to the notorious Android fragmentation problem. We also demonstrate that OSV-Free is easy to use, by applying OSV-Free to harden the complex "Facebook React Native" framework. OSV-Free is open source, and its source code and more implementation and evaluation details are available online.
20
TaintDroid: an information-flow tracking system for realtime privacy monitoring on smartphones
William Enck, Peter Gilbert, Byung-Gon Chun et al. · 2010 · 2.3K citations
Steven Arzt, Siegfried Rasthofer, Christian Fritz et al. · 2014 · 1.4K citations
Attacks on WebView in the Android system
Tongbo Luo, Hao Hao, Wenliang Du et al. · 2011 · 190 citations
Code Injection Attacks on HTML5-based Mobile Apps
Xing Jin, Xunchao Hu, Kailiang Ying et al. · 2014 · 146 citations