VulnTest is a deliberately vulnerable web application designed for learning about web security. It provides a safe environment to practice identifying and exploiting common web vulnerabilities.
This application is intentionally vulnerable and should NEVER be deployed on a public server or used with real user data. It is designed for educational purposes only in a controlled local environment.
- SQL Injection: Practice bypassing authentication and extracting data
- Cross-Site Scripting (XSS): Test stored XSS attacks in comments
- Command Injection: Experiment with OS command injection in a sandboxed environment
- Broken Access Control: Test privilege escalation and insecure direct object references
- Insecure File Uploads: Learn about the dangers of unrestricted file uploads
- Python 3.8 or higher
- pip (Python package manager)
- A modern web browser
-
Clone the repository or download the source code
-
Navigate to the project directory:
cd VulnTest -
Create a virtual environment (recommended):
python -m venv venv .\venv\Scripts\activate # On Windows source venv/bin/activate # On macOS/Linux
-
Install the required packages:
pip install -r requirements.txt
-
Start the development server:
python app.py
-
Open your web browser and navigate to:
http://localhost:5000 -
Use the following default credentials to log in:
- Username:
admin - Password:
insecurepassword
- Username:
- Location: Login page
- Description: The login form is vulnerable to SQL injection, allowing authentication bypass.
- Example Payload:
- Username:
admin' -- - Password: [anything]
- Username:
- Location: Comments section
- Description: User input is not properly escaped, allowing stored XSS attacks.
- Example Payload:
<script>alert('XSS')</script>
- Location: Ping utility
- Description: The ping command is vulnerable to command injection.
- Example Payload:
8.8.8.8; whoami
- Location: Admin panel
- Description: Missing proper authorization checks allow unauthorized access to admin functionality.
- Exploit: Navigate to
/adminafter logging in as any user.
- Location: File upload page
- Description: Files can be uploaded without proper validation.
- Exploit: Upload a PHP shell or other malicious files.
This application demonstrates what NOT to do in a production environment. Always follow these security best practices:
- Input Validation: Validate and sanitize all user inputs
- Parameterized Queries: Use parameterized queries to prevent SQL injection
- Output Encoding: Always encode user-generated content before displaying it
- Access Control: Implement proper authentication and authorization
- File Uploads: Validate file types, use safe filenames, and store uploads outside the web root
- Command Execution: Avoid using user input in system commands
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
This application is for educational purposes only. The creators are not responsible for any misuse of this software. Always ensure you have proper authorization before testing security on any system.