id: wildcard-tls

info:
  name: Wildcard TLS Certificate
  author: lucky0x0d
  severity: info
  description: |
    Checks a sites certificate to see if there are wildcard CN or SAN entries.
  reference:
    - https://cheatsheetseries.owasp.org/cheatsheets/Transport_Layer_Security_Cheat_Sheet.html#carefully-consider-the-use-of-wildcard-certificates
  metadata:
    max-request: 1
  tags: ssl,tls,wildcard,vuln
ssl:
  - address: "{{Host}}:{{Port}}"
    matchers:
      - type: dsl
        dsl:
          - wildcard_certificate == true

    extractors:
      - type: dsl
        dsl:
          - '"CN: " + subject_cn'
          - '" SAN: " + subject_an'
# digest: 4a0a004730450220528da6f63749d68ebe8f5ee40bf99b7eb5dda237e2829493ebc4884f8a29cb7b022100d32e48d2005fe71e9daba2b3c14528de684fd7c210b2f76b9708cb817b7d42a4:922c64590222798bb761d5b6d8e72950