PMForce: Systematically Analyzing postMessage Handlers at Scale

Marius Steffens, Ben Stock
{"title":"PMForce: Systematically Analyzing postMessage Handlers at Scale","authors":"Marius Steffens, Ben Stock","doi":"10.1145/3372297.3417267","DOIUrl":null,"url":null,"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.","PeriodicalId":20481,"journal":{"name":"Proceedings of the 2020 ACM SIGSAC Conference on Computer and Communications Security","volume":"59 2 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2020-10-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"15","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 2020 ACM SIGSAC Conference on Computer and Communications Security","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3372297.3417267","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 15

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.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
PMForce:系统地大规模分析postMessage处理程序
网络已经成为一个平台,在这个平台上,网站依赖于跨越起源边界的复杂交互。虽然同源策略阻止了与其他来源文档的直接数据交换,但postMessage API提供了一种放松,允许开发人员跨这些边界交换数据。虽然先前的手工分析可以显示出postMessage处理程序中存在的问题,但不幸的是,postMessage使用量的急剧增加使得任何手工方法都变得难以处理。为了处理这种增加的工作负载,我们开始自动查找postMessage处理程序中的问题,这些问题允许攻击者在易受攻击的站点中执行代码、更改客户端状态或泄露敏感信息。为了实现这一目标,我们提供了一个运行在浏览器内部的自动分析框架,它使用选择性强制执行与轻量级动态污染跟踪相结合,在分析的处理程序中找到踪迹,这些踪迹最终以允许代码执行或状态更改的接收器结束。我们使用从程序跟踪中提取的路径约束,并使用开发模板(Exploit Templates)对它们进行扩展,即,附加约束,确定解决所有这些约束的有效分配会产生代码调用或状态操纵行为。基于这些约束,我们使用Z3生成旨在触发不安全功能的postMessages,以证明可利用性,并大规模地验证我们的发现。我们使用这个框架进行了最全面的实验,研究了在前10万个最有影响力的网站中发现的postMessage处理程序的安全问题,这使我们能够在252个独特的处理程序中找到潜在的可利用数据流,其中111个是自动可利用的。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Session details: Session 1D: Applied Cryptography and Cryptanalysis HACLxN: Verified Generic SIMD Crypto (for all your favourite platforms) Pointproofs: Aggregating Proofs for Multiple Vector Commitments Session details: Session 4D: Distributed Protocols A Performant, Misuse-Resistant API for Primality Testing
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1