更多上下文未必更好:LLM在标识符恢复与代码去混淆上的评测
More Context, Mixed Results: Evaluating LLMs for Identifier Recovery and Code Deobfuscation
研究在51个近期Java项目、3种混淆器和6种上下文/检索设置下,对比4种传统基线与Qwen、OLMo、DeepSeek 3个LLM的标识符检测与语义恢复能力。
arXiv:2611.19043v1 Announce Type: cross Abstract: Source code is often obfuscated through identifier renaming, incentivizing reverse engineers to develop techniques for recovering meaningful names. To assess how LLMs compare with these techniques, we evaluate 4 traditional baselines and 3 LLMs (Qwen, OLMo and DeepSeek) on identifier detection and semantic recovery across 51 recent Java projects, 3 obfuscators, and 6 context/retrieval settings. LLMs generally outperform traditional techniques on both tasks, but benefit from different forms of context and settings: agentic retrieval yields the strongest detection results, reaching 91.56% $F_1$, while enclosing-class context generally improves semantic recovery at a higher token cost. Despite these gains, exact recovery peaks at 16.42% overall (under one-hop context) and 32.93% for field names (under repository retrieval), which are the easiest to recover. Class identifiers are the hardest to detect, with a mean detection $F_1$ of 48.48% across models, settings and obfuscators. More context is not always beneficial: larger methods hinder semantic recovery. Beyond identifier renaming, our experiments show that control-flow obfuscation degrades both tasks more than string encryption. Our findings provide useful ad hoc insights for reverse engineers choosing models and context strategies to deobfuscate code snippets.
来源:arXiv (AI + Vision + Imaging) · arxiv.org