Crowdflow: Efficient Information Flow Security

Crowdflow: Efficient Information Flow Security

CrowdFlow: Efficient Information Flow Security Christoph Kerschbaumer, Eric Hennigan, Per Larsen Stefan Brunthaler, Michael Franz fckerschb, eric.hennigan, perl, s.brunthaler, [email protected] University of California, Irvine Abstract. The widespread use of JavaScript (JS) as the dominant web program- ming language opens the door to attacks such as Cross Site Scripting that steal sensitive information from users. Information flow tracking successfully addresses current browser security shortcomings, but current implementations incur a signif- icant runtime overhead cost that prevents adoption. We present a novel approach to information flow security that distributes the track- ing workload across all page visitors by probabilistically switching between two JavaScript execution modes. Our framework reports attempts to steal information from a user’s browser to a third party that maintains a blacklist of malicious URLs. Participating users can then benefit from receiving warnings about blacklisted URLs, similar to anti-phishing filters. Our measurements indicate that our approach is both efficient and effective. First, our technique is efficient because it reduces performance impact by an order of magnitude. Second, our system is effective, i.e. , it detects 99.45% of all information flow violations on the Alexa Top 500 pages using a conservative 5% sampling rate. Most sites need fewer samples in practice; and will therefore incur even less overhead. 1 Motivation Modern web pages have become complex web applications that mash up scripts from different origins inside a single execution context in a user’s browser. Unfortunately, this execution scheme opens the door for attackers, too. Vulnerability studies consistently rank Cross Site Scripting (XSS) highest in the list of the most prevalent type of attacks on web applications [1,2,3]. Attackers use XSS to gain access to confidential user information. A recent study on privacy violating flows confirms the ubiquity of user data theft when browsing the web [4]. Previous work on browser security shows that information flow tracking can counter such attacks [5,6,7,8,9]. Even though information flow tracking prevents misappropri- ation of sensitive data, all known approaches introduce runtime overheads that make execution of JS code at least two to three times slower. We believe that industry will never adopt the information flow approach without a substantial reduction in this overhead. Taint tracking is a more efficiently implementable subset of information flow tracking; for example, TaintDroid [10] reports an overhead of just 14%. Information flow tracking increases security by tracking both data and control flow, but unfortunately no efficient implementation is known for dynamically typed languages such as JS. Our solution distributes the tracking overhead among a crowd of visitors, leveraging the same property that attackers target: site popularity. The more visitors a site has, the less tracking effort is required by an individual client. To balance precision and performance, our system, CrowdFlow, primarily executes code in a partial taint tracking interpreter and probabilistically switches to a slower information flow tracking interpreter at decision points such as function boundaries. The probabilistic switching between the two JS interpreters allows individual clients to execute web applications much faster than traditional approaches where every client always performs the costly information flow tracking. Even though the CrowdFlow approach permits individuals to miss detection of specific information flow violations, we show that a crowd of users, in aggregate, detects the majority of information flow violations. Clients report policy violating flows to a trusted third party that collects suspicious information flow reports, similar to commercial blacklisting initiatives like Google’s Safe Browsing [11] or Microsoft’s Smartscreen-Filter [12]. Currently, corporations hosting URL blacklist services populate the database at their own expense, through automated scanning that tends to miss real-world use of web applications by logged-in users. These services also provide a form through which end- users can submit a malicious URL for investigation, but this collection mechanism tends to catch code that causes user-level annoyance rather than surreptitious and silent data theft. Additionally, website operators in adversarial competition submit false allegations in an attempt to put competing websites on the blacklist. We believe that automating the reporting process on the client side and basing it on privacy-violating information flow results in three benefits. First, automated reporting increases the amount of data that these systems have, enabling them to improve report validation. Second, automated reporting reduces the number of false allegations by raising the bar on the level of detail a report contains. Third, automated reporting tracks into the deep web, inspecting application behavior after a user has logged in. CrowdFlow, with its low per-user overhead, is a perfect front-end for these systems. We provide background information on JS security (Section 2) that motivates the de- velopment of CrowdFlow, define the threat model our system defends against (Section 3) and make the following contributions: • We introduce CrowdFlow (Section 4), a novel approach to information flow tracking that switches between two JS interpreters to balance performance and security. This architecture distributes the tracking costs across a crowd of visitors to a page. • We present a comprehensive information flow tracking browser (Section 5) based on WebKit [13] and provide implementation details for both partial taint tracking and information flow tracking modes. • We evaluate our system on a variety of real-world websites. In particular, we demon- strate the practicality of our framework (Section 6) by showing that our system satisfies the following important properties: − Efficiency: CrowdFlow executes JS an order of magnitude faster than tra- ditional approaches for information flow tracking, with an average runtime overhead of 27.84% for SunSpider [14] and 32.05% for V8 [15] benchmarks. To compare, execution overhead of traditional information flow implementations ranges between 200% and 300%. 2 − Effectiveness: Our approach finds almost all (99.45%) information flow viola- tions on the Alexa Top 500 [16] web sites compared to a traditional information flow tracking system. We achieve this detection rate with a crowd of only five users, and a conservative function invocation sampling rate of 5%. 2 Background on JS Security XSS is a code injection attack that allows an adversary to execute code without the user’s knowledge and consent. For example, XSS allows attackers to harvest sensitive information such as keystrokes, authentication credentials and credit card numbers. A malicious script can even traverse the Document Object Model (DOM) [17] and steal all visible data on a compromised web page [18]. Web developers often include third-party functionality such as jQuery, Google Analytics, and Facebook APIs to enrich a user’s browsing experience. Recent work by Nikiforakis et al. [19] highlights the problematic situation of granting third-party scripts access to application internals and shows the potential of included code to perform malicious actions without attracting attention from either developers or end users. Currently, browsers rely on the Same Origin Policy (SOP) [20], and the Content Security Policy (CSP) [21] to limit a script’s access to information. The CSP allows page authors to whitelist trusted sources and the SOP prevents access for scripts of different origins when properly isolated with iframe-tags. However, neither policy can prevent JS from stealing information on a page when developers include multiple libraries in the same execution context, as currently practiced [19]. 3 Threat Model Throughout this paper we assume that attackers have the following abilities: (i) attackers can operate their own hosts, and (ii) can inject code into other web pages. Code injection into other pages relies either on exploiting a XSS vulnerability of a page, or the ability to provide content for mashups, advertisements, libraries, etc., that victim sites include. The attacker’s capabilities, however, are limited to JS and the attacker can neither intercept nor control network traffic. Phishing Campaigns vs. Targeted Attacks: In contrast to common information flow tracking systems, the architecture of CrowdFlow does not attempt to prevent information theft attacks from within the user’s browser. Rather, it reports detected information flow violations to a trusted third-party aggregator, such as Google’s Safebrowsing initiative or Microsoft’s Smartscreen-Filter. CrowdFlow is not designed to defend against a targeted attack, in which the attacker tries to steal information of one particular person. The architecture of CrowdFlow aims to protect the majority of users against phishing campaigns, where the attacker distributes exploit code to high-traffic web pages to gather as much information as possible. 3 Threat Examples CrowdFlow Defends Against: To steal information from a browser, malicious code must surreptitiously communicate it to an attacker-controlled server. For example, by placing an image on the page, the attacker can steal sensitive information through the target URL of an image request: 1 elem.src="evil.com/p.png?v="+ creditcard_number; The GET request for the image p.png acts as a channel through which the attacker

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    16 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us