#When do we need to determine the number of columns in SQLi ?

3 messages · Page 1 of 1 (latest)

mortal pecan
#

@deft pollen my message was automatically deleted but you can see it in the logs right?

deft pollen
#

sudo recover

sweet moatBOT
#
Volkan Sungar#5295

I was practicing with the PortSwigger labs when I realised while solving a Blind SQLi lab that all of the previous labs made me determine the number of columns using NULL values; so we had to keep adding NULL to the SQL query. But in the Blind SQLi lab we didn't do anything like that instead we only SELECT'ed one value in a subquery. Why didn't we need to find the number of the columns? What was different?

https://portswigger.net/web-security/sql-injection/blind/lab-conditional-responses
In this one here you can see that we never determine the number of columns instead we SELECT an arbitrary 'a' string.

https://portswigger.net/web-security/sql-injection/examining-the-database/lab-listing-database-contents-oracle
But in this one we determined the number of columns and we even determined which columns contain text data.

Why can't we just do it like the Blind one instead of doing such things?

Attachments

None