Analyzing Information Flow in JavaScript-based Browser Extensions Mohan Dhawan and Vinod Ganapathy Department of Computer Science Rutgers University.

Slides:



Advertisements
Similar presentations
Presented by Vaibhav Rastogi. Current browsers try to separate host system from Web Websites evolved into web applications Lot of private data on the.
Advertisements

Analyzing Information Flow in JavaScript-based Browser Extensions Mohan Dhawan and Vinod Ganapathy Department of Computer Science Rutgers University 25.
Operating System Security
JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
The Case for JavaScript Transactions Mohan Dhawan, Chung-chieh Shan, Vinod Ganapathy Department of Computer Science Rutgers University PLAS 2010.
Ensuring Operating System Kernel Integrity with OSck By Owen S. Hofmann Alan M. Dunn Sangman Kim Indrajit Roy Emmett Witchel Kent State University College.
Next Generation Endpoint Security Jason Brown Enterprise Solution Architect McAfee May 23, 2013.
An Evaluation of the Google Chrome Extension Security Architecture
By Philipp Vogt, Florian Nentwich, Nenad Jovanovic, Engin Kirda, Christopher Kruegel, and Giovanni Vigna Network and Distributed System Security(NDSS ‘07)
1 14th ACM Conference on Computer and Communications Security, Alexandria, VA Shuo Chen †, David Ross ‡, Yi-Min Wang † † Internet Services Research Center.
Secure web browsers, malicious hardware, and hardware support for binary translation Sam King.
On the Incoherencies in Web Browser Access Control Policies Authors: Kapil Singh, et al Presented by Yi Yang.
The Most Dangerous Code in the Browser Stefan Heule, Devon Rifkin, Alejandro Russo, Deian Stefan Stanford University, Chalmers University of Technology.
Firefox 2 Feature Proposal: Remote User Profiles TeamOne August 3, 2007 TeamOne August 3, 2007.
1 Detecting Logic Vulnerabilities in E- Commerce Applications Presenter: Liu Yin Slides Adapted from Fangqi Sun Computer Science Department College of.
Phu H. Phung Chalmers University of Technology JSTools’ 12 June 13, 2012, Beijing, China Joint work with Lieven Desmet (KU Leuven)
Android Security Enforcement and Refinement. Android Applications --- Example Example of location-sensitive social networking application for mobile phones.
1 Subspace: Secure Cross Domain Communication for Web Mashups Collin Jackson and Helen J. Wang Mamadou H. Diallo.
Subspace: Secure Cross-Domain Communication for Web Mashups In Proceedings of the 16th International World Wide Web Conference. (WWW), 2007 Collin Jackson,
Introduction to InfoSec – Recitation 10 Nir Krakowski (nirkrako at post.tau.ac.il) Itamar Gilad (itamargi at post.tau.ac.il)
D ATABASE S ECURITY Proposed by Abdulrahman Aldekhelallah University of Scranton – CS521 Spring2015.
Presented by…. Group 2 1. Programming language 2Introduction.
Understanding Android Security Yinshu Wu William Enck, Machigar Ongtang, and PatrickMcDaniel Pennsylvania State University.
FLOWFOX A WEB BROWSER WITH FLEXIBLE AND PRECISE INFORMATION CONTROL.
JavaScript CMPT 281. Outline Introduction to JavaScript Resources What is JavaScript? JavaScript in web pages.
INTRODUCTION TO WEB DATABASE PROGRAMMING
IT 210 The Internet & World Wide Web introduction.
Panorama: Capturing System-wide Information Flow for Malware Detection and Analysis Authors: Heng Yin, Dawn Song, Manuel Egele, Christoper Kruegel, and.
Prevent Cross-Site Scripting (XSS) attack
Fall, Privacy&Security - Virginia Tech – Computer Science Click to edit Master title style Design Extensions to Google+ CS6204 Privacy and Security.
Automatically Hardening Web Applications Using Precise Tainting Anh Nguyen-Tuong Salvatore Guarnieri Doug Greene Jeff Shirley David Evans University of.
Behavior-based Spyware Detection By Engin Kirda and Christopher Kruegel Secure Systems Lab Technical University Vienna Greg Banks, Giovanni Vigna, and.
Master Thesis Defense Jan Fiedler 04/17/98
Gaurav Aggarwal and Elie Bursztein, Collin Jackson, Dan Boneh, USENIX (Aug.,2010) A N A NALYSIS OF P RIVATE B ROWSING M ODES IN M ODERN B ROWSERS 1.
Chapter 8 Cookies And Security JavaScript, Third Edition.
OMash: Enabling Secure Web Mashups via Object Abstractions Steven Crites, Francis Hsu, Hao Chen (UC Davis) ACM Conference on Computer and Communications.
document.cookie Identity Theft ✗ Cookie Stealing.
CSCE 201 Web Browser Security Fall CSCE Farkas2 Web Evolution Web Evolution Past: Human usage – HTTP – Static Web pages (HTML) Current: Human.
Defending Browsers against Drive-by Downloads:Mitigating Heap-Spraying Code Injection Attacks Authors:Manuel Egele, Peter Wurzinger, Christopher Kruegel,
SECURE WEB APPLICATIONS VIA AUTOMATIC PARTITIONING S. Chong, J. Liu, A. C. Myers, X. Qi, K. Vikram, L. Zheng, X. Zheng Cornell University.
Information Security What is Information Security?
SMash : Secure Component Model for Cross- Domain Mashups on Unmodified Browsers WWW 2008 Frederik De Keukelaere et al. Presenter : SJ Park.
Copyright © cs-tutorial.com. Overview Introduction Architecture Implementation Evaluation.
Department of Computer Science Internet Performance Measurements using Firefox Extensions Scot L. DeDeo Professor Craig Wills.
PwC New Technologies New Risks. PricewaterhouseCoopers Technology and Security Evolution Mainframe Technology –Single host –Limited Trusted users Security.
November 19, 2008 CSC 682 Use of Virtualization to Thwart Malware Written by: Ryan Lehan Presented by: Ryan Lehan Directed By: Ryan Lehan Produced By:
M. Alexander Helen J. Wang Yunxin Liu Microsoft Research 1 Presented by Zhaoliang Duan.
Vaibhav Rastogi and Yi Yang.  SOP is outdated  Netscape introduced this policy when most content on the Internet was static  Differences amongst different.
Protecting Browsers from Extension Vulnerabilities Paper by: Adam Barth, Adrienne Porter Felt, Prateek Saxena at University of California, Berkeley and.
An Analysis of the Mozilla Jetpack Extension Framework Rezwana Karim, Mohan Dhawan, Vinod Ganapathy Computer Science, Rutgers University Chung-cheih Shan.
Web Security Lesson Summary ●Overview of Web and security vulnerabilities ●Cross Site Scripting ●Cross Site Request Forgery ●SQL Injection.
Chapter 12: How Private are Web Interactions?. Why we care? How much of your personal info was released to the Internet each time you view a Web page?
Plug-in Architectures Presented by Truc Nguyen. What’s a plug-in? “a type of program that tightly integrates with a larger application to add a special.
1 Isolating Web Programs in Modern Browser Architectures CS6204: Cloud Environment Spring 2011.
Trends and Lessons from Three Years Fighting Malicious Extensions Nav Jagpal, Eric Dingle, Jean-Philippe, Gravel Panayiotis, Mavrommatis Niels, Provos.
Web Browsing *TAKE NOTES*. Millions of people browse the Web every day for research, shopping, job duties and entertainment. Installing a web browser.
No Escape From Reality: Security and Privacy of Augmented Reality Browsers WWW '15.
CSRF Attacks Daniel Chen 11/18/15. What is CSRF?  Cross Site Request Forgery (Sea-Surf)  AKA XSRF/ One Click / Sidejacking / Session Riding  Exploits.
1 Utkarsha MishraCOMPSCI 725 David Silver, Suman Jana, Eric Chen, Collin Jackson, and Dan Boneh. “Password Managers: Attacks and Defenses.” In Proceedings.
1 Figure 9-3: Webserver and E-Commerce Security Browser Attacks  Take over a client via the browser Interesting information on the client Can use browser.
Interactions & Automations
The Postman Always Rings Twice: Attacking and Defending postMessage in HTML5 Websites Paper by Sooel Son and Vitaly Shmatikov, The University of Texas.
Nat 4/5 Computing Science Software
Online Training Course
CSC 495/583 Topics of Software Security Web Browser Security (2)
Recitation on AdFisher
Exploring DOM-Based Cross Site Attacks
Protecting Browsers from Extension Vulnerabilities
Cross Site Request Forgery (CSRF)
Presentation transcript:

