
项目说明
🛡️ Cyber Battleground
A full-stack, hands-on cybersecurity simulation platform for learning, teaching, and demonstrating both offensive and defensive web security.
Built for education, demos, and real-world security awareness.
---
Web Application
<img width="1513" height="1084" alt="Screenshot 2025-07-18 134946" src=" />
Attack Dashboard
<img width="1622" height="1066" alt="Screenshot 2025-07-18 134953" src=" />
Defense Dashboard
<img width="1772" height="1087" alt="Screenshot 2025-07-18 135003" src=" />
🚩 What is Cyber Battleground?
Cyber Battleground is an intentionally web application and security lab. It provides a safe, interacti to:
Explore and exploit real-world web (SQL Injection, XSS, brute-force, file upload, command injection)Launch and obser via a custom Attack DashboardMonitor, detect, and block attacks in real time with a professional Defense DashboardLearn best practices and mitigation strategies for each , with in-app explanations> ⚠️ WARNING: This project is intentionally insecure.
> Ne to a public server. Use only in isolated, local, or educational en.
---
✨ Features
Web Application
Built with Express (Node.js) and SQLiteClassic : -
SQL Injection (login)
-
Cross-Site Scripting (XSS) (comments)
-
Brute-force (login)
-
Un File Upload -
Command InjectionEach page includes: - A right-side card explaining the , example attacks, and mitigation strategies
- A prominent warning banner
Attack Dashboard
Modern, card-based UI with a dark hacker themeEach attack (SQLi, brute-force, XSS, file upload, command injection) is an independent cardManual and auto-attack buttons (auto-attack is rate-limited)All attack scripts are Python-based, modular, and easy to extendDefense Dashboard
Blue team theme, card-based layoutLi Per Minute chart (shows all real requests, smoothed, always )Recent Requests table (last 5, with modal for full stream, attacks highlighted)Detected Attacks (last 5 unique, deduplicated by endpoint/type/timestamp, attacks highlighted)Blocked IPs section with unblock buttonClear Detections button to fully clear detection logs from both UI and backendNote at the top about localhost IPsOnly real user/attack activity is shown; /api/*, /attack/*, /favicon.ico are filtered outDetection & Defense Logic
Detects SQLi, XSS, brute-force login, malicious file upload (by extension), and command injection (by shell metacharacters)All detected attacks are shown in the dashboard and highlighted in the chart and tablesBackend and frontend deduplication prevent duplicate detections from appearingAuto-blocking for SQLi, XSS, and brute-force attacksOther Features
Educational content: Every is explained with examples and defensesBeautiful, modern UI: Green (web), red (attack), blue (defense) themesAll logs, attacks, and blocks are fully synchronized between memory and storageDebug endpoints and logs for de and demo purposesResponsi UI/UX---
🛠️ Getting Started
1. Clone the Repo
2. Install Node.js Dependencies
Node.js: v18.x or laterExpress: ^4.18.2sqlite3: ^5.1.6body-parser: ^1.20.2multer: ^1.4.5-lts.13. Install Python Requirements
Python: 3.8+requests: >=2.25.04. Run the App
5. Open in Browser
Home: Website: Attack Dashboard: Defense Dashboard: ---
🧑💻 Usage & Educational Value
Try each : Read the right-side card for a detailed explanation and mitigation.Attack: Use the Attack Dashboard to launch SQLi, brute-force, XSS, file upload, and command injection attacks (manual or auto).Defend: Watch the Defense Dashboard detect, log, and block attacks in real time. Block/unblock IPs, see li, and learn how blue teams operate.Learn: Every page is a mini-lesson in web security, with real code and real consequences.---
🔍 Details of Each Component
Web App
/login.html: SQL Injection and brute-force login form/comments.html: XSS- comment section/upload.html: Un file upload/cmd.html: Command injection inputEducational cards: Each page explains the , how to exploit it, and how to defendAttack Dashboard
SQL Injection: Manual and auto attack forms, Python script for automated exploitationBrute-force: Password list attack, Python scriptXSS: Payload injection, Python scriptFile Upload: Malicious file upload, Python scriptCommand Injection: Shell metacharacter injection, Python scriptAuto-attack: Each auto-attack is rate-limited and requires explicit user actionDefense Dashboard
Li Per Minute: All real requests, not just attacks, graphed for situational awarenessRecent Requests: Last 5 real requests, attacks highlighted, modal for full streamDetected Attacks: Last 5 unique attacks, deduplicated, attacks highlightedBlocked IPs: List of blocked IPs, with unblock buttonClear Detections: Button to clear all logs and detectionsFiltering: Only real user/attack activity is shown; /api/*, /attack/*, /favicon.ico are filtered outDetection Logic
SQL Injection: Detected by common SQLi patterns in login requestsXSS: Detected by script tags and event handlers in commentsBrute-force: Detected by repeated failed logins from the same IPMalicious File Upload: Detected by dangerous file extensionsCommand Injection: Detected by shell metacharacters in command inputDeduplication: Both backend and frontend deduplicate attacks by endpoint/type/timestampAuto-blocking: Offending IPs are blocked for SQLi, XSS, and brute-force---
🤝 How to Contribute
This project is a work in progress and a community learning tool.
Feature ideas? Open an issue or pull request!Found a bug? File an issue with steps to reproduce.Want to add new , attacks, or defenses? Fork and PR!Educators: Suggest content, labs, or integrations.Designers: Help us make it even more beautiful and accessible.Security pros: Review, test, and help us keep the project realistic and up-to-date.> We welcome all contributions, feedback, and collaborators!
---
📚 License & Credits
MIT LicenseInspired by OWASP Juice Shop, DVWA, and the broader security community---
💡 Contact & Community
GitHub IssuesBuy Me a Coffee (BMAC)GitHub: flatmarstheory---
Let’s build the best open-source cybersecurity battleground together!
项目信息
开发语言:HTML
Star 数:8
技术要点
该项目属于防护思路方向的开源资源,代码结构清晰,适合安全研究人员学习参考。项目围绕A full-stack, hands-on cybersecurity simulation platform for learning, teaching, and demonstrating both offensive and defensive web security.展开,提供了可运行的实现,对理解相关安全机制、工具原理与攻防技术具有较高的研究价值。
从技术实现角度看,此类项目的核心在于对底层原理的深入理解与工程化落地。开发者在研究过程中可以结合官方文档与社区讨论,梳理项目的初始化流程、核心模块职责与数据流转,逐步掌握其中的技术细节与设计思路。
使用与学习建议
1. 下载源码压缩包,解压到本地环境。
2. 根据项目类型准备对应的运行环境与依赖。
3. 按照 README 中的步骤完成配置与部署。
4. 在隔离的测试环境中运行验证,避免影响生产系统。
免责声明
本资源来源于开源社区,仅供安全研究、技术学习与合法授权范围内的攻防演练使用,请勿用于任何非法或侵害他人权益的用途。使用本项目产生的一切后果由使用者自行承担。