id: hashicorp-consul-webgui

info:
  name: HashiCorp Consul Web UI Login Panel - Detect
  author: c-sh0
  severity: info
  description: HashiCorp Consul Web UI 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:hashicorp:consul:*:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    vendor: hashicorp
    product: consul
    shodan-query:
      - http.title:"Consul by HashiCorp"
      - http.title:"consul by hashicorp"
      - cpe:"cpe:2.3:a:hashicorp:consul"
    fofa-query: title="consul by hashicorp"
    google-query: intitle:"consul by hashicorp"
  tags: consul,webserver,panel,hashicorp,discovery

http:
  - method: GET
    path:
      - "{{BaseURL}}/ui/"

    host-redirects: true
    max-redirects: 2

    matchers-condition: and
    matchers:
      - type: status
        status:
          - 200

      - type: word
        part: body
        words:
          - '<title>Consul by HashiCorp</title>'
          - '%22%2C%22CONSUL_COPYRIGHT_URL%22%3A%22https%3A%2F%2Fwww.hashicorp.com%22'
        condition: or

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - "CONSUL_VERSION:.*([0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3})"
# digest: 4a0a00473045022100c41f32590775f94aa8bfaaa81ad42c543d4f7b6cdb2f8d10ee37210102e191d8022074d73682d0e2b3a4ed99976cdac09b3269f402ec77b548acabae6b4a12d2c93a:922c64590222798bb761d5b6d8e72950