Analyzing Information Flow in JavaScript-based Browser Extensions Mohan Dhawan and Vinod Ganapathy Department of Computer Science Rutgers University

JavaScript-based Extensions (JSEs) Modern browsers support extensions – JavaScript-based Extensions Hugely popular – 1.5 bn JSEs downloaded, mn used daily [Mozilla Add-ons Statistics Dashboard]

JSEs: A Security Risk Unrestricted access to system resources Hard to detect malicious code Inadequate sandboxing of JSE actions: JSEs execute with the full privileges of the browser Lack of good development and debugging tools for JSE Sensitive Malicious JSEs can cause loss of sensitive data Vulnerable JSEs can be exploited by remote attacker Malicious JSE Vulnerable JSE Sensitive

Outline Introduction Motivating Example Solution Evaluation Conclusion

GreaseMonkey Highly popular Firefox extension – nearly 3 million active daily users [Mozilla Add-ons Statistics Dashboard] Exports a set of APIs for users to customize and program the way web pages look and function

GreaseMonkey/Firefox Vulnerability Alice Sensitive Exploited JSEs can lead to disclosure of confidential data Firefox with GreaseMonkey GreaseMonkey

Proof-of-Concept Attack: Just 20 lines

GreaseMonkey / Firefox Vulnerability Firefox Bug – watch allows scripts to register code to be executed when a property on some other object is assigned. watching the window object for the point at which APIs are added, a malicious script can use those functions at the moment they are attached. GreaseMonkey Solution – Sandbox prevents scripts on webpages to access APIs User scripts can change the properties of an object without any JavaScript on the web page being able to see it

