Problem Statement :
This lab contains an SQL injection vulnerability in the product category filter. The results from the query are returned in the application’s response so you can use a UNION attack to retrieve data from other tables.
The database contains a different table called users, with columns called username and password.
To solve the lab, perform an SQL injection UNION attack that retrieves all usernames and passwords, and use the information to log in as the administrator user.
Solution:
- In order to solve this lab, I have to first figure out how can I retrieve data from other tables into one single column (Heading says retrieving multiple values in a single column).
Administrator
3kg6bba8ibuwhhz0xc0m
The URL was crafted as
' UNION SELECT NULL, CONCAT (Username, password) FROM users--
This then restored all both the tables data into single column.


Here we can see the same example in MS SQL DB. Where in CONCAT also takes care of joining A String with Integer.
