InspectJS:利用代码相似性和用户反馈进行JavaScript的有效着色规范推断
InspectJS: Leveraging Code Similarity and User-Feedback for Effective Taint Specification Inference for JavaScript
摘要:
静态分析已成为检测安全漏洞的首选武器。污点分析特别是一种非常通用和强大的技术,其中安全策略以禁止流的形式表示,无论是从不受信任的输入源到敏感的接收器(在完整性策略中)还是从敏感的源到不受信任的接收器(在机密性策略中)。这种方法的吸引力在于,污染跟踪机制只需实现一次,然后可以使用不同的污染规范(即,源和汇的集合,以及使其他有问题的流无害的任何消毒器)进行参数化,以检测许多不同类型的漏洞。但是,尽管实现可伸缩的过程间静态污点跟踪的技术已经相当成熟,但制作污点规范仍然是一门艺术而不是科学,并且在实践中往往涉及大量的手动工作。过去的工作主要集中在自动化技术上,用于从库的实现或从它们在客户端代码中的使用方式来推断库的污点规范。在后者中,基于机器学习的方法已经显示出巨大的前景。在这项工作中,我们将现有的机器学习方法与GitHub的CodeQL分析框架中的手动污点建模相结合,以挖掘JavaScript库的水槽规范。我们表明,机器学习组件可以成功地推断出许多新的污点汇,要么不是手动建模的一部分,要么由于分析不完整而未被检测到。此外,我们提出了组织水槽预测使用自动排名和代码相似性指标,使分析工程师能够有效地筛选大量的预测,以确定真正的积极的技术。
英文摘要:
Static analysis has established itself as a weapon of choice for detecting security vulnerabilities. Taint analysis in particular is a very general and powerful technique, where security policies are expressed in terms of forbidden flows, either from untrusted input sources to sensitive sinks (in integrity policies) or from sensitive sources to untrusted sinks (in confidentiality policies). The appeal of this approach is that the taint-tracking mechanism has to be implemented only once, and can then be parameterized with different taint specifications (that is, sets of sources and sinks, as well as any sanitizers that render otherwise problematic flows innocuous) to detect many different kinds of vulnerabilities. But while techniques for implementing scalable inter-procedural static taint tracking are fairly well established, crafting taint specifications is still more of an art than a science, and in practice tends to involve a lot of manual effort. Past work has focussed on automated techniques for inferring taint specifications for libraries either from their implementation or from the way they tend to be used in client code. Among the latter, machine learning-based approaches have shown great promise. In this work we present our experience combining an existing machine-learning approach to mining sink specifications for JavaScript libraries with manual taint modelling in the context of GitHub's CodeQL analysis framework. We show that the machine-learning component can successfully infer many new taint sinks that either are not part of the manual modelling or are not detected due to analysis incompleteness. Moreover, we present techniques for organizing sink predictions using automated ranking and code-similarity metrics that allow an analysis engineer to efficiently sift through large numbers of predictions to identify true positives.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。