Firefox Sniffer (FFsniFF) – A Malicious JSE Sniffs all form fields s them to the attacker ******** Submit to the website Firefox with FFsniFF

Outline Introduction Motivating Example Solution Evaluation Conclusion

Prior Work Access control to guard against JSE behavior – Ter-Louw et al. (Journal of Virology, 2008) – Hallaraker and Vigna (ICECCS, 2005) Coarse grained → false positives and negatives Data Cookies

Recent related work Google Chrome extension security model – Aims to protect against vulnerable extensions Two key principles: – Separation of duty: Split an extension into multiple components, based on functionality – Least privilege: Give each component only the access rights needed to achieve its task New extension model: So extensions need to be written from scratch

Solving the GreaseMonkey Problem Alice Sensitive 1.Mark data as sensitive 2.Take action when sensitive data is sent out Firefox with GreaseMonkey GreaseMonkey

Our Solution Security Architecture for Browser Extensions (Sabre) – Attach security labels with each JavaScript object – Track the propagation of these labels – Take action when a sensitive object is externalized Enhance browser with JavaScript information flow analysis

Security Labels Sensitivity Level Provenance File System User Interface Network File System HIGH JSE Sabre Information flows from sources to sinks.

Sources

Sinks Obtained sources and sinks from Netscape’s JavaScript data tainting project [circa 1998] And added some of our own

Challenges in Real JSEs 1.Cross - Domain Flows 2.Benign Flows 3.Provenance 4.Implicit Flows

Challenge 1: Cross – Domain Flows Necko User Interface XPConnect XPCOM DOM Network Engine User Interface Extension Rendering Engine Inter-Component Communication JavaScript Engine DOM Persistent Data JavaScript in a JSE can interact with other browser sub- systems var cookieMgr = getService(Components.interfaces.nsICookieManager); cookies.txt

var cookieMgr = getService(Components.interfaces.nsICookieManager); Problem : Label propagation for objects and properties not managed by JavaScript Solution : Assign sensitivity label of component to JavaScript objects – JavaScript can interact and store data in the DOM Modify the DOM to store security labels also Challenge 1: Cross – Domain Flows (Object Access)

