开题,是一个文件上传界面
.php文件不允许上传
测试了一下是黑名单,过滤了php相关的文件,但是没过滤.ini
、.htaccess
后缀的文件
对内容的过滤是<?
、file
,所以不能用.user.ini
配置文件绕过
SetHandler application/x-httpd-php
当前目录以及子目录所有文件将会被当作php解析。

再上传个图片马
回显了个<?,后续访问也是404,就是没传上去呗,文件内容还有问题

尝试用script标签继续优化,避开<?

但很可惜,高版本下服务器并不解析这种script标签为php代码,仍然不行
文件上传之.htaccess的一些技巧 - FreeBuf网络安全行业门户
于是在将所有文件解析为php的同时,开启php_value auto_append_file用base64解码来包含恶意文件,从而绕过<?的限制
显示内容不能有file,尝试大小写绕过,但似乎不能解析
于是用\来绕过
再传个base64编码的图片马
访问/upload/yjh.png
连蚁剑,拿flag
