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

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

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

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

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
DVDR_LLM — 複数の大規模言語モデルを用いたソフトウェア脆弱性の検出・修復のためのアンサンブルフレームワーク。コンセンサス分析と、適合率-再現率トレードオフのための評価ツールを備えています。 | Kitploit
ツール/GitHubGitHub/erroristotle/dvdr_llm
脆弱性分析コード分析機械学習論文と研究学習と教育AIセキュリティ
GitHuberroristotle/dvdr_llm

DVDR_LLM

複数の大規模言語モデルを用いたソフトウェア脆弱性の検出・修復のためのアンサンブルフレームワーク。コンセンサス分析と、適合率-再現率トレードオフのための評価ツールを備えています。

リポジトリを見る
38ヶ月前未レビュー

人気

すべて見る →

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

すべてのツールを探索

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

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

DVDR-LLM: ソフトウェア脆弱性の検出と修復において、LLMはいつ協調するとより優れているのか?

Python 3.8+ Paper

研究論文の公式実装およびアーティファクト:
「DVDR-LLM: ソフトウェア脆弱性の検出と修復において、LLMはいつ協調するとより優れているのか?」

🎯 概要

DVDR-LLMは、ソフトウェア脆弱性の検出と修復において複数の大規模言語モデル(LLM)を統合する際の根本的なトレードオフを体系的に検証するアンサンブルフレームワークです。我々の包括的な評価は、セキュリティ上重要なアプリケーションにおける適合率-再現率のバランス、モデル多様性の利点、コンセンサスベースのアプローチに関する重要な洞察を明らかにします。

主要な発見

  • 適合率-再現率のトレードオフ: アンサンブルはパッチ有効性評価における誤検知を減らしますが(精度+10〜12%)、脆弱性特定における見逃し(偽陰性)を増加させます
  • 複雑性の利点: モデル多様性の利点はコード抽象化レベルが上がるにつれて増大します(複数ファイルの脆弱性で再現率+18%、F1+11.8%)
  • 保守的バイアス: モデルの80%が体系的な保守的挙動を示します(過剰検出よりも脆弱性の見逃し)
  • 固有の専門家は存在しない: すべての脆弱性検出はアンサンブル全体で重複しており、多数決戦略を裏付けています

📁 リポジトリ構造

root@kitploit:~
DVDR_LLM/
├── dvdr_llm/                  # Main package (professional structure)
│   ├── __init__.py            # Package exports
│   ├── cli.py                 # Command-line interface
│   ├── config.py              # Configuration settings
│   ├── core/                  # Core functionality
│   │   ├── api_client.py      # LLM API communication
│   │   ├── detector.py        # VulnerabilityDetector class
│   │   └── prompts.py         # Prompt generation utilities
│   ├── analysis/              # Analysis modules
│   │   ├── consensus.py       # Consensus analysis
│   │   └── metrics.py         # Performance metrics
│   ├── evaluation/            # Model evaluation
│   │   └── evaluator.py       # ModelEvaluator class
│   ├── visualization/         # Plotting and visualization
│   │   └── plotter.py         # ResultsPlotter class
│   └── tools/                 # Additional utilities
├── utils/                     # Original utility modules
│   ├── api.py                 # LLM API interaction helpers
│   ├── database.py            # SQLite helper functions
│   └── config.py              # Configuration constants
├── data/                      # Datasets and databases
│   ├── vulnerabilities.csv    # Vulnerability data
│   └── vulnerable and patched codes.sqlite
├── output/                    # Generated results and databases
│   ├── database_*.sqlite      # Model-specific databases
│   ├── consensus_analysis/    # Consensus analysis results
│   ├── metrics/              # Performance metrics
│   └── database_exports/     # Exported data
├── examples/                  # Usage examples
│   └── basic_usage.py         # Basic usage demonstration
├── docs/                      # Documentation
│   └── README_consensus_analysis.md
├── paper/                     # Research paper
│   ├── main.pdf               # Published paper
│   └── main.tex               # LaTeX source
├── setup.py                   # Package installation
├── requirements.txt           # Dependencies
├── CHANGELOG.md              # Change log
├── LICENSE                   # MIT License
└── README.md                 # This file

🚀 クイックスタート

前提条件

  • Python 3.8+
  • LLM APIへのアクセス(Ollama、OpenAIなど)
  • 脆弱性データベース用のSQLite

インストール

  1. リポジトリをクローン:

    root@kitploit:~
    git clone https://github.com/Erroristotle/DVDR_LLM.git
    cd DVDR_LLM
    
  2. 依存関係をインストール:

    root@kitploit:~
    pip install -r requirements.txt
    pip install -e .  # Install package in development mode
    
  3. インストールを確認:

    root@kitploit:~
    python verify_package.py
    

