id: teslamate-unauth-access

info:
  name: TeslaMate - Unauthenticated Access
  author: For3stCo1d
  severity: medium
  description: |
    A misconfig in Teslamate allows unauthorized access to /settings endpoint.
  metadata:
    verified: true
    max-request: 1
    shodan-query: http.favicon.hash:-1478287554
    fofa-query: title="teslamate"
  tags: misconfig,teslamate,unauth

http:
  - method: GET
    path:
      - "{{BaseURL}}/settings"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "Settings · TeslaMate"
          - "URLs</h2>"
        condition: and

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - "<td>([0-9.]+)<strong>"

# digest: 4b0a00483046022100a34f3dcd06fb844c5e881b8c8352b999dc24c0d0aa7b9f46bd01b87434a24f350221009cc0b519c750367431d73d8576f4815100cc5b7673c8d314a2d4fe7cf747538c:922c64590222798bb761d5b6d8e72950
