Basic template

Basic DNS Request to detect if a CNAME record exists for an input.

id: basic-dns-example

info:
  name: Test DNS Template
  author: pdteam
  severity: info

dns:
  - name: "{{FQDN}}"
    type: CNAME
    class: inet
    recursion: true
    retries: 3
    matchers:
      - type: word
        words:
          # The response must contain a CNAME record
          - "IN\tCNAME"

Multiple matcher

An example showcasing multiple matchers of nuclei, allowing detection of Subdomains with CNAME records that point to either zendesk.com or github.io.

id: multiple-matcher

info:
  name: Test DNS Template
  author: pdteam
  severity: info

dns:
  - name: "{{FQDN}}"
    type: CNAME
    class: inet
    recursion: true
    retries: 5
    matchers-condition: or
    matchers:
      - type: word
        name: zendesk
        words:
          - "zendesk.com"
      - type: word
        name: github
        words:
          - "github.io"

You can find even more examples of DNS templates in the nuclei-templates repository on GitHub.