Skip to content

A simple demo showcasing SQL Injection vulnerabilities, how they work, and how to prevent them using secure coding practices. Built with Python(Flask) and SQLite for educational purposes.

Notifications You must be signed in to change notification settings

MohamedBoukthir/SQL-injection-DEMO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask SQL Injection Project

This project is a Flask web application that demonstrates SQL injection vulnerability.

Screenshots

Registration Page

This page allows users to register by providing a username, email, and password. register

Database View

This view shows the database content, which can be manipulated through SQL injection. Database

Login Page

Users can log in using their credentials. This page is vulnerable to SQL injection attacks. Login

Server Logs

The server logs show the running SQL script that gets injected by the attacker. Logs

Admin Dashboard

The hacker gains access to the admin dashboard through SQL injection. Dashboard

Setting Up the Environment

To set up a virtual environment and install the required packages, follow these steps:

  1. Create a virtual environment:

    python -m venv venv
  2. Activate the virtual environment:

    • On Windows:
      venv\Scripts\activate
    • On macOS and Linux:
      source venv/bin/activate
  3. Install the required packages:

    pip install -r requirements.txt

Running the Application

To run the application, use the following command:

flask run

Project Structure

  • app.py: Main application file containing the Flask app and database functions.
  • utils.py: Utility functions such as password hashing and key generation.
  • templates/: HTML templates for rendering web pages.
  • static/: Static files such as CSS and images.
  • requirements.txt: Project dependencies.
  • README.md: Project documentation.
  • DEMO/: Folder containing screenshots used in the README.

About

A simple demo showcasing SQL Injection vulnerabilities, how they work, and how to prevent them using secure coding practices. Built with Python(Flask) and SQLite for educational purposes.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published