基本的な使用方法

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

root@kitploit:~
# Run vulnerability detection with ensemble
dvdr-llm detect --models llama3-8b,codellama-7b --database data/vulnerabilities.sqlite

# Analyze consensus patterns (RQ2)
dvdr-llm analyze consensus --input results/metrics/model_predictions.csv --threshold 0.6

# Generate conflict pattern visualization (Figure in paper)
python dvdr_llm/visualization/conflict_pattern_plot.py results/metrics/reviewer_insights_disagreement_patterns.csv -o reviewer_insights

# Evaluate ensemble performance across abstraction levels (RQ3)
dvdr-llm evaluate --models-dir output/ --abstraction-analysis

Python API

root@kitploit:~
from dvdr_llm import VulnerabilityDetector, ConsensusAnalyzer, ModelEvaluator

# Initialize vulnerability detector
detector = VulnerabilityDetector("llama3-8b-instruct")

# Connect to database
detector.connect_to_database("data/vulnerabilities.sqlite")

# Analyze code for vulnerabilities
code = """
void vulnerable_function(char *input) {
    char buffer[100];
    strcpy(buffer, input);  // Buffer overflow
}
"""

# Get CVE predictions
cve_names = detector.analyze_code_for_cves(code, 2023)
print(f"Identified CVEs: {cve_names}")

# Detect vulnerability
is_vulnerable = detector.detect_vulnerability(code)
print(f"Is vulnerable: {is_vulnerable}")

# Process database entries
stats = detector.process_database_entries(limit=100)
print(f"Processed {stats['processed']} entries")

# Clean up
detector.close()

# Multi-model consensus analysis
model_databases = {
    "llama3-8b": "output/database_llama3-8b-instruct.sqlite",
    "codellama-7b": "output/database_codellama-7b-instruct.sqlite",
    "gemma2-9b": "output/database_gemma2-9b.sqlite"
}

analyzer = ConsensusAnalyzer()
consensus_results = analyzer.run_full_analysis(model_databases)

# Model evaluation
evaluator = ModelEvaluator()
evaluation_results = evaluator.evaluate_multiple_models(
    model_databases, 
    "data/ground_truth.csv"
)

📊 論文結果の再現

研究課題

RQ1: 複数LLMの統合の影響

root@kitploit:~
# Generate Table 2 (Model comparison with delta percentages)
python dvdr_llm/tools/model_contribution_analysis.py results/metrics/model_predictions.csv --compare-ensemble --threshold 0.7

# Analyze individual vs ensemble performance
dvdr-llm evaluate --comparison-analysis --threshold 0.7

RQ2: 最適なコンセンサス閾値

root@kitploit:~
# Generate Figure 3 (Threshold sensitivity analysis)
python dvdr_llm/tools/threshold_analysis.py results/metrics/model_predictions.csv --range 0.3-0.8

# Statistical validation of threshold selection
python dvdr_llm/analysis/statistical_validation.py --threshold-analysis

RQ3: 抽象化レベル別のパフォーマンス

root@kitploit:~
# Generate Table 3 (Abstraction level analysis)
python dvdr_llm/evaluation/evaluator.py --abstraction-analysis --threshold 0.6

# Level-specific performance evaluation
dvdr-llm evaluate --abstraction-levels 1,2,3 --ensemble

RQ4: パッチ品質のための重み付き集約

root@kitploit:~
# Analyze patch quality metrics (ROUGE, CodeBLEU, Complexity)
python dvdr_llm/tools/patch_quality_analysis.py results/patches/ --weighted-scoring

# Generate Figure 4 (Patch similarity and complexity analysis)
dvdr-llm visualize --patch-analysis --metrics results/patch_metrics.csv

主要な図の生成

root@kitploit:~
# Main conflict pattern analysis figure (Figure 2)
python dvdr_llm/visualization/conflict_pattern_plot.py results/metrics/reviewer_insights_disagreement_patterns.csv -o reviewer_insights

# Threshold sensitivity analysis (Figure 3)
python dvdr_llm/visualization/enhanced_figure3_generator.py results/metrics/model_predictions.csv

# Statistical validation plots (Appendix)
python dvdr_llm/analysis/statistical_significance_analysis.py --generate-plots

🔧 設定

モデル設定

dvdr_llm/config.pyを編集してLLMエンドポイントを設定します:

