SQL Injection Fragmented knowledge

Source: Internet
Author: User


1.Order by explanation:

In the SQL language, the order BY statement is followed by a field name to sort the results of the query. But he has a special use, that is, to add a number in the back without adding a field name. When a number is added, it is sorted by the first few fields of the table. Only valid if the number is small equals the number of fields. So by this condition, you can tell how many fields exist in a table. For example, order by 10 returns to normal, and the order by 11 page returns an error, indicating that there are 10 fields in the database.

2.Union select 1,2,3,4,5,6,7,8,9,10,11 from

First of all, explain the meaning of a few numbers behind Select, 1,2,3,4 ..., here are a few numbers is purely dine, together with the Union keyword in front of the table of the number of fields, or can not be stitched into a table. At the time of SQL injection, when you replace the corresponding location with the data you want to get, the query results are displayed later. As the last line:


650) this.width=650; "class=" ikqb_img "src=" https://gss0.baidu.com/9fo3dSag_xI4khGko9WTAnF6hhy/zhidao/wh%3D600% 2c800/sign=83aa26988a025aafd36776cdcbdd875c/18d8bc3eb13533fad032f376a0d3fd1f40345be5.jpg "style=" border:0px; " alt= "18d8bc3eb13533fad032f376a0d3fd1f40345be5"/>


3. Common functions

There are a lot of functions that can be used in MySQL, such as user () database () version () to see the username of the current connection, the name of the database, and the versions of MySQL such as return 3 6 7 then you replace 3 6 7 with user () Datab ASE () version () is the Union select 1, 2, User (), 4, 5, LoadFile (), Version (), 9, 10, 11 so that the user name absolute path can be burst on the page.



SQL Injection Fragmented knowledge

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.