SlideShare a Scribd company logo
6
Most read
8
Most read
11
Most read
VexLLM: LLMを用いたVEX自動生成ツール
須田 瑛大 (NTT ソフトウェアイノベーションセンタ)
akihiro.suda.cz@hco.ntt.co.jp
Vuls 祭り #10 (2024/08/20)
https://github.com/AkihiroSuda/vexllm
• Trivy などを使うと大量に脆弱性が検出されるが、全て対処
しないといけないわけではない
– イメージに含まれる全てのライブラリの全ての関数を使うわけでは
ない
– 全てのコマンドラインツールの全ての引数を使うわけではない
– 実際に攻撃可能なものは3%程度 (先ほどの福田さんの発表参照)
2
背景: 脆弱性が検出されすぎる
• 例: python:3.12.4 イメージには CVE-2024-32002
(9.0 CRITICAL) を持つ git バイナリが含まれる
– git の submodules と シンボリックリンクに関する脆弱性
– git を実行しないことがわかっているなら気にする必要はない
– git を実行するとしても実行対象リポジトリが定数になっているなら
実際に攻撃を受ける可能性は必ずしも高くはない
– CVSSv3 スコアが 9.0 だからといって焦る必要はない
3
背景: 脆弱性が検出されすぎる
• 気にしなくてよい脆弱性の番号をVEX や .trivyignore に書いてお
けば、Trivy の警告を抑制できる
– .trivyignore: 無視する脆弱性番号しか含まない簡易VEX
• しかし、VEX や .trivyignore を自分で書くのは大変
4
VEXや.trivyignoreで脆弱性情報を抑制できる
• https://github.com/AkihiroSuda/vexllm
• OpenAI などの LLM に OpenVEX や .trivyignore を出力させる
• 用途に応じてヒントを指定する
5
VexLLM
vexllm generate python.json .trivyignore 
--hint-not-server 
--hint-compromise-on-availability 
--hint-used-commands=python3 
--hint-unused-commands=git,wget,curl,apt,apt-get
• https://github.com/AkihiroSuda/vexllm
• OpenAI などの LLM に OpenVEX や .trivyignore を出力させる
• 用途に応じてヒントを指定する
6
VexLLM
vexllm generate python.json .trivyignore 
--hint-not-server 
--hint-compromise-on-availability 
--hint-used-commands=python3 
--hint-unused-commands=git,wget,curl,apt,apt-get
入力 (TrivyのJSON) 出力
サーバ用途ではない
情報漏洩や改竄は
妥協できないが
可用性については
運用対処の余地が
ありうる
絶対使われるコマンド
絶対使われないコマンド
7
.trivyignore 出力例
# {"vulnerability":{"@id":"CVE-2024-32002","description":"Git is a revision cont
rol system. Prior to versions 2.45.1, 2.44.1, 2.43.4, 2.42.2, 2.41.1, 2.40.2, an
d 2.39.4, repositories with submodules can be crafted in a way that exploits a b
ug in Git whereby it can be fooled into writing files not into the submodule's w
orktree but into a `.git/` directory. This allows writing a hook that will be ex
ecuted while the clone operation is still running, giving the user no opportunit
y to inspect the code that is being executed. The problem has been patched in ve
rsions 2.45.1, 2.44.1, 2.43.4, 2.42.2, 2.41.1, 2.40.2, and 2.39.4. If symbolic l
ink support is disabled in Git (e.g. via `git config --global core.symlinks fals
e`), the described attack won't work. As always, it is best to avoid cloning rep
ositories from untrusted sources."},"products":[{"@id":"git-man@1:2.39.2-1.1"}],
"status":"not_affected","justification":"vulnerable_code_not_in_execute_path","i
mpact_statement":"{"confidence":0.6,"reason":"This RCE vulnerability is spe
cific to recursive clones in Git, which is not a commonly used feature in the co
ntext of a Python container image."}"}
CVE-2024-32002 黄色い部分がLLMの出力
コメント行はOpenVEXのJSON
• 出力は毎回異なることが多い
• false positive も false negative も多い
• なるべく人間がレビューして手直しすべき
8
あくまでも参考程度
9
内部で生成しているプロンプト [1/2]
You are a security expert talented for triaging vulnerability reports.
You judge whether a vulnerability is likely negligible under the specified hints.
### Hints
* Artifact type: "container_image"
* Artifact name: "python:3.12.4"
* The artifact is a container image. So, kernel-related vulnerabilities are safely negligible.
* The artifact is not used as a network server program. So, server-specific vulnerabilities are safely
negligible.
* The following shell commands are known to be used: [python3]
* The following shell commands are known to be unused and their vulnerabilities are negligible,
although these commands might be still present in the artifact: [git wget curl apt apt-get]
* Put solid focus on Confidentiality and Integrity rather than Availability. e.g., denial -of-service
does not need to be considered as catastrophic as data leakage and modification.
### Input format:
The input is similar to [Trivy](https://github.com/aquasecurity/trivy)'s JSON, but not exactly same.
10
内部で生成しているプロンプト [2/2]
### Output format
If you find negligible vulnerabilities, print a JSON map formatted and indented as follows:
```json
{
"CVE-2042-12345": {"confidence": 0.4, "reason": "This DDOS vulnerability is only exploitable in
public server programs."},
"CVE-2042-23456": {"confidence": 0.8, "reason": "The vulnerable package "foo" is unlikely
used."}
}
```
* `confidence` (0.0-1.0): higher value if you are confident with the answer.
* `reason`: the reason why you think the vulnerability is negligible. Should be unique, descriptive,
and in 2 or 3 sentences.
Do not include non-negligible vulnerabilities in the result.
Only print a valid JSON.
• false positive や false negative の定量評価
• Trivy のプラグインとして実行できるようにする
• Trivy の CLI ともっと密に連携させる
– いちいちJSONや.trivyignoreを作る操作を要らなくする
• Trivy 以外、OpenVEX以外にも対応する
• 各種OSSコミュニティで採用してもらうことを目指す
– LLMに与えるヒント(絶対使うコマンド、使わないコマンドなど)のファイルを
作成・メンテナンスしてもらうようにしたい (VEX Hub上で?)
11
今後

More Related Content

PDF
[JPCERT/CC POC Meeting] 研究紹介 + DLLハイジャックの脆弱性
PDF
1891件以上のカーネルの不具合修正に貢献した再現用プログラムを自動生成するsyzkallerのテスト自動化技術(NTT Tech Conference ...
PDF
【DeepSecurityUserNight】我が家の箱入り娘を世間に晒すのは危険なのでDeepSecurityに見守ってもらった話
PDF
CND(Certified Network Defender:認定ネットワークディフェンダー)のご紹介
PDF
さらば、Stagefright 脆弱性
PPT
クラウドアプリケーション開発に必要なセキュリティ
PDF
「継続的デリバリー」読書会 第3章 継続的デリバリー
PDF
Flutterアプリ開発におけるモジュール分割戦略
[JPCERT/CC POC Meeting] 研究紹介 + DLLハイジャックの脆弱性
1891件以上のカーネルの不具合修正に貢献した再現用プログラムを自動生成するsyzkallerのテスト自動化技術(NTT Tech Conference ...
【DeepSecurityUserNight】我が家の箱入り娘を世間に晒すのは危険なのでDeepSecurityに見守ってもらった話
CND(Certified Network Defender:認定ネットワークディフェンダー)のご紹介
さらば、Stagefright 脆弱性
クラウドアプリケーション開発に必要なセキュリティ
「継続的デリバリー」読書会 第3章 継続的デリバリー
Flutterアプリ開発におけるモジュール分割戦略

Similar to 【Vuls祭り#10 (2024/08/20)】 VexLLM: LLMを用いたVEX自動生成ツール (20)

PDF
TEE (Trusted Execution Environment)は第二の仮想化技術になるか?
PDF
Resilience Engineering on Kubernetes
ODP
ライブコーディングとデモで理解するWebセキュリティの基礎
PDF
TypeScript製フレームワーク「Nest」のご紹介
PPTX
2015 0227 OSC-Spring Tokyo NETMF
PDF
Serfが面白いと俺の中で話題にwwwwww
PDF
コンテナを突き破れ!! ~コンテナセキュリティ入門基礎の基礎~(Kubernetes Novice Tokyo #11 発表資料)
PDF
ALMツールたべくらべ
PDF
RISC-Vのセキュリティ技術(TEE, Root of Trust, Remote Attestation)
PPTX
KubernetesのRBACを掘り下げてみる(Kubernetes Novice Tokyo #17 発表資料)
PDF
セキュリティオペレーション自動化に向けた、基盤技術と共通インターフェースの構築 [ISOC-JP workshop, 2016/05/20]
PPTX
DeClang 誕生!Clang ベースのハッキング対策コンパイラ【DeNA TechCon 2020 ライブ配信】
PDF
[CB19] アンチウイルスをオラクルとしたWindows Defenderに対する新しい攻撃手法 by 市川遼
PDF
IDAの脆弱性とBug Bounty by 千田 雅明
PDF
クロスサイトリクエストフォージェリ(CSRF)とその対策
PDF
[Intermediate 01] イントロダクション / Bitcoin を動作させる
ODP
Postgre SQL security_20170412
PDF
Di shen pacsec_jp-final
PDF
[1C5] Docker Comose & Swarm mode Orchestration (Japan Container Days - Day1)
PDF
TEE (Trusted Execution Environment)は第二の仮想化技術になるか?
Resilience Engineering on Kubernetes
ライブコーディングとデモで理解するWebセキュリティの基礎
TypeScript製フレームワーク「Nest」のご紹介
2015 0227 OSC-Spring Tokyo NETMF
Serfが面白いと俺の中で話題にwwwwww
コンテナを突き破れ!! ~コンテナセキュリティ入門基礎の基礎~(Kubernetes Novice Tokyo #11 発表資料)
ALMツールたべくらべ
RISC-Vのセキュリティ技術(TEE, Root of Trust, Remote Attestation)
KubernetesのRBACを掘り下げてみる(Kubernetes Novice Tokyo #17 発表資料)
セキュリティオペレーション自動化に向けた、基盤技術と共通インターフェースの構築 [ISOC-JP workshop, 2016/05/20]
DeClang 誕生!Clang ベースのハッキング対策コンパイラ【DeNA TechCon 2020 ライブ配信】
[CB19] アンチウイルスをオラクルとしたWindows Defenderに対する新しい攻撃手法 by 市川遼
IDAの脆弱性とBug Bounty by 千田 雅明
クロスサイトリクエストフォージェリ(CSRF)とその対策
[Intermediate 01] イントロダクション / Bitcoin を動作させる
Postgre SQL security_20170412
Di shen pacsec_jp-final
[1C5] Docker Comose & Swarm mode Orchestration (Japan Container Days - Day1)
Ad

More from Akihiro Suda (20)

PDF
20250617 [KubeCon JP 2025] containerd - Project Update and Deep Dive.pdf
PDF
20250616 [KubeCon JP 2025] VexLLM - Silence Negligible CVE Alerts Using LLM.pdf
PDF
20250403 [KubeCon EU] containerd - Project Update and Deep Dive.pdf
PDF
20250403 [KubeCon EU Pavilion] containerd.pdf
PDF
20250402 [KubeCon EU Pavilion] Lima.pdf_
PDF
20241115 [KubeCon NA Pavilion] Lima.pdf_
PDF
20241113 [KubeCon NA Pavilion] containerd.pdf
PDF
【情報科学若手の会 (2024/09/14】なぜオープンソースソフトウェアにコントリビュートすべきなのか
PDF
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
PDF
20240321 [KubeCon EU Pavilion] Lima.pdf_
PDF
20240320 [KubeCon EU Pavilion] containerd.pdf
PDF
20240201 [HPC Containers] Rootless Containers.pdf
PDF
[Podman Special Event] Kubernetes in Rootless Podman
PDF
[KubeConNA2023] Lima pavilion
PDF
[KubeConNA2023] containerd pavilion
PDF
[DockerConハイライト] OpenPubKeyによるイメージの署名と検証.pdf
PDF
[CNCF TAG-Runtime] Usernetes Gen2
PDF
[DockerCon 2023] Reproducible builds with BuildKit for software supply chain ...
PDF
The internals and the latest trends of container runtimes
PDF
[KubeConEU2023] Lima pavilion
20250617 [KubeCon JP 2025] containerd - Project Update and Deep Dive.pdf
20250616 [KubeCon JP 2025] VexLLM - Silence Negligible CVE Alerts Using LLM.pdf
20250403 [KubeCon EU] containerd - Project Update and Deep Dive.pdf
20250403 [KubeCon EU Pavilion] containerd.pdf
20250402 [KubeCon EU Pavilion] Lima.pdf_
20241115 [KubeCon NA Pavilion] Lima.pdf_
20241113 [KubeCon NA Pavilion] containerd.pdf
【情報科学若手の会 (2024/09/14】なぜオープンソースソフトウェアにコントリビュートすべきなのか
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240321 [KubeCon EU Pavilion] Lima.pdf_
20240320 [KubeCon EU Pavilion] containerd.pdf
20240201 [HPC Containers] Rootless Containers.pdf
[Podman Special Event] Kubernetes in Rootless Podman
[KubeConNA2023] Lima pavilion
[KubeConNA2023] containerd pavilion
[DockerConハイライト] OpenPubKeyによるイメージの署名と検証.pdf
[CNCF TAG-Runtime] Usernetes Gen2
[DockerCon 2023] Reproducible builds with BuildKit for software supply chain ...
The internals and the latest trends of container runtimes
[KubeConEU2023] Lima pavilion
Ad

【Vuls祭り#10 (2024/08/20)】 VexLLM: LLMを用いたVEX自動生成ツール

  • 1. VexLLM: LLMを用いたVEX自動生成ツール 須田 瑛大 (NTT ソフトウェアイノベーションセンタ) akihiro.suda.cz@hco.ntt.co.jp Vuls 祭り #10 (2024/08/20) https://github.com/AkihiroSuda/vexllm
  • 2. • Trivy などを使うと大量に脆弱性が検出されるが、全て対処 しないといけないわけではない – イメージに含まれる全てのライブラリの全ての関数を使うわけでは ない – 全てのコマンドラインツールの全ての引数を使うわけではない – 実際に攻撃可能なものは3%程度 (先ほどの福田さんの発表参照) 2 背景: 脆弱性が検出されすぎる
  • 3. • 例: python:3.12.4 イメージには CVE-2024-32002 (9.0 CRITICAL) を持つ git バイナリが含まれる – git の submodules と シンボリックリンクに関する脆弱性 – git を実行しないことがわかっているなら気にする必要はない – git を実行するとしても実行対象リポジトリが定数になっているなら 実際に攻撃を受ける可能性は必ずしも高くはない – CVSSv3 スコアが 9.0 だからといって焦る必要はない 3 背景: 脆弱性が検出されすぎる
  • 4. • 気にしなくてよい脆弱性の番号をVEX や .trivyignore に書いてお けば、Trivy の警告を抑制できる – .trivyignore: 無視する脆弱性番号しか含まない簡易VEX • しかし、VEX や .trivyignore を自分で書くのは大変 4 VEXや.trivyignoreで脆弱性情報を抑制できる
  • 5. • https://github.com/AkihiroSuda/vexllm • OpenAI などの LLM に OpenVEX や .trivyignore を出力させる • 用途に応じてヒントを指定する 5 VexLLM vexllm generate python.json .trivyignore --hint-not-server --hint-compromise-on-availability --hint-used-commands=python3 --hint-unused-commands=git,wget,curl,apt,apt-get
  • 6. • https://github.com/AkihiroSuda/vexllm • OpenAI などの LLM に OpenVEX や .trivyignore を出力させる • 用途に応じてヒントを指定する 6 VexLLM vexllm generate python.json .trivyignore --hint-not-server --hint-compromise-on-availability --hint-used-commands=python3 --hint-unused-commands=git,wget,curl,apt,apt-get 入力 (TrivyのJSON) 出力 サーバ用途ではない 情報漏洩や改竄は 妥協できないが 可用性については 運用対処の余地が ありうる 絶対使われるコマンド 絶対使われないコマンド
  • 7. 7 .trivyignore 出力例 # {"vulnerability":{"@id":"CVE-2024-32002","description":"Git is a revision cont rol system. Prior to versions 2.45.1, 2.44.1, 2.43.4, 2.42.2, 2.41.1, 2.40.2, an d 2.39.4, repositories with submodules can be crafted in a way that exploits a b ug in Git whereby it can be fooled into writing files not into the submodule's w orktree but into a `.git/` directory. This allows writing a hook that will be ex ecuted while the clone operation is still running, giving the user no opportunit y to inspect the code that is being executed. The problem has been patched in ve rsions 2.45.1, 2.44.1, 2.43.4, 2.42.2, 2.41.1, 2.40.2, and 2.39.4. If symbolic l ink support is disabled in Git (e.g. via `git config --global core.symlinks fals e`), the described attack won't work. As always, it is best to avoid cloning rep ositories from untrusted sources."},"products":[{"@id":"git-man@1:2.39.2-1.1"}], "status":"not_affected","justification":"vulnerable_code_not_in_execute_path","i mpact_statement":"{"confidence":0.6,"reason":"This RCE vulnerability is spe cific to recursive clones in Git, which is not a commonly used feature in the co ntext of a Python container image."}"} CVE-2024-32002 黄色い部分がLLMの出力 コメント行はOpenVEXのJSON
  • 8. • 出力は毎回異なることが多い • false positive も false negative も多い • なるべく人間がレビューして手直しすべき 8 あくまでも参考程度
  • 9. 9 内部で生成しているプロンプト [1/2] You are a security expert talented for triaging vulnerability reports. You judge whether a vulnerability is likely negligible under the specified hints. ### Hints * Artifact type: "container_image" * Artifact name: "python:3.12.4" * The artifact is a container image. So, kernel-related vulnerabilities are safely negligible. * The artifact is not used as a network server program. So, server-specific vulnerabilities are safely negligible. * The following shell commands are known to be used: [python3] * The following shell commands are known to be unused and their vulnerabilities are negligible, although these commands might be still present in the artifact: [git wget curl apt apt-get] * Put solid focus on Confidentiality and Integrity rather than Availability. e.g., denial -of-service does not need to be considered as catastrophic as data leakage and modification. ### Input format: The input is similar to [Trivy](https://github.com/aquasecurity/trivy)'s JSON, but not exactly same.
  • 10. 10 内部で生成しているプロンプト [2/2] ### Output format If you find negligible vulnerabilities, print a JSON map formatted and indented as follows: ```json { "CVE-2042-12345": {"confidence": 0.4, "reason": "This DDOS vulnerability is only exploitable in public server programs."}, "CVE-2042-23456": {"confidence": 0.8, "reason": "The vulnerable package "foo" is unlikely used."} } ``` * `confidence` (0.0-1.0): higher value if you are confident with the answer. * `reason`: the reason why you think the vulnerability is negligible. Should be unique, descriptive, and in 2 or 3 sentences. Do not include non-negligible vulnerabilities in the result. Only print a valid JSON.
  • 11. • false positive や false negative の定量評価 • Trivy のプラグインとして実行できるようにする • Trivy の CLI ともっと密に連携させる – いちいちJSONや.trivyignoreを作る操作を要らなくする • Trivy 以外、OpenVEX以外にも対応する • 各種OSSコミュニティで採用してもらうことを目指す – LLMに与えるヒント(絶対使うコマンド、使わないコマンドなど)のファイルを 作成・メンテナンスしてもらうようにしたい (VEX Hub上で?) 11 今後