Demonstrates SQL injection attacks using malicious SQL queries and SQL prevention techniques.
- In this demo, the Database Schema is displayed first
- Later, 4 sets of Login credentials are tested:
- Correct credentials present in the user database
- Wrong credentials to show the failure message
- First SQL Injection example is demonstrated
- Later the Second SQL Injection example is demonstrated
- In this demo, the Navigation bar is demonstrated
- The project is deployed as Microservices of Front-end, Server, and Database using Heroku Cloud Platfrom
- Demostrates SQL Injection in an elegant way using LAMP stack
- Follows best practices and code readability
- SQL injection is an attack used to take over database servers by dynamically poisoning SQL queries.
- SQL injection is a cybersecurity vulnerability where attackers input malicious SQL (Structured Query Language) code into a web application's input fields.
- If the application doesn't properly validate or sanitize the input, it can execute unintended database commands.
- This can lead to unauthorized access, data theft, or manipulation of the database.
- To prevent SQL injection, developers should use parameterized queries or prepared statements and validate user inputs.
- Security measures like input validation and output encoding are crucial to mitigate this risk.
- In this attack, a special SQL query is passed as user input to the login page.
- Later, when the backend code compiles the input along with the SQL query.
- The code then gets hijacked because these queries will change the meaning of the backend code.
- The SQL injection queries used for this demonstration project are:
' or 1=1--
- This query will change all the SQL statements to always be true because of the or keyword.
- And the rest of the SQL statement after
'--'
will be commented.admin' or '1'='1
- This query will change all the SQL statements and will also always be true. Because of the
or
keyword, the two expressions produce true values.
To get the project working, you need to install the following dependencies.
- T Aswin Barath https://github.com/AswinBarath