Skip to content
KitploitKITPLOIT
ツールブログ
提出
ツールブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

··フィード·お問い合わせ·プライバシー·© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
vulnhuntr — LLMを使用したゼロショット脆弱性発見 | Kitploit
ツール/GitHubGitHub/protectai/vulnhuntr
静的分析脆弱性分析コード分析ウェブアプリケーション悪用ペネトレーションテストAIセキュリティ
GitHubprotectai/vulnhuntr

vulnhuntr

LLMを使用したゼロショット脆弱性発見

リポジトリを見る
2.7k3181年前Kitploit レビュー済み

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有
Vulnhuntr ロゴ

LLMと静的コード解析を使用して、リモートで悪用可能な脆弱性を特定するツールです。

世界初の自律型AIが発見した0day脆弱性

説明

Vulnhuntrは、LLMの力を活用して、リモートのユーザー入力から始まりサーバー出力に至るコード呼び出しチェーン全体を自動的に作成・分析し、従来の静的コード解析ツールの能力をはるかに超える、複雑で多段階のセキュリティ回避型脆弱性を検出します。すべての0dayに対するVulnhuntrの出力を含む詳細はこちら: Protect AI Vulnhuntr Blog

発見された脆弱性

[!TIP] Vulnhuntrを使用して脆弱性を発見しましたか? huntr.com にレポートを提出して$$を獲得し、以下のリストに追加するPRを送信してください!

[!NOTE] この表はこれまでに発見された脆弱性の一部です。責任ある開示期間が終了し次第、伏せ字を解除します。

リポジトリスター数脆弱性
gpt_academic67kLFI, XSS
ComfyUI66kXSS
Langflow46kRCE, IDOR
FastChat37kSSRF
Ragflow31kRCE
LLaVA21kSSRF
gpt-researcher17kAFO
Letta14kAFO

制限事項

  • Pythonコードベースのみがサポートされています。
  • 以下の脆弱性クラスのみを識別できます:
    • ローカルファイルインクルード (LFI)
    • 任意ファイル上書き (AFO)
    • リモートコード実行 (RCE)
    • クロスサイトスクリプティング (XSS)
    • SQLインジェクション (SQLI)
    • サーバーサイドリクエストフォージェリ (SSRF)
    • 安全でないダイレクトオブジェクト参照 (IDOR)

インストール

[!IMPORTANT] Vulnhuntrは、Pythonコードの解析に使用するJediに多数のバグがあるため、Python 3.10を厳密に必要とします。他のバージョンのPythonでインストールした場合、確実には動作しません。

Vulnhuntrの簡単なインストールと実行には、pipxまたはDockerの使用をお勧めします。

Dockerを使用する場合:

root@kitploit:~
docker build -t vulnhuntr https://github.com/protectai/vulnhuntr.git#main

pipxを使用する場合:

root@kitploit:~
pipx install git+https://github.com/protectai/vulnhuntr.git --python python3.10

または、poetryを使用してソースから直接インストールすることもできます:

root@kitploit:~
git clone https://github.com/protectai/vulnhuntr
cd vulnhuntr && poetry install

使用方法

このツールは、GitHubリポジトリを分析してリモートで悪用可能な潜在的な脆弱性を検出するために設計されています。このツールにはAPIキーとGitHubリポジトリのローカルパスが必要です。オプションでLLMサービスのカスタムエンドポイントを指定することもできます。

[!CAUTION] 使用するLLMプロバイダーで常に支出制限を設定するか、コストを注意深く監視してください。このツールは、LLMのコンテキストウィンドウに可能な限り多くのコードを収めようとするため、高額な請求が発生する可能性があります。

[!TIP] LLMにはClaudeの使用をお勧めします。テストを通じて、GPTよりもClaudeの方が良い結果が得られています。

コマンドラインインターフェース

root@kitploit:~
usage: vulnhuntr [-h] -r ROOT [-a ANALYZE] [-l {claude,gpt,ollama}] [-v]

Analyze a GitHub project for vulnerabilities. Export your ANTHROPIC_API_KEY/OPENAI_API_KEY before running.

options:
  -h, --help            show this help message and exit
  -r ROOT, --root ROOT  Path to the root directory of the project
  -a ANALYZE, --analyze ANALYZE
                        Specific path or file within the project to analyze
  -l {claude,gpt,ollama}, --llm {claude,gpt,ollama}
                        LLM client to use (default: claude)
  -v, --verbosity       Increase output verbosity (-v for INFO, -vv for DEBUG)

例

pipxインストールから、Claudeを使用してリポジトリ全体を分析する:

root@kitploit:~
export ANTHROPIC_API_KEY="sk-1234"
vulnhuntr -r /path/to/target/repo/

[!TIP] リモートのユーザー入力を受け取る特定のファイルをVulnhuntrに指定し、個別にスキャンすることをお勧めします。

pipxインストールから、GPT-4oを使用して/path/to/target/repo/server.pyファイルを分析する。ファイルの代わりにサブディレクトリを指定することもできます:

root@kitploit:~
export OPENAI_API_KEY="sk-1234"
vulnhuntr -r /path/to/target/repo/ -a server.py -l gpt 

