Auto-patching DOM-based XSS at scale
Authors:
Open Access
- 30 August 2015
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 272-283
Abstract
DOM-based cross-site scripting (XSS) is a client-side code injection vulnerability that results from unsafe dynamic code generation in JavaScript applications, and has few known practical defenses. We study dynamic code evaluation practices on nearly a quarter million URLs crawled starting from the the Alexa Top 1000 websites. Of 777,082 cases of dynamic HTML/JS code generation we observe, 13.3% use unsafe string interpolation for dynamic code generation — a well-known dangerous coding practice. To remedy this, we propose a technique to generate secure patches that replace unsafe string interpolation with safer code that utilizes programmatic DOM construction techniques. Our system transparently auto-patches the vulnerable site while incurring only 5.2 − 8.07% overhead. The patching mechanism requires no access to server-side code or modification to browsers, and thus is practical as a turnkey defense.Keywords
Funding Information
- National Research Foundation-Prime Minister's office, Republic of Singapore (NRF2014NCR-NCR001-21)
- Intel Corporation
This publication has 30 references indexed in Scilit:
- AutoCSP: Automatically Retrofitting CSP to Web Applications2015
- Hydrocyclone Numerical Simulation and Separation Efficiency OptimizationApplied Mechanics and Materials, 2014
- You Can’t Be Me: Enabling Trusted Paths and User Sub-origins in Web BrowsersLecture Notes in Computer Science, 2014
- Why Is CSP Failing? Trends and Challenges in CSP Adoption2014
- Data-Confined HTML5 Applications2013
- SCRIPTGARD2011
- A Systematic Analysis of XSS Sanitization in Web Application Frameworks2011
- KatanaInternational Journal of Secure Software Engineering, 2010
- XSS-GUARD: Precise Dynamic Prevention of Cross-Site Scripting AttacksLecture Notes in Computer Science, 2009
- BrowserShieldACM Transactions on the Web, 2007