https://github.com/dhiraviyasundaram/sql-injection-demo
A Flask app demonstrating SQL Injection vulnerability and its prevention using parameterized queries.
https://github.com/dhiraviyasundaram/sql-injection-demo
demonstration education flask parameterized-queries python security sql-injection sqlite vulnerability web-security
Last synced: about 1 month ago
JSON representation
A Flask app demonstrating SQL Injection vulnerability and its prevention using parameterized queries.
- Host: GitHub
- URL: https://github.com/dhiraviyasundaram/sql-injection-demo
- Owner: DHIRAVIYASUNDARAM
- Created: 2025-06-30T16:10:27.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-06-30T16:28:32.000Z (11 months ago)
- Last Synced: 2025-06-30T17:39:24.555Z (11 months ago)
- Topics: demonstration, education, flask, parameterized-queries, python, security, sql-injection, sqlite, vulnerability, web-security
- Language: HTML
- Homepage: http://127.0.0.1:5000/
- Size: 76.2 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🛡️ SQL Injection Demo
This repository demonstrates how SQL Injection attacks can be exploited in insecure web applications using a basic PHP-MySQL login system. It is intended strictly for **educational purposes** to help learners understand security flaws and how to prevent them.
---
## ⚠️ Disclaimer
This project is for **educational use only**. Do **not** use these techniques on real systems without proper authorization.
---
## 🚀 Getting Started
### 🛠️ Prerequisites
- PHP and MySQL (e.g., XAMPP, WAMP, MAMP)
- Web browser
---
### ⚙️ Setup Instructions
1. **Clone the repository**
```bash
git clone https://github.com/DHIRAVIYASUNDARAM/sql-injection-demo.git
```
2. **Import the Database**
- Open **phpMyAdmin** (or MySQL command line).
- Create a new database named, for example: `sqldemo`.
- Click **Import** and upload the `db.sql` file from this repository.
3. **Deploy the App Locally**
- Move the `sql-injection-demo` folder into your web server’s root directory:
- For XAMPP: `C:/xampp/htdocs/`
- For WAMP: `C:/wamp64/www/`
- Launch **XAMPP** or your preferred stack.
- Start both **Apache** and **MySQL** services.
4. **Open the application in your browser**
```
http://localhost/sql-injection-demo/
```
---
## 🧪 Demonstrating the SQL Injection
To demonstrate the vulnerability, try entering this input in the login form:
```sql
' OR '1'='1
```
This will bypass authentication and log you in without valid credentials, showcasing how SQL injection works.
---
## 🧠 Learning Outcomes
- Understand how SQL Injection compromises web apps.
- Learn the dangers of using unsanitized user input in SQL queries.
- Recognize the importance of secure coding practices like input validation and prepared statements.
---
## 🎥 Demo Video
▶️ **Watch the Screen Recording Demo of the College Club Website**
[](https://drive.google.com/file/d/1riCW5RdVJGa6UnU25Lhpl5TJjX3EnYoc/view?usp=sharing)
---