id: netdata-panel

info:
  name: Netdata Panel - Detect
  author: TechbrunchFR,righettod,matejsmycka
  severity: info
  description: |
    Netdata panel was discovered.
  reference:
    - https://github.com/netdata/netdata
    - https://www.netdata.cloud/
  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:netdata:netdata:*:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    vendor: netdata
    product: netdata
    shodan-query:
      - http.title:"netdata dashboard"
      - http.title:"Netdata Console"
      - "server: netdata embedded http server"
    fofa-query: title="netdata dashboard"
    google-query: intitle:"netdata dashboard"
  tags: panel,netdata,login,dashboard,discovery

http:
  - method: GET
    path:
      - "{{BaseURL}}/api/v1/info"
      - "{{BaseURL}}/api/v2/info"
      - "{{BaseURL}}/sign-in"

    stop-at-first-match: true
    matchers-condition: or
    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(to_lower(header), "application/json")'
          - 'contains(to_lower(body), "netdata")'
        condition: and

      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(to_lower(body), "<title>netdata console</title>")'
        condition: and

    extractors:
      - type: regex
        part: body
        regex:
          - 'version"\s*:\s*"v([^"]+)"'

      - type: regex
        part: body
        regex:
          - 'kernel_version"\s*:\s*"([^"]+)"'

      - type: regex
        part: body
        regex:
          - '(?i)nodeEnv:\s+"([a-z0-9]+)"'
# digest: 4a0a0047304502202064c3f79bf2f3b569c0518e5fbb80f21c31ac7f6417df0de4efa20b63f3fa19022100f960449b0606c7b6de2d88f2743f6b00233954b1407b58bef14b19516bc336cd:922c64590222798bb761d5b6d8e72950