恶意软件对抗研究
When Malware is Packin’ Heat; Limits of Machine Learning Classifiers Based on Static Analysis Features
机器学习快速发展,当前工业界和学术界对于恶意软件识别研究的结果,作者对其提出疑问,称没考虑加壳对分类的影响,忽略了这个重要因素,并且作者证明了从加壳可执行文件中提取的特征不能充分去1)泛化其他未知packer,2)对对抗样本具有鲁棒性。并且指出了当前推出的不成熟的机器学习应用会导致大量的误报,而且训练使用的数据集是不正确的。
https://www.yuque.com/docs/share/44d1580f-52d3-4cdd-a0b1-bd7208aa2771?# 《When Malware is Packin’ Heat; Limits of Machine Learning Classifiers Based on Static Analysis Features》
Generating Adversarial Malware Examples for Black-Box Attacks Based on GAN
Hu和Tan等人提出了一种基于生成对抗网络(GAN)的黑盒攻击方法去规避静态恶意软件检测,叫做MalGAN,MalGAN假设攻击者知道目标模型全部特征空间(通过模型反馈结果猜出),它首先建立了大量不同的检测器去拟合黑盒模型,然后训练生成网络去最小化对抗样本的恶意概率。
https://www.yuque.com/docs/share/afff70e2-6b42-44ec-9446-d8aa5ee37e40?# 《Generating Adversarial Malware Examples for Black-Box Attacks Based on GAN》
Exploring Adversarial Examples in Malware Detection
Octavian Suciu等人提出了两种不同的白盒攻击策略来规避静态恶意软件检测模型,分别是append attack和slack attack。append attack将字节序列添加到文件末尾实施攻击,而slack attack是对slack bytes进行修改实施攻击,append攻击可采用多种不同的策略,Random,Gradient,Benign和FGM,而slack attack只采用了FGM,结果证明了slack attack比append attack更有效。
https://www.yuque.com/docs/share/5c541657-284d-4423-8d70-61b8868471a6?# 《Exploring Adversarial Examples in Malware Detection》
Adversarial Deep Learning for Robust Detection of Binary Encoded Malware
中心目标:我们的中心目标是研究如何将针对连续域的稳健对抗训练方法转换为服务于包括恶意软件的离散或分类特征域。
https://www.yuque.com/docs/share/d45bde2f-976d-4ec2-8971-17caf9212b41?# 《Adversarial Deep Learning for Robust Detection of Binary Encoded Malware》
On Visual Hallmarks of Robustness to Adversarial Malware
视觉方法:提出对抗性损失景观方法和决策、自组织地图方法,有助于解释强化的 NN 模型。
https://www.yuque.com/docs/share/8b361851-6a9a-41e9-9818-3c97a156dc88?# 《On Visual Hallmarks of Robustness to Adversarial Malware》
Heterogeneous Graph Matching Networks for Unknown Malware Detection
Shen Wang等人提出一种动态检测恶意程序的模型叫MatchGNet,该框架首先通过程序的快照获取程序的行为,利用该模型提取图的语义的特征,然后使用孪生神经网络进行相似度测量,该模型不仅能够检测恶意程序,还能识别未知程序和假程序,最终MatchGNet相比当前最优的恶意软件检测算法减少了50%的误报,同时保持零漏报。
https://www.yuque.com/docs/share/0ceceb24-85ea-49f0-903f-5201d1fe59e7?# 《Heterogeneous Graph Matching Networks for Unknown Malware Detection》
Shallow Security: on the Creation of Adversarial Variants to Evade Machine Learning-Based Malware Detectors
Fabrício Ceschin等人参加了2019年8月的挑战,该挑战是由endgame公司提出的50个恶意软件绕过3个静态检测模型的挑战,并获得了冠军,主要思路是首先将恶意软件放在dropper软件的资源节区,然后在dropper末尾添加善意软件的data,最后生成不影响恶意软件真实行为,而且能够绕过静态检测模型的软件,并且该方法对真实世界中的AV引擎也起到了作用,降低了检测率。
https://www.yuque.com/docs/share/548d24a8-913d-43cf-85bd-ebe9c15ce990?# 《Shallow Security: on the Creation of Adversarial Variants to
Evade Machine Learning-Based Malware Detectors》
Static Malware Detection & Subterfuge: Quantifying the Robustness of Machine Learning and Current Anti-Virus
William Fleshman等人提出了用四种黑盒攻击方法来量化机器学习模型和当前AV的鲁棒性,分别是随机选择良性修改、有针对性的重要字节遮挡、对文件加壳和ROP注入,其中作者的主要贡献是有针对性的重要字节遮挡,能够找到重要的字节区域进行遮挡,但是这种方法会对恶意软件的功能造成影响。
https://www.yuque.com/docs/share/2b2de1b2-88d4-44de-aa51-8712768cedea?# 《Static Malware Detection & Subterfuge:
Quantifying the Robustness of Machine Learning
and Current Anti-Virus》
Adversarial Malware Binaries: Evading Deep Learning for Malware Detection in Executables
Bojan Kolosnjaji等人提出一种基于梯度的白盒攻击来绕过基于字节特征的MalConv深度学习模型,通过改变恶意软件末尾的少数字节来进行攻击,同时能够保持其软件的功能性,结果显示注入了仅仅10000字节使得Malconv准确率下降50%,但只修改了少于软件1%的字节数。
https://www.yuque.com/docs/share/a56370da-002f-4e73-8fe4-344d13879820?# 《Adversarial Malware Binaries: Evading Deep
Learning for Malware Detection in Executables》
ROPInjector: Using Return Oriented Programming for Polymorphism and Antivirus Evasion
Giorgos Poulios等人提出了一种使用ROP注入来绕过AV软件的黑盒攻击方法,并且开发了对应的工具来实现这一攻击,主要是将恶意的shellcode转换成对应的ROP等价表示,并将其patch到PE文件中,此方法还能通过不同组合生成不同的变种,结果也证明ROPInjector能几乎绕过在VirusTotal上的antivirus software。
https://www.yuque.com/docs/share/b6119966-5786-4b57-b15d-4042be0293ef?# 《ROPInjector: Using Return Oriented Programming for
Polymorphism and Antivirus Evasion》
Deceiving End-to-End Deep Learning Malware Detectors using Adversarial Examples
Felix Kreuk等人提出了一种新的白盒攻击方法来攻击MalConv这个端到端的深度学习恶意软件检测模型,该方法首先在编码层的两个位置(mid-file和end-file)进行注入一段随机数据,接着使用FGSM来更新修改注入的数据,最后从编码层重构造返回到输入层,结果也显示出得到的payload能够在同一文件不同位置,不同文件也适用。
https://www.yuque.com/docs/share/c4230bf0-54d4-4444-bb80-3350378e0226?# 《Deceiving End-to-End Deep Learning Malware
Detectors using Adversarial Examples》
AMVG: Adaptive Malware Variant Generation Framework Using Machine Learning
Jusop Choi等人提出了一种使用遗传算法的AMVG白盒攻击框架去绕过恶意软件检测方法,该框架主要针对源代码型的恶意软件,在知道目标检测器的细节的基础上,GA能够应用不同的模块自动生成有效且能够绕过检测器的对抗样本,变异操作既包括了影响功能的操作和不影响功能的操作,实验结果表明在一定时间内自动生成恶意软件变体是可行的。
https://www.yuque.com/docs/share/149e55b9-8535-4868-b306-1f07bc8d8a6d?# 《AMVG: Adaptive Malware Variant Generation
Framework Using Machine Learning》
ARMED: How Automatic Malware Modifications Can Evade Static Detection?
Raphael Labaca Castro等人提出一种黑盒攻击ARMED框架来绕过静态检测,首先windows的PE文件上先经过修改box对文件进行修改生成变异体,接着检测变异体的功能性是否完整,最后通过检测引擎生成检测率并判断是否绕过成功,实验结果表明有一定效果,但其中有很多地方都需要进行改进。
https://www.yuque.com/docs/share/baed8fa5-0faf-4239-83da-4165baa4546a?# 《ARMED: How Automatic Malware Modifications Can Evade Static Detection?》
AIMED: Evolving Malware with Genetic Programming to Evade Detection
Raphael Labaca Castro等人是第一次提出基于遗传规划的黑盒攻击框架去绕过恶意软件检测,叫AIMED,AIMED首先利用Manipulation box生成种群,然后计算适应度函数值,如果没有绕过,利用selection,Crossover和Mutation操作来生成新的一代。实验结果表示时间消耗比随机的降低50%。
https://www.yuque.com/docs/share/fdfe73e2-487c-4db4-abf8-5611c0209572?# 《AIMED: Evolving Malware with
Genetic Programming to Evade Detection》
Optimization-Guided Binary Diversification to Mislead Neural Networks for Malware Detection
Mahmood Sharif等人提出一种白盒攻击方法,通过优化算法去指导二进制文件的转变从而绕过DNN的检测,假设攻击者知道DNN的参数,首先计算当前修改后文件对于DNN的梯度,接着选择与梯度方向一致的Transformation对文件进行修改,其中,Transformation包括in-place randomization (IPR)和code displacement (Disp).
https://www.yuque.com/docs/share/ebe1cce1-9688-4d14-8cf2-611c94ecc780?# 《Optimization-Guided Binary Diversification to
Mislead Neural Networks for Malware Detection》
Poster: Training GANs to Generate Adversarial Examples Against Malware Classification
Raphael Labaca Castro等人提出了一个与MalGAN架构不同的GAN网络对模型进行黑盒攻击,不同地方在于生成器所使用的扰动和特征不同,首先通过discriminator来拟合黑盒模型,然后通过训练使得生成器添加的字节扰动能够绕过模型。
https://www.yuque.com/docs/share/6823c1a8-fa72-44bc-9c86-9a2ca7523993?# 《Poster: Training GANs to Generate Adversarial
Examples Against Malware Classification》
Poster: Attacking Malware Classifiers by Crafting Gradient-Attacks that Preserve Functionality
Explaining Vulnerabilities of Deep Learning to Adversarial Malware Binaries
采用IG方法提取出哪个特征对分类最重要,发现比较重要的特征来自于coff和可选头,Luca Demetrio等人提出了一种novel基于梯度的白盒攻击(借鉴了Bojan Kolosnjaji的攻击方法)来绕过基于字节特征的MalConv深度学习模型,首先计算DOS头中可修改字节的单位梯度,接着替换为距离梯度直线最近的字节值,结果来源于public 的60 different malware中有52个绕过了Malconv模型。
https://www.yuque.com/docs/share/95b238b6-48a0-44da-a3e5-b4edc42f6c47?# 《Explaining Vulnerabilities of Deep Learning to
Adversarial Malware Binaries》
Adversarial EXEmples: A Survey and Experimental Evaluation of Practical Attacks on Machine Learning for Windows Malware Detectio
Luca Demetrio等人提出了一个白盒攻击方法,名字叫Extend and Shift攻击(对两个攻击进行介绍),首先计算输入的编码向量的梯度,按单位梯度排序取前个预计要修改的字节,最后替换为距离梯度直线最近的字节值,结果效果优于其他几个攻击方法(用文献编号代替)
https://www.yuque.com/docs/share/b82e68fe-9a51-45b3-afd0-c357412a7aae?# 《Adversarial EXEmples: A Survey and Experimental Evaluation of Practical
Attacks on Machine Learning for Windows Malware Detectio》
Functionality-preserving Black-box Optimization of Adversarial Windows Malware
Luca Demetrio等人提出了一种使用遗传算法的黑盒攻击方法去绕过静态检测,作者相对于其他黑盒攻击方法做的改变就是将善意文件section注入与遗传算法结合起来,首先从善意文件的 section中随机提取出k段不同长度的字节序列,接着随机生成N个长度为k的向量(每一位0代表不添加对应的字节序列,1为添加),最后,经过选择,交叉,变异等操作生成对抗样本(使用较小的查询量和注入字节大小),该方法也能够对只能得到label的模型进行攻击。
https://www.yuque.com/docs/share/758fdfbd-a38f-462e-b832-ae8d83595f35?# 《Functionality-preserving Black-box Optimization of
Adversarial Windows Malware》
Automatic Generation of Adversarial Examples for Interpreting Malware Classifiers
Wei Song等人提出了一个黑盒攻击框架来生成对抗样本去绕过AV和开源分类器,首先随机生成一系列action序列来生成对抗样本,接着提升有效的action的权重,有利于被下一次选中,此外,作者还通过最小化算法对action序列进行处理从而对攻击成功的原因进行解释,最后从查询次数,时间,可转移性等方面来验证了框架的有效性。
https://www.yuque.com/docs/share/ba6e637b-3de7-4392-b806-78bacda6b327?# 《Automatic Generation of Adversarial Examples for Interpreting Malware
Classifiers》
Against All Odds: Winning the Defense Challenge in an Evasion Competition with Diversification
Erwin Quiring等人参加了微软恶意软件绕过挑战赛并获得了第一名
https://www.yuque.com/docs/share/f3e3db18-9600-4358-a75e-d90d23293f41?# 《Against All Odds: Winning the Defense Challenge
in an Evasion Competition with Diversification》
Generation & Evaluation of Adversarial Examples for Malware Obfuscation
Daniel Park等人提出了一个使用恶意软件图像混淆方法去生成对抗样本的白盒攻击方法,首先采用FGSM和CW攻击方法生成不能激活的对抗样本图像,接着采用最短编辑距离的算法对之前生成的对抗样本和原样本进行处理,得到原样本中可以插入语义nop的位置和对应的语义nop,用最后形成的保存恶意功能的对抗样本进行实验,结果优于其他随机方法的混淆方法。
https://www.yuque.com/docs/share/07d63886-8571-4b9e-9a75-91d7709e88a1?# 《Generation & Evaluation of Adversarial Examples for
Malware Obfuscation》
An Adversarial Machine Learning Method Based on OpCode N-grams Feature in Malware Detection
Xiang Li等人提出一种白盒攻击方法去找到Window上的可执行文件的对抗特征,他首先用训练集中的每个opcode的DF值提取前1000个Opcode,接着将TF-IDF权重作为特征进行训练生成三个模型,分别是SVM,DNN,XGBoost,此外,使用SHAP值找到重要的特征并且使用传统的指令替代的混淆方法对随机选取的10个样本生成对抗样本绕过生成的三个模型,最后结果全部绕过。
https://www.yuque.com/docs/share/aa2ad23d-7e25-42ea-96cf-a79abce87db1?# 《An Adversarial Machine Learning Method Based on OpCode N-grams Feature in
Malware Detection》
An adversarial machine learning approach to evaluate the robustness of a security solution
本文并没有集中在GAN算法(文中没有具体介绍算法细节)层面,主要是进行了实验,探讨怎样的配置使得对抗学习训练出的模型最具鲁棒性(主要是如何训练)
https://www.yuque.com/docs/share/44aebfbb-639d-49ed-b173-145310b30c9d?# 《An adversarial machine learning approach to evaluate the robustness of a security
solution》
COPYCAT: Practical Adversarial Attacks on Visualization-Based Malware Detection
Aminollah Khormali等人提出一种非目标性的白盒攻击方法去绕过CNN模型的检测,名字叫AE padding,首先将二进制软件转化为灰度图像,利用现存的五种深度学习对抗攻击方法生成不能被激活的对抗样本,将对抗样本添加到源文件的末尾,实验结果显示了高的绕过率。
https://www.yuque.com/docs/share/fe7bc40b-e464-4fa2-a769-81b52e51d10b?# 《COPYCAT: Practical Adversarial Attacks
on Visualization-Based Malware Detection》
Improved MalGAN: Avoiding Malware Detector by Leaning Cleanware Features
Masataka Kawai等人对Hu等人提出的MalGAN网络提出了四个缺点并进行改进,它首先首先多个cleanware和一个malware创建一个API list(被生成器和取代器使用),生成器通过加入一些cleanware的API来生成扰动去绕过模型(使用另外的API list) 检测,基于取代器的权重训练生成器降低loss。
https://www.yuque.com/docs/share/aca0603b-a140-4e4f-bbcb-08b15a9589c6?# 《Improved MalGAN: Avoiding Malware Detector by
Leaning Cleanware Features》
Adversarial Examples for CNN-Based Malware Detectors
BINGCAI CHEN等人提出了一种利用saliency vector的白盒攻击方法去绕过Malconv检测模型,它首先根据善意文件的saliency vector(using the Grad-CAM method)找到对善意分类重要的数据块,接着随机选取一个数据块append到恶意文件的末尾,并且使用FGSM方法对添加的数据块进行修改,当恶意软件的loss值小于一个固定值时,停止修改,最后判断是否成功绕过检测模型。试验结果显示当append byte较少时,使用FGSM的BFA的攻击效果远好于单纯的BFA攻击,当append byte变大时,两个的效果变得差不多。
https://www.yuque.com/docs/share/377a53b5-489d-4dc5-87d4-63ff3a257ca1?# 《Adversarial Examples for CNN-Based
Malware Detectors》
DeepDetectNet vs RLAttackNet: An adversarial method to improve deep learningbased static malware detection model
Yong Fang等人提出使用强化学习对深度学习模型进行黑盒攻击,首先训练一个静态PE检测的深度学习模型(特征是Import Functions Feature,General Information Feature,Bytes Entropy Feature),AUC率高达0.989,接着使用强化学习生成对抗样本,agent将DDQN与Dueling DQN结合在一起,action采用的确定的操作,最后用生成的对抗样本对模型进行重训练,使得攻击成功率显著降低。
https://www.yuque.com/docs/share/9ebb0864-4a0b-4980-b17f-11e716d5ed4f?# 《DeepDetectNet vs RLAttackNet: An adversarial method to improve deep learningbased static malware detection model》
Evading API Call Sequence Based Malware Classifiers
Fenil Fadadu等人提出一种从两个level对基于API序列的多个检测模型进行黑盒攻击生成对抗样本,该方法主要克服了Rosenberg et al提出的方法的缺陷,去掉了configuration files的overhead和不会超过一分就不检测了,作者展示了两种攻击,对于特征层面,在每次迭代,选择对应的api能够最大化分数函数的,对于可执行文件层面,使用IAT hooking对文件所调用api进行修改,实验结果显示方法相比Rosenberg et al的方法效果好。
https://www.yuque.com/docs/share/3a119117-6ada-48c1-9623-3f75f92664ac?# 《Evading API Call Sequence Based Malware Classifiers》
SoK: Arms Race in Adversarial Malware Detection
systematize the field of Adversarial Malware Detection (AMD) through the lens of a unified framework of assumptions, attacks, defenses and security properties
https://www.yuque.com/docs/share/a00b3c20-fa04-4ff8-9e08-7e2b3f4e02dd?# 《SoK: Arms Race in Adversarial Malware Detection》
Enhancing Deep Neural Networks Against Adversarial Malware Examples
Deqiang Li等人提出一种鲁棒的对抗防御方法抵抗对抗绕过攻击,首先对训练数据进行预处理使得训练数据变得balance,接着通过输入tranformation和对特征进行denoising autoencoder生成鲁棒的特征语义,并且使用对抗训练(包括对抗正则化)和集成学习的方法来增加防御模型的鲁棒性
https://www.yuque.com/docs/share/18d94ba6-611f-4ed1-987a-7abb5e3cf21c?# 《Enhancing Deep Neural Networks Against
Adversarial Malware Examples》
Adversarial Machine Learning in Malware Detection: Arms Race between Evasion Attack and Defense
Lingwei Chen等人提出使用基于修改API Call的黑盒攻击方法去绕过线性检测模型,它首先通过最大相关算法确定与恶意分类相关大的API集合M和与善意分类相关大的API集合B,对其排序,攻击时每次迭代选择M中的API去消除,选择B中的API进行添加,从两种中选择对数据集产生误分类最大的操作,直到所消耗的cost超过一个阈值或者没有可以进行增加和删除的API停止
https://www.yuque.com/docs/share/bf1f2c76-5d64-412e-88bb-11458b8230f5?# 《Adversarial Machine Learning in Malware Detection: Arms Race between Evasion Attack and Defense》
Adversarially Robust Malware Detection Using Monotonic Classification
Inigo Incer等人提出使用单调特征训练出来的单调模型更鲁棒,能够抵抗绕过攻击。
https://www.yuque.com/docs/share/386ac34e-a603-4d3b-98fa-84413d94907a?# 《Adversarially Robust Malware Detection Using Monotonic Classification》
组会分享
AntiFuzz: Impeding Fuzzing Audits of Binary Executables
在本文中,作者介绍了几种技术来保护二进制可执行文件免受fuzzer的分析。更具体地说,作者对fuzzer的基本假设进行了系统分析,并针对每种假设制定了一般对策。请注意,这些技术并非旨在针对特定的fuzz工具,而是针对所有fuzz工具必不可少的一般假设(相当于所有fuzzer的共性特征)。我们的评估表明,这些技术有效地阻止了模糊检查,同时引入了可忽略的性能开销。就像混淆技术增加了发现漏洞所需的人工量一样,我们的技术也使基于自动模糊测试的方法变得无效。
https://www.yuque.com/docs/share/7f7095a8-fec1-4158-8986-613a3fc199e1?# 《论文分析》
SAVIOR: Securing Autonomous Vehicles with Robust Physical Invariants
在本文中,我们介绍了SAVIOR:一种用强大物理不变量来保护自动驾驶汽车的架构,我们实施并验证了适用于航空和地面车辆的两种流行的开源控制器,并证明了其有效性。
https://www.yuque.com/docs/share/0adcfad7-001e-402f-9b0e-7f052da4e8d1?# 《SAVIOR:Securing Autonomous Vehicles with Robust Physical Invariants》
恶意软件对抗方法总结
恶意软件攻击绕过方式 | list of manipulations | which parts? (header/section/all?) |
---|---|---|
import_function_add | adding a function to the import address table that is never used | section |
section_rename | manipulating existing section names | section |
section_add | creating new (unused) sections | section |
section_name_append | append a random section name to the section table of PE file | section |
section_append | appending bytes to extra space at the end of sections | section |
New_Entry_Point | creating a new entry point which immediately jumps to the original entry point | all |
remove_signature | removing signature information | header |
remove_debug / manipulate debug | manipulating / remove debug info | header |
upx_pack | pack the file | all |
upx_unpack | unpack the file | all |
modify_checksum | modifying (breaking) header checksum | header |
overlay_append | appending bytes to the overlay (end of PE file) | section |
time_rename | Modifying the time and date stamps in PE header | header |
break_optional_header | Amending some unimportant symbols in optional header, such as minor image version, the number of rva and size, etc. | header |
Modifying the size of raw data in section (section_reoder) | header | |
Rebuilding content in the section | section | |
resource_rebuild | Reordering the resources in PE files such as some modifiable necessary information (resource_rebuild) | section |
DOS_header_alter | Altering some unimportant symbols in DOS header, such as checksum, etc | header |
Dropper | all | |
Code Randomization | Code Randomization(Replace instruction sequence with semantically equivalent one) | all |
Code Displacement | code displacement(replace them with semantic nops) | all |
insert semantic nops | all | |
Inject of benign content at the end of the file or the sections | section | |
Obfusmal,Stealmal,Hollowmal (类似混淆) | all | |
Occlusion of Important Bytes | all | |
inject semantic Nops into CFG blocks | all | |
Adding irelvent API call to the API call list | section | |
generate irreverent APIs and insert them into API Call sequences | section | |
Eliminating and Adding API Call | section | |
Appending by optimized bytes | section | |
Modify specific regions of the DOS header with optimized bytes | header |