🧐 概要 | 🏆 ベンチマークスイート | 🚀 クイックスタート | 🏗️ アーキテクチャ | ⚙️ 設定 | 📊 生成 | 📝 検証 | 📝 CLIインターフェース | 📝 引用
Cyber-Zeroは、ランタイム実行環境を必要とせずにサイバーセキュリティエージェントをトレーニングするための包括的なフレームワークです。
大規模言語モデル(LLM)は、実行可能なランタイム環境でトレーニングされた場合、ソフトウェアエンジニアリングタスクにおいて目覚ましい成功を収めていますが、そのような環境は、チャレンジの設定や実行コンテキストが一時的または制限されているサイバーセキュリティ領域ではしばしば利用できません。Cyber-Zeroは、公開されているCTFのwriteupを活用し、ペルソナ駆動型のLLMシミュレーションを採用してランタイムの動作をリバースエンジニアリングし、実際の実行環境なしで現実的で長期的なインタラクションシーケンスを生成することで、この根本的な制限に対処します。
主要なイノベーションは、実際の実行環境を必要とせずに、LLMシミュレーションを通じて高品質なトレーニング軌跡を生成することにあり、これによりサイバーセキュリティエージェントのトレーニングがスケーラブルかつ実用的になります。Cyber-Zeroによって合成された軌跡を使用して、私たちはLLMベースのエージェントをトレーニングし、3つの著名なCTFベンチマーク(InterCode-CTF、NYU CTF Bench、Cybench)において、ベースラインモデルに対して最大13.1%の絶対的な性能向上を達成しました。
サイバーセキュリティエージェントの評価を民主化するために、私たちはCyber-ZeroのEnIGMA+向けに適応させた3つの修復済みベンチマークスイートを提供しています:
すべてのベンチマークはEnIGMAおよびEnIGMA+の仕様に従うように再フォーマットされており、各チャレンジにはchallenge.jsonファイルとdocker-compose.ymlファイル(必要な場合)が含まれています。
私たちのベンチマークスイートは、元のベンチマークで特定されたいくつかの問題に対処し、信頼性の高い評価のための修復版を提供しています。特定の修復と改善の詳細については、benchmarks/README.mdを参照してください。
サイバーセキュリティエージェントの開発を促進するために、私たちは**EnIGMA+**を提供しています。これはEnIGMAの拡張エージェントスキャフォールディングであり、数百のCTFチャレンジを_数日_ではなく_数時間_で実行します。EnIGMA+はSWE-agentの上に構築されています。
EnIGMA+ を使用した私たちの最良のモデルである Cyber-Zero-32B は、オープンウェイトモデルの中で新たな最先端性能を確立し、DeepSeek-V3-0324 や Claude-3.5-Sonnet といったプロプライエタリシステムの能力に匹敵しながら、優れたコスト効率を提供します。これは、ランタイム不要の軌跡合成が最先端のサイバーセキュリティエージェントの開発を効果的に民主化できることを実証しています。
インストール、設定、使用方法など EnIGMA+ の詳細については、enigma-plus フォルダ内の README をご確認ください。
# Install dependencies
pip install -r requirements.txt
# Install the package
pip install -e .
# Using the CLI
cyber-zero generate \
--sampled_flags_path task_meta.jsonl \
--output_path trajectories.jsonl \
--trajectories_per_task 3 \
--workers 16
# Using the direct script interface
python generate_trajectory.py \
--sampled_flags_path task_meta.jsonl \
--output_path trajectories.jsonl \
--trajectories_per_task 3 \
--workers 16
# Using the CLI
cyber-zero evaluate \
--input_path trajectories.jsonl \
--output_path quality_results.jsonl \
--model_id deepseek-v3-0324
# Using the direct script interface
python evaluate_quality.py \
--input_path trajectories.jsonl \
--output_path quality_results.jsonl \
--model_id deepseek-v3-0324
# Using the CLI
cyber-zero reformat \
--input_path quality_results.jsonl \
--output_path formatted_trajectories.jsonl \
--split_output
# Using the direct script interface
python reformat_trajectories.py \
--input_path quality_results.jsonl \
--output_path formatted_trajectories.jsonl \
--split_output
本フレームワークは、Cyber-Zero のモジュール式アーキテクチャに従っています:
cyber_zero/
├── __init__.py # Package initialization
├── config.py # Configuration management
├── models.py # Data models (TaskMeta, TrajectoryData, etc.)
├── utils.py # Common utilities
├── validation.py # Response and command validation
├── llm_client.py # LLM interaction and quality evaluation
├── trajectory_generator.py # Main trajectory generation logic
├── quality_evaluator.py # Quality evaluation for trajectories
├── trajectory_reformatter.py # Trajectory reformatting for training
├── cli.py # Command-line interface
├── prompts/ # System prompts
│ ├── __init__.py
│ ├── assistant_turn_prompt.txt # Assistant (CTF player) prompt
│ └── user_turn_prompt.txt # User (system/environment) prompt
└── data_collection/ # Data collection utilities
├── __init__.py # Package initialization
├── config.py # Data collection configuration
├── scraper.py # Shared web scraping utilities
└── README.md # Data collection documentation
このフレームワークは、集中管理型のモデル管理を備えた階層的な設定システムを使用しています:
from cyber_zero import Config
config = Config()
config.MAX_TURNS = 60 # Maximum conversation turns (30 paired turns)
config.DEFAULT_WORKERS = 16 # Number of parallel workers
このフレームワークは litellm を通じて複数の LLM プロバイダーをサポートしています。研究論文で指定されているデフォルトモデルは DeepSeek-V3-0324 です:
# Get available models
from cyber_zero.config import Config
config = Config()
print(config.models.MODEL_MAPPINGS)
# {'deepseek-v3-0324': 'deepseek-ai/DeepSeek-V3-0324', ...}
# Use a specific model
model_id = config.models.get_model_id("deepseek-v3-0324")
軌跡生成用のカスタムモデルを追加するには、cyber_zero/config.py 内のモデルマッピングを更新します:
# In cyber_zero/config.py
@dataclass
class ModelConfig:
def __post_init__(self):
if self.MODEL_MAPPINGS is None:
self.MODEL_MAPPINGS = {
# Default research model
"deepseek-v3-0324": "deepseek-ai/DeepSeek-V3-0324",
# Add your custom models here
"custom-model": "provider/your-custom-model-id",
"local-model": "http://localhost:8000/v1/completions",
}
このフレームワークは、最適な軌跡生成のために研究で検証されたパラメータを使用します:
CTF タスクのメタデータを表します:
task = TaskMeta(
task_name="Buffer Overflow Basic",
task_tag="pwn",
task_points="100",
task_description="Find the vulnerability...",
solution="flag{example}",
# ... other fields
)
会話履歴を含む完全なトラジェクトリ:
trajectory = TrajectoryData(
task_name="Example Task",
trajectory=[
ConversationTurn(role="user", content="ls -la"),
ConversationTurn(role="assistant", content="```bash\nls -la\n```"),
# ... more turns
],
# ... other fields
)
このフレームワークには、軌跡の品質を保証するための包括的な検証メカニズムが含まれています: