SQLi Labs Guide
SQLi Labs Guide
Steps to Solve
1. Preparation
1. Access the Lab:
This will present a login page with a username and password field.
Username: administrator
Password: admin
Objective
Exploit a SQL injection vulnerability in the product category filter to retrieve
unreleased products.
1. Preparation
1. Access the Lab:
send it to Repeater
‘ OR 1=1- -
Lab Solved !!
Objective
Perform a SQL injection UNION attack to determine the number of columns in the
query by injecting null values. This is a foundational step to retrieve data from
other tables in subsequent labs.
. Preparation
1. Access the Lab:
in Repeater note Request body closely and add ‘ (single qutation mark) at the end
of
Request Search Parameter and send Request and note the Response to Check it
for SQL injection .
Objective
Perform a SQL injection UNION attack to identify a column compatible with string
data by injecting a random value provided by the lab. This allows further
exploitation, such as retrieving sensitive data.
1. Preparation
1. Access the Lab:
Take note of the random string value provided by the lab (e.g., abcdef ).
in Repeater check the Request body and note the Request Search/GET
parameters
Add ‘ (single qutation mark) at the end of
Request Search Parameter and send Request and note the Response to Check it
for SQL injection
Perform SQL Injection to Determine Column Count:
If the query returns an error or the string doesn’t appear in the response,
move the string to the next column and retry:
'+UNION+SELECT+NULL,'abcdef',NULL--
'+UNION+SELECT+NULL,NULL,'abcdef'--
Objective
Exploit a SQL injection vulnerability in the product category filter to retrieve data
from other tables. This lab teaches how to extract sensitive information (e.g.,
usernames and passwords) using a SQL injection UNION attack.
Preparation
1. Access the Lab:
Choose any product category from the filter (e.g., TECH Gift).
Capture the HTTP request for the selected category using Burp Suite.
Replace one NULL value in the query with the provided string (e.g., abcdef ):
If the query returns an error or the string doesn’t appear in the response,
move the string to the next column and retry:
'+UNION+SELECT+NULL,NULL,'abcdef'--
Query the users table to extract usernames and passwords. For example:
'+UNION+SELECT+username,password,NULL+FROM+users--
Objective
Exploit a SQL injection vulnerability in the product category filter to retrieve
multiple pieces of data in a single column. This attack targets an application where
the results of a query are returned in a single column of the application's
response.