id: teslamate-unauth-access

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

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: 490a0046304402202bdc2bb8810b088c1c5895e24f6e5fc1720d79971e1f878a83e726b47b4183950220786186779a4f16810f173712f050e4f12b4cb924efd1de0c03cd68d50acc1812:922c64590222798bb761d5b6d8e72950