Saved in:
Bibliographic Details
Main Authors: Zhang, Guangyu, Wang, Xixuan, Sun, Shiyu, Xiao, Peiyan, Sun, Kun, Xiong, Yanhai
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2509.08865
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916945864949760
author Zhang, Guangyu
Wang, Xixuan
Sun, Shiyu
Xiao, Peiyan
Sun, Kun
Xiong, Yanhai
author_facet Zhang, Guangyu
Wang, Xixuan
Sun, Shiyu
Xiao, Peiyan
Sun, Kun
Xiong, Yanhai
contents Sophisticated evasion tactics in malicious Android applications, combined with their intricate behavioral semantics, enable attackers to conceal malicious logic within legitimate functions, underscoring the critical need for robust and in-depth analysis frameworks. However, traditional analysis techniques often fail to recover deeply hidden behaviors or provide human-readable justifications for their decisions. Inspired by advances in large language models (LLMs), we introduce TraceRAG, a retrieval-augmented generation (RAG) framework that bridges natural language queries and Java code to deliver explainable malware detection and analysis. First, TraceRAG generates summaries of method-level code snippets, which are indexed in a vector database. At query time, behavior-focused questions retrieve the most semantically relevant snippets for deeper inspection. Finally, based on the multi-turn analysis results, TraceRAG produces human-readable reports that present the identified malicious behaviors and their corresponding code implementations. Experimental results demonstrate that our method achieves 96\% malware detection accuracy and 83.81\% behavior identification accuracy based on updated VirusTotal (VT) scans and manual verification. Furthermore, expert evaluation confirms the practical utility of the reports generated by TraceRAG.
format Preprint
id arxiv_https___arxiv_org_abs_2509_08865
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle TraceRAG: A LLM-Based Framework for Explainable Android Malware Detection and Behavior Analysis
Zhang, Guangyu
Wang, Xixuan
Sun, Shiyu
Xiao, Peiyan
Sun, Kun
Xiong, Yanhai
Software Engineering
Sophisticated evasion tactics in malicious Android applications, combined with their intricate behavioral semantics, enable attackers to conceal malicious logic within legitimate functions, underscoring the critical need for robust and in-depth analysis frameworks. However, traditional analysis techniques often fail to recover deeply hidden behaviors or provide human-readable justifications for their decisions. Inspired by advances in large language models (LLMs), we introduce TraceRAG, a retrieval-augmented generation (RAG) framework that bridges natural language queries and Java code to deliver explainable malware detection and analysis. First, TraceRAG generates summaries of method-level code snippets, which are indexed in a vector database. At query time, behavior-focused questions retrieve the most semantically relevant snippets for deeper inspection. Finally, based on the multi-turn analysis results, TraceRAG produces human-readable reports that present the identified malicious behaviors and their corresponding code implementations. Experimental results demonstrate that our method achieves 96\% malware detection accuracy and 83.81\% behavior identification accuracy based on updated VirusTotal (VT) scans and manual verification. Furthermore, expert evaluation confirms the practical utility of the reports generated by TraceRAG.
title TraceRAG: A LLM-Based Framework for Explainable Android Malware Detection and Behavior Analysis
topic Software Engineering
url https://arxiv.org/abs/2509.08865