2022 · 11 citations · 21 references
ComputingComputer ScienceCybersecurityApplication SecurityComputer SecurityWeb SecurityBrowser SecurityClient-side SecurityCross-site ScriptingServer-side SecurityWeb Application SecurityWeb Application VulnerabilitiesCross-site Scripting AttacksCross-site Scripting DetectionJavascript SanitizationJavascript SecuritySanitizationString AnalysisSymbolic AnalysisTaint Detection
Despite the considerable amounts of resources invested into securing the Web, Cross-Site Scripting (XSS) is still widespread. This is especially true for Client-Side XSS as, unlike server-side application frameworks, Web browsers do not ship with standard protection routines, so-called sanitizers. Web developers, therefore, have to either resort to third-party libraries or write their own sanitizers to stop XSS in its tracks. Such custom sanitizer routines – dubbed hand sanitizers in the following – are notoriously difficult to implement securely. In this paper, we present a technique to automatically detect, extract, analyze, and validate JavaScript sanitizer functions using a combination of taint tracking and symbolic string analysis. While existing work evaluates server-side sanitizers using a small number of applications, we present the first large-scale study of client-side JavaScript sanitizers. Of the most popular 20,000 websites, our method detects 705 unique sanitizers across 1,415 domains, of which 12.5% are insecure. Of the vulnerable sanitizers, we were able to automatically generate circumventing exploits for 51.3% of them, highlighting the dangers of manual sanitization attempts. Interestingly, vulnerable sanitizers are present across the entire range of website rankings considered, and we find that most sanitizers are not generic enough to thwart XSS if used in just a slightly different context. Finally, we explore the origins of vulnerable sanitizers to motivate adopting a standardized sanitization API available directly in the browser.
21
Regular expressions considered harmful in client-side XSS filters
Daniel Bates, Adam Barth, Collin Jackson · 2010 · 174 citations
Sebastian Lekies, Ben Stock, Martin Johns · 2013 · 159 citations
Fast and precise sanitizer analysis with BEK
Pieter Hooimeijer, Benjamin Livshits, Dávid Molnár et al. · 2011 · 129 citations