Documentation
¶
Overview ¶
Package dns checks a target domain's DNS posture: email anti-spoofing records (SPF, DKIM, DMARC), certificate-issuance control (CAA), and dangling / takeover-prone CNAMEs. Every check is passive — it performs DNS lookups only, never HTTP, and sends no attack traffic. Lookups honor ctx and are memoized for the scan.
Index ¶
- func WithResolver(ctx context.Context, r Resolver) context.Context
- type CAA
- type DKIM
- type DMARC
- type DanglingCNAME
- type Resolver
- type SPF
- type SubdomainTakeover
- func (SubdomainTakeover) Category() core.Category
- func (SubdomainTakeover) Description() string
- func (SubdomainTakeover) ID() string
- func (SubdomainTakeover) Mode() core.Mode
- func (SubdomainTakeover) OWASP() []string
- func (SubdomainTakeover) Run(ctx context.Context, t core.Target) ([]core.Finding, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CAA ¶
type CAA struct{}
CAA flags a domain with no CAA record (any CA may issue certs for it).
func (CAA) Description ¶
type DKIM ¶
type DKIM struct{}
DKIM checks a handful of common selectors and reports when none publish a key. DKIM selectors are app-specific, so a miss is "possible", not confirmed.
func (DKIM) Description ¶
type DMARC ¶
type DMARC struct{}
DMARC flags a missing or monitor-only DMARC policy.
func (DMARC) Description ¶
type DanglingCNAME ¶
type DanglingCNAME struct{}
DanglingCNAME flags a CNAME that points to a name which does not resolve to any address — a classic dangling record.
func (DanglingCNAME) Category ¶
func (DanglingCNAME) Category() core.Category
func (DanglingCNAME) Description ¶
func (DanglingCNAME) Description() string
func (DanglingCNAME) ID ¶
func (DanglingCNAME) ID() string
func (DanglingCNAME) Mode ¶
func (DanglingCNAME) Mode() core.Mode
func (DanglingCNAME) OWASP ¶
func (DanglingCNAME) OWASP() []string
type Resolver ¶
type Resolver interface {
LookupTXT(ctx context.Context, name string) ([]string, error)
LookupCNAME(ctx context.Context, host string) (string, error)
LookupHost(ctx context.Context, host string) ([]string, error)
LookupCAA(ctx context.Context, name string) ([]string, error)
}
Resolver is the DNS surface the checks use. net.Resolver satisfies it; tests inject a fake. The engine does not provide one, so checks fall back to the system resolver via resolverFrom.
type SPF ¶
type SPF struct{}
SPF flags a domain with no SPF record (or a dangerously permissive one).
func (SPF) Description ¶
type SubdomainTakeover ¶
type SubdomainTakeover struct{}
SubdomainTakeover flags a CNAME to a takeover-prone provider whose backing resource appears unclaimed (target does not resolve).
func (SubdomainTakeover) Category ¶
func (SubdomainTakeover) Category() core.Category
func (SubdomainTakeover) Description ¶
func (SubdomainTakeover) Description() string
func (SubdomainTakeover) ID ¶
func (SubdomainTakeover) ID() string
func (SubdomainTakeover) Mode ¶
func (SubdomainTakeover) Mode() core.Mode
func (SubdomainTakeover) OWASP ¶
func (SubdomainTakeover) OWASP() []string