【摘要】靶场:http://security.secavenue.com/此题是在渗透吧新手群发出来的,既然是靶场,那就一定有漏洞已经说明了,没有XSS,Ctrl+U查看源码,就知道确实htmlspecials()函数过滤的...
靶场:http://security.secavenue.com/
![](https://upload-images.jianshu.io/upload_images/6661013-d8a193589f5ba032.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
此题是在渗透吧新手群发出来的,
![](https://upload-images.jianshu.io/upload_images/6661013-f729c42b78be52ac.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
既然是靶场,那就一定有漏洞
已经说明了,没有XSS,Ctrl+U查看源码,就知道确实htmlspecials()函数过滤的
然后小东就直接Burp抓包,扔到sqlmap就跑出来了,如下图
![](https://upload-images.jianshu.io/upload_images/6661013-658acf77fdc68e91.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
Emmm~这不是重点,拿到flag感觉简单得有点出乎意料。。。
之后加大了难度,做了一些过滤,正好下课回来再看看
![](https://upload-images.jianshu.io/upload_images/6661013-ccc37d845d4ae1c3.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
做了过滤,那就绕过嘛,
接下来都是正常操作
先用Burpsuite抓个包儿,放到Repeater里就是一顿干!
单引号检测
![](https://upload-images.jianshu.io/upload_images/6661013-67ac0aa0e438ce09.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
完全Ojbk,假如我们现在不知道是否过滤,
因为是评论所以猜测其SQL语句为
$time=date("Y-m-d h:i:s");
$sql = "INSERT INTO表名称 (user,txt,time) VALUES ('$user','$txt','$time')";
尝试使用updatexml()函数
我们将user字段改为:admin' or updatexml(1,concat_ws(0x7e,(version())),0) or '
![](https://upload-images.jianshu.io/upload_images/6661013-871045f192d1cce8.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
Emmm~然而这就很骚了,简单替换后,发现正则过滤了 or
Tips:还有extractvalue()函数也是一样的用法。
完全Ojbk
所以接下来
你是不知道,mmp,information_schema 这个单词有 or ...
![](https://upload-images.jianshu.io/upload_images/6661013-34b0f6a6b3580a53.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![](https://upload-images.jianshu.io/upload_images/6661013-67a5dab1e9b835e0.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
OK,这样子的话
既然过滤了or总得留条路子吧
替换成||
![](https://upload-images.jianshu.io/upload_images/6661013-9429be90e563d1ff.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
成功get flag!
欢迎一起交流~
最后补充:
![](https://upload-images.jianshu.io/upload_images/6661013-15d4873e5c05f809.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
延时注入:
Sleep(3)
WriteUp下载地址:https://pan.lanzou.com/i0ox15i
小东
简介:专业团队网站开发、安全运维,合作意向请联系!
发表评论