id: avtech-dvr-ssrf

info:
  name: AVTECH DVR - SSRF
  author: ritikchaddha
  severity: medium
  description: |
    AVTECH DVR device, Search.cgi can be accessed directly. Search.cgi is responsible for searching and accessing cameras in the local network. Search.cgi provides the cgi_query function.
  metadata:
    verified: true
    max-request: 1
    shodan-query: title:"login" product:"Avtech"
    fofa-query: app="AVTECH-视频监控"
  tags: ssrf,avtech,unauth,iot

http:
  - method: GET
    path:
      - "{{BaseURL}}/cgi-bin/nobody/Search.cgi?action=scan"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - 'Search.Device'
          - 'Proto='
          - 'IPAddress='
        condition: and

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

      - type: status
        status:
          - 200

# digest: 4a0a00473045022100ec5b7f8b8cad83cf6aac91d8208f35873b33937d61ed95ff05ac72264e77c85e022047409f618785913f45532725bf9910384150b82cf2c8cdddbda079afe28d8f0b:922c64590222798bb761d5b6d8e72950