root@kitploit:~
LLM_MODELS = {
    "llama3_8b": "ollama run llama3:8b-instruct",
    "codellama_7b": "ollama run codellama:7b-instruct",
    "mistral_7b": "ollama run mistral:7b-instruct",
    # Add your model configurations
}

# Consensus thresholds for different scenarios
CONSENSUS_THRESHOLDS = {
    "conservative": 0.8,  # High precision, low false positives
    "balanced": 0.6,      # Balanced precision-recall
    "sensitive": 0.4      # High recall, catch more vulnerabilities
}

プロンプトテンプレート

このフレームワークは再現性のための標準化されたプロンプトテンプレートを使用します:

  • SVD1: 未パッチコードにおける脆弱性の特定
  • SVD2: パッチの有効性評価
  • SVD3: CVE/CWEに基づく脆弱性の特定
  • SVD4: CVE/CWEに基づくパッチ検証
  • SVR1: ゼロショットによる脆弱性修復
  • SVR2: コミット説明を用いた少数ショット修復

📈 実験結果

モデルパフォーマンスの概要

Δ%はアンサンブルベースラインからの性能差を示します

主要な洞察

  1. 逆の性能関係: 検出に優れたモデルは検証では失敗することが多い
  2. 閾値の感度: 60%の閾値がタスク全体で最適なバランスを提供する
  3. 抽象化の利点: コードの複雑性が増すにつれてアンサンブルの利点が拡大する
  4. 保守的バイアス: 過剰検出よりも過小検出へ向かう体系的な傾向

🛠️ 高度な使用方法

カスタム分析

root@kitploit:~
# Implement custom consensus strategy
from dvdr_llm.analysis.consensus import ConsensusAnalyzer

class WeightedConsensus(ConsensusAnalyzer):
    def __init__(self, model_weights):
        self.weights = model_weights
    
    def weighted_majority_vote(self, predictions):
        weighted_sum = sum(pred * weight for pred, weight in zip(predictions, self.weights))
        return weighted_sum >= 0.5

# Use custom visualization
from dvdr_llm.visualization import ConflictPatternPlotter

plotter = ConflictPatternPlotter()
plotter.create_professional_figure(
    disagreement_data, 
    output_prefix="custom_analysis",
    style="publication"
)

フレームワークの拡張

root@kitploit:~
# Add new LLM model
from dvdr_llm.core.api_client import LLMClient

class CustomLLMClient(LLMClient):
    def __init__(self, api_endpoint, model_name):
        super().__init__(api_endpoint, model_name)
    
    def generate_response(self, prompt, **kwargs):
        # Implement custom API interaction
        pass

# Register new model
detector.register_model("custom-llm", CustomLLMClient("api_url", "model_name"))

📚 ドキュメント

  • APIリファレンス: 詳細なAPIドキュメント
  • 分析ガイド: 統計分析の説明
  • 可視化ガイド: 図の生成手順
  • コンセンサス分析: コンセンサス手法の詳細

🔬 研究論文

完全な研究成果は paper/main.tex に記載されています。主な貢献は以下のとおりです:

  1. 脆弱性タスクにおけるLLMアンサンブル多様性の初の包括的な実証評価
  2. 構文を超えたコード品質を考慮した新しい重み付き修復評価システム
  3. 実用的なスケーラビリティの洞察を提供する3つの抽象化レベルにわたる体系的分析
  4. セキュリティ上重要なアプリケーションのための重要な適合率-再現率トレードオフ分析

🤝 貢献

貢献を歓迎します! 貢献ガイドラインをご覧ください:

  1. リポジトリをフォークする
  2. フィーチャーブランチを作成する(git checkout -b feature/new-analysis)
  3. 変更をコミットする(git commit -am 'Add new analysis method')
  4. ブランチにプッシュする(git push origin feature/new-analysis)
  5. プルリクエストを作成する

📄 ライセンス

LICENCEファイルを参照してください。

DVDR-LLMを使用する場合は、以下のように引用してください:

@article{zibaeirad2025diverse, title={Diverse LLMs vs. Vulnerabilities: Who Detects and Fixes Them Better?}, author={Zibaeirad, Arastoo and Vieira, Marco}, journal={arXiv preprint arXiv:2512.12536}, year={2025} }

ツールをダウンロード
モデルSVD1 (Δ%)SVD2 (Δ%)SVD3 (Δ%)SVD4 (Δ%)
Llama3-8b+59.8%-87.5%+127.1%-73.5%
Llama3-70b-50.8%+54.4%-19.6%+13.5%
CodeLlama-7b+16.8%-34.6%+86.9%-45.4%
Ensemble (60%)ベースラインベースラインベースラインベースライン