id: haproxy-exporter-metrics

info:
  name: Detect Haproxy Exporter
  author: pussycat0x
  severity: low
  description: Haproxy metrics is exposed.
  classification:
    cpe: cpe:2.3:a:haproxy:haproxy:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: haproxy
    product: haproxy
    shodan-query: title:"haproxy exporter"
  tags: haproxy,exposure,debug,misconfig

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

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "HELP haproxy_"

      - type: word
        part: body
        words:
          - "haproxy_exporter"
          - "haproxy_backend"
        condition: or

      - type: status
        status:
          - 200
# digest: 490a00463044022054638b810e5d1ab0659ef9ef737f3a5e73e932dc8d8d151cfcb2af00ad95a0e4022026c0b07400c94b26c4de48e8c8c16e83a1d314bfafee2158dfc3b0bef4be4bdc:922c64590222798bb761d5b6d8e72950