Challenge 1: Cross – Domain Flows (Method Access) sis.init(is); // initializes a nsIScriptableInput object // using a nsIInputStream object Problem : Label propagation across methods not managed by JavaScript Solution : Implement function summaries to specify label propagation rules – Sabre supports 127 cross-domain function models

Challenge 2: Benign Flows Benign JSEs may contain flow violations – PwdHash [Usenix Security ‘05] ******* PwdHash SHA1(pwd||domain) ******* *********** SHA1(pwd||url_one) SHA1(pwd||url_two)

Challenge 2: Benign Flows Disallowing them could render JSE dysfunctional Problem : How to identify such flows? – Difficult to isolate malicious / benign behavior at runtime Solution : Security analyst supplies a security policy to white-list trusted JSEs or declassify specific objects De-classification of password field in PwdHash

Challenge 3: Provenance Origin of the script – Needs to be determined only once at the time of dispatching the script for execution JSEs contain overlays – Describe patches for the UI and contain JavaScript code – Event - driven and not explicitly dispatched for execution Problem : Track provenance for “all” JavaScript including code in JSE overlay files Solution : Per bytecode provenance tracking, or separately verify the overlay files

Problem : handling direct control dependencies? Solution : Labeled Scope Label(lhs) = Label(rhs) U Label(scope) Challenge 4: Implicit Flows

Problem : How to deal with all implicit flows? Solution : Static analysis – Future work to enhance Sabre with support for static analysis

Outline Introduction Motivating Example Solution Evaluation Conclusion

Evaluation: Goals Effectiveness – Classify behavior of benign JSEs – Determine information flow violations in malicious JSEs Performance – Impact on JavaScript performance – Compare overhead due to per-bytecode provenance check for overlay code

Evaluation: Methodology Evaluated Sabre using a suite of 24 JSEs – Comprising over 120K lines of JavaScript code Enhance the browser with the JSE being tested and examine any flow violations Test Setup – Integrated Sabre with Firefox – 2.33Ghz Intel Core2 Duo, 3GB RAM, Ubuntu 7.10

Results: Categorizing Benign JSEs 1.HTML Forms 2.Network Messages 3.File System 4.Load URLs 5.JavaScript Events White-listing / De-classification of trusted JSEs is essential

1: HTML forms

2: Network Messages Transfer data over network – HTTP channels – XMLHttpRequest USE – Get security updates, weather reports MISUSE – Send user’s confidential data, browsing patterns

3: File system accesses File System – Read / write files to persistent data store USE – Save JSE data in user preferences, manage files MISUSE – Save malicious files, steal sensitive data like cookies

4: Loading URLs Load URLs – monitor user activity (keystrokes, hyperlinks clicked) – load URL based upon this activity USE – Useful functionality for many JSEs, e.g. PDF Download MISUSE – initiate a drive-by-download attack by loading an untrusted URL

5: JavaScript events JavaScript Events – JavaScript code on a web page can communicate with JSEs via events USE – JSEs can listen for specific events from scripts on web pages MISUSE – JSE can send sensitive data to script on webpage

Results: Accuracy Vulnerable & Malicious JSEs – GreaseMonkey v0.3.3 – Firebug v1.01 – FFsniFF – BrowserSPY Result – Precisely identified all flow violations – No false positives during normal web browsing

Results: Performance Overheads

Outline Introduction Motivating Example Solution Evaluation Future work and Conclusion

Future work: Sabre enhancements Static analysis of JavaScript. Can benefit: – Precision of analysis: Will help discover implicit information flows – Speed of analysis: Use summaries that capture information flow properties of frequently- executed code fragments Diagnosis of information flow alerts to automate the placement of declassifiers

Future work: Containing third-party JavaScript using Information Flow Current Work Mashups

41 Conclusion Exploited JSEs can cause loss of sensitive information Policy-based access control is coarse grained and overly restrictive Sabre uses information flow tracking across browser sub-systems to prevent security violations in untrusted JSE code

Analyzing Information Flow in JavaScript-based Browser Extensions Mohan Dhawan and Vinod Ganapathy Published in Proceedings of the 25 th Annual Computer Security Applications Conference, December Thank you