name: DVAI - Damn Vulnerable AI Hospital description: An intentionally vulnerable AI Agent environment for security testing and red teaming. Companion target for H-ASES framework. version: 1.1.0 author: yofat
DVAI Target Environment (The Dojo)
Current Status: Active | Last Updated: 2026-01-26
DVAI 是一個故意設計有漏洞的智慧醫院 AI Agent 系統,作為 H-ASES 紅隊框架的官方測試靶場。
Capabilities
- 10+1 Scenarios: 完整涵蓋 OWASP ASI Top 10 弱點
- Multi-Agent Architecture: 真實微服務架構,支援 MCP 協議
- Three Difficulty Levels: EASY / MEDIUM / HARD 防禦等級
- Dynamic Flags: 每次執行產生隨機 Flag,驗證攻擊成功
- Lightweight LLM: 使用 TinyLlama (1.1B) 僅需 ~1.5GB VRAM
Quick Start
1. Start the Environment
cd dvai
# 啟動單一場景 (例如 ASI-01 掛號櫃檯)
docker compose -f docker-compose.goat.yml --profile asi-01 up
# 啟動所有場景
docker compose -f docker-compose.goat.yml --profile all up
# 設定難度 (0=EASY, 1=MEDIUM, 2=HARD)
DEFENSE_LEVEL=2 docker compose -f docker-compose.goat.yml --profile asi-01 up
2. Access Points
| Scenario | Port | Description |
|---|---|---|
| 01 | 8101 | Reception Desk (ASI-01: Prompt Injection) |
| 02 | 8102 | Records Admin (ASI-02: Tool Misuse) |
| 03 | 8103 | Lab Controller (ASI-03: RCE) |
| 04 | 8104 | Device Manager (ASI-04: Supply Chain) |
| 05 | 8105 | Clinical RAG (ASI-05: Knowledge Poisoning) |
| 06 | 8106 | Prescription (ASI-06: Guardrail Bypass) |
| 07 | 8107 | Secretary (ASI-07: Data Leakage) |
| 08 | 8108 | Researcher (ASI-08: Vector/Memory Attack) |
| 09 | 8109 | Referral (ASI-09: Multi-Agent Trust) |
| 10 | 8110 | Scheduler (ASI-10: DoS) |
| 11 | 8111 | Full Chain (Complete Kill Chain) |
3. Verification
# 確認服務運行
docker ps | grep dvai
# 測試 API
curl http://localhost:8101/api/chat -X POST -H "Content-Type: application/json" -d '{"message": "Hello"}'
Flag System
每個場景都有獨立的 Flag,格式為:
ASI_XX_CATEGORY{RANDOM_12_CHARS}
例如:ASI_01_PROMPT_INJECTION{Y46RCJEKC71P}
注意:Flag 是每次執行隨機生成的,用於驗證當次攻擊成功。
Integration with H-ASES
from core.target_client import DVAITarget
target = DVAITarget(persona="01", difficulty="easy")
target.setup_known_target()
response = target.chat("你好,你是誰?")
print(f"Captured Flags: {target.captured_flags}")
Project Structure
dvai/
├── docker-compose.goat.yml # 主要 Docker 配置
├── scenarios/ # 10+1 個場景
│ ├── 01-reception/ # ASI-01: 間接注入
│ ├── 02-records-admin/ # ASI-02: 工具濫用
│ └── ...
├── shared/
│ ├── llm_client.py # Ollama 客戶端
│ ├── flag_manager.py # Flag 產生與驗證
│ └── defense.py # 難度控制系統
└── README.md
Related Projects
- H-ASES: Hierarchical Agentic Security Exploitation System - 自動化紅隊攻擊框架