Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3372297.3417267acmconferencesArticle/Chapter ViewAbstractPublication PagesccsConference Proceedingsconference-collections
research-article

PMForce: Systematically Analyzing postMessage Handlers at Scale

Published: 02 November 2020 Publication History

Abstract

The Web has become a platform in which sites rely on intricate interactions that span across the boundaries of origins. While the Same-Origin Policy prevents direct data exchange with documents from other origins, the postMessage API offers one relaxation that allows developers to exchange data across these boundaries. While prior manual analysis could show the presence of issues within postMessage handlers, unfortunately, a steep increase in postMessage usage makes any manual approach intractable. To deal with this increased work load, we set out to automatically find issues in postMessage handlers that allow an attacker to execute code in the vulnerable sites, alter client-side state, or leak sensitive information. To achieve this goal, we present an automated analysis framework running inside the browser, which uses selective forced execution paired with lightweight dynamic taint tracking to find traces in the analyzed handlers that end in sinks allowing for code-execution or state alterations. We use path constraints extracted from the program traces and augment them with Exploit Templates, i.e., additional constraints, ascertaining that a valid assignment that solves all these constraints produces a code-invoking or state-manipulating behavior. Based on these constraints, we use Z3 to generate postMessages aimed at triggering the insecure functionality to prove exploitability, and validate our findings at scale. We use this framework to conduct the most comprehensive experiment studying the security issues of postMessage handlers found throughout the top 100,000 most influential sites yet, which allows us to find potentially exploitable data flows in 252 unique handlers out of which 111 were automatically exploitable.

Supplementary Material

MOV File (Copy of CCS2020_fpx011_Marius Steffens - Andrew Diehl.mov)
Presentation video

References

[1]
Ahmed Elsobky. 2018. Unleashing an Ultimate XSS Polyglot. https://github.com/0xsobky/HackVault/wiki/Unleashing-an-Ultimate-XSS-Polyglot. (2018). [accessed 06-Apr-2020].
[2]
Adam Barth, Collin Jackson, and John C Mitchell. 2009. Securing frame communication in browsers. Commun. ACM, Vol. 52, 6 (2009).
[3]
blukat29. 2020. regex-crossword-solver. https://github.com/blukat29/regex-crossword-solver. (2020). [accessed 06-Apr-2020].
[4]
Cristian Cadar, Daniel Dunbar, Dawson R Engler, et almbox. 2008. KLEE: Unassisted and Automatic Generation of High-Coverage Tests for Complex Systems Programs. In OSDI.
[5]
Google. 2020. Chrome DevTools Protocol. https://chromedevtools.github.io/devtools-protocol/. (2020). [accessed 06-Apr-2020].
[6]
Xunchao Hu, Yao Cheng, Yue Duan, Andrew Henderson, and Heng Yin. 2017. Jsforce: A forced execution engine for malicious javascript detection. In International Conference on Security and Privacy in Communication Systems.
[7]
Kyungtae Kim, I Luk Kim, Chung Hwan Kim, Yonghwi Kwon, Yunhui Zheng, Xiangyu Zhang, and Dongyan Xu. 2017. J-force: Forced execution on javascript. In WWW.
[8]
Clemens Kolbitsch, Benjamin Livshits, Benjamin Zorn, and Christian Seifert. 2012. Rozzle: De-cloaking internet malware. In IEEE Symposium on Security & Privacy.
[9]
Sebastian Lekies, Ben Stock, and Martin Johns. 2013. 25 million flows later: Large-scale detection of DOM-based XSS. In CCS.
[10]
Guodong Li, Esben Andreasen, and Indradeep Ghosh. 2014. SymJS: automatic symbolic testing of JavaScript web applications. In FSE.
[11]
Blake Loring, Duncan Mitchell, and Johannes Kinder. 2017. ExpoSE: practical symbolic execution of standalone JavaScript. In Proceedings of the 24th ACM SIGSOFT International SPIN Symposium on Model Checking of Software.
[12]
Felix Maier. 2020. Iroh. https://github.com/maierfelix/Iroh. (2020). [accessed 06-Apr-2020].
[13]
William Melicher, Anupam Das, Mahmood Sharif, Lujo Bauer, and Limin Jia. 2018. Riding out domsday: Towards detecting and preventing dom cross-site scripting. In NDSS.
[14]
Mozilla Developer Network. 2020 a. Symbol. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol. (2020). [accessed 06-Apr-2020].
[15]
Mozilla Developer Network. 2020 b. The structured clone algorithm. https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm. (2020). [accessed 06-Apr-2020].
[16]
OWASP. 2020 a. Cross-Site Request Forgery (CSRF) Prevention Cheat Sheet. https://owasp.org/www-project-cheat-sheets/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet#double-submit-cookie. (2020). [accessed 06-Apr-2020].
[17]
OWASP. 2020 b. Session fixation. https://owasp.org/www-community/attacks/Session_fixation. (2020). [accessed 06-Apr-2020].
[18]
Victor Le Pochat, Tom Van Goethem, Samaneh Tajalizadehkhoob, Maciej Korczy'nski, and Wouter Joosen. 2019. Tranco: A research-oriented top sites ranking hardened against manipulation. NDSS (2019). https://tranco-list.eu/list/NZQW/100000
[19]
Prateek Saxena, Devdatta Akhawe, Steve Hanna, Feng Mao, Stephen McCamant, and Dawn Song. 2010a. A symbolic execution framework for javascript. In IEEE Symposium on Security & Privacy.
[20]
Prateek Saxena, Steve Hanna, Pongsin Poosankam, and Dawn Song. 2010b. FLAX: Systematic Discovery of Client-side Validation Vulnerabilities in Rich Web Applications. In NDSS.
[21]
Yan Shoshitaishvili, Ruoyu Wang, Christopher Salls, Nick Stephens, Mario Polino, Andrew Dutcher, John Grosen, Siji Feng, Christophe Hauser, Christopher Kruegel, et almbox. 2016. Sok:(state of) the art of war: Offensive techniques in binary analysis. In IEEE Symposium on Security & Privacy.
[22]
Suphannee Sivakorn, Iasonas Polakis, and Angelos D Keromytis. 2016. The cracked cookie jar: HTTP cookie hijacking and the exposure of private information. In IEEE Symposium on Security & Privacy.
[23]
Sooel Son and Vitaly Shmatikov. 2013. The Postman Always Rings Twice: Attacking and Defending postMessage in HTML5 Websites. In NDSS.
[24]
Marius Steffens, Christian Rossow, Martin Johns, and Ben Stock. 2019. Don't Trust The Locals: Investigating the Prevalence of Persistent Client-Side Cross-Site Scripting in the Wild. In NDSS.
[25]
Ben Stock, Martin Johns, Marius Steffens, and Michael Backes. 2017. How the Web Tangled Itself: Uncovering the History of Client-Side Web (In)Security. In USENIX Security.
[26]
Minh-Thai Trinh, Duc-Hiep Chu, and Joxan Jaffar. 2014. S3: A symbolic string solver for vulnerability detection in web applications. In CCS.
[27]
Yunhui Zheng, Xiangyu Zhang, and Vijay Ganesh. 2013. Z3-str: A z3-based string solver for web application analysis. In Proceedings of the 2013 9th Joint Meeting on Foundations of Software Engineering.

Cited By

View all
  • (2024)Trust me if you canProceedings of the 33rd USENIX Conference on Security Symposium10.5555/3698900.3699236(6003-6020)Online publication date: 14-Aug-2024
  • (2024)Unveiling the Invisible: Detection and Evaluation of Prototype Pollution Gadgets with Dynamic Taint AnalysisProceedings of the ACM Web Conference 202410.1145/3589334.3645579(1800-1811)Online publication date: 13-May-2024
  • (2024)Detecting and Understanding Self-Deleting JavaScript CodeProceedings of the ACM Web Conference 202410.1145/3589334.3645540(1768-1778)Online publication date: 13-May-2024
  • Show More Cited By

Index Terms

  1. PMForce: Systematically Analyzing postMessage Handlers at Scale

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    CCS '20: Proceedings of the 2020 ACM SIGSAC Conference on Computer and Communications Security
    October 2020
    2180 pages
    ISBN:9781450370899
    DOI:10.1145/3372297
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 02 November 2020

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. forced execution
    2. large-scale analysis
    3. taint analysis
    4. xss

    Qualifiers

    • Research-article

    Conference

    CCS '20
    Sponsor:

    Acceptance Rates

    Overall Acceptance Rate 1,261 of 6,999 submissions, 18%

    Upcoming Conference

    CCS '25

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)64
    • Downloads (Last 6 weeks)4
    Reflects downloads up to 06 Feb 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)Trust me if you canProceedings of the 33rd USENIX Conference on Security Symposium10.5555/3698900.3699236(6003-6020)Online publication date: 14-Aug-2024
    • (2024)Unveiling the Invisible: Detection and Evaluation of Prototype Pollution Gadgets with Dynamic Taint AnalysisProceedings of the ACM Web Conference 202410.1145/3589334.3645579(1800-1811)Online publication date: 13-May-2024
    • (2024)Detecting and Understanding Self-Deleting JavaScript CodeProceedings of the ACM Web Conference 202410.1145/3589334.3645540(1768-1778)Online publication date: 13-May-2024
    • (2024)Jasmine: Scale up JavaScript Static Security Analysis with Computation-based Semantic Explanation2024 IEEE Symposium on Security and Privacy (SP)10.1109/SP54263.2024.00183(296-311)Online publication date: 19-May-2024
    • (2024)The Great Request Robbery: An Empirical Study of Client-side Request Hijacking Vulnerabilities on the Web2024 IEEE Symposium on Security and Privacy (SP)10.1109/SP54263.2024.00098(166-184)Online publication date: 19-May-2024
    • (2024)To Auth or Not To Auth? A Comparative Analysis of the Pre- and Post-Login Security Landscape2024 IEEE Symposium on Security and Privacy (SP)10.1109/SP54263.2024.00094(1500-1516)Online publication date: 19-May-2024
    • (2023)A Honey postMessage, but a Heart of Gall: Exploiting Push Service in Service Workers Via postMessageProceedings of the 2023 ACM Asia Conference on Computer and Communications Security10.1145/3579856.3590342(785-796)Online publication date: 10-Jul-2023
    • (2023)WebSpec: Towards Machine-Checked Analysis of Browser Security Mechanisms2023 IEEE Symposium on Security and Privacy (SP)10.1109/SP46215.2023.10179465(2761-2779)Online publication date: May-2023
    • (2023)It’s (DOM) Clobbering Time: Attack Techniques, Prevalence, and Defenses2023 IEEE Symposium on Security and Privacy (SP)10.1109/SP46215.2023.10179403(1041-1058)Online publication date: May-2023
    • (2023)NodeMedic: End-to-End Analysis of Node.js Vulnerabilities with Provenance Graphs2023 IEEE 8th European Symposium on Security and Privacy (EuroS&P)10.1109/EuroSP57164.2023.00068(1101-1127)Online publication date: Jul-2023
    • Show More Cited By

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media