arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.29620cs.CRcs.SE
收藏

通过符号库解析恢复动态加载代码的控制流图

Control Flow Graph Recovery for Dynamically Loaded Code via Symbolic Library Resolution

V.M. Glushkov Institute of Cybernetics of the NAS of Ukraine(乌克兰国家科学院V.M.格鲁什科夫控制论研究所)

Oleksandr Mostovyi

AI总结:

提出结合符号执行与推测性库预加载的方法,通过拦截动态加载操作并加载实际库到分析状态,恢复二进制文件中动态加载代码的控制流图,在16个合成基准测试中平均额外恢复29.8%的节点和26.5%的边,库检测精度和召回率均达100%。

摘要:

控制流图是使用动态和静态软件分析方法进行软件分析的主要数据源之一。受保护的软件和现代恶意软件越来越依赖动态代码加载技术来规避静态分析。运行时动态链接机制的使用引入了未解析的间接调用,从而阻止了静态控制流图的恢复。这隐藏了可用于阻止安全分析的动态库。为了解决这一局限性,提出了一种分析技术,该技术将符号执行与推测性库预加载相结合,通过使用动态加载从二进制文件中恢复控制流图。该方法使用自定义软件钩子,在符号执行期间拦截动态加载操作,并将实际库加载到分析状态中。该模块基于两级架构,同时存储拦截函数和指令跟踪,全部在符号执行环境中进行。为了避免执行动态插桩工具所需的潜在恶意代码,分析完全通过符号执行进行,使其对恶意软件分析安全。为了评估,使用了16个合成基准测试,采用了各种混淆技术,包括加密库名称、网络触发加载、环境派生路径、多阶段解密链、无文件执行以及手动可执行和可链接格式解析。实验结果表明,与仅静态分析相比,该模块平均额外恢复29.8%的控制流图节点和26.5%的边,在库检测中达到100%的精度和100%的召回率,所有发现均通过基于Frida的动态插桩验证。

英文摘要:

Control Flow Graphs are one of the main data sources for software analysis that use dynamic and static software analysis methods. Protected software and modern malware increasingly depend on dynamic code loading techniques to evade static analysis. Usage of runtime dynamic linking mechanisms introduces unresolved indirect calls that stop static Control Flow Graph recovery. This serves to hide dynamic library that can be used for prevention of security analysis. To address this limitation, an analysis technique is proposed that combines symbolic execution with speculative library preloading to recover Control Flow Graphs from binaries by using dynamic loading. The methodology uses custom software hooks that intercept dynamic loading operations during symbolic execution and perform actual library loading into the analysis state. The module is based on a two-level architecture that stores interception functions and instruction tracking at the same time, all within a symbolic execution environment. To avoid executing potentially malicious code that dynamic instrumentation tools require, the analysis was conducted entirely through symbolic execution, making it safe for malware analysis. For evaluation a batch of 16 synthetic benchmarks was used, employing various obfuscation techniques including encrypted library names, network-triggered loading, environment-derived paths, multi-stage decryption chains, fileless execution and manual executable and linkable format parsing. The experiments results show that module recovers on average 29.8 % additional Control Flow Graph nodes and 26.5 % additional edges compared to static analysis alone, achieves 100 % precision and 100 % recall in library detection, with all discoveries validated through Frida-based dynamic instrumentation.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