一句话:结合静态程序分析与 LLM,自底向上恢复混淆 Android 应用标识符的语义。
Android 开发者常通过标识符重命名混淆代码以阻碍逆向工程,但这严重妨碍对恶意与隐私敏感行为的下游安全分析。现有去混淆技术依赖代码相似度、学到的命名先验或局部 LLM 推理,在专有、重度混淆或跨文件上下文依赖的代码上效果有限。本文提出 DeMask,将静态程序分析与大语言模型相结合,以程序结构引导自底向上、上下文感知的推断过程,实现全应用语义重建;同时引入定制命名约束与优化策略,以缓解 LLM 幻觉并保证在真实代码库上的可扩展性。作者实现原型并在多样化的良性及恶意 Android 应用数据集上评估,结果表明 DeMask 在语义准确性与命名一致性上显著优于先前工作,在所有评估设置中平均有效语义恢复率超过 88.6%。
Android developers frequently employ identifier renaming to obfuscate code and hinder reverse engineering. This practice effectively conceals program semantics. However, it severely impedes downstream security analysis tasks, particularly manual inspection of malicious and privacy-sensitive behaviors. Existing deobfuscation techniques rely on code similarity, learned naming priors, or local LLM reasoning. These methods often exhibit severe limitations when applied to proprietary, heavily obfuscated, or cross-file context-dependent code. In this paper, we present DeMask, a novel framework that integrates static program analysis with Large Language Models (LLMs) to recover meaningful identifiers from obfuscated Android apps. Guided by program structure, DeMask executes a bottom-up, context-aware inference process for whole-app semantic reconstruction. It incorporates tailored naming constraints and optimization strategies to mitigate LLM hallucinations and ensure scalability for real-world codebases. We implemented a prototype and evaluated it on diverse datasets of benign and malicious Android apps. The results demonstrate that DeMask significantly outperforms prior work in semantic accuracy and naming consistency. Specifically, it achieves an average effective semantic recovery of over 88.6% across all evaluation settings.