An Evaluation of the Google Chrome Extension Security Architecture

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

JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
JavaScript Objects - DOM CST 200 JavaScript. Objectives Introduce JavaScript objects Introduce Document Object Model Introduce window object Introduce.
0 The Past, Present and Future of XSS Defense Jim Manico 2011 OWASP Brussels.
Path Cutter: Severing the Self-Propagation Path of XSS JavaScript Worms in Social Web Networks Yinzhi Cao, Vinod Yegneswaran, Phillip Porras, and Yan Chen.
I'll see your cross site scripting and raise you a Content Security Policy Lou Leone :: Rochester OWASP.
Chrome Extentions Vulnerabilities. Introduction Google Chrome Browser Chrome OS Platform Chrome Web Store Applications Open Source Platform.
Hulk: Eliciting Malicious Behavior in Browser Extensions
張逸文 P ROTECTING B ROWSERS FROM E XTENSION V ULNERABILITIES NDSS 2010 Adam Barth, University of California, Berkeley Adrienne Porter Felt, University of.
Using Replicated Execution for a More Secure and Reliable Browser Authors: Hui Xue, Nathan Dautenhahn, Samuel T. King University of Illinois at Urbana.
Presented by Vaibhav Rastogi.  Advent of Web 2.0 and Mashups  Inclusion of untrusted third party content a necessity  Need to restrict the functionality.
The Most Dangerous Code in the Browser Stefan Heule, Devon Rifkin, Alejandro Russo, Deian Stefan Stanford University, Chalmers University of Technology.
Security of Mobile Applications Vitaly Shmatikov CS 6431.
Aaron Blankstein and Michael J. Freedman Princeton University Tuan Tran.
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 Collin Jackson Stanford University Helen J. Wang Microsoft Research ACM WWW, May, 2007 Presenter:
Norman SecureSurf Protect your users when surfing the Internet.
Presented by…. Group 2 1. Programming language 2Introduction.
Understanding Android Security Yinshu Wu William Enck, Machigar Ongtang, and PatrickMcDaniel Pennsylvania State University.
AdJail: Practical Enforcement of Confidentiality and Integrity Policies on Web Advertisements Mike Ter Louw, Karthik Thotta Ganesh, V.N. Venkatakrishnan.
Secure Software Development Mini Zeng University of Alabama in Huntsville 1.
CSCI 6962: Server-side Design and Programming Course Introduction and Overview.
JavaScript & jQuery the missing manual Chapter 11
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
CS346 - Javascript 1, 21 Module 1 Introduction to JavaScript CS346.
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.
CSCI 6962: Server-side Design and Programming Secure Web Programming.
SCRIPT LESS ATTACKS STEALING THE PIE WITHOUT TOUCHING THE SILL.
JavaScript, Fourth Edition
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
CSE 4481 Computer Security Lab Mark Shtern. INTRODUCTION.
Erika Chin Adrienne Porter Felt Kate Greenwood David Wagner University of California Berkeley MobiSys 2011.
HTML5 Communication. The Setup Somewhere on the web, a server makes a ”service” available, that we wish to use in a web application The service may offer.
Chapter 8 Cookies And Security JavaScript, Third Edition.
Protecting Browsers from Extension Vulnerabilities (NDSS 2010) Adam Barth, Adrienne Porter Felt, Prateek Saxena University of California, Berkeley {abarth,
CSE 4481 Computer Security Lab Mark Shtern. INTRODUCTION.
THE DEVIL IS IN THE (IMPLEMENTATION) DETAILS: AN EMPIRICAL ANALYSIS OF OAUTH SSO SYSTEMS SAN-TSAI SUN & KONSTANTIN BEZNOSOV PRESENTED BY: NAZISH KHAN COMPSCI.
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.
Web Security Lesson Summary ●Overview of Web and security vulnerabilities ●Cross Site Scripting ●Cross Site Request Forgery ●SQL Injection.
Security Issues with PHP  PHP installation  PHP programming Willa Zhu & Eugene Burger.
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.
Android Permissions Demystified
Trevor Jim Nikhil Swamy Michael Hicks Defeating Script Injection Attacks with Browser-Enforced Embedded Policies Jason FroehlichSeptember 24, 2008.
ASP. ASP is a powerful tool for making dynamic and interactive Web pages An ASP file can contain text, HTML tags and scripts. Scripts in an ASP file are.
INTRODUCTION JavaScript can make websites more interactive, interesting, and user-friendly.
1 Utkarsha MishraCOMPSCI 725 David Silver, Suman Jana, Eric Chen, Collin Jackson, and Dan Boneh. “Password Managers: Attacks and Defenses.” In Proceedings.
Mark Shtern.  Our life depends on computer systems  Traffic control  Banking  Medical equipment  Internet  Social networks  Growing number of.
Browser code isolation John Mitchell CS 155 Spring 2016.
By Collin Donaldson. Hacking is only legal under the following circumstances: 1.You hack (penetration test) a device/network you own. 2.You gain explicit,
The Postman Always Rings Twice: Attacking and Defending postMessage in HTML5 Websites Paper by Sooel Son and Vitaly Shmatikov, The University of Texas.
Module 1 Introduction to JavaScript
XSS (Client-side) CSCE 548 Building Secure Software(07/20/2016)
Protecting Memory What is there to protect in memory?
CSC 495/583 Topics of Software Security Web Browser Security (2)
BrowserShield: Vulnerability-Driven Filtering of Dynamic HTML
14 A Brief Look at JavaScript and jQuery.
Analyzing WebView Vulnerabilities in Android Applications
Web Design and Development
WWW安全 國立暨南國際大學 資訊管理學系 陳彥錚.
Understanding Android Security
Introduction to JavaScript
Protecting Browsers from Extension Vulnerabilities
Cross-Site Scripting Attack (XSS)
Presentation transcript:

An Evaluation of the Google Chrome Extension Security Architecture Nicholas Carlini, Adrienne Porter Felt, and David Wagner University of California, Berkeley USENIX Security Symposium 2012 2012-07-16 曾毓傑

Outline Introduction Extension Security Background Extension Security Review Evaluation of Isolated Worlds Evaluation of Privilege Separation Evaluation of Permission System Defenses Defenses Evaluation Conclusion

Introduction Most browser extensions are written by well-meaning developers who are not security experts Google Chrome employs three mechanisms to prevent and mitigate extension vulnerabilities Isolated Worlds Separate extension’s JavaScript heap from web page’s heap Privilege Separation Separate extension into two parts: content script and core extensions Permissions Predefine a list of permission that extension needs

Extension Security Background We focus on non-malicious extensions that are vulnerable to external attacks: Benign-but-buggy extensions Two types of attacks are possible Network Attackers Add malicious data into HTTP traffic reading from extension Add HTTP script into HTTPS web-page Web Attackers Extension treat website’s data or functions as trusted Network Attacker Execute Untrusted Data Untrusted Data Execute Modified Data Original Data Modified Data

Extension Architecture

Chrome Security Model Isolated Worlds Extension access a copy of DOM elements, different heap

Chrome Security Model (Cont.) Privilege Separation Core extension can access Browser API but not page’s DOM Content script can access page’s DOM but not Browser API Two components communicate with each other using Message Passing script

Chrome Security Model (Cont.) Permissions A Manifest.json file listing permission needed of the extension Each element is mapping to a certain Browser API module or a domain needed to access

Chrome Security Model (Cont.) Content Security Policy (CSP) Client-side HTML policy system to restrict some type of JavaScript to be executed on the page Not implemented when the research is working, so we won’t discuss this part

Extension Security Review 100 Google Chrome Extension is evaluated 50 most popular extensions 50 randomly selected extensions Three types of methodology is applied to the analysis Black-box testing Source code analysis Holistic testing 40% of the extensions contains vulnerabilities, totally 70 vulnerabilities are found from those extensions

Extension Security Review (Cont.)

Evaluation of Isolated Worlds The protection of Isolated Worlds is largely succeeds Only 3/100 extensions has content script vulnerabilities Four possible security challenges needs to be noticed Data as HTML – untrusted data been inserted into page Eval – code will run in content script’s isolated world Click Injection – unwanted events would be triggered Prototypes and Capabilities – JavaScript prototype mechanism Isolated Worlds defeats two of them, but not Eval and Click Injection

Evaluation of Privilege Separation Privilege Separation is intended to shield the privileged core extension from attacks 61/100 has content script, 23/61(38%) has vulnerabilities by accident or intentionally Privilege Separation protect a content script vulnerability 62% of the time

Evaluation of Privilege Separation (Cont.) Possible attacks Vulnerable Content Script – ask core extension to trigger arbitrary HTTP XHRs AdBlock gets window object which has eval() functionality Web Developer insert messages into popup page, which is controlled by the core extension Website Metadata Vulnerabilities – some malicious data may contain in website metadata Direct Network Attacks – malicious data from HTTP XHRs or scripts

Evaluation of Privilege Separation (Cont.) Privilege Separation fully protect 62% of extensions, still good enough to protect core extension from attacks Developers may accidentally or intentionally write bad code if there is no privilege separation

Evaluation of Permission System Permission system restrict the modules can be used in core extension If the extension is compromised, attackers can only get the permissions extension predefined in the Manifest.json file Popular permissions requested by the 27 extensions with core extension vulnerabilities

Evaluation of Permission System (Cont.) Impact of those vulnerabilities Critical – Run arbitrary code on user’s system High – Access DOM of all HTTP(S) websites Medium – Access DOM of financial or important personal data Low – Access DOM of specific websites that do not contain sensitive data None – Does not leak any permissions

Evaluation of Permission System (Cont.) Developers would be unwilling to take the time to specify the correct set of permissions, which increase the danger once extension is compromised Permission System helps mitigate these vulnerabilities in practice, thus have a positive impact on system security

Defenses Four additional defenses is introduced to increase the security of extension Banning HTTP Scripts Use HTTPS to fetch script to prevent Man-in-the-middle attack Include script in the extension instead of fetching it dynamically Banning Inline Scripts Change event binding using addEventListner() instead of onClick attribute Banning Eval Use function literal instead of string in setTimeout() Use JSON.parse() instead of eval() to parse JSON data Banning HTTP XHR Use HTTPS XHR

Defenses Evaluation Some extensions may be broken, but some extensions may fix the vulnerabilities Recommendation: Banning HTTP Scripts and Banning Inline Script No extensions would be permanently broken

Conclusion Our work is the first to evaluate the efficacy of the Google Chrome extension platform Perform a security review on 100 Google Chrome extensions Isolation Worlds defeat most of the attacks