id: chromecast-detect

info:
  name: Google Chromecast - Detect
  author: LucianNitescu
  severity: info
  description: |
    Searches for Google Chromecast via their eureka_info route.
  reference:
    - https://github.com/thewhiteh4t/killcast/blob/ee81cfa03c963d47d3335770fcea2ca48bddeabf/killcast.py#L100C25-L100C43
    - https://rithvikvibhu.github.io/GHLocalApi/#section/Google-Home-Local-API/Authentication
  classification:
    cpe: cpe:2.3:h:google:chromecast:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: google
    product: chromecast
    shodan-query: Chromecast
  tags: google,chromecast,detect

http:
  - raw:
      - |
        GET /setup/eureka_info HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '"cast_build_revision":'
          - '"ssdp_udn":'
        condition: and

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