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,vuln

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: 490a00463044022053c2adba10bbb1aa080452aa948c0772c9278d08802bc08b8fcea4b703b2b8cd022009f26836cb438dea23e436c44f0e548c9d17966dd0dfe4c2cff17dc8b338c174:922c64590222798bb761d5b6d8e72950