LOHRE:基于执行的类型恢复——通过大语言模型协调的混合分析
LOHRE: Execution-Grounded Type Recovery via LLM-Orchestrated Hybrid Analysis
AI总结:
本文提出LOHRE框架,通过LLM协调混合分析实现基于执行的UDT恢复,经多数据集评估,其准确率优于静态基线,动态验证、跨函数知识库及EDH均对性能有关键作用。
摘要:
为了对剥离的二进制文件函数进行安全分析,需要从机器码中恢复函数接口和用户定义类型(UDT)布局。现有基于大语言模型(LLM)的方法存在两个局限:一是缺乏基于执行的验证,无法检测与实际内存布局不一致的推断UDT;二是可能忽略无直接调用关系函数间共享UDT的证据。本文提出LLM协调混合逆向工程框架LOHRE,该框架将推断的UDT视为可证伪假设,并通过程序执行对其进行测试。LOHRE采用假设-验证-优化循环,通过基线输入与变异输入的配对动态切片仿真测试候选布局。为降低处理冗长执行历史的成本,执行深度启发式(EDH)将配对轨迹压缩为执行深度差及被测字段观测使用情况的摘要。跨函数知识库聚合兼容的UDT假设和字段级置信度分数,以指导测试和假设优化。在RealType数据集的四个优化级别及Windows远程过程调用(RPC)数据集上对LOHRE进行评估:LOHRE在RealType四个优化级别上的平均UDT结构准确率为57.85%,在Windows RPC上为35.6%,优于所评估的静态基线;禁用动态验证后,RealType上准确率降至19.28%,Windows RPC上降至9.2%;移除跨函数知识库后,RealType上准确率降至41.03%,Windows RPC上降至10.0%;用完整执行轨迹替代EDH的压缩反馈会降低恢复准确率,同时令牌使用量增加3.7倍,运行时间增加3.0倍。这些结果表明,基于执行的验证、紧凑反馈及跨函数证据对准确高效的UDT恢复具有重要作用。
英文摘要:
Documenting stripped binary functions for security analysis requires recovering function interfaces and user-defined type (UDT) layouts from machine code. Existing large language model (LLM)-based methods face two limitations: they lack execution-based validation to detect inferred UDTs inconsistent with actual memory layouts, and may overlook evidence about shared UDTs across functions without direct call relationships. We present LLM-Orchestrated Hybrid Reverse Engineering (LOHRE), a framework that treats inferred UDTs as falsifiable hypotheses and tests them against program execution. LOHRE uses a hypothesize-validate-refine loop to test candidate layouts through paired dynamic slice emulation of baseline and mutated inputs. To reduce the cost of processing lengthy execution histories, the Execution-Depth Heuristic (EDH) compresses paired traces into an execution-depth difference and a summary of the tested field's observed uses. A cross-function knowledge base aggregates compatible UDT hypotheses and field-level confidence scores to guide testing and hypothesis refinement. We evaluate LOHRE on RealType at four optimization levels and a Windows remote procedure call (RPC) dataset. LOHRE achieves an average UDT Structural accuracy of 57.85% across RealType's four optimization levels and 35.6% on Windows RPC, outperforming the evaluated static baselines. Disabling dynamic validation reduces accuracy to 19.28% on RealType and 9.2% on Windows RPC. Removing the cross-function knowledge base reduces accuracy to 41.03% on RealType and 10.0% on Windows RPC. Replacing EDH's compressed feedback with full execution traces reduces recovery accuracy while increasing token use by 3.7 times and runtime by 3.0 times. These results indicate that execution-based validation, compact feedback, and cross-function evidence contribute to accurate and efficient UDT recovery.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。