Code Monkey home page Code Monkey logo

lbm-banking-backend's Introduction

SQL Injection Attack Demo Website


This is the back-end repository for a full-stack application I built to demonstrate how SQL Injection attacks can be performed. The code in this project has been written with deliberate vulnerabilities to SQL Injection attacks. This is primarily accomplished through a lack of parameterised queries, which enables users on the front end to maliciously retrieve data through the login page of the application.

The concept of this app is a fake banking website that deliberately lacks proper authentication and includes sql vulnerabilities on the backend. I also delivered a presentation on this project, the slides for which can be found in the link below:

Presentation Slides

How to use

Follow the link below (you may need to wait momentarily as the server wakes up)

LBM Banking

SQL Injection 1:

Try to login without a password. Type 'Username' into the username field (this is a verified username in the database). In the same field, without any spaces, append an inverted comma and two hyphens. Your username field should look look like this: Username'--

Next, fill the password field with any input you want. If you have filled the username field correctly, the database will be queried without a password. See my presentation slides for visualisation on how this works

Before you click 'Login', open the browser's console (right click -> 'Inspect' -> 'Console'). Now click 'Login' and watch what happens.

Because the authentication only requires some form of user data to be returned, you will be verified for entry, and should see the user data for the 'Username' user. Further logins could now be done with their actual password!


SQL Injection 2:

You can also break into website with absolutely zero knowledge of any user data to begin with. This time, by manipulating the conditions of the SQL query from the login page, we can retrieve all user data AND enter the website. Use the following entry for the username field to execute this: 'OR 1=1 --

Once again, the password field requires an input, but this can be anything you want.

And voila! If you check your console, you should see the data for all the users! And if you were really sneaky, you might even now login with the admin account to see if there are any extra privileges...

**DISCLAIMER: All data used in this project is completely fake and was only created for the purposes of this demonstrative application. No real user data/money is at risk in the use of this app.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.