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

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: 4b0a00483046022100fddd84ce9eb38e4df06cbf935a40f9870ff619b5eb526e28bba4d3760244b62a022100e46e856723e03c2c561608bb6862b3b6490bd24854779174968eb7f448246dbe:922c64590222798bb761d5b6d8e72950