id: grafana-detect

info:
  name: Grafana Login Panel - Detect
  author: organiccrap,AdamCrosser,bhutch
  severity: info
  description: Grafana login panel was detected.
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
    cwe-id: CWE-200
    cpe: cpe:2.3:a:grafana:grafana:*:*:*:*:*:*:*:*
  metadata:
    max-request: 2
    vendor: grafana
    product: grafana
    shodan-query:
      - title:"Grafana"
      - cpe:"cpe:2.3:a:grafana:grafana"
      - http.title:"grafana"
    category: devops
    fofa-query:
      - title="grafana"
      - app="grafana"
    google-query: intitle:"grafana"
  tags: panel,grafana,detect,discovery

http:
  - method: GET
    path:
      - "{{BaseURL}}/login"
      - "{{BaseURL}}/graph/login"

    stop-at-first-match: true
    matchers:
      - type: word
        part: body
        words:
          - "<title>Grafana</title>"

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - '\"version\"\:\"([0-9.]+)\"}'
          - '\"subTitle\":\"Grafana v([0-9.]+)'

      - type: kval
        kval:
          - version
# digest: 4b0a00483046022100e27bf94093ff18a6f5b9157c6d656e7f1998cf5950558051c810e5fd3ca473c8022100c40b3bf72bae55869f564853fe7294fc316b5cd26e111674ed4109d808df06f4:922c64590222798bb761d5b6d8e72950