[论文解读] Intra-Section Code Cave Injection for Adversarial Evasion Attacks on Windows PE Malware File
本文提出了一种新颖的段内代码洞注入技术,通过在恶意软件文件的 .text、.data 或 .rdata 段内嵌入对抗性扰动,以逃避基于机器学习的 Windows PE 恶意软件检测器。该方法利用梯度下降法,在 MalConv2 上实现了高达 97.93% 的逃避率,显著优于基于追加的攻击方式,并通过自定义代码加载器在运行时恢复原始恶意软件行为,有效保持了功能完整性。
Windows malware is predominantly available in cyberspace and is a prime target for deliberate adversarial evasion attacks. Although researchers have investigated the adversarial malware attack problem, a multitude of important questions remain unanswered, including (a) Are the existing techniques to inject adversarial perturbations in Windows Portable Executable (PE) malware files effective enough for evasion purposes?; (b) Does the attack process preserve the original behavior of malware?; (c) Are there unexplored approaches/locations that can be used to carry out adversarial evasion attacks on Windows PE malware?; and (d) What are the optimal locations and sizes of adversarial perturbations required to evade an ML-based malware detector without significant structural change in the PE file? To answer some of these questions, this work proposes a novel approach that injects a code cave within the section (i.e., intra-section) of Windows PE malware files to make space for adversarial perturbations. In addition, a code loader is also injected inside the PE file, which reverts adversarial malware to its original form during the execution, preserving the malware's functionality and executability. To understand the effectiveness of our approach, we injected adversarial perturbations inside the .text, .data and .rdata sections, generated using the gradient descent and Fast Gradient Sign Method (FGSM), to target the two popular CNN-based malware detectors, MalConv and MalConv2. Our experiments yielded notable results, achieving a 92.31% evasion rate with gradient descent and 96.26% with FGSM against MalConv, compared to the 16.17% evasion rate for append attacks. Similarly, when targeting MalConv2, our approach achieved a remarkable maximum evasion rate of 97.93% with gradient descent and 94.34% with FGSM, significantly surpassing the 4.01% evasion rate observed with append attacks.
研究动机与目标
- 为解决当前缺乏有效且隐蔽的对抗性逃避技术来应对 Windows PE 恶意软件,且能保持其功能的问题。
- 探究在现有 PE 段内(段内)注入对抗性扰动是否比在文件末尾追加扰动更有效。
- 开发一种方法,在对抗性扰动注入后仍能保持恶意软件的可执行性及原始行为。
- 评估扰动大小与位置对逃避最先进深度学习恶意软件检测器的影响。
- 探索在段内而非段间或文件末尾使用代码洞进行注入的可行性与有效性。
提出的方法
- 将对抗性扰动注入到 Windows PE 文件的 .text、.data 或 .rdata 段内的现有代码洞中,而非在文件末尾追加。
- 使用梯度下降法和快速梯度符号法(FGSM)生成针对 MalConv 和 MalConv2 模型的对抗性扰动。
- 在恶意软件中注入一个 24 字节的代码加载器,该加载器在运行时覆盖扰动,以恢复原始恶意软件功能。
- 在 PE 头中禁用地址空间布局随机化(ASLR),以确保内存加载的可预测性,并保障代码加载器的可靠执行。
- 采用自定义的二进制操作流水线,在保持 PE 文件结构与完整性的同时,插入代码洞并修改段头。
- 通过在 Windows 虚拟机中执行并进行调试验证功能,确保无运行时错误或崩溃。
实验结果
研究问题
- RQ1现有的针对 Windows PE 恶意软件文件的对抗性扰动注入技术是否足够有效以实现逃避目的?
- RQ2在扰动注入后,攻击过程是否能保持恶意软件的原始行为与可执行性?
- RQ3是否存在尚未被探索的 PE 文件结构内注入位置——特别是段内代码洞——可提升逃避成功率?
- RQ4为逃避基于机器学习的恶意软件检测器,所需对抗性扰动的最佳位置与尺寸是什么,同时不破坏文件的结构完整性?
- RQ5段内代码洞注入是否在逃避率与隐蔽性方面优于传统的追加式攻击方法?
主要发现
- 所提出的段内代码洞注入技术在使用梯度下降法时,对 MalConv 实现了 92.31% 的逃避率,显著高于追加式攻击的 16.17%。
- 在 MalConv2 上,该方法使用梯度下降法实现了最高 97.93% 的逃避率,而追加式攻击仅为 4.01%。
- 使用 FGSM 时,对 MalConv 的逃避率达到 96.26%,对 MalConv2 达到 94.34%,表明该方法在不同攻击方式下均具有高度有效性。
- 代码加载器的注入成功在运行时恢复了原始恶意软件行为,确保了在大规模字节修改下仍能保持功能完整性。
- 段内注入比文件末尾或段间注入更有效且更隐蔽,因为扰动与合法代码共处,更难被静态分析检测。
- 该方法受限于 32 位 x86 二进制文件,因代码加载器为硬编码且 ASLR 被禁用,但通过少量调整即可实现对其他架构的可移植性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。