Dockerインストールから、Claudeとカスタムエンドポイントを使用して/local/path/to/target/repo/repo-subfolder/target-file.pyを分析する:

root@kitploit:~
docker run --rm -e ANTHROPIC_API_KEY=sk-1234 -e ANTHROPIC_BASE_URL=https://localhost:1234/api -v /local/path/to/target/repo:/repo vulnhuntr:latest -r /repo -a repo-subfolder/target-file.py

実験的

Ollamaはオプションとして含まれていますが、オープンソースモデルが出力を正しく構造化する点では成功していません。

root@kitploit:~
export OLLAMA_BASE_URL=http://localhost:11434/api/generate
export OLLAMA_MODEL=llama3.2
vulnhuntr -r /path/to/target/repo/ -a server.py -l ollama

ロジックフロー

VulnHuntr ロジック

  • LLMがREADMEを要約し、これをシステムプロンプトに含める
  • LLMがファイル全体に対して初期分析を実行し、潜在的な脆弱性を報告する
  • 次にVulnhuntrは、二次分析のためにLLMに脆弱性固有のプロンプトを与える
  • LLMがコードを分析するたびに、プロジェクト内の他のファイルから追加のコンテキストとなる関数/クラス/変数を要求する
  • ユーザー入力からサーバー処理までの呼び出しチェーン全体が完了するまでこれを続け、その後最終分析を行う
  • 最終分析は、推論、概念実証エクスプロイト、信頼度スコアで構成される

[!TIP] 一般的に、信頼度スコアが7未満の場合は脆弱性が存在する可能性は低いことを意味します。スコア7は調査が必要であることを意味し、スコア8以上は有効な脆弱性である可能性が非常に高いことを意味します。

出力

このツールは、分析されたファイルで見つかった脆弱性の詳細なレポートを生成します。レポートには以下が含まれます:

  • 各ファイルの初期評価結果。
  • コンテキスト関数とクラス参照を含む二次評価結果。
  • 見つかった脆弱性の信頼度スコア。
  • 分析プロセスのログ。
  • PoCエクスプロイト

以下は、Ragflow(現在は修正済み)における0dayリモートコード実行脆弱性を説明するVulnhuntrレポートの例です:

root@kitploit:~
scratchpad:
  1. Analyzing the add_llm function in llm_app.py. 2. Identified user input used as keys to access dictionaries: EmbeddingModel, ChatModel, RerankModel,
CvModel, and TTSModel. 3. These dictionaries contain class references, which are instantiated with user-supplied parameters. 4. The factory variable is 
directly used from user input (req['llm_factory']) without proper validation. 5. The llm_name is also derived from user input in most cases. 6. The 
instantiation of these classes occurs in try-except blocks, but exceptions are only used for error messages, not preventing execution. 7. The api_key 
and other sensitive information are passed directly to these instantiated classes. 8. There's no comprehensive input validation or sanitization for the 
factory or llm_name variables. 9. The vulnerability is in a route decorated with @login_required, indicating it's accessible to authenticated users. 10.
Reviewing the EmbeddingModel, ChatModel, RerankModel, CvModel, and TTSModel dictionaries to understand their contents and potential for exploitation.
----------------------------------------

analysis:
  The add_llm function in llm_app.py contains a critical Remote Code Execution (RCE) vulnerability. The function uses user-supplied input 
(req['llm_factory'] and req['llm_name']) to dynamically instantiate classes from the EmbeddingModel, ChatModel, RerankModel, CvModel, and TTSModel 
dictionaries. This pattern of using user input as a key to access and instantiate classes is inherently dangerous, as it allows an attacker to 
potentially execute arbitrary code. The vulnerability is exacerbated by the lack of comprehensive input validation or sanitization on these 
user-supplied values. While there are some checks for specific factory types, they are not exhaustive and can be bypassed. An attacker could potentially
provide a malicious value for 'llm_factory' that, when used as an index to these model dictionaries, results in the execution of arbitrary code. The 
vulnerability is particularly severe because it occurs in a route decorated with @login_required, suggesting it's accessible to authenticated users, 
which might give a false sense of security.
----------------------------------------

poc:
  POST /add_llm HTTP/1.1
  Host: target.com
  Content-Type: application/json
  Authorization: Bearer <valid_token>
  
  {
      "llm_factory": "__import__('os').system",
      "llm_name": "id",
      "model_type": "EMBEDDING",
      "api_key": "dummy_key"
  }
  
  This payload attempts to exploit the vulnerability by setting 'llm_factory' to a string that, when evaluated, imports the os module and calls system. 
The 'llm_name' is set to 'id', which would be executed as a system command if the exploit is successful.
----------------------------------------

confidence_score:
  8
----------------------------------------

vulnerability_types:
  - RCE
----------------------------------------

ロギング

このツールは、分析プロセスと結果をvulnhuntr.logという名前のファイルに記録します。このファイルには、初期評価と二次評価を含む分析の各ステップに関する詳細情報が含まれています。

作者

  • Dan McInerney: [email protected], @DanHMcinerney
  • Marcello Salvati: [email protected], @byt3bl33d3r
ツールをダウンロード