基本文件上传.md

更改文件名

例如将shell.php改为shell.gifshell.png之类的

更改Content-Type

例如Content-Type: image/gif

添加文件头

例如伪造GIF时添加GIF98a文件头

更改php木马为phtml

例如<?php phpinfo();?>改为<script language='php'>phpinfo();</script>

上传.htaccess文件

对于Apache有效

AddType application/x-httpd-php .jpg

.htaccess文件指定使用以php代码看待名称含有.jpg的文件

php_value auto_prepend_file 1.txt
php_value auto_append_file 2.txt

.htaccess文件指定在解析php文件前先包含1.txt中的内容,解析php文件后包含2.txt中的内容

上传.user.ini文件

php的用户配置文件,适用范围比.htaccess更广

auto_prepend_file=1.txt
auto_append_file=2.txt

和上面的.htaccess效果相同

#Web #Apache #PHP #nginx #访问控制 #HTML #文件上传 #bypass #phtml