Skip to content

Adarsh-S-R/web-pentest-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web Pentesting Playground

A deliberately vulnerable web application designed for practicing web security testing and bug bounty hunting. This project includes multiple common web vulnerabilities, such as SQL Injection, IDOR, XSS, Open Redirects, and Insecure File Uploads.

🚀 Live Demo

Web Pentest Playground

⚠️ Note: Render uses Cloudflare security, which may block SQL injection attempts with an error: "Sorry, you have been blocked. This website is using a security service to protect itself from online attacks."

🛠️ Installation

For unrestricted testing, it's recommended to run the project locally:

git clone https://github.com/adarsh-s-r/web-pentest-playground.git
cd web-pentest-playground
pip install -r requirements.txt
python app.py

The application will be available at http://127.0.0.1:5000

📌 Features & Vulnerabilities

✅ User Authentication

  • Users must register manually (no pre-existing admin account)
  • Login form vulnerable to SQL Injection

✅ Stored & Reflected XSS

  • Comments section vulnerable to unsanitized JavaScript execution

✅ Open Redirect

  • Redirect users to external sites via /redirect?url=<target>

✅ Insecure File Upload

  • Allows arbitrary file uploads including .php files

✅ Admin Panel

  • Any registered user with the username admin has admin privileges

🔎 Testing the Vulnerabilities

🛑 SQL Injection (Login Bypass)

  • Endpoint: /login
  • Payload:
admin' -- 
  • Effect: Logs in as admin without a valid password (if an admin user exists)

🛑 IDOR (Insecure Direct Object Reference)

  • Endpoint: /view_users
  • Exploit: A normal user can access this page and then navigate to /admin_dashboard

🛑 XSS (Stored Cross-Site Scripting)

  • Endpoint: /comment
  • Payload:
<script>alert('Hacked!')</script>
  • Effect: The script will execute when viewing the comments

🛑 Open Redirect

  • Endpoint: /redirect?url=https://evil.com
  • Effect: Redirects the user to an external malicious site

🛑 Insecure File Upload

  • Endpoint: /upload
  • Exploit: Upload a malicious PHP file and execute it via /uploads/malicious.php

📝 Important Notes

  • There is no pre-existing admin account. You must register an admin user manually (e.g., admin:admin123)
  • The app is intentionally vulnerable, do NOT deploy it in a production environment

🚨 Disclaimer

This project is for educational purposes only. Do NOT deploy this on a live server without proper security measures.

📜 License

MIT License. Feel free to use, modify, and learn from it! 😊

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors