SQL injection attack, listing the database contents on non-Oracle databases
Step 1: Go to the product category to ensure whether this is SQL injection vulnerable or not. If it shows ‘Internal Server error Or HTTP request 500 ‘ , it means this site is SQL injection vulnerable. Step2: To check the number of columns, we run the injection query: ‘ order by 1- - It responds to HTTP 200. That means the database has at least 1 column. ‘ order by 2- - It also responds to HTTP 200. That means the database has at least 2 columns. ‘ order by 3- - It responds to HTTP 500 & internal server errors. That means the database doesn’t contain 3 columns. It is noted that every time when we inject a vulnerable query on the category filter we have to encode the query by pressing Ctrl+U (URL encoding). Step3: To find out which database version it is, ‘UNION SELECT @@@version ,null - - It responds to 500HTTP bad requests, so we ensure that the site database doesn’t have Microsoft. version. Now you run the PostgreSQL query: Microsoft SELECT @@version Postgr...