Skip to main content
QUICK REVIEW

[论文解读] ConsiDroid: A Concolic-based Tool for Detecting SQL Injection Vulnerability in Android Apps

Ehsan Edalat, Babak Sadeghiyan|arXiv (Cornell University)|Nov 26, 2018
Advanced Malware Detection TechniquesComputer Science参考文献 23被引用 3
一句话总结

ConsiDroid 是一种基于 concolic 执行的工具,通过扩展源代码以添加虚拟主类和符号模拟类,利用 SPF 实现污点分析,从而检测 Android 应用中的 SQL 注入漏洞。在 140 个 F-Droid 应用中,该工具成功识别出三个真实存在的 SQL 注入漏洞,准确率达到 100%,展示了有效的路径优先级排序和动态污点跟踪能力,且性能开销极低。

ABSTRACT

In this paper, we present a concolic execution technique for detecting SQL injection vulnerabilities in Android apps, with a new tool we called ConsiDroid. We extend the source code of apps with mocking technique, such that the execution of original source code is not affected. The extended source code can be treated as Java applications and may be executed by SPF with concolic execution. We automatically produce a DummyMain class out of static analysis such that the essential functions are called sequentially and, the events leading to vulnerable functions are triggered. We extend SPF with taint analysis in ConsiDroid. For making taint analysis possible, we introduce a new technique of symbolic mock classes in order to ease the propagation of tainted values in the code. An SQL injection vulnerability is detected through receiving a tainted value by a vulnerable function. Besides, ConsiDroid takes advantage of static analysis to adjust SPF in order to inspect only suspicious paths. To illustrate the applicability of ConsiDroid, we have inspected randomly selected 140 apps from F-Droid repository. From these apps, we found three apps vulnerable to SQL injection. To verify their vulnerability, we analyzed the apps manually based on ConsiDroid's reports by using Robolectric.

研究动机与目标

  • 为解决 Android 应用缺乏 concolic 测试工具的问题,特别是针对检测 SQL 注入漏洞的需求。
  • 通过为应用添加虚拟主类,克服 Android 中 concolic 执行面临的挑战,如缺少入口点和 SDK 依赖问题。
  • 通过引入符号模拟类,实现在不执行真实 SDK 逻辑的前提下传播污染值,从而在 Android 应用中实现动态污点分析。
  • 通过静态分析优先选择可疑执行路径,提升效率。
  • 在 F-Droid 代码库中的真实开源 Android 应用上评估该工具的有效性。

提出的方法

  • ConsiDroid 通过反向遍历调用图,自动生成虚拟主类来扩展 Android 应用,从而在不修改原始源代码的前提下触发潜在漏洞函数。
  • 使用符号模拟类来模拟 SDK 功能,将方法体替换为默认值,避免在 concolic 执行过程中产生路径分支。
  • 将污点分析集成到 SPF 的 concolic 执行引擎中,追踪从不受信任输入(源)到 SQL 执行函数(汇)的数据流。
  • 利用静态分析识别并优先处理潜在的漏洞路径,减少路径爆炸问题,提升性能。
  • ConsiDroid 扩展了 SPF,增加了符号执行和污点追踪功能,当污染值到达易受攻击的 SQL 函数时,可检测出 SQL 注入漏洞。
  • 该工具通过报告具体的执行轨迹来报告漏洞,帮助开发者快速定位并修复问题。

实验结果

研究问题

  • RQ1基于污点分析的 concolic 执行能否检测出真实 Android 应用中的 SQL 注入漏洞?
  • RQ2使用虚拟主类和符号模拟类在不修改原始代码的前提下,能否有效支持 Android 应用的 concolic 测试?
  • RQ3基于静态分析的路径优先级策略在多大程度上减少了 Android 应用中 concolic 测试的性能开销?
  • RQ4ConsiDroid 在真实世界应用仓库中检测 SQL 注入漏洞的准确率和召回率如何?
  • RQ5Android 应用的复杂度在多大程度上影响 ConsiDroid 分析的时间和代码覆盖率?

主要发现

  • ConsiDroid 在从 140 个随机选取的 F-Droid 应用中成功检测出三个真实的 SQL 注入漏洞,所有漏洞均通过使用 Robolectric 的手动分析得到确认。
  • 该工具在漏洞检测中实现了 100% 的准确率,评估集中未报告任何误报。
  • 随着应用复杂度的增加,ConsiDroid 的性能开销仅略有上升,这一结果通过方法数量、SDK 方法使用量和 Activity 数量等指标进行了衡量。
  • 利用静态分析优先处理潜在漏洞路径,显著减少了探索的执行路径数量,提升了效率。
  • 即使在应用复杂度增加的情况下,ConsiDroid 仍保持了较高的代码覆盖率,且执行时间增加极少。
  • 符号模拟类技术成功实现了跨 SDK 边界的污点传播,且未引发路径爆炸问题。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。