SecurityWithAdarsh/OWASP-Top10-Labs

GitHub: SecurityWithAdarsh/OWASP-Top10-Labs

一套基于 OWASP Top 10 (2021) 的实战安全学习实验室,提供完整的漏洞利用、检测及修复指导。

Stars: 1 | Forks: 0

# 🔐 OWASP Top 10 Labs — 实战 Web 应用安全

## 📌 这个仓库是什么? 本仓库包含 **10 个结构化的实验模块**,每个模块对应一个 OWASP Top 10 (2021) 漏洞类别。每个实验包含: - 📖 **概念** — 什么是漏洞以及为什么会产生漏洞 - 🧪 **实验环境搭建** — 环境、前置条件、目标应用 - ⚔️ **攻击演练** — 带有命令的逐步利用过程 - 🔍 **检测** — 日志模式、Burp Suite 技巧、SIEM 查询 - 🛡️ **修复方案** — 安全代码片段与加固指南 - 🗺️ **MITRE ATT&CK 映射** — 映射到相关技术 ## 🗂️ 仓库结构 ``` OWASP-Top10-Labs/ ├── labs/ │ ├── A01-Broken-Access-Control/ │ ├── A02-Cryptographic-Failures/ │ ├── A03-Injection/ │ ├── A04-Insecure-Design/ │ ├── A05-Security-Misconfiguration/ │ ├── A06-Vulnerable-Components/ │ ├── A07-Identification-Authentication-Failures/ │ ├── A08-Software-Data-Integrity-Failures/ │ ├── A09-Security-Logging-Monitoring-Failures/ │ └── A10-SSRF/ ├── dvwa-labs/ # DVWA-specific walkthroughs ├── tools/ # Helper scripts (Python, Bash) ├── checklists/ # Quick pentest checklists per category ├── reports/ # Sample pentest report templates └── README.md ``` ## 📋 实验索引 | # | OWASP ID | 漏洞 | 平台 | 难度 | 状态 | |---|----------|---------------|----------|------------|--------| | 1 | A01:2021 | [访问控制失效](./labs/A01-Broken-Access-Control/README.md) | DVWA + WebGoat | 🟢 初级 | ✅ 已完成 | | 2 | A02:2021 | [加密机制失效](./labs/A02-Cryptographic-Failures/README.md) | DVWA + Custom | 🟡 中级 | ✅ 已完成 | | 3 | A03:2021 | [注入 (SQLi + XSS + CMDi)](./labs/A03-Injection/README.md) | DVWA + SQLMap | 🟢 初级 | ✅ 已完成 | | 4 | A04:2021 | [不安全设计](./labs/A04-Insecure-Design/README.md) | Juice Shop | 🟡 中级 | ✅ 已完成 | | 5 | A05:2021 | [安全配置错误](./labs/A05-Security-Misconfiguration/README.md) | Custom + Nikto | 🟢 初级 | ✅ 已完成 | | 6 | A06:2021 | [脆弱和过时的组件](./labs/A06-Vulnerable-Components/README.md) | Custom + CVE | 🟡 中级 | ✅ 已完成 | | 7 | A07:2021 | [身份识别和认证失效](./labs/A07-Identification-Authentication-Failures/README.md) | DVWA + Burp | 🟢 初级 | ✅ 已完成 | | 8 | A08:2021 | [软件和数据完整性失效](./labs/A08-Software-Data-Integrity-Failures/README.md) | Custom + JWT | 🔴 高级 | ✅ 已完成 | | 9 | A09:2021 | [安全日志和监控失效](./labs/A09-Security-Logging-Monitoring-Failures/README.md) | Splunk + DVWA | 🟡 中级 | ✅ 已完成 | | 10 | A10:2021 | [服务端请求伪造 (SSRF)](./labs/A10-SSRF/README.md) | WebGoat + Custom | 🔴 高级 | ✅ 已完成 | ## 🛠️ 实验环境搭建 ### 选项 1:DVWA(推荐用于 A01, A02, A03, A07) ``` # 使用 Docker(最简单) docker pull vulnerables/web-dvwa docker run -d -p 80:80 vulnerables/web-dvwa # 访问 http://localhost/ # 默认凭据:admin / password # 设置安全级别:随着进度选择 Low(起步)、Medium、High ``` ### 选项 2:OWASP Juice Shop (A04, A05) ``` docker pull bkimminich/juice-shop docker run -d -p 3000:3000 bkimminich/juice-shop # 访问 http://localhost:3000 ``` ### 选项 3:OWASP WebGoat (A01, A08, A10) ``` docker pull webgoat/webgoat docker run -d -p 8080:8080 -p 9090:9090 webgoat/webgoat # 访问 http://localhost:8080/WebGoat ``` ### 必备工具 ``` # Burp Suite Community Edition https://portswigger.net/burp/communitydownload # SQLMap pip install sqlmap # 或:sudo apt install sqlmap # FFUF (Fuzzer) go install github.com/ffuf/ffuf/v2@latest # 或:sudo apt install ffuf # Nikto sudo apt install nikto # Python 3(用于辅助脚本) sudo apt install python3 python3-pip ``` ## 🎯 如何使用这些实验 1. **从 A03 (注入) 开始** — 最直观,有助于建立自信 2. **按照 A01 → A10 的顺序**进行系统化学习 3. 每个实验都有 **低 / 中 / 高** 难度的渐进过程(DVWA 安全级别) 4. 完成 **检测部分** — 这是让你在 SOC/AppSec 面试中脱颖而出的关键 5. 阅读 **修复代码** — 理解安全应该是什么样子的 ## 🧰 实验中使用的工具 | 工具 | 用途 | 实验 | |------|---------|------| | Burp Suite Community | HTTP 拦截、模糊测试、重发 | A01, A02, A07, A08, A10 | | SQLMap | 自动化 SQL 注入 | A03 | | FFUF | 目录/路径模糊测试 | A01, A05 | | Nikto | Web 服务器配置错误扫描 | A05 | | jwt.io | JWT token 分析 | A08 | | CyberChef | 解码、哈希、加密分析 | A02 | | Python (requests) | 自定义漏洞利用脚本 | A03, A10 | | Splunk (免费版) | 日志分析与检测 | A09 | ## 🗺️ Web 版 MITRE ATT&CK — 覆盖图 | OWASP ID | ATT&CK 技术 | 战术 | |----------|------------------|--------| | A01 | T1548 — Abuse Elevation Control Mechanism | Privilege Escalation | | A02 | T1552 — Unsecured Credentials | Credential Access | | A03 | T1190 — Exploit Public-Facing Application | Initial Access | | A04 | T1068 — Exploitation for Privilege Escalation | Privilege Escalation | | A05 | T1592 — Gather Victim Host Information | Reconnaissance | | A06 | T1190 — Exploit Public-Facing Application | Initial Access | | A07 | T1110 — Brute Force | Credential Access | | A08 | T1195 — Supply Chain Compromise | Initial Access | | A09 | T1562 — Impair Defenses | Defense Evasion | | A10 | T1090 — Proxy | Command & Control | ## 📝 示例报告模板 一个专业的渗透测试报告模板(基于真实格式)位于 [`/reports/OWASP-Pentest-Report-Template.md`](./reports/OWASP-Pentest-Report-Template.md)。 ## 📚 学习路径 ``` Beginner Path: A03 (SQLi) → A07 (Auth) → A01 (Access Control) → A05 (Misconfig) Intermediate Path: A02 (Crypto) → A04 (Design) → A06 (Components) → A09 (Logging) Advanced Path: A08 (Integrity / JWT) → A10 (SSRF) ``` ## 🔗 相关资源 - [OWASP Top 10 官方网站 (2021)](https://owasp.org/Top10/) - [DVWA GitHub](https://github.com/digininja/DVWA) - [PortSwigger Web 安全学院](https://portswigger.net/web-security) - [TryHackMe — OWASP Top 10 房间](https://tryhackme.com/room/owasptop10) - [HackTheBox — Web 挑战](https://app.hackthebox.com/) ## 👥 关于作者 **Adarsh Singh** — DevSecOps 工程师 | AppSec | OT/ICS 安全 - 🔗 [LinkedIn](https://linkedin.com/in/adarsh-singh-cybersecurity/) - 🐙 [GitHub](https://github.com/SecurityWithAdarsh) - 🎯 TryHackMe:全球前 5% - 📧 欢迎探讨 SOC 分析师、渗透测试和 AppSec 相关机会 ## ⚠️ 法律免责声明

⭐ 如果这个仓库对你有帮助,请点个 Star — 并在 LinkedIn 上与我交流!

标签:CISA项目, MISP, OPA, OWASP Top 10, Web安全, 安全培训, 应用安全, 数据泄露, 蓝队分析, 请求拦截, 逆向工具, 靶场