id: vault-panel

info:
  name: Vault Login Panel - Detect
  author: DhiyaneshDK,righettod
  severity: info
  description: Vault login panel was detected.
  reference:
    - https://developer.hashicorp.com/vault
    - https://developer.hashicorp.com/vault/api-docs
    - https://developer.hashicorp.com/vault/api-docs#help
  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:vault:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 4
    vendor: hashicorp
    product: vault
    shodan-query: http.favicon.hash:-919788577
    fofa-query: icon_hash=-919788577
  tags: panel,vault,detect,hashicorp

http:
  - method: GET
    path:
      - "{{BaseURL}}/v1/sys/health"
      - "{{BaseURL}}/ui/vault/auth"
      - "{{BaseURL}}/ui/auth"
      - "{{BaseURL}}/v1/sys/health?help=1"

    stop-at-first-match: true
    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200 || status_code == 429'
          - 'contains_any(to_lower(body), "vault-cluster", "vault/config/environment", "<title>vault</title>", "hashicorp vault api")'
        condition: and

    extractors:
      - type: json
        part: body_1
        name: version
        json:
          - ".version"
# digest: 4a0a00473045022076f2b0ee83f0305d721e84773bdfb94f3352836a12293cc385b79dcd46d83843022100cb7a6025d1c4a3bc186eeb703174533f363eb9b3ce79b0abfb9a73469a3de892:922c64590222798bb761d5b6d8e72950