LLMalMorph: 大規模言語モデルを用いた変種マルウェア生成の実現可能性について
LLMalMorph: On The Feasibility of Generating Variant Malware using Large-Language-Models
July 12, 2025
著者: Md Ajwad Akil, Adrian Shuai Li, Imtiaz Karim, Arun Iyengar, Ashish Kundu, Vinny Parla, Elisa Bertino
cs.AI
要旨
大規模言語モデル(LLMs)は、ソフトウェア開発と自動コード生成を変革してきた。これらの進歩に触発され、本論文では、LLMsを用いてマルウェアのソースコードを改変し、バリアントを生成する可能性を探る。我々は、LLMsによる意味的および構文的なコード理解を活用し、新しいマルウェアバリアントを生成する半自動フレームワーク「LLMalMorph」を提案する。LLMalMorphは、マルウェアのソースコードから関数レベルの情報を抽出し、カスタム設計されたプロンプトと戦略的に定義されたコード変換を組み合わせることで、リソース集約的なファインチューニングなしにLLMを導き、バリアントを生成する。LLMalMorphを評価するため、我々は多様なタイプ、複雑さ、機能を持つ10のWindowsマルウェアサンプルを収集し、618のバリアントを生成した。詳細な実験により、マルウェアの機能を維持しつつ、これらのマルウェアバリアントの検出率をある程度低下させることが可能であることが示された。さらに、機械学習(ML)ベースのマルウェア検出器に対して最適化を行わなかったにもかかわらず、いくつかのバリアントはMLベースのマルウェア分類器に対して顕著な攻撃成功率を達成した。また、ソースコードからマルウェアバリアントを生成する際の現在のLLMの能力の限界について議論し、この新興技術がマルウェアバリアント生成の広範な文脈においてどの位置にあるかを評価する。
English
Large Language Models (LLMs) have transformed software development and
automated code generation. Motivated by these advancements, this paper explores
the feasibility of LLMs in modifying malware source code to generate variants.
We introduce LLMalMorph, a semi-automated framework that leverages semantical
and syntactical code comprehension by LLMs to generate new malware variants.
LLMalMorph extracts function-level information from the malware source code and
employs custom-engineered prompts coupled with strategically defined code
transformations to guide the LLM in generating variants without
resource-intensive fine-tuning. To evaluate LLMalMorph, we collected 10 diverse
Windows malware samples of varying types, complexity and functionality and
generated 618 variants. Our thorough experiments demonstrate that it is
possible to reduce the detection rates of antivirus engines of these malware
variants to some extent while preserving malware functionalities. In addition,
despite not optimizing against any Machine Learning (ML)-based malware
detectors, several variants also achieved notable attack success rates against
an ML-based malware classifier. We also discuss the limitations of current LLM
capabilities in generating malware variants from source code and assess where
this emerging technology stands in the broader context of malware variant
generation.