防护思路
点击放大

![CI]()
![Python 3.11+]()
![License: MIT]()
![OWASP LLM Top 10]()
A curated, searchable database of prompt injection attacks for defensive AI security research.
Built by Scott Thornton
3,900+ prompt injection attacks from 20 source datasets, deduplicated content hashing, classified by technique and se, and searchable via FTS5 full-text search. A quality scoring engine identifies and filters noise, leaving ~1,300 high-signal attack prompts.
Think of it as Exploit-DB for prompt injection — a structured, searchable, testable collection of real-world attack techniques.
prompt-db CLI| Source | Count | A | Type |
|--------|-------|-------------|------|
| jailbreak-llms | ~1,000 | High | Jailbreak prompts from Discord/Reddit |
| elite_custom_prompts | 120 | High | Hand-crafted ad attacks |
| benign-malicious-classification | ~120 | High | Labeled attack/benign pairs |
| lakera-gandalf | ~40 | Medium | Gandalf challenge prompts |
| prompt-injection-research | ~17 | Medium | Research-deri |
| + 15 other sources | — | | Mixed quality, filtered by curation |
After quality curation, ~1,300 prompts remain from an initial 3,900+.
| Technique | Description | OWASP |
|-----------|-------------|-------|
| prompt_injection | Direct instruction manipulation | LLM01 |
| jailbreak | Bypass safety guardrails | LLM01 |
| prompt_extraction | Extract system prompts/instructions | LLM01, LLM06 |
| data_exfiltration | Leak training data or PII | LLM06 |
| multi_turn_attack | Multi-step con manipulation | LLM01 |
| obfuscation | Encoding/obfuscation techniques | LLM01 |
| payload_splitting | Split malicious payload across messages | LLM01 |
| ad | Ad perturbation attacks | LLM01 |
| Command | Description |
|---------|-------------|
| prompt-db build | Build database from JSON source files |
| prompt-db stats | Show database statistics |
| prompt-db search <query> | Full-text search with filters |
| prompt-db info <id> | Detailed view of a single prompt |
| prompt-db export | Export to JSON/JSONL/CSV |
| prompt-db audit | Data quality audit by source |
| prompt-db curate | Remo, flag high-quality prompts |
Global options: --db <path> (or PROMPT_DB_PATH env var), --
The SQLite database uses the following core tables:
prompts — Main prompt storage with content hash, technique, complexity, sophistication scorecategories — OWASP LLM Top 10 categories with MITRE ATLAS IDstags — Flexible tagging (attack patterns, techniques)test_results — Empirical test data (model, result, confidence, latency)prompt_ — Generated/manual attack prompts_fts — FTS5 full-text search indexOr without make:
See examples/basic_usage.py for Python library usage.
This database is for defensi research only. See SECURITY.md for full policy. By using this tool, you agree to use it only for authorized security testing, de defenses, and academic research.
MIT — see LICENSE
开发语言:Python
Star 数:2
该项目属于防护思路方向的开源资源,代码结构清晰,适合安全研究人员学习参考。项目围绕Prompt injection attack database for defensive AI security research with RAG-powered generation and testing integration展开,提供了可运行的实现,对理解相关安全机制、工具原理与攻防技术具有较高的研究价值。
从技术实现角度看,此类项目的核心在于对底层原理的深入理解与工程化落地。开发者在研究过程中可以结合官方文档与社区讨论,梳理项目的初始化流程、核心模块职责与数据流转,逐步掌握其中的技术细节与设计思路。
1. 下载源码压缩包,解压到本地环境。
2. 根据项目类型准备对应的运行环境与依赖。
3. 按照 README 中的步骤完成配置与部署。
4. 在隔离的测试环境中运行验证,避免影响生产系统。
本资源来源于开源社区,仅供安全研究、技术学习与合法授权范围内的攻防演练使用,请勿用于任何非法或侵害他人权益的用途。使用本项目产生的一切后果由使用者自行承担。
| 资源标题 | prompt-database - Prompt injection attack database for defensive AI |
| 所属分类 | 防护思路 |
| 发布作者 | admin |
| 发布时间 | 2026-10-06 00:19:34 |
| 下载权限 | 免费下载 |
| 附件数量 | 2 个下载链接 |
| 浏览次数 | 422 |
| 讨论数量 | 0 |
| 主题状态 | 正常讨论中 |