Network and Information Security Laboratory: Assignment No - 09 Title: Simulation of SQL Injection
Network and Information Security Laboratory: Assignment No - 09 Title: Simulation of SQL Injection
Network and Information Security Laboratory: Assignment No - 09 Title: Simulation of SQL Injection
Assignment No – 09
Title: Simulation of SQL Injection
PART A
SQL Injection Attack:
SQL injection is a code insertion or "injection" method, utilized to attack data-
driven applications, in which malicious SQL statements are inserted or "injected"
into an entry field for execution. A successful SQL injection exploit can read raw
data from the database, modify database data (DML/DDL/DQL), execute
administrative operations on the database etc.
The OWASP organization (Open Web Application Security Project) notes SQL injections
in their OWASP Top 10 2017 report as the number one threat to web application security.
Database: MySQL
Database Name: test_db
Table Name: users
Column Names: username, password
After adding extra inputs to the password field, the SQL Statement becomes:
SELECT * from users where username=’admin’ AND
password=’admin@123’ OR ‘a’=’a’
Next, prepare statements are used as placeholders for data rather than the data
itself. Prepare statements prevent SQL Injection as no extra information is
included in the statement.