slcyha/ai-security-lab
GitHub: slcyha/ai-security-lab
基于 Docker 的本地实验环境,用于测试和分析 LLM 应用的安全漏洞及各类提示注入攻击。
Stars: 0 | Forks: 0
# DVAIA LLM 安全测试
这是我在 DVAIA (Damn Vulnerable AI Application) 上进行的手动 LLM 安全测试笔记。我实际尝试了不同类型的 Prompt injection 和 agentic tool 滥用,并试图推导出它们各自生效的原因。
!!该实验环境是一个故意设计为存在漏洞的应用程序;不包含任何针对真实目标的内容。
## 测试结果
Direct Injection = 成功 LLM01
Document Injection = 成功 LLM01
Template Injection = 成功 LLM01
RAG Poisoning = 成功 LLM05
Web Injection = 失败 LLM02
Agent = Config/Data Leak 成功 LLM06
Agent = 未经授权删除 严重 LLM06
每个向量的详细说明位于 `writeups/` 文件夹中。
## 环境
- Docker Compose
- Local Ollama,模型:`phi3:latest`
- Agentic 模型:`qwen3:0.6b`
- Qdrant (RAG 向量 DB)
## 安装说明
```
git clone https://github.com/airtasystems/DVAIA-Damn-Vulnerable-AI-Application.git
cd DVAIA-Damn-Vulnerable-AI-Application
cp .env.example .env
docker compose up -d --build
```
我在 `.env` 中将 chat 模型设置为 `phi3:latest`:
```
DEFAULT_MODEL=ollama:phi3:latest
```
如果未安装模型:
```
ollama pull phi3:latest
```
应用程序将通过 `http://localhost:5000` 打开。
## 参考资源
- [DVAIA](https://github.com/airtasystems/DVAIA-Damn-Vulnerable-AI-Application)
- [OWASP Top 10 for LLM Applications](https://owasp.org/www-project-top-10-for-large-language-model-applications/)
- [Genbounty](https://genbounty.com/)
标签:AI安全, AI风险缓解, Chat Copilot, CISA项目, DLL 劫持, Docker Compose, Gradle, LLM评估, Ollama, RAG, 大语言模型, 安全靶场, 漏洞测试, 版权保护, 请求拦截, 逆向工具, 配置审计