Welcome to the Vulnerability Scanner repository! This project is designed as a hands-on learning resource for understanding and experimenting with common web vulnerabilities. The centerpiece is the interactive playground located in the /demos directory, which features real vulnerable code examples you can run and study.
⚠️ Warning: This project is still a Work in Progress (WIP). Some payloads, as well as features like the playground/XSS playground, are still buggy or unreliable. The playground itself may not always behave as expected. Expect ongoing changes and improvements, and use with caution.
- Project Overview
- Folder Structure
- Playground:
/demos - How to Use the Project
- Learning Recommendations
- License
This repository provides practical demonstrations of common web vulnerabilities including SQL Injection, Cross-Site Scripting (XSS), Broken Access Control, and Command Injection. By running and interacting with these demos, you can learn how such vulnerabilities work and how attackers might exploit them.
The main folders and files relevant to learning and experimentation are:
/demos/
demo.py
/sqli_demos/
sqli_demo_login.py
sqli_demo_search.py
/xss_demos/
reflected_xss_demo.py
stored_xss_demo.py
/broken_access_control/
broken_acces_admin_demo.py
idor_demo.py
/command_Injection/
command_injection_demo.py
/templates/
*.html (templates for the demos)
demos/demo.py: Entry point for the playground web app.demos/sqli_demos/: Demos for SQL injection vulnerabilities.demos/xss_demos/: Demos for XSS vulnerabilities (reflected and stored).demos/broken_access_control/: Demos for broken access control (admin bypass & IDOR).demos/command_Injection/: Demo for command injection.templates/: HTML templates for the demo web pages.
The /demos directory contains a Flask application composed of multiple vulnerable blueprints. Each blueprint focuses on a specific class of vulnerability and exposes endpoints you can interact with via a browser.
- SQL Injection:
sqli_demo_login.py: Simulates a login system vulnerable to SQLi.sqli_demo_search.py: Product/user search vulnerable to SQLi.
- Cross-Site Scripting (XSS):
reflected_xss_demo.py: Basic reflected XSS.stored_xss_demo.py: Simple stored XSS in comments.
- Broken Access Control:
broken_acces_admin_demo.py: Role-based admin access check.idor_demo.py: Insecure direct object reference (profile access by ID).
- Command Injection:
command_injection_demo.py: Unsafe ping utility allowing command injection.
-
Install dependencies (ensure you are in the root of the project):
pip install -r requirements.txt
-
Start the demo playground:
python demos/demo.py
-
Open your browser and navigate to
http://localhost:5000/ -
Browse the endpoints:
/: SQLi login/search: SQLi search/reflected: Reflected XSS/stored: Stored XSS/admin: Broken access control (admin panel)/profile/<id>: IDOR/ping: Command injection
The /templates directory contains the HTML files rendered by the Flask endpoints. You can edit these to experiment with how vulnerabilities are presented and exploited.
- Explore the vulnerable endpoints in your browser.
- Interact with forms and inputs as a normal user would.
- Try attack payloads (e.g.,
' OR 1=1--,<script>alert(1)</script>, etc.) to see how vulnerabilities are exposed. - Modify the code to experiment with fixes and improvements.
- Use the source code as a reference for how not to code securely.
- Tinker with each demo to understand how the vulnerabilities work.
- Try to exploit each one using typical attack payloads.
- Read the Python source files and templates to see how insecure coding leads to vulnerabilities.
- Challenge yourself to patch the code and make the endpoints secure.
This project is licensed under the MIT License. See LICENSE for details.
Have fun learning and hacking—ethically!