04 - SQL injection attack, querying the database type and version on MySQL and Microsoft
Given : Injection point (Product category) , Database (MySQL/Microsoft)
End goal : Display the database version
Start the lab by clicking on the ACCESS THE LAB button
As usual , intercept the request in burp suit and click on the any category and then the intercepted request looks like :
This lab is similer to the previous lab. Putting the single quote gives 500 error which indicate the possibility of sqli. Then use order by method to find the number of the columns in the table. This lab also contain 2 columns in the table because ORDER BY 3 gives 500 error :
So the possible query that can be injected would be UNION SELECT @@version,NULL--
:
Note : Space at the end of comment which is require in MySql
Lab solved :