# Portswigger SQLi-Lab5 ## SQL injection attack, querying the database type and version on Oracle This lab is quite similar to what I have done in this previous labs , Techinically I have already solved this before like in this lab you just need to query the database and version being used so it's pretty easy , it also has the GET paramter `category` to be vulnerable to sqli. First we need to identify the number of columns so we are going to use `order by I tried to used order by 1 and 2 , it worked when I will use `order by 3` it will give an error because only 2 columns exists in the table But there's a problem , in oracle we need to include a table name or it will give us an error So what we can do is , use a dummy table called `dual` (Ignore the lab completion as I did the lab before making this writeup) Now we may need to use built in tables in order to retreive database and version, we can query the user by supplying `user` In oracale database in order to retrieve version , we need to query for `banner` from a table named `v$version` ```sql Pets' union select banner,null from v$version -- ``` With this our lab is completed !