Page 287 - 《软件学报》2025年第8期
P. 287

3710                                                       软件学报  2025  年第  36  卷第  8  期


                 6
                 (School of Computing and Data Science, Nanyang Technological University, Singapore 639798, Singapore)
                 7
                 (School of Computer Science and Technology, Huazhong University of Science and Technology, Wuhan 430074, China)
                 Abstract:  Software concept drift means that the structure and composition of the same type of software will change over time. In malware
                 classification,  concept  drift  means  that  the  structure  and  composition  characteristics  of  malware  samples  from  the  same  family  can  change
                 over  time.  This  will  cause  a  decline  in  the  performance  of  fixed-mode  malware  classification  algorithms  over  time.  Existing  methods  for
                 static  malware  classification  experience  significant  performance  degradation  when  faced  with  concept  drift  scenarios,  making  it  difficult  to
                 meet  the  needs  of  practical  applications.  To  address  this  problem,  given  the  commonalities  between  natural  language  understanding  and
                 binary  byte  stream  analysis,  a  highly  accurate  and  robust  malware  classification  method  is  proposed  based  on  BERT  and  a  custom
                 autoencoder  architecture.  This  method  extracts  execution-oriented  malware  opcode  sequences  through  disassembly  analysis  to  reduce
                 redundant  information.  Then,  it  uses  BERT  to  understand  the  contextual  semantics  of  the  sequences  and  perform  vector  embedding  to
                 effectively  understand  the  deep  program  semantics  of  the  malware  samples.  It  also  screens  effective  task-related  features  through  the
                 geometric  median  subspace  projection  and  bottleneck  autoencoders.  Finally,  a  classifier  composed  of  fully  connected  layers  is  used  to
                 output the classification results. The practical effectiveness of the proposed method is validated through comparative experiments with nine
                 state-of-the-art  malware  classification  methods  in  both  normal  and  concept  drift  scenarios.  Experimental  results  show  that  the  proposed
                 method  achieves  an  F1  score  of  99.49%  in  normal  scenarios,  outperforming  those  nine  methods.  Moreover,  in  concept  drift  scenarios,  the
                 F1 score is improved by 10.78% to 43.71% compared to the nine methods.
                 Key words:  malware static analysis; concept drift; robust optimization

                    作为全球使用最广泛的操作系统, Windows 由于其开放的开发环境和复杂的软件来源, 特别容易受到恶意软
                 件的攻击. Windows 恶意软件分类有助于提供准确的威胁识别和分类, 帮助加强计算机系统的安全防御, 促进恶意
                 软件研究和分析以及推动威胁情报的共享与合作, 是保护计算机系统和用户安全的重要研究内容. 在静态分析方
                 法中, 相较于传统基于规则的方法, 基于学习的恶意软件分类可以从大量样本中学习恶意软件家族的潜在特征, 具
                 有更强的自适应性和泛化能力, 且不需要专家知识制定复杂的匹配规则就能达到较高的准确率. 近些年, 基于学习
                 的  Windows 恶意软件静态分类逐渐成为热点研究方向.
                    基于学习的     Windows 恶意软件静态分类方法通过静态分析恶意软件的二进制文件, 提取文件特征                        (例如特征
                 字符串、API 调用等), 然后使用机器学习算法进行模型训练和预测. 后来随着深度学习的发展, 一些研究工作                               [1–3]
                 通过将恶意软件二进制文件转换成图片或文本的形式, 结合图像处理或自然语言处理领域                              (NLP) 的深度学习模型
                 进行家族分类预测. 然而, 现有的基于学习的恶意软件分类方法往往缺乏对程序语义信息的深度挖掘, 在复杂环境
                 中表现的准确性和稳定性存在不足, 尤其是在概念漂移场景中, 容易出现分类性能大幅下降的问题. 通过对最先进
                 的  9  种  Windows 恶意软件分类工作进行大规模的评估实验, Ma 等人           [4] 发现现有方法在概念漂移场景中的性能下
                 降巨大, 难以满足工业场景的实际应用需求. 普通场景下表现优秀的分类模型在概念漂移场景下性能下降幅度甚
                 至可以达到    69.62%. 针对上述问题, 本文提出了一种基于学习的新型恶意软件分类方法, 通过结合反汇编分析和
                 自然语言处理中的字节流分析, 实现对恶意软件的深层语义进行挖掘, 并对提取特征进行去偏和降维, 提取与任务
                 相关的有效特征, 提高模型表现的稳定性, 以在概念漂移场景中达到更好的表现.
                    具体来说, 本文主要面临两个主要挑战.
                    (1) 如何处理恶意二进制文件并将其转换为适合学习模型的输入.
                    (2) 如何设计有效的分析模式来降低概念漂移对模型分类性能的负面影响.
                    针对第   1  个挑战, 需要考虑将恶意软件转化为特征有效且适合学习算法处理的形式, 并且能够深刻体现恶意
                 软件的语义特征. 一些工作        [5–7] 通过分析程序的函数调用图或控制流图以进行恶意软件分类, 其分类的准确性很大
                 程度上取决于特征提取和利用的方式. 然而手动定义的特征提取会遗失许多程序潜在的上下文语义关系. 因此应
                 该考虑让学习算法更多地处理原始特征信息, 利用深度学习算法来理解程序的上下文语义, 让分类器更加类似于
                 端到端的结构. 一些基于二进制流分析的工作              [8,9] 将二进制文件转换为字节序列或灰度图像, 然后使用自然语言处
                 理模型或图像分类模型对其进行分析. 尽管这些工作利用学习模型来理解程序的语义信息, 但它们的性能并不突
                 出. 这是由于恶意程序二进制流中包含大量与程序行为无关的冗余信息                        (例如通用文件结构和数据信息), 此外文
   282   283   284   285   286   287   288   289   290   291   292