id: acme-challenge-detect

info:
  name: ACME DNS Challenge - Detect
  author: rxerium
  severity: info
  description: |
    Detects ACME (Automated Certificate Management Environment) DNS-01 challenge records used by Let's Encrypt and other certificate authorities.
  reference:
    - https://www.rfc-editor.org/rfc/rfc8555
    - https://letsencrypt.org/docs/challenge-types/
  metadata:
    max-request: 1
  tags: dns,acme,letsencrypt,certificate,discovery

dns:
  - name: "_acme-challenge.{{FQDN}}"
    type: TXT

    matchers:
      - type: regex
        regex:
          - "IN\tTXT"
          - "[A-Za-z0-9_-]{43}"

    extractors:
      - type: regex
        regex:
          - 'TXT\s+"([^"]+)"'
# digest: 490a0046304402202b8780aa7f0a3f0bbef9582c4b50b02624b7f5a03d893db2d24af28ad08e9c11022035e990db7544711f554a9e13bd4c9f5f22f1903fab31269aff5bfe52f2d5f389:922c64590222798bb761d5b6d8e72950