id: haproxy-exporter-metrics

info:
  name: Detect Haproxy Exporter
  author: pussycat0x
  severity: low
  description: Haproxy metrics is exposed.
  metadata:
    verified: true
    max-request: 1
    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: 490a0046304402200655ee70596afce87e1d8db4b3082d84aa6b0da7a5861afb56a96f843e11fb20022069d40c4579c0ab2134a278af489c32581bcc20920ef60ada17b6749c1c838b3d:922c64590222798bb761d5b6d8e72950