思路
先上传带shell的png文件,上传成功
把文件后缀改成php,上传失败,改成xxxxx上传成功,得知是黑名单过滤,
上传phtml后缀,可以成功上传,但是无法解析,可以试试上传配置文件,访问upload,发现有可执行文件index.php,可以用上传.user.ini
来进行文件包含(题目是nginx)
user.ini.它比.htaccess用的更广,不管是nginx/apache/IIS,只要是以fastcgi运行的php都可以用这个方法。
条件:
服务器脚本语言为PHP
对应目录下面有可执行的php文件,如index.php
服务器使用CGI/FastCGI模式
auto_prepend_file=shell.png // 包含shell.png文件