|国家科技期刊平台
首页|期刊导航|计算机工程|面向二进制代码的细粒度软件多样化方法

面向二进制代码的细粒度软件多样化方法OACSTPCD

Binary Code-Oriented Fine-Grained Software Diversification Method

中文摘要英文摘要

现有软件多样化方法大多需要源代码,基于编译器生成变体二进制,而对二进制代码直接进行转换时由于缺乏调试信息导致难以正确逆向,且易造成高额的性能开销.为此,提出一种面向二进制代码的细粒度软件多样化方法.通过静态二进制重写技术以函数块为单位进行重排序,随机化函数在代码段中的原始位置,同时使程序的内存片段gadgets位置发生改变,使得攻击者对程序的先验知识失效,以防御大规模代码重用攻击.为了进一步提高攻击者破解难度,对基本块内的指令进行依赖性分析,实现基本块内指令随机化,同时使得随机化后基本块的原始语义不变.性能测试结果表明,函数重排序对gadgets存活率的影响大于基本块内指令重排序,两者同时使用时程序的gadgets平均存活率为5.71%;模糊哈希算法Tlsh比较结果显示,该方法能够有效躲避同源性检测;使用工具Bindiff进行测试的结果表明,多样化后基本块内指令重排序的异构度大于函数重排序,且在基准测试集SPEC CPU2006上函数重排序和指令重排序同时使用时平均运行开销仅为3.1%,具有良好的实用性.

Most software diversification methods require source codes and generate variant binaries based on the compilers used.However,when converting binary codes directly,reversing them correctly is difficult owing to insufficient debugging information,and high performance overheads can be generated easily.Hence,a fine-grained software diversification method for binary codes is proposed herein.Using static binary rewriting technology to reorder function blocks,randomizing the original position of functions in code snippets,and changing the position of a program's memory segment gadgets,attackers lose their prior knowledge regarding the program to defend against large-scale code reuse attacks.To further increase the difficulty of cracking by attackers,dependency analysis is performed on the instructions within the basic block,and the instructions within the basic block are randomized while maintaining the original semantics of the randomized basic block.Performance test results show that the effect of function reordering on the survival rate of gadgets is greater than that of instruction reordering within the basic block.When both are performed simultaneously,the average survival rate of gadgets in the program is 5.71%.Comparison based on the fuzzy hash algorithm Tlsh show that this method can effectively avoid homology detection.Test results obtained using the tool Bindiff show that the heterogeneity of instruction reordering within the basic block after diversification is greater than that of function reordering.Moreover,on the benchmark test set SPEC CPU2006,when both function reordering and instruction reordering are performed simultaneously,the average operating cost is only 3.1%,thus indicating good practicality.

何本伟;郭云飞;梁浩;王庆丰

信息工程大学信息技术研究所,河南 郑州 450001

计算机与自动化

软件多样化代码重用攻击二进制重写代码随机化数据依赖性

software diversificationcode-reuse attacksbinary rewritingcode randomizationdata dependency

《计算机工程》 2024 (001)

基于拟态构造的云自适应认知安全防御理论与方法研究

138-144 / 7

国家自然科学基金(62002383);国家重点研发计划(2021YFB1006200,2021YFB1006201).

10.19678/j.issn.1000-3428.0066174

评论