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:
    category: devops
    max-request: 2
    product: grafana
    shodan-query: title:"Grafana"
    vendor: grafana
  tags: panel,grafana,detect

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
        name: version
        part: body
        group: 1
        regex:
          - '\"version\"\:\"([0-9.]+)\"}'
          - '\"subTitle\":\"Grafana v([0-9.]+)'

      - type: kval
        kval:
          - version
# digest: 490a00463044022075f2a271e73c5f9373ef3f5b28fe05acaf6bf18eaffff0d31ab41deab8ca36fb02204a9039e70a164be9de3d266f50808bdd97ad9294048cc5b2b746d97dcda224e8:922c64590222798bb761d5b6d8e72950