摘要
Cross-site scripting (XSS) has constantly remained one of the most prevalent attacks on the Web. In this work, we question its current taxonomy, i.e., the client- or server-side reflected (non-persistent) or stored (persistent) matrix. The Web has extensively changed. Consequently, considering XSS with the lenses of this famous matrix has become at least imprecise, at most impossible for many code injection scenarios where (i) a service worker or an edge worker generates HTTP responses and can reflect or persist XSS payloads infecting not only JavaScript in web pages but also Web assembly, web workers and affecting one or many users automatically; (ii) an attacker sends a web push message directly to a browser push service to trigger code execution in a dormant service worker; or (iii) a cross-origin adversary tampers with code stored by a vulnerable website on the user's physical/permanent file system, etc. Our proposal --to get out of the matrix and not enter another rigid one-- expresses the essence of XSS as code infection and affection attack and allows for clearly specifying the different actors and components involved, their environments, contexts, and storages, as well as their recurrence and persistence seen as a continuum rather than a binary marker. From a defensive perspective, we showcase the challenges and limitations of current mechanisms for mitigating XSS, which targets the entire attack surface of modern websites. Finally, we demonstrate an abuse of the Service-Worker-Allowed header to control entire domains with malicious service workers.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
脉络
- Don't Trust The Locals: Investigating the Prevalence of Persistent Client-Side Cross-Site Scripting in the Wild 引用了 Code-Reuse Attacks for the Web: Breaking Cross-Site Scripting Mitigations via Script Gadgets
- Don't Trust The Locals: Investigating the Prevalence of Persistent Client-Side Cross-Site Scripting in the Wild 引用了 CSP Is Dead, Long Live CSP! On the Insecurity of Whitelists and the Future of Content Security Policy
- Don't Trust The Locals: Investigating the Prevalence of Persistent Client-Side Cross-Site Scripting in the Wild 引用了 CCSP: Controlled Relaxation of Content Security Policies by Runtime Policy Composition
- Code-Reuse Attacks for the Web: Breaking Cross-Site Scripting Mitigations via Script Gadgets 引用了 CSP Is Dead, Long Live CSP! On the Insecurity of Whitelists and the Future of Content Security Policy
- PMForce: Systematically Analyzing postMessage Handlers at Scale 引用了 Don't Trust The Locals: Investigating the Prevalence of Persistent Client-Side Cross-Site Scripting in the Wild
- CCSP: Controlled Relaxation of Content Security Policies by Runtime Policy Composition 引用了 CSP Is Dead, Long Live CSP! On the Insecurity of Whitelists and the Future of Content Security Policy
它引用的 Paper11
- CSP Is Dead, Long Live CSP! On the Insecurity of Whitelists and the Future of Content Security PolicyLukas Weichselbaum, Michele Spagnuolo, Sebastian Lekies, Artur JancCCS 2016 · 114 次引用
- Don't Trust The Locals: Investigating the Prevalence of Persistent Client-Side Cross-Site Scripting in the WildMarius Steffens, Christian Rossow, Martin Johns, Ben StockNDSS 2019 · 84 次引用
- Code-Reuse Attacks for the Web: Breaking Cross-Site Scripting Mitigations via Script GadgetsSebastian Lekies, Krzysztof Kotowicz, Samuel Groß, Eduardo A. Vela Nava 等CCS 2017 · 62 次引用
- PMForce: Systematically Analyzing postMessage Handlers at ScaleMarius Steffens, Ben StockCCS 2020 · 23 次引用
- CCSP: Controlled Relaxation of Content Security Policies by Runtime Policy CompositionStefano Calzavara, Alvise Rabitti, Michele BugliesiUSENIX Security 2017 · 15 次引用
相关 Paper
- SWAPP: A New Programmable Playground for Web Application SecurityPhakpoom Chinprutthiwong, Jianwei Huang, Guofei GuUSENIX Security 2022
- Splendor: Static Detection of Stored XSS in Modern Web ApplicationsHe Su, Feng Li, Lili Xu, Wenbo Hu 等ISSTA 2023 · 11 次引用
- Understanding and Mitigating Remote Code Execution Vulnerabilities in Cross-platform EcosystemFeng Xiao, Zheng Yang, Joey Allen, Guangliang Yang 等CCS 2022 · 14 次引用
- Dancer in the Dark: Synthesizing and Evaluating Polyglots for Blind Cross-Site ScriptingRobin Kirchner, Jonas Möller, Marius Musch, David Klein 等USENIX Security 2024 · 9 次引用
- 12 Angry Developers - A Qualitative Study on Developers' Struggles with CSPSebastian Roth, Lea Gröber, Michael Backes, Katharina Krombholz 等CCS 2021 · 22 次引用
