面向Android污点分析的LLM增强方法研究 Towards LLM-Enhanced Android Taint Analysis 预印本

⚠️ 本文为 预印本(arXiv 公开版本),尚未经过正式同行评审。作者自发公开,结论未经期刊审稿验证,阅读时请知悉。
发布时间:2026-08-25
⬇️ 2 次下载
👁️ 预览文献
💡 AI 中文简介
污点分析是检测Android应用敏感数据泄露的关键技术,但传统静态工具如FlowDroid在建模Android框架时存在局限。本文探索了使用现成的大型语言模型(LLM)推理Android应用污点流的可行性,采用智能体交互策略让LLM迭代探索代码并推理数据流。在DroidBench基准上与FlowDroid对比,Gemini-3 Flash的F1分数达0.96,远超FlowDroid的0.55,尤其在组件间通信、隐式流和反射等难点类别上显著提升。在真实应用中也发现了FlowDroid遗漏的潜在泄露。初步结果表明,LLM推理可有效补充传统静态污点分析,为混合增强管道的研究提供了动力。
领域软件安全、移动安全、静态分析
适合谁读需要一定专业背景,适合安全分析、静态分析和LLM应用领域的研究者
核心贡献1. 首次探索现成LLM通过智能体交互进行Android污点推理的可行性。2. 在DroidBench上显著优于FlowDroid,尤其在传统难点类别上表现突出。
关键数据Gemini-3 Flash F1=0.96 vs FlowDroid F1=0.55;组件间通信F1=0.95 vs 0.17;隐式流F1=0.94 vs 0.00;反射F1=1.00 vs 0.50
推荐理由想知道大模型如何颠覆传统静态分析?看这篇,LLM在污点分析上的表现惊艳,传统工具被碾压!
关键词["污点分析", "Android安全", "大语言模型", "静态分析", "数据泄露检测"]

原文摘要

查看英文原文摘要

Taint analysis is a fundamental technique for detecting sensitive data leaks in Android apps. However, traditional static tools, such as FlowDroid, still face well-known challenges due to the complexity of accurately modeling the Android framework. In this paper, we investigate whether off-the-shelf Large Language Models (LLMs) can effectively reason about taint flows in Android apps. Our preliminary approach relies on an agentic interaction strategy, enabling the LLM to iteratively explore code and reason about data flows. We conduct an initial evaluation on the DroidBench benchmark against FlowDroid, where our approach outperforms the baseline: Gemini-3 Flash achieves an F1-score of 0.96, compared to 0.55 for FlowDroid. In particular, we observe improvements in challenging categories such as inter-component communication (0.95 vs. 0.17), implicit flows (0.94 vs. 0.00), and reflection (1.00 vs. 0.50), where FlowDroid typically struggles. On a small set of real-world apps, the LLM-based approach also identifies additional potential data leaks not reported by FlowDroid. These preliminary findings suggest that LLM reasoning may effectively complement traditional static taint analysis, motivating future research on hybrid LLM-enhanced taint analysis pipelines.

📚 参考文献 (41 条)

查看全部 41 条
  1. [1] Marco Alecci, Nicolas Sannier, Marcello Ceci, Sallam Abualhaija, Jordan Samhi, Domenico Bianculli, Tegawendé François d Assise BISSYANDE, and Jacques Klein. 2025. Toward LLM-Driven GDPR Compliance Checking for Android Apps. In 33rd ACM International Conference on the Foundations of Software Engineering (FSE Companion’25).
  2. [2] Kevin Allix, Tegawendé F. Bissyandé, Jacques Klein, and Yves Le Traon. 2016. AndroZoo: Collecting Millions of Android Apps for the Research Commu- nity. In Proceedings of the 13th International Conference on Mining Software Repositories (Austin, Texas) (MSR ’16). ACM, New York, NY, USA, 468–471. doi:10.1145/2901739.2903508
  3. [3] Anthropic. 2024. Model Context Protocol. https://modelcontextprotocol.io. Accessed: 2026-04-27.
  4. [4] Anthropic. 2026. Claude Code by Anthropic | AI Coding Agent, Terminal, IDE. https://claude.com/product/claude-code. Accessed: 2026-04-27.
  5. [5] Steven Arzt, Siegfried Rasthofer, Christian Fritz, Eric Bodden, Alexandre Bartel, Jacques Klein, Yves Le Traon, Damien Octeau, and Patrick McDaniel. 2014. Flowdroid: Precise context, flow, field, object-sensitive and lifecycle-aware taint analysis for android apps. ACM sigplan notices 49, 6 (2014), 259–269.
  6. [6] Islem Bouzenia, Premkumar Devanbu, and Michael Pradel. 2024. Repairagent: An autonomous, llm-based agent for program repair. arXiv preprint arXiv:2403.17134 (2024).
  7. [7] Yinghao Chen, Zehao Hu, Chen Zhi, Junxiao Han, Shuiguang Deng, and Jianwei Yin. 2024. Chatunitest: A framework for llm-based test generation. In Companion Proceedings of the 32nd ACM International Conference on the Foundations of Software Engineering. 572–576. 2https://chatgpt.com/ 3https://claude.ai/ 4https://github.com/features/copilot
  8. [8] Sidong Feng and Chunyang Chen. 2024. Prompting is all you need: Automated android bug replay with large language models. In Proceedings of the 46th IEEE/ACM International Conference on Software Engineering. 1–13.
  9. [9] Jonah Ghebremichael, Saastha Vasan, Saad Ullah, Greg Tystahl, David Adei, Christopher Kruegel, Giovanni Vigna, William Enck, and Alexandros Kapravelos. 2026. Multi-Agent Taint Specification Extraction for Vulnerability Detection. arXiv preprint arXiv:2601.10865 (2026).
  10. [10] Google. 2026. Gemini CLI. https://github.com/google-gemini/gemini-cli. Accessed: 2026-04-27.
  11. [11] Google DeepMind. 2026. Gemini 3 – Google DeepMind. https: //deepmind.google/technologies/gemini/. Accessed: 2026-04-27.
  12. [12] Yuejun Guo, Constantinos Patsakis, Qiang Hu, Qiang Tang, and Fran Casino. 2024. Outside the comfort zone: Analysing llm capabilities in software vulnerability de- tection.InEuropeansymposiumonresearchincomputersecurity.Springer,271–289.
  13. [13] Yuchao Huang, Junjie Wang, Zhe Liu, Yawen Wang, Song Wang, Chunyang Chen, Yuanzhe Hu, and Qing Wang. 2024. Crashtranslator: Automatically reproducing mobile application crashes directly from stack trace. In Proceedings of the 46th ieee/acm international conference on software engineering. 1–13.
  14. [14] Sungmin Kang, Juyeon Yoon, and Shin Yoo. 2023. Large language models are few-shot testers: Exploring llm-based general bug reproduction. In 2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE). IEEE, 2312–2323.
  15. [15] Avishree Khare, Saikat Dutta, Ziyang Li, Alaia Solko-Breslin, Rajeev Alur, and Mayur Naik. 2023. Understanding the effectiveness of large language models in detecting security vulnerabilities. arXiv preprint arXiv:2311.16169 (2023).
  16. [16] LaurieWired. 2025. GhidraMCP: Model Context Protocol Server for Ghidra. https://github.com/LaurieWired/GhidraMCP. Accessed: 2026-04-27.
  17. [17] Haonan Li, Yu Hao, Yizhuo Zhai, and Zhiyun Qian. 2024. Enhancing static analysis for practical bug detection: An llm-integrated approach. Proceedings of the ACM on Programming Languages 8, OOPSLA1 (2024), 474–499.
  18. [18] Li Li, Alexandre Bartel, Tegawendé F Bissyandé, Jacques Klein, Yves Le Traon, Steven Arzt, Siegfried Rasthofer, Eric Bodden, Damien Octeau, and Patrick McDaniel. 2015. Iccta: Detecting inter-component privacy leaks in android apps. In 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering, Vol. 1. IEEE, 280–291.
  19. [19] Ziyang Li, Saikat Dutta, and Mayur Naik. 2024. IRIS: LLM-assisted static analysis for detecting security vulnerabilities. arXiv preprint arXiv:2405.17238 (2024).
  20. [20] Puzhuo Liu, Chengnian Sun, Yaowen Zheng, Xuan Feng, Chuan Qin, Yuncheng Wang, Zhenyang Xu, Zhi Li, Peng Di, Yu Jiang, et al. 2025. Llm-powered static binary taint analysis. ACM Transactions on Software Engineering and Methodology 34, 3 (2025), 1–36.
  21. [21] ZheLiu,ChunyangChen,JunjieWang,MengzhuoChen,BoyuWu,XingChe,Dan- dan Wang, and Qing Wang. 2024. Make llm a testing expert: Bringing human-like interaction to mobile gui testing via functionality-aware decisions. In Proceedings of the IEEE/ACM 46th International Conference on Software Engineering. 1–13.
  22. [22] Linghui Luo, Felix Pauck, Goran Piskachev, Manuel Benz, Ivan Pashchenko, Martin Mory, Eric Bodden, Ben Hermann, and Fabio Massacci. 2022. TaintBench: Automatic real-world malware benchmarking of Android taint analyses. Empirical Software Engineering 27, 1 (2022), 16.
  23. [23] Wei Ma, Shangqing Liu, Zhihao Lin, Wenhan Wang, Qiang Hu, Ye Liu, Cen Zhang, Liming Nie, Li Li, and Yang Liu. 2023. LMs: Understanding Code Syntax and Semantics for Code Analysis. arXiv preprint arXiv:2305.12138 (2023).
  24. [24] Noble Saji Mathews, Yelizaveta Brus, Yousra Aafer, Meiyappan Nagappan, and Shane McIntosh. 2024. Llbezpeky: Leveraging large language models for vulnerability detection. arXiv preprint arXiv:2401.01269 (2024).
  25. [25] Aman Mehta. 2025. JADX-MCP: Model Context Protocol Server for JADX. https://github.com/zinja-coder/jadx-ai-mcp. Accessed: 2026-04-27.
  26. [26] Kexin Pei, David Bieber, Kensen Shi, Charles Sutton, and Pengcheng Yin. 2023. Can large language models reason about program invariants?. In International Conference on Machine Learning. PMLR, 27496–27520.
  27. [27] Xingzhi Qian, Xinran Zheng, Yiling He, Shuo Yang, and Lorenzo Cavallaro. 2025. LAMD: Context-driven Android Malware Detection and Classification with LLMs. arXiv preprint arXiv:2502.13055 (2025).
  28. [28] Qwen Team, Alibaba Group. 2026. Qwen3.5: Towards Native Multimodal Agents. https://qwen.ai/blog?id=qwen3.5. Accessed: 2026-04-27.
  29. [29] Jordan Samhi, René Just, Tegawendé F Bissyandé, Michael D Ernst, and Jacques Klein. 2024. Call graph soundness in android static analysis. In Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis. 945–957.
  30. [30] Jordan Samhi, Marc Miltenberger, Marco Alecci, Steven Arzt, Tegawendé Bissyandé, and Jacques Klein. 2025. Do you have 5 min? Improving Call Graph Analysis with Runtime Information. In Proceedings of the 33rd ACM International Conference on the Foundations of Software Engineering. 540–544.
  31. [31] Max Schäfer, Sarah Nadi, Aryaz Eghbali, and Frank Tip. 2023. An empirical evaluation of using large language models for automated unit test generation. IEEE Transactions on Software Engineering 50, 1 (2023), 85–105.
  32. [32] Secure Software Engineering Group. 2026. DroidBench: A Micro-Benchmark Suite for Android Taint Analysis. https://github.com/secure-software- engineering/DroidBench. Accessed: 2026-05-08. 5
  33. [33] Secure Software Engineering Group. 2026. FlowDroid: Static Data Flow Tracker. https://github.com/secure-software-engineering/FlowDroid. Accessed: 2026-05-08.
  34. [34] Tiezhu Sun, Marco Alecci, Yewei Song, Xunzhu Tang, Kisub Kim, Jordan Samhi, Tegawendé F Bissyandé, and Jacques Klein. 2025. RAML: Toward Retrieval-Augmented Localization of Malicious Payloads in Android Apps. In 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE). IEEE, 3963–3967.
  35. [35] Weisong Sun, Chunrong Fang, Yudu You, Yun Miao, Yi Liu, Yuekang Li, Gelei Deng, Shenghan Huang, Yuchen Chen, Quanjun Zhang, et al. 2023. Automatic code sum- marization via chatgpt: How far are we? arXiv preprint arXiv:2305.12865 (2023).
  36. [36] Yuqiang Sun, Daoyuan Wu, Yue Xue, Han Liu, Haijun Wang, Zhengzi Xu, Xiaofei Xie, and Yang Liu. 2024. Gptscan: Detecting logic vulnerabilities in smart contracts by combining gpt with program analysis. In Proceedings of the IEEE/ACM 46th International Conference on Software Engineering. 1–13.
  37. [37] Junjian Ye, Xincheng Fei, Xavier de Carné de Carnavalet, Lianying Zhao, Lifa Wu, and Mengyuan Zhang. 2024. Detecting command injection vulnerabilities in Linux-based embedded firmware with LLM-based taint analysis of library functions. Computers & Security 144 (2024), 103971.
  38. [38] Junbin Zhang, Yingying Wang, Lina Qiu, and Julia Rubin. 2021. Analyzing android taint analysis tools: FlowDroid, Amandroid, and DroidSafe. IEEE Transactions on Software Engineering 48, 10 (2021), 4014–4040.
  39. [39] Xueling Zhang, Xiaoyin Wang, Rocky Slavin, and Jianwei Niu. 2021. Condysta: Context-aware dynamic supplement to static taint analysis. In 2021 IEEE Symposium on Security and Privacy (SP). IEEE, 796–812.
  40. [40] Wenxiang Zhao, Juntao Wu, and Zhaoyi Meng. 2025. Apppoet: Large language model based android malware detection via multi-view prompt engineering. Expert Systems with Applications 262 (2025), 125546.
  41. [41] Li Zhong and Zilong Wang. 2024. Can llm replace stack overflow? a study on robustness and reliability of large language model code generation. In Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 38. 21841–21849. 6