Skip to main content
Erschienen in: Empirical Software Engineering 5/2023

01.09.2023

XSnare: application-specific client-side cross-site scripting protection

verfasst von: José Carlos Pazos, Jean-Sébastien Légaré, Ivan Beschastnikh

Erschienen in: Empirical Software Engineering | Ausgabe 5/2023

Einloggen

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

We present XSnare, a client-side Cross-Site Scripting (XSS) solution implemented as a Firefox extension. The client-side design of XSnare can protect users before application developers release patches and before server operators apply them. XSnare blocks XSS attacks by using previous knowledge of a web application’s HTML template content and the rich DOM context. XSnare uses a database of exploit descriptions, which are written with the help of previously recorded CVEs. It singles out injection points for exploits in the HTML and dynamically sanitizes content to prevent malicious payloads from appearing in the DOM. XSnare displays a secured version of the site, even if is exploited. We evaluated XSnare on 81 recent CVEs related to XSS attacks, and found that it defends against 93.8% of these exploits. We compared XSnare’s funcitonality and protection with two well known content filtering extensions: NoScript and uBlockOrigin. To the best of our knowledge, XSnare is the first protection mechanism for XSS that is application-specific, and based on publicly available CVE information. We show that XSnare’s specificity protects users against exploits which evade other, more generic, XSS defenses. Our performance evaluation shows that our extension’s overhead on web page loading time is less than 10% for 72.6% of the sites in the Moz Top 500 list. We also show that XSnare has as a slowdown of less than 10% on 60% of the vulnerable sites that we considered. XSnare has a false positive rate of 1/4876 (0.0205%) on the Alexa top 5000 sites.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Anhänge
Nur mit Berechtigung zugänglich
Literatur
Zurück zum Zitat Abgrall E, Traon YL, Gombault S, et al (2014) Empirical investigation of the web browser attack surface under cross-site scripting: An urgent need for systematic security regression testing. In: 2014 IEEE Seventh International Conference on Software Testing, Verification and Validation Workshops. pp 34–41. https://doi.org/10.1109/ICSTW.2014.63 Abgrall E, Traon YL, Gombault S, et al (2014) Empirical investigation of the web browser attack surface under cross-site scripting: An urgent need for systematic security regression testing. In: 2014 IEEE Seventh International Conference on Software Testing, Verification and Validation Workshops. pp 34–41. https://​doi.​org/​10.​1109/​ICSTW.​2014.​63
Zurück zum Zitat Bezemer CP, Mesbah A, van Deursen A (2009) Automated security testing of web widget interactions. In: Proceedings of the 7th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on The Foundations of Software Engineering. Association for Computing Machinery, New York, NY, USA, ESEC/FSE ’09. pp 81-90. https://doi.org/10.1145/1595696.1595711 Bezemer CP, Mesbah A, van Deursen A (2009) Automated security testing of web widget interactions. In: Proceedings of the 7th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on The Foundations of Software Engineering. Association for Computing Machinery, New York, NY, USA, ESEC/FSE ’09. pp 81-90. https://​doi.​org/​10.​1145/​1595696.​1595711
Zurück zum Zitat Bisht P, Venkatakrishnan VN (2008) XSS-GUARD: Precise dynamic prevention of cross-site scripting attacks. In: Proceedings of the 5th International Conference on Detection of Intrusions and Malware, and Vulnerability Assessment. Springer-Verlag, Berlin, Heidelberg, DIMVA ’08. pp 23–43. https://doi.org/10.1007/978-3-540-70542-0_2 Bisht P, Venkatakrishnan VN (2008) XSS-GUARD: Precise dynamic prevention of cross-site scripting attacks. In: Proceedings of the 5th International Conference on Detection of Intrusions and Malware, and Vulnerability Assessment. Springer-Verlag, Berlin, Heidelberg, DIMVA ’08. pp 23–43. https://​doi.​org/​10.​1007/​978-3-540-70542-0_​2
Zurück zum Zitat Hallaraker O, Vigna G (2005) Detecting malicious javascript code in mozilla. In: Proceedings of the 10th IEEE International Conference on Engineering of Complex Computer Systems. IEEE Computer Society, Washington, DC, USA, ICECCS ’05, pp 85–94. https://doi.org/10.1109/ICECCS.2005.35 Hallaraker O, Vigna G (2005) Detecting malicious javascript code in mozilla. In: Proceedings of the 10th IEEE International Conference on Engineering of Complex Computer Systems. IEEE Computer Society, Washington, DC, USA, ICECCS ’05, pp 85–94. https://​doi.​org/​10.​1109/​ICECCS.​2005.​35
Zurück zum Zitat Heiderich M, Späth C, Schwenk J (2017) Dompurify: Client-side protection against XSS and markup injection. In: Foley SN, Gollmann D, Snekkenes E (eds) Computer Security - ESORICS 2017. Springer International Publishing, Cham, pp 116–134CrossRef Heiderich M, Späth C, Schwenk J (2017) Dompurify: Client-side protection against XSS and markup injection. In: Foley SN, Gollmann D, Snekkenes E (eds) Computer Security - ESORICS 2017. Springer International Publishing, Cham, pp 116–134CrossRef
Zurück zum Zitat Nadji Y, Saxena P, Song D (2009) Document structure integrity: A robust basis for cross-site scripting defense. In: NDSS Nadji Y, Saxena P, Song D (2009) Document structure integrity: A robust basis for cross-site scripting defense. In: NDSS
Zurück zum Zitat Nguyen-Tuong A, Guarnieri S, Greene D et al (2005) Automatically hardening web applications using precise tainting. Security and Privacy in the Age of Ubiquitous Computing, IFIP TC11 20th International Conference on Information Security (SEC 2005), May 30 - June 1, 2005. Chiba, Japan, pp 295–308 Nguyen-Tuong A, Guarnieri S, Greene D et al (2005) Automatically hardening web applications using precise tainting. Security and Privacy in the Age of Ubiquitous Computing, IFIP TC11 20th International Conference on Information Security (SEC 2005), May 30 - June 1, 2005. Chiba, Japan, pp 295–308
Zurück zum Zitat Pietraszek T, Berghe CV (2006) Defending against injection attacks through context-sensitive string evaluation. In: Proceedings of the 8th International Conference on Recent Advances in Intrusion Detection. Springer-Verlag, Berlin, Heidelberg, RAID’05. pp 124–145. https://doi.org/10.1007/11663812_7 Pietraszek T, Berghe CV (2006) Defending against injection attacks through context-sensitive string evaluation. In: Proceedings of the 8th International Conference on Recent Advances in Intrusion Detection. Springer-Verlag, Berlin, Heidelberg, RAID’05. pp 124–145. https://​doi.​org/​10.​1007/​11663812_​7
Zurück zum Zitat Snyder P, Taylor C, Kanich C (2017) Most websites don’t need to vibrate: A cost-benefit approach to improving browser security. In: Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security. ACM, New York, NY, USA, CCS ’17. pp 179–194. https://doi.org/10.1145/3133956.3133966 Snyder P, Taylor C, Kanich C (2017) Most websites don’t need to vibrate: A cost-benefit approach to improving browser security. In: Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security. ACM, New York, NY, USA, CCS ’17. pp 179–194. https://​doi.​org/​10.​1145/​3133956.​3133966
Zurück zum Zitat Steffens M, Rossow C, Johns M, et al (2019) Don’t trust the locals: Investigating the prevalence of persistent client-side cross-site scripting in the wild. In: 26th Annual Network and Distributed System Security Symposium, NDSS 2019, San Diego, California, USA, February 24-27, 2019 Steffens M, Rossow C, Johns M, et al (2019) Don’t trust the locals: Investigating the prevalence of persistent client-side cross-site scripting in the wild. In: 26th Annual Network and Distributed System Security Symposium, NDSS 2019, San Diego, California, USA, February 24-27, 2019
Zurück zum Zitat Sundareswaran S, Squicciarini AC (2012) XSS-Dec: A hybrid solution to mitigate cross-site scripting attacks. In: Proceedings of the 26th Annual IFIP WG 11.3 Conference on Data and Applications Security and Privacy. Springer-Verlag, Berlin, Heidelberg, DBSec’12. pp 223–238. https://doi.org/10.1007/978-3-642-31540-4_17 Sundareswaran S, Squicciarini AC (2012) XSS-Dec: A hybrid solution to mitigate cross-site scripting attacks. In: Proceedings of the 26th Annual IFIP WG 11.3 Conference on Data and Applications Security and Privacy. Springer-Verlag, Berlin, Heidelberg, DBSec’12. pp 223–238. https://​doi.​org/​10.​1007/​978-3-642-31540-4_​17
Zurück zum Zitat Sun F, Xu L, Su Z (2009) Client-side detection of XSS worms by monitoring payload propagation. In: Backes M, Ning P (eds) Computer Security - ESORICS 2009. Springer Berlin Heidelberg, Berlin, Heidelberg, pp 539–554 Sun F, Xu L, Su Z (2009) Client-side detection of XSS worms by monitoring payload propagation. In: Backes M, Ning P (eds) Computer Security - ESORICS 2009. Springer Berlin Heidelberg, Berlin, Heidelberg, pp 539–554
Zurück zum Zitat Wassermann G, Su Z (2008) Static detection of cross-site scripting vulnerabilities. In: Proceedings of the 30th International Conference on Software Engineering. Association for Computing Machinery, New York, NY, USA, ICSE ’08. p 171-180. https://doi.org/10.1145/1368088.1368112 Wassermann G, Su Z (2008) Static detection of cross-site scripting vulnerabilities. In: Proceedings of the 30th International Conference on Software Engineering. Association for Computing Machinery, New York, NY, USA, ICSE ’08. p 171-180. https://​doi.​org/​10.​1145/​1368088.​1368112
Zurück zum Zitat Wassermann G, Yu D, Chander A, et al (2008) Dynamic test input generation for web applications. In: Proceedings of the 2008 International Symposium on Software Testing and Analysis. Association for Computing Machinery, New York, NY, USA, ISSTA ’08. p 249-260. https://doi.org/10.1145/1390630.1390661 Wassermann G, Yu D, Chander A, et al (2008) Dynamic test input generation for web applications. In: Proceedings of the 2008 International Symposium on Software Testing and Analysis. Association for Computing Machinery, New York, NY, USA, ISSTA ’08. p 249-260. https://​doi.​org/​10.​1145/​1390630.​1390661
Zurück zum Zitat Wurzinger P, Platzer C, Ludl C, et al (2009) Swap: Mitigating XSS attacks using a reverse proxy. In: Proceedings of the 2009 ICSE Workshop on Software Engineering for Secure Systems. IEEE Computer Society, Washington, DC, USA, IWSESS ’09. pp 33–39. https://doi.org/10.1109/IWSESS.2009.5068456 Wurzinger P, Platzer C, Ludl C, et al (2009) Swap: Mitigating XSS attacks using a reverse proxy. In: Proceedings of the 2009 ICSE Workshop on Software Engineering for Secure Systems. IEEE Computer Society, Washington, DC, USA, IWSESS ’09. pp 33–39. https://​doi.​org/​10.​1109/​IWSESS.​2009.​5068456
Zurück zum Zitat Xiao X, Paradkar A, Thummalapenta S, et al (2012) Automated extraction of security policies from natural-language software documents. In: Proceedings of the ACM SIGSOFT 20th International Symposium on the Foundations of Software Engineering. Association for Computing Machinery, New York, NY, USA, FSE ’12. https://doi.org/10.1145/2393596.2393608 Xiao X, Paradkar A, Thummalapenta S, et al (2012) Automated extraction of security policies from natural-language software documents. In: Proceedings of the ACM SIGSOFT 20th International Symposium on the Foundations of Software Engineering. Association for Computing Machinery, New York, NY, USA, FSE ’12. https://​doi.​org/​10.​1145/​2393596.​2393608
Metadaten
Titel
XSnare: application-specific client-side cross-site scripting protection
verfasst von
José Carlos Pazos
Jean-Sébastien Légaré
Ivan Beschastnikh
Publikationsdatum
01.09.2023
Verlag
Springer US
Erschienen in
Empirical Software Engineering / Ausgabe 5/2023
Print ISSN: 1382-3256
Elektronische ISSN: 1573-7616
DOI
https://doi.org/10.1007/s10664-023-10323-w

Weitere Artikel der Ausgabe 5/2023

Empirical Software Engineering 5/2023 Zur Ausgabe

Premium Partner