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
  metadata:
    verified: true
    max-request: 1
    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: 4a0a0047304502206c214513406d47d4e688761e11149e983c02c3e47bdfa1f4d01fab2aa15ff11d0221009b017586aea846fc0befea354637be19778ec8c58b0fb2c49e2f28e65855dc2a:922c64590222798bb761d5b6d8e72950