CTF思路
点击放大

<p align="center">
<img src="docs/assets/images/logo.png" alt="AI for the Win - Security AI Training Platform Logo" width="150" height="150">
</p>
![CI]()
![OpenSSF Scorecard]()
![Python 3.10-3.12]()

![Open In Colab]()

A hands-on training program for security practitioners who want to build AI-powered tools for threat detection, incident response, and security automation. 50+ labs (including 9 intro labs and 12 bridge labs), 4 capstone projects, 18 CTF challenges. Includes sample datasets, solution walkthroughs, and Docker lab en. Designed for vibe coding with AI assistants like Cursor, Claude Code, and Copilot.
---
Lab 10 - Phishing Classifier catches what rules miss:
Lab 35 - LLM Log Analysis finds attacks in noise:
---
No installation needed -- click and run in your browser:
Beginner (No API key):
![Lab 02]() Prompt Engineering basics
![Lab 07]() Your first ML model
Intermediate (No API key):
![Lab 10]() ML phishing detection
Ad (API key required):
![Lab 15]() LLM-powered log analysis
> All 50+ notebooks are in notebooks/ -- open any .ipynb in Colab
---
| Your Background | Start Here | Next Steps |
|-----------------|------------|------------|
| Completely new to AI? | Lab 02: Prompt Engineering | -> Lab 07 -> Lab 10 |
| New to AI/ML? | Lab 10: Phishing Classifier | -> Lab 11 -> Lab 12 |
| Know Python, want LLM tools? | Lab 15: LLM Log Analysis | -> Lab 16 -> Lab 18 |
| Want DFIR focus? | Lab 31: Ransomware Detection | -> Lab 33 -> Lab 34 |
Tip: Labs 00-13 are FREE (no API keys). LLM labs (14+) need an API key (~$5-25 total).
---
Click any lab to explore -- Your learning journey from setup to expert:
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<td align="center"><a href="./labs/lab00-en/"><img src=" alt="Lab 00"/></a></td>
<td align="center"><a href="./labs/lab01-python-security-fundamentals/"><img src=" alt="Lab 01"/></a></td>
<td align="center"><a href="./labs/lab02-intro-prompt-engineering/"><img src=" alt="Lab 02"/></a></td>
<td align="center"><a href="./labs/lab03-/"><img src=" alt="Lab 03"/></a></td>
<td align="center"><a href="./labs/lab04-ml-concepts-primer/"><img src=" alt="Lab 04"/></a></td>
</tr>
<tr>
<td align="center"><a href="./labs/lab05-ai-in-security-operations/"><img src=" alt="Lab 05"/></a></td>
<td align="center"><a href="./labs/lab06-/"><img src=" alt="Lab 06"/></a></td>
<td align="center"><a href="./labs/lab07-hello-world-ml/"><img src=" alt="Lab 07"/></a></td>
<td align="center"><a href="./labs/lab08-working-with-apis/"><img src=" alt="Lab 08"/></a></td>
<td align="center"><a href="./labs/lab09-ctf-fundamentals/"><img src=" alt="Lab 09"/></a></td>
</tr>
<tr>
<td align="center"><a href="./labs/lab10-phishing-classifier/"><img src=" alt="Lab 10"/></a></td>
<td align="center"><a href="./labs/lab11-malware-clustering/"><img src=" alt="Lab 11"/></a></td>
<td align="center"><a href="./labs/lab12-anomaly-detection/"><img src=" alt="Lab 12"/></a></td>
<td align="center"><a href="./labs/lab13-ml-/"><img src=" alt="Lab 13"/></a></td>
<td align="center"><a href="./labs/lab14-first-ai-agent/"><img src=" alt="Lab 14"/></a></td>
</tr>
<tr>
<td align="center"><a href="./labs/lab15-llm-log-analysis/"><img src=" alt="Lab 15"/></a></td>
<td align="center"><a href="./labs/lab16-threat-intel-agent/"><img src=" alt="Lab 16"/></a></td>
<td align="center"><a href="./labs/lab17-embeddings-/"><img src=" alt="Lab 17"/></a></td>
<td align="center"><a href="./labs/lab18-security-rag/"><img src=" alt="Lab 18"/></a></td>
<td align="center"><a href="./labs/lab19-binary-basics/"><img src=" alt="Lab 19"/></a></td>
</tr>
<tr>
<td align="center"><a href="./labs/lab20-sigma-fundamentals/"><img src=" alt="Lab 20"/></a></td>
<td align="center"><a href="./labs/lab21-yara-generator/"><img src=" alt="Lab 21"/></a></td>
<td align="center"><a href="./labs/lab22-/"><img src=" alt="Lab 22"/></a></td>
<td align="center"><a href="./labs/lab23-detection-pipeline/"><img src=" alt="Lab 23"/></a></td>
<td align="center"><a href="./labs/lab24-monitoring-ai-systems/"><img src=" alt="Lab 24"/></a></td>
</tr>
<tr>
<td align="center"><a href="./labs/lab25-dfir-fundamentals/"><img src=" alt="Lab 25"/></a></td>
<td align="center"><a href="./labs/lab26-windows-e/"><img src=" alt="Lab 26"/></a></td>
<td align="center"><a href="./labs/lab27-windows-registry-forensics/"><img src=" alt="Lab 27"/></a></td>
<td align="center"><a href="./labs/lab28-li/"><img src=" alt="Lab 28"/></a></td>
<td align="center"><a href="./labs/lab29-ir-copilot/"><img src=" alt="Lab 29"/></a></td>
</tr>
<tr>
<td align="center"><a href="./labs/lab30-ransomware-fundamentals/"><img src=" alt="Lab 30"/></a></td>
<td align="center"><a href="./labs/lab31-ransomware-detection/"><img src=" alt="Lab 31"/></a></td>
<td align="center"><a href="./labs/lab32-ransomware-simulation/"><img src=" alt="Lab 32"/></a></td>
<td align="center"><a href="./labs/lab33-memory-forensics-ai/"><img src=" alt="Lab 33"/></a></td>
<td align="center"><a href="./labs/lab34-c2-traffic-analysis/"><img src=" alt="Lab 34"/></a></td>
</tr>
<tr>
<td align="center"><a href="./labs/lab35-lateral-mo/"><img src=" alt="Lab 35"/></a></td>
<td align="center"><a href="./labs/lab36-threat-actor-profiling/"><img src=" alt="Lab 36"/></a></td>
<td align="center"><a href="./labs/lab37-ai-powered-threat-actors/"><img src=" alt="Lab 37"/></a></td>
<td align="center"><a href="./labs/lab38-ml-security-intro/"><img src=" alt="Lab 38"/></a></td>
<td align="center"><a href="./labs/lab39-ad/"><img src=" alt="Lab 39"/></a></td>
</tr>
<tr>
<td align="center"><a href="./labs/lab40-llm-security-testing/"><img src=" alt="Lab 40"/></a></td>
<td align="center"><a href="./labs/lab41-model-monitoring/"><img src=" alt="Lab 41"/></a></td>
<td align="center"><a href="./labs/lab42-fine-tuning-security/"><img src=" alt="Lab 42"/></a></td>
<td align="center"><a href="./labs/lab43-rag-security/"><img src=" alt="Lab 43"/></a></td>
<td align="center"><a href="./labs/lab44-cloud-security-fundamentals/"><img src=" alt="Lab 44"/></a></td>
</tr>
<tr>
<td align="center"><a href="./labs/lab45-cloud-security-ai/"><img src=" alt="Lab 45"/></a></td>
<td align="center"><a href="./labs/lab46-container-security/"><img src=" alt="Lab 46"/></a></td>
<td align="center"><a href="./labs/lab47-ser/"><img src=" alt="Lab 47"/></a></td>
<td align="center"><a href="./labs/lab48-cloud-ir-automation/"><img src=" alt="Lab 48"/></a></td>
<td align="center"><a href="./labs/lab49-llm-red-teaming/"><img src=" alt="Lab 49"/></a></td>
</tr>
<tr>
<td align="center"><a href="./labs/lab50-purple-team-ai/"><img src=" alt="Lab 50"/></a></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
Legend: Grey Foundation (00-09, Free) | Green ML Foundations (10-13, Free) | Purple LLM Basics (14-18) | Orange Detection/DFIR (19-29) | Red Ad/Cloud (30-50)
<details>
<summary><strong>Detailed Lab Descriptions</strong></summary>
| Lab | Topic | Description |
|-----|-------|-------------|
| 00 | Setup | En configuration |
| 01 | Python | Security-focused Python basics |
| 02 | Prompts | LLM basics with free playgrounds |
| 03 | Vibe Coding | AI assistants for accelerated learning |
| 04 | ML Intro | Supervised/unsupervised, features, e |
| 05 | AI in SOC | Where AI fits, human-in-the-loop |
| 06 | Stats | Matplotlib, Seaborn for dashboards |
| 07 | Hello ML | Your first ML model end-to-end |
| 08 | APIs | REST APIs, authentication, rate limiting |
| 09 | CTF Fundamentals | CTF mindset, encoding, flag hunting |
| Lab | Topic | Description |
|-----|-------|-------------|
| 10 | Phishing | TF-IDF, Random Forest, classification |
| 11 | Malware | K-Means, DBSCAN, clustering binaries |
| 12 | Anomaly | Isolation Forest, LOF, baselines |
| 13 | ML vs LLM | When to use each, cost tradeoffs |
| Lab | Topic | Description |
|-----|-------|-------------|
| 14 | Agent | ReAct pattern, tool calling basics |
| 15 | Logs | Prompt engineering, IOC extraction |
| 16 | Intel | LangChain, autonomous in |
| 17 | | Embeddings, similarity search |
| 18 | RAG | ChromaDB, retrie Q&A |
| Lab | Topic | Description |
|-----|-------|-------------|
| 19 | Binary | PE structure, entropy analysis |
| 20 | Sigma | Log-based detection rules |
| 21 | YARA | AI-assisted rule generation |
| 22 | Vuln | CVSS, risk prioritization |
| 23 | Pipeline | ML filtering + LLM enrichment |
| 24 | Monitor | Obser, cost tracking |
| 25 | DFIR | Forensics basics, e collection |
| 26 | Windows Logs | Event log parsing, detection |
| 27 | Registry | Registry forensics, persistence |
| 28 | Live IR | Li, triage procedures |
| 29 | IR Bot | Con IR, playbook execution |
| 30 | Ransom Fund | Ransomware families, attack lifecycle |
| 31 | Ransom | Entropy, beha detection |
| 32 | Purple | Safe ad emulation |
| 33 | Memory | , process injection |
| 34 | C2 | Beaconing, DNS tunneling, JA3 |
| 35 | Lateral | Auth anomalies, graph paths |
| Lab | Topic | Description |
|-----|-------|-------------|
| 36 | Actors | TTP extraction, attribution |
| 37 | AI Threat | Deepfakes, AI-generated phishing |
| 38 | MLSec | Data poisoning, model security |
| 39 | Adv ML | E attacks, robust defenses |
| 40 | LLM Security | Prompt injection testing, jailbreaks |
| 41 | Model Monitor | Drift detection, ad inputs |
| 42 | Tuning | LoRA, custom embeddings |
| 43 | RAG Security | KB poisoning, context sanitization |
| 44 | Cloud Fund | Shared responsibility, IAM |
| 45 | Cloud | AWS/Azure/GCP, CloudTrail |
| 46 | Container | Kubernetes, runtime detection |
| 47 | Ser | Lambda, event injection |
| 48 | Cloud IR | Automated containment, e |
| 49 | Red Team | Prompt injection, jailbreaks |
| 50 | Purple AI | Automated attack simulation |
</details>
---
| Project | Difficulty | Focus |
|---------|------------|-------|
| Security Analyst Copilot | Ad | LLM agents, IR automation |
| Automated Threat Hunter | Ad | ML detection, pipelines |
| Malware Analysis Assistant | Intermediate | Static analysis, YARA |
| Intel Platform | Intermediate | RAG, prioritization |
Each includes starter code, requirements, and e criteria. See capstone-projects/.
---
| Requirement | Minimum | Recommended |
|-------------|---------|-------------|
| Python | 3.10 | 3.10-3.12 (PyTorch not yet a for 3.13+) |
| RAM | 8GB | 16GB (for local LLMs) |
| OS | Windows, macOS, Linux | Any |
| Editor | Any | VS Code, Cursor, PyCharm |
| Git | Required | - |
| Docker | Optional | For containerized labs |
| API Key | Labs 14+ only | Free tiers a |
A services: Jupyter Lab, Elasticsearch, Kibana, PostgreSQL, Redis, MinIO, Ollama (local LLMs), ChromaDB (). Start only what you need — see docker/README.md for service profiles.
> Python 3.10, 3.11, or 3.12 required. Python 3.13 is experimental. Python 3.14 is not supported — it causes resolution-too-deep errors because PyTorch, LangChain, and other packages lack 3.14 wheels. Check with python -- before proceeding.
<details>
<summary><strong>Dependency install failing?</strong></summary>
If pip install hangs or fails with resolution-too-deep:
1. Check Python — must be 3.10-3.12 (python --)
2. Try uv (faster resolver): pip install uv && uv pip install -r requirements.txt
3. Install selectively: pip install -e ".[anthropic]" instead of the full requirements.txt
See Troubleshooting Guide for details.
</details>
| | Description | Required |
|----------|-------------|----------|
| ANTHROPIC_API_KEY | Claude API | One LLM key required |
| OPENAI_API_KEY | GPT-4/5 API | One LLM key required |
| GOOGLE_API_KEY | Gemini API | One LLM key required |
| | | Optional |
> You only need ONE LLM provider. All labs support multiple pro.
---
| Resource | Description |
|----------|-------------|
| En Setup | First-time setup |
| AI for Security Leaders | Exec/manager guide: invest, measure, govern AI |
| API Keys Guide | Get API keys, manage costs |
| Troubleshooting | Fix common issues |
| Lab Walkthroughs | Step-by-step solutions |
| Role-Based Paths | SOC, IR, hunting paths |
| Security-to-AI Glossary | AI terms for security folks |
| All Guides | 28 guides: tools, APIs, ad |
Issues? Open a GitHub issue
| Category | Tools |
|----------|-------|
| LLM Pro | Claude (Sonnet/Opus/Haiku), GPT-5, Gemini 3, Ollama |
| LLM Frameworks | LangChain, LangGraph, LiteLLM |
| ML/AI | scikit-learn, PyTorch, Transformers |
| DB | ChromaDB, sentence-transformers |
| Security | YARA, Sigma, MITRE ATT&CK, pefile |
| Vibe Coding | Cursor, Claude Code, Copilot, Windsurf |
---
Created by Raymond DePalma
![LinkedIn]()
---
Contributions welcome! Please read CONTRIBUTING.md first.
---
AI for the Win is dual-licensed for maximum flexibility:
| Content Type | License | Personal Use | Commercial Use |
|--------------|---------|--------------|----------------|
| Educational content, labs, docs | CC BY-NC-SA 4.0 | ✅ FREE | Requires license |
| Code samples and scripts | MIT | ✅ FREE | ✅ FREE |
View Commercial Licensing Options | Contact Raymond DePalma
---
"AI for the Win" is a trademark of Raymond DePalma. You may reference this project by name with attribution, but may not use it in competing training programs or in ways that suggest official affiliation.
See LICENSE for complete terms.
---
Some labs and CTF challenges include sample malware metadata, IOC patterns, or simulated attack artifacts that may trigger antivirus software. These files contain analysis data for educational purposes, not actual malware.
Paths to exclude in your antivirus software:
ai_for_the_win/ - The entire repository (recommended)ctf-challenges/**/challenge/ - CTF challenge files with simulated web shells, persistence mechanismslabs/lab21-yara-generator/data/ - Malware metadata for YARA rule generationdata/malware/ - Sample malware analysis artifactsAdd folder exclusions for these paths in your A if files are being quarantined.
This project aims to be accessible to all learners:
If you encounter accessibility issues, please open an issue.
---
> Responsible Use: This material is for defensi education only. Do not use techniques described here for unauthorized access or attacks. See RESPONSIBLE_USE.md.
> This is a personal educational project created and maintained on personal time. It is not affiliated with, endorsed by, or sponsored by any employer, organization, or .
---
<p align="center">
<b>Ready to build AI-powered security tools?</b><br>
<a href=" in Colab</a> |
<a href="./labs/lab00-en/">Local Setup</a> |
<a href="./docs/ai-security-training-program.md">Full Curriculum</a>
</p>
开发语言:Python
Star 数:163
该项目属于CTF思路方向的开源资源,代码结构清晰,适合安全研究人员学习参考。项目围绕Build AI-powered security tools. 50+ hands-on labs covering ML, LLMs, RAG, threat detection, DFIR, and red teaming. Includes Colab notebooks, Docker environment, and CTF challenges.展开,提供了可运行的实现,对理解相关安全机制、工具原理与攻防技术具有较高的研究价值。
从技术实现角度看,此类项目的核心在于对底层原理的深入理解与工程化落地。开发者在研究过程中可以结合官方文档与社区讨论,梳理项目的初始化流程、核心模块职责与数据流转,逐步掌握其中的技术细节与设计思路。
1. 下载源码压缩包,解压到本地环境。
2. 根据项目类型准备对应的运行环境与依赖。
3. 按照 README 中的步骤完成配置与部署。
4. 在隔离的测试环境中运行验证,避免影响生产系统。
本资源来源于开源社区,仅供安全研究、技术学习与合法授权范围内的攻防演练使用,请勿用于任何非法或侵害他人权益的用途。使用本项目产生的一切后果由使用者自行承担。
| 资源标题 | ai_for_the_win - 构建人工智能驱动的安全工具。50多个动手实验室 |
| 所属分类 | CTF思路 |
| 发布作者 | admin |
| 发布时间 | 2026-10-05 23:48:40 |
| 下载权限 | 免费下载 |
| 附件数量 | 2 个下载链接 |
| 浏览次数 | 356 |
| 讨论数量 | 0 |
| 主题状态 | 正常讨论中 |