Reproduced a better article, by the heart of the big guy to write.
There are many bypass techniques for SQL injection, specific bypass techniques need to look at the specific environment, and a lot of bypass methods need to have a real environment, preferably in the process of penetration testing you encounter the environment, otherwise if you just think of yourself, it is obviously not reliable. This article is to summarize my experience in the CTF topic or infiltration of the process, the use of SQL injection bypass technique, this article with their own knowledge and ability to constantly improve, the summary of the method will be more.
1. Quote Bypass
The place where the quotation marks are used is in the final where clause. As in the following SQL statement, this is a simple statement that is used to check all the fields in the Users table.
Select column_name from Information_schema.tables where table_name="Users"
At this point, if the quotation marks are filtered, then the WHERE clause above is not available. Then it is necessary to use hex to deal with this problem.
The hexadecimal string for users is 7573657273. Then the last SQL statement becomes:
1 Select column_name from where table_name=0x7573657273
Summary: Use hexadecimal to bypass quotation marks
2, comma Bypass
When using the blinds, you need to use the substr (), Mid (), limit. These clause methods all need to use commas. Both methods for substr () and mid () can be resolved using the from-to method.
1 Select substr (database(0from1for1); 2 Select Mid (database(0from1for1);
For limit, you can use offset to bypass.
1 Select * from 0,12# is equivalent to the following SQL statement 3Select* from 10
Summary: Use from to bypass commas
3. The comparator (<,>) bypasses
Similarly, when using the blind, you need to use a comparison operator to find a binary search. If you cannot use the comparison operator, then you need to use the greatest to bypass it.
The most common one is a blind SQL statement.
1 Select * from where id=1andASCII(substr (database(),0,1 ))>
If the comparison operator is filtered and the above blind statement is not available, then you can use greatest instead of the comparison operator. The greatest (n1,n2,n3, ET) function returns the maximum value of the input parameters (N1,N2,N3, etc.).
Then the above SQL statement can use greatest to become the following clause:
1 Select * from where id=1 and Greatest (ASCII(substr (),0 ,1))=
Summary: Use greatest () to bypass the comparison operator.
Original link: http://blog.spoock.com/2016/09/04/sqli-bypass/
Reproduced Summary of SQL injection bypass techniques