[论文解读] XFL: eXtreme Function Labeling
该论文提出XFL,一种用于通过将函数名中的每个标记视为标签来预测二进制代码中函数名的极端多标签学习框架。它引入了DEXTER,一种结合静态分析特征与局部和全局代码上下文的函数嵌入方法,在10,000个二进制文件的数据集上实现了82.5%的精确率,优于当前最先进方法。
Reverse engineers would benefit from identifiers like function names, but these are usually unavailable in binaries. Training a machine learning model to predict function names automatically is promising but fundamentally hard due to the enormous number of classes. In this paper, we introduce eXtreme Function Labeling (XFL), an extreme multi-label learning approach to selecting appropriate labels for binary functions. XFL splits function names into tokens, treating each as an informative label akin to the problem of tagging texts in natural language. To capture the semantics of binary code, we introduce DEXTER, a novel function embedding that combines static analysis-based features with local context from the call graph and global context from the entire binary. We demonstrate that XFL outperforms state-of-the-art approaches to function labeling on a dataset of over 10,000 binaries from the Debian project, achieving a precision of 82.5%. We also study combinations of XFL with different published embeddings for binary functions and show that DEXTER consistently improves over the state of the art in information gain. As a result, we are able to show that binary function labeling is best phrased in terms of multi-label learning, and that binary function embeddings benefit from moving beyond just learning from syntax.
研究动机与目标
- 为解决在二进制代码中预测有意义函数名的挑战,因为此类标识符通常缺失。
- 通过将函数命名问题建模为多标签学习问题,克服函数命名中的极端类别不平衡问题。
- 通过整合局部(调用图)和全局(整个二进制文件)代码上下文,提升函数嵌入质量。
- 证明多标签学习在逆向工程中函数标签化方面优于单标签方法。
- 表明DEXTER嵌入在不同二进制函数嵌入基线方法上均能持续提升性能。
提出的方法
- XFL将函数名中的每个单词视为独立标签,将函数命名转化为多标签分类任务。
- DEXTER通过结合静态分析特征、来自调用图的局部上下文以及来自整个二进制文件的全局上下文,生成函数嵌入。
- 该模型使用深度神经网络学习代码结构和关系中的语义含义表示。
- 通过多标签分类头进行标签预测,输出每个名称中令牌的概率。
- 该框架在来自Debian项目的10,000个二进制文件的大规模数据集上端到端进行训练。
- 使用精确率@k(k=1)和信息增益来评估性能,以衡量标签质量。
实验结果
研究问题
- RQ1能否将二进制代码中的函数命名有效建模为极端多标签学习问题?
- RQ2整合局部和全局代码上下文在多大程度上提升了用于命名预测的函数嵌入质量?
- RQ3DEXTER在预测有意义的函数名标记方面是否优于现有函数嵌入方法?
- RQ4与单标签方法相比,多标签学习在多大程度上提升了函数标签化的准确性?
- RQ5DEXTER嵌入在不同二进制分析任务和数据集上的泛化能力如何?
主要发现
- XFL在Debian二进制数据集上实现了82.5%的精确率,显著优于当前最先进方法。
- DEXTER嵌入在多个基线函数嵌入上均持续提升了信息增益,证明了其鲁棒性和有效性。
- 全局二进制上下文的整合增强了函数表示,使标签预测效果优于仅使用语法或局部上下文的模型。
- 多标签学习方法在函数命名预测中比单标签替代方案更准确且语义更合理。
- 使用令牌级别标签使模型能够以高精确度预测复杂、多词函数名。
- 结果表明,函数标签化应作为多标签问题来处理,且语义必须超越语法特征进行捕捉。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。