使用fluentTQL流畅地指定污染流查询
Fluently specifying taint-flow queries with fluentTQL
摘要:
以前的工作表明,污点分析只有在正确地定制到使用它们的上下文时才有用。现有的领域特定语言(DSL)允许通过定义描述潜在易受攻击的污染流的拒绝列表数据流规则来进行这种定制。但是,这些语言主要是为熟悉污点分析的安全专家设计的。软件开发人员认为这些语言很复杂。本文介绍了一种专门针对污染流的查询语言FluentTQL。fluentTQL是内部Java DSL,使用流畅的界面设计。fluentTQL查询可以表达各种污染风格的漏洞类型,例如注入,跨站点脚本或路径遍历。本文描述了fluentTQL的抽象语法和具体语法,定义了其运行时语义。语义独立于任何底层分析,并允许通过各种污染分析评估fluentTQL查询。在两个污点分析求解器Boomerang和FlowDroid之上,fluentTQL的实例显示并验证了fluentTQL的表达能力。基于现有的文献中的例子,我们实现了11个流行的安全漏洞类型在Java中的查询。使用我们的SQL注入规范,基于Boomerang的污点分析在OWASP WebGoat应用程序中找到了所有17个已知的污点流,而使用FlowDroid则找到了13个污点流。同样,在Java PetClinic应用程序的易受攻击版本中,基于Boomerang的污点分析找到了所有7个预期的污点流。在7个实际的Android应用程序中,有25个预期的污染流,其中18个被检测到。在一项由26名软件开发人员参与的用户研究中,fluentTQL获得了很高的可用性分数。与Semmle/GitHub最先进的DSL CodeQL相比,参与者发现fluentTQL更有用,并且他们能够在更短的时间内指定污点分析查询。
英文摘要:
Previous work has shown that taint analyses are only useful if correctly customized to the context in which they are used. Existing domain-specific languages (DSLs) allow such customization through the definition of deny-listing data-flow rules that describe potentially vulnerable taint-flows. These languages, however, are designed primarily for security experts who are knowledgeable in taint analysis. Software developers consider these languages to be complex. This paper presents fluentTQL, a query language particularly for taint-flow. fluentTQL is internal Java DSL and uses a fluent-interface design. fluentTQL queries can express various taint-style vulnerability types, e.g. injections, cross-site scripting or path traversal. This paper describes fluentTQL's abstract and concrete syntax and defines its runtime semantics. The semantics are independent of any underlying analysis and allows evaluation of fluentTQL queries by a variety of taint analyses. Instantiations of fluentTQL, on top of two taint analysis solvers, Boomerang and FlowDroid, show and validate fluentTQL expressiveness. Based on existing examples from the literature, we implemented queries for 11 popular security vulnerability types in Java. Using our SQL injection specification, the Boomerang-based taint analysis found all 17 known taint-flows in the OWASP WebGoat application, whereas with FlowDroid 13 taint-flows were found. Similarly, in a vulnerable version of the Java PetClinic application, the Boomerang-based taint analysis found all seven expected taint-flows. In seven real-world Android apps with 25 expected taint-flows, 18 were detected. In a user study with 26 software developers, fluentTQL reached a high usability score. In comparison to CodeQL, the state-of-the-art DSL by Semmle/GitHub, participants found fluentTQL more usable and with it they were able to specify taint analysis queries in shorter time.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。