Skip to main content
QUICK REVIEW

[論文レビュー] Double Backdoored: Converting Code Large Language Model Backdoors to Traditional Malware via Adversarial Instruction Tuning Attacks

Md Imran Hossen, Chilukoti, Sai Venkatesh|arXiv (Cornell University)|Apr 29, 2024
Network Security and Intrusion DetectionComputer Science被引用数 3
ひとこと要約

この論文は、悪意のあるコードスニペットを敵対的に埋め込んだ訓練データを用いて、指示微調整済みコードLLMを狙うフレームワークであるEvilInstructCoderを紹介する。CodeLlama、DeepSeek-Coder、StarCoder2に対して、0.5%の汚染データ(81サンプル)のみで76–86%のバックドア攻撃成功率を達成し、AIコーディングアシスタントにおける深刻なセキュリティ脆弱性を示している。

ABSTRACT

Instruction-tuned Large Language Models designed for coding tasks are increasingly employed as AI coding assistants. However, the cybersecurity vulnerabilities and implications arising from the widespread integration of these models are not yet fully understood due to limited research in this domain. This work investigates novel techniques for transitioning backdoors from the AI/ML domain to traditional computer malware, shedding light on the critical intersection of AI and cyber/software security. To explore this intersection, we present MalInstructCoder, a framework designed to comprehensively assess the cybersecurity vulnerabilities of instruction-tuned Code LLMs. MalInstructCoder introduces an automated data poisoning pipeline to inject malicious code snippets into benign code, poisoning instruction fine-tuning data while maintaining functional validity. It presents two practical adversarial instruction tuning attacks with real-world security implications: the clean prompt poisoning attack and the backdoor attack. These attacks aim to manipulate Code LLMs to generate code incorporating malicious or harmful functionality under specific attack scenarios while preserving intended functionality. We conduct a comprehensive investigation into the exploitability of the code-specific instruction tuning process involving three state-of-the-art Code LLMs: CodeLlama, DeepSeek-Coder, and StarCoder2. Our findings reveal that these models are highly vulnerable to our attacks. Specifically, the clean prompt poisoning attack achieves the ASR@1 ranging from over 75% to 86% by poisoning only 1% (162 samples) of the instruction fine-tuning dataset. Similarly, the backdoor attack achieves the ASR@1 ranging from 76% to 86% with a 0.5% poisoning rate. Our study sheds light on the critical cybersecurity risks posed by instruction-tuned Code LLMs and highlights the urgent need for robust defense mechanisms.

研究の動機と目的

  • 敵対的指示微調整攻撃下における指示微調整済みコードLLMのサイバーセキュリティ脆弱性を調査すること。
  • 指示微調整データセットに悪意あるコードを自動的に生成・挿入できるフレームワークの開発すること。
  • 現実世界の攻撃者能力を反映した多様な脅威モデルを想定し、指示微調整済みコードLLMの利用可能性を評価すること。
  • 汚染率がバックドア成功率およびモデルの有用性に与える影響を測定すること。
  • バックドアが仕込まれたモデルが、悪意あるコード生成を明示的に指示されたモデルを上回ることを実証すること。

提案手法

  • 敵対的コードインジェクションエンジンは、指示微調整データセットのキュレーション段階で、悪意あるコードスニペットを自動生成し、健全なコードに挿入する。
  • フレームワークは、特定の自然言語指示を受けた際に悪意あるペイロードを生成するようモデルを誘導するためのトリガー語句を採用する。
  • 汚染は、指示微調整データセットのわずかな割合(0.5–3%)に適用され、バックドア付きモデルの学習が行われる。
  • 攻撃の成功は、攻撃成功度(ASR@1)とASR@10を用いて評価され、悪意あるペイロードを含む応答の割合が測定される。
  • 比較評価には、バックドア付きモデルと明示的に悪意あるコード生成を指示されたモデルが含まれており、ペイロードを分離するために<m>および</m>タグが使用される。
  • フレームワークは、複数のモデルサイズと指示微調整設定を想定し、3つの最先端のコードLLM(CodeLlama、DeepSeek-Coder、StarCoder2)を評価する。
Figure 1. Overview of EvilInstructCoder Attack Framework. In this figure, $r$ represents a sample benign response from instruction tuning dataset, with the malicious version of $r$ highlighted in red . $i$ denotes an instruction, with the instruction containing a trigger phrase set by the attacker m
Figure 1. Overview of EvilInstructCoder Attack Framework. In this figure, $r$ represents a sample benign response from instruction tuning dataset, with the malicious version of $r$ highlighted in red . $i$ denotes an instruction, with the instruction containing a trigger phrase set by the attacker m

実験結果

リサーチクエスチョン

  • RQ1指示微調整済みコードLLMは、健全な自然言語指示に対して悪意あるコードを生成するように操作可能か?
  • RQ2コードLLMの指示微調整データセットにおけるデータ汚染によるバックドアインジェクションはどの程度効果的か?
  • RQ3異なるコードLLMアーキテクチャにおいて、高い攻撃成功率を達成するために必要な最小汚染率は何か?
  • RQ4バックドア付きモデルの性能は、悪意あるコード生成を明示的に指示されたモデルと比べてどうか?
  • RQ5バックドア攻撃は、標準的なコード生成ベンチマークにおけるモデルの性能にどの程度悪影響を及えるか?

主な発見

  • わずか81サンプル(データセットの0.5%)を汚染するだけで、CodeLlama 7BモデルではASR@1が86%、DeepSeek-Coder 6.7Bでは81.2%、StarCoder2 7Bでは76%を超える。
  • すべてのモデルが0.5%の汚染率で100%のASR@10を達成しており、複数のテストケースにおいて一貫した高い利用可能性が示された。
  • バックドア付きモデルは、明示的に悪意あるコード生成を指示されたモデルを上回り、後者ではDeepSeek-Coder 6.7Bで最大ASR@1が81.2%にとどまった。
  • GPT-3.5でさえも明示的な指示を受ければASR@1が98%に達しており、バックドア付きモデルが明示的指示攻撃と同等に高い競争力を示していることがわかった。
  • StarCoder2 7Bモデルでは、HumanEvalベンチマークにおけるpass@1スコアが最大3.8%低下にとどまり、標準性能への影響は最小限に抑えられている。
  • ASR@1は3%の汚染率で96%以上に飽和し、ASR@10は0.5%の汚染率でも100%に達するため、攻撃の高い効率性とスケーラビリティが確認された。
Figure 2. Attack performance against instruction-tuned (FT) Code LLMs under various poisoning rates in Adversarial Scenario A, employing the clean prompt poisoning attack method.
Figure 2. Attack performance against instruction-tuned (FT) Code LLMs under various poisoning rates in Adversarial Scenario A, employing the clean prompt poisoning attack method.

この論文を読む

Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。

Nubintでこの論文を読む

このレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。