SlideShare une entreprise Scribd logo
1  sur  40
Télécharger pour lire hors ligne
©!Men!&!Mice!!http://menandmice.com!

©!ISC!http://www.isc.org
DNS!wildcards
1
©!Men!&!Mice!!http://menandmice.com!
DNS!wildcards
!
!
!
Demo!time!
2
©!Men!&!Mice!!http://menandmice.com!
DNS!wildcards
the!DNS!protocol!allows!the!definition!on!“wildcard”!DNS!
records!to!synthesise!DNS!answers!from!authoritative!
servers!
DNS!wildcards!are!domain!names!(owner!names)!with!the!
leftmost!label!being!a!single!asterisk!“*”!
there!are!no!other!wildcard!characters!in!DNS!other!than!“*”!
DNS!wildcards!have!their!own!rules!that!are!different!
from!other!systems!with!wildcards!(regular!expressions,!
Unix!shell!filename!globbing,!DOS/Windows!filename!
wildcards!...)
3
©!Men!&!Mice!!http://menandmice.com!
DNS!wildcards
DNS!wildcards!have!been!originally!defined!in!the!
“original”!DNS!RFC!1034,!and!have!been!updated!in!
RFC!2672!and!RFC!4592!
RFC!4592!“The!Role!of!Wildcards!in!the!Domain!Name!
System”!is!a!must!read!to!understand!all!nuances!of!DNS!
wildcards
4
©!Men!&!Mice!!http://menandmice.com!
DNS!wildcards
DNS!wildcard!examples!(from!different!zones):



*.example.com. 3600 IN A 192.0.2.80

*.firma.example.com. 600 IN MX 10 mail.example.net.

*.example. 86400 IN TXT “a wildcard”!
not!wildcard!records!(just!“normal”!domain!names):



*test.example.de. 400 IN A 192.0.2.11

test.*.example.com. 600 IN TXT “not a wildcard”

**.example.com. 600 IN TXT “alsonot a wildcard”



5
©!Men!&!Mice!!http://menandmice.com!
DNS!wildcards
Example!zone!with!wildcards!(from!RFC!4592):

$ORIGIN example.

example. 3600 IN SOA <SOA RDATA>

example. 3600 NS ns.example.com.

example. 3600 NS ns.example.net.

*.example. 3600 TXT "this is a wildcard"

*.example. 3600 MX 10 host1.example.

sub.*.example. 3600 TXT "this is not a wildcard"

host1.example. 3600 A 192.0.2.1

_ssh._tcp.host1.example. 3600 SRV <SRV RDATA>

_ssh._tcp.host2.example. 3600 SRV <SRV RDATA>

subdel.example. 3600 NS ns.example.com.

subdel.example. 3600 NS ns.example.net.



6
©!Men!&!Mice!!http://menandmice.com!
DNS!wildcards
7
“.”
“example.”
“*”
“sub”
“host1”
“_tcp”
“_ssh”
“host2”
“_tcp”
“_ssh”
“subdel”
Example!zone!with!wildcards!(from!RFC!4592):

$ORIGIN example.

example. 3600 IN SOA <SOA RDATA>

example. 3600 NS ns.example.com.

example. 3600 NS ns.example.net.

*.example. 3600 TXT "this is a wildcard"

*.example. 3600 MX 10 host1.example.

sub.*.example. 3600 TXT "this is not a wildcard"

host1.example. 3600 A 192.0.2.1

_ssh._tcp.host1.example. 3600 SRV <SRV RDATA>

_ssh._tcp.host2.example. 3600 SRV <SRV RDATA>

subdel.example. 3600 NS ns.example.com.

subdel.example. 3600 NS ns.example.net.



©!Men!&!Mice!!http://menandmice.com!
DNS!wildcards
8
“.”
“example.”
“*”
“sub”
“host1”
“_tcp”
“_ssh”
“host2”
“_tcp”
“_ssh”
“subdel”
Query:!host3.example. ? IN MX ?
Example!zone!with!wildcards!(from!RFC!4592):

$ORIGIN example.

example. 3600 IN SOA <SOA RDATA>

example. 3600 NS ns.example.com.

example. 3600 NS ns.example.net.

*.example. 3600 TXT "this is a wildcard"

*.example. 3600 MX 10 host1.example.

sub.*.example. 3600 TXT "this is not a wildcard"

host1.example. 3600 A 192.0.2.1

_ssh._tcp.host1.example. 3600 SRV <SRV RDATA>

_ssh._tcp.host2.example. 3600 SRV <SRV RDATA>

subdel.example. 3600 NS ns.example.com.

subdel.example. 3600 NS ns.example.net.



©!Men!&!Mice!!http://menandmice.com!
DNS!wildcards
8
“.”
“example.”
“*”
“sub”
“host1”
“_tcp”
“_ssh”
“host2”
“_tcp”
“_ssh”
“subdel”
Query:!host3.example. ? IN MX ?
Answer:!host3.example. 3600 IN MX 10 host1.example.
Example!zone!with!wildcards!(from!RFC!4592):

$ORIGIN example.

example. 3600 IN SOA <SOA RDATA>

example. 3600 NS ns.example.com.

example. 3600 NS ns.example.net.

*.example. 3600 TXT "this is a wildcard"

*.example. 3600 MX 10 host1.example.

sub.*.example. 3600 TXT "this is not a wildcard"

host1.example. 3600 A 192.0.2.1

_ssh._tcp.host1.example. 3600 SRV <SRV RDATA>

_ssh._tcp.host2.example. 3600 SRV <SRV RDATA>

subdel.example. 3600 NS ns.example.com.

subdel.example. 3600 NS ns.example.net.



©!Men!&!Mice!!http://menandmice.com!
DNS!wildcards
9
“.”
“example.”
“*”
“sub”
“host1”
“_tcp”
“_ssh”
“host2”
“_tcp”
“_ssh”
“subdel”
Query:!host3.example. ? IN A ?
Example!zone!with!wildcards!(from!RFC!4592):

$ORIGIN example.

example. 3600 IN SOA <SOA RDATA>

example. 3600 NS ns.example.com.

example. 3600 NS ns.example.net.

*.example. 3600 TXT "this is a wildcard"

*.example. 3600 MX 10 host1.example.

sub.*.example. 3600 TXT "this is not a wildcard"

host1.example. 3600 A 192.0.2.1

_ssh._tcp.host1.example. 3600 SRV <SRV RDATA>

_ssh._tcp.host2.example. 3600 SRV <SRV RDATA>

subdel.example. 3600 NS ns.example.com.

subdel.example. 3600 NS ns.example.net.



©!Men!&!Mice!!http://menandmice.com!
DNS!wildcards
9
“.”
“example.”
“*”
“sub”
“host1”
“_tcp”
“_ssh”
“host2”
“_tcp”
“_ssh”
“subdel”
Query:!host3.example. ? IN A ?
Answer:!NOERROR / NODATA (Answer = 0)
Example!zone!with!wildcards!(from!RFC!4592):

$ORIGIN example.

example. 3600 IN SOA <SOA RDATA>

example. 3600 NS ns.example.com.

example. 3600 NS ns.example.net.

*.example. 3600 TXT "this is a wildcard"

*.example. 3600 MX 10 host1.example.

sub.*.example. 3600 TXT "this is not a wildcard"

host1.example. 3600 A 192.0.2.1

_ssh._tcp.host1.example. 3600 SRV <SRV RDATA>

_ssh._tcp.host2.example. 3600 SRV <SRV RDATA>

subdel.example. 3600 NS ns.example.com.

subdel.example. 3600 NS ns.example.net.



©!Men!&!Mice!!http://menandmice.com!
DNS!wildcards
10
“.”
“example.”
“*”
“sub”
“host1”
“_tcp”
“_ssh”
“host2”
“_tcp”
“_ssh”
“subdel”
Query:!foo.bar.example. ? IN TXT ?
Example!zone!with!wildcards!(from!RFC!4592):

$ORIGIN example.

example. 3600 IN SOA <SOA RDATA>

example. 3600 NS ns.example.com.

example. 3600 NS ns.example.net.

*.example. 3600 TXT "this is a wildcard"

*.example. 3600 MX 10 host1.example.

sub.*.example. 3600 TXT "this is not a wildcard"

host1.example. 3600 A 192.0.2.1

_ssh._tcp.host1.example. 3600 SRV <SRV RDATA>

_ssh._tcp.host2.example. 3600 SRV <SRV RDATA>

subdel.example. 3600 NS ns.example.com.

subdel.example. 3600 NS ns.example.net.



©!Men!&!Mice!!http://menandmice.com!
DNS!wildcards
10
“.”
“example.”
“*”
“sub”
“host1”
“_tcp”
“_ssh”
“host2”
“_tcp”
“_ssh”
“subdel”
Query:!foo.bar.example. ? IN TXT ?
Answer:!foo.bar.example. 3600 IN TXT “this is a wildcard”
Example!zone!with!wildcards!(from!RFC!4592):

$ORIGIN example.

example. 3600 IN SOA <SOA RDATA>

example. 3600 NS ns.example.com.

example. 3600 NS ns.example.net.

*.example. 3600 TXT "this is a wildcard"

*.example. 3600 MX 10 host1.example.

sub.*.example. 3600 TXT "this is not a wildcard"

host1.example. 3600 A 192.0.2.1

_ssh._tcp.host1.example. 3600 SRV <SRV RDATA>

_ssh._tcp.host2.example. 3600 SRV <SRV RDATA>

subdel.example. 3600 NS ns.example.com.

subdel.example. 3600 NS ns.example.net.



©!Men!&!Mice!!http://menandmice.com!
DNS!wildcards
11
“.”
“example.”
“*”
“sub”
“host1”
“_tcp”
“_ssh”
“host2”
“_tcp”
“_ssh”
“subdel”
Query:!host1.example. ? IN MX ?
Example!zone!with!wildcards!(from!RFC!4592):

$ORIGIN example.

example. 3600 IN SOA <SOA RDATA>

example. 3600 NS ns.example.com.

example. 3600 NS ns.example.net.

*.example. 3600 TXT "this is a wildcard"

*.example. 3600 MX 10 host1.example.

sub.*.example. 3600 TXT "this is not a wildcard"

host1.example. 3600 A 192.0.2.1

_ssh._tcp.host1.example. 3600 SRV <SRV RDATA>

_ssh._tcp.host2.example. 3600 SRV <SRV RDATA>

subdel.example. 3600 NS ns.example.com.

subdel.example. 3600 NS ns.example.net.



©!Men!&!Mice!!http://menandmice.com!
DNS!wildcards
11
“.”
“example.”
“*”
“sub”
“host1”
“_tcp”
“_ssh”
“host2”
“_tcp”
“_ssh”
“subdel”
Query:!host1.example. ? IN MX ?
Answer:!NOERROR / NODATA (Answer = 0)
Example!zone!with!wildcards!(from!RFC!4592):

$ORIGIN example.

example. 3600 IN SOA <SOA RDATA>

example. 3600 NS ns.example.com.

example. 3600 NS ns.example.net.

*.example. 3600 TXT "this is a wildcard"

*.example. 3600 MX 10 host1.example.

sub.*.example. 3600 TXT "this is not a wildcard"

host1.example. 3600 A 192.0.2.1

_ssh._tcp.host1.example. 3600 SRV <SRV RDATA>

_ssh._tcp.host2.example. 3600 SRV <SRV RDATA>

subdel.example. 3600 NS ns.example.com.

subdel.example. 3600 NS ns.example.net.



©!Men!&!Mice!!http://menandmice.com!
DNS!wildcards
12
“.”
“example.”
“*”
“sub”
“host1”
“_tcp”
“_ssh”
“host2”
“_tcp”
“_ssh”
“subdel”
Query:!sub.*.example. ? IN MX ?
Example!zone!with!wildcards!(from!RFC!4592):

$ORIGIN example.

example. 3600 IN SOA <SOA RDATA>

example. 3600 NS ns.example.com.

example. 3600 NS ns.example.net.

*.example. 3600 TXT "this is a wildcard"

*.example. 3600 MX 10 host1.example.

sub.*.example. 3600 TXT "this is not a wildcard"

host1.example. 3600 A 192.0.2.1

_ssh._tcp.host1.example. 3600 SRV <SRV RDATA>

_ssh._tcp.host2.example. 3600 SRV <SRV RDATA>

subdel.example. 3600 NS ns.example.com.

subdel.example. 3600 NS ns.example.net.



©!Men!&!Mice!!http://menandmice.com!
DNS!wildcards
12
“.”
“example.”
“*”
“sub”
“host1”
“_tcp”
“_ssh”
“host2”
“_tcp”
“_ssh”
“subdel”
Query:!sub.*.example. ? IN MX ?
Answer:!NOERROR / NODATA (Answer = 0)
Example!zone!with!wildcards!(from!RFC!4592):

$ORIGIN example.

example. 3600 IN SOA <SOA RDATA>

example. 3600 NS ns.example.com.

example. 3600 NS ns.example.net.

*.example. 3600 TXT "this is a wildcard"

*.example. 3600 MX 10 host1.example.

sub.*.example. 3600 TXT "this is not a wildcard"

host1.example. 3600 A 192.0.2.1

_ssh._tcp.host1.example. 3600 SRV <SRV RDATA>

_ssh._tcp.host2.example. 3600 SRV <SRV RDATA>

subdel.example. 3600 NS ns.example.com.

subdel.example. 3600 NS ns.example.net.



©!Men!&!Mice!!http://menandmice.com!
DNS!wildcards
13
“.”
“example.”
“*”
“sub”
“host1”
“_tcp”
“_ssh”
“host2”
“_tcp”
“_ssh”
“subdel”
Query:!_telnet._tcp.host1.example. ? IN SRV ?
Example!zone!with!wildcards!(from!RFC!4592):

$ORIGIN example.

example. 3600 IN SOA <SOA RDATA>

example. 3600 NS ns.example.com.

example. 3600 NS ns.example.net.

*.example. 3600 TXT "this is a wildcard"

*.example. 3600 MX 10 host1.example.

sub.*.example. 3600 TXT "this is not a wildcard"

host1.example. 3600 A 192.0.2.1

_ssh._tcp.host1.example. 3600 SRV <SRV RDATA>

_ssh._tcp.host2.example. 3600 SRV <SRV RDATA>

subdel.example. 3600 NS ns.example.com.

subdel.example. 3600 NS ns.example.net.



©!Men!&!Mice!!http://menandmice.com!
DNS!wildcards
13
“.”
“example.”
“*”
“sub”
“host1”
“_tcp”
“_ssh”
“host2”
“_tcp”
“_ssh”
“subdel”
Query:!_telnet._tcp.host1.example. ? IN SRV ?
Answer:!NOERROR / NODATA (Answer = 0)
Example!zone!with!wildcards!(from!RFC!4592):

$ORIGIN example.

example. 3600 IN SOA <SOA RDATA>

example. 3600 NS ns.example.com.

example. 3600 NS ns.example.net.

*.example. 3600 TXT "this is a wildcard"

*.example. 3600 MX 10 host1.example.

sub.*.example. 3600 TXT "this is not a wildcard"

host1.example. 3600 A 192.0.2.1

_ssh._tcp.host1.example. 3600 SRV <SRV RDATA>

_ssh._tcp.host2.example. 3600 SRV <SRV RDATA>

subdel.example. 3600 NS ns.example.com.

subdel.example. 3600 NS ns.example.net.



©!Men!&!Mice!!http://menandmice.com!
DNS!wildcards
14
“.”
“example.”
“*”
“sub”
“host1”
“_tcp”
“_ssh”
“host2”
“_tcp”
“_ssh”
“subdel”
Query:!host1.example. ? IN A ?
Example!zone!with!wildcards!(from!RFC!4592):

$ORIGIN example.

example. 3600 IN SOA <SOA RDATA>

example. 3600 NS ns.example.com.

example. 3600 NS ns.example.net.

*.example. 3600 TXT "this is a wildcard"

*.example. 3600 MX 10 host1.example.

sub.*.example. 3600 TXT "this is not a wildcard"

host1.example. 3600 A 192.0.2.1

_ssh._tcp.host1.example. 3600 SRV <SRV RDATA>

_ssh._tcp.host2.example. 3600 SRV <SRV RDATA>

subdel.example. 3600 NS ns.example.com.

subdel.example. 3600 NS ns.example.net.



©!Men!&!Mice!!http://menandmice.com!
DNS!wildcards
14
“.”
“example.”
“*”
“sub”
“host1”
“_tcp”
“_ssh”
“host2”
“_tcp”
“_ssh”
“subdel”
Query:!host1.example. ? IN A ?
Answer:!host1.example. 3600 IN A 192.0.2.1
Example!zone!with!wildcards!(from!RFC!4592):

$ORIGIN example.

example. 3600 IN SOA <SOA RDATA>

example. 3600 NS ns.example.com.

example. 3600 NS ns.example.net.

*.example. 3600 TXT "this is a wildcard"

*.example. 3600 MX 10 host1.example.

sub.*.example. 3600 TXT "this is not a wildcard"

host1.example. 3600 A 192.0.2.1

_ssh._tcp.host1.example. 3600 SRV <SRV RDATA>

_ssh._tcp.host2.example. 3600 SRV <SRV RDATA>

subdel.example. 3600 NS ns.example.com.

subdel.example. 3600 NS ns.example.net.



©!Men!&!Mice!!http://menandmice.com!
DNS!wildcards
15
“.”
“example.”
“*”
“sub”
“host1”
“_tcp”
“_ssh”
“host2”
“_tcp”
“_ssh”
“subdel”
Query:!host.subdel.example. ? IN A ?
Example!zone!with!wildcards!(from!RFC!4592):

$ORIGIN example.

example. 3600 IN SOA <SOA RDATA>

example. 3600 NS ns.example.com.

example. 3600 NS ns.example.net.

*.example. 3600 TXT "this is a wildcard"

*.example. 3600 MX 10 host1.example.

sub.*.example. 3600 TXT "this is not a wildcard"

host1.example. 3600 A 192.0.2.1

_ssh._tcp.host1.example. 3600 SRV <SRV RDATA>

_ssh._tcp.host2.example. 3600 SRV <SRV RDATA>

subdel.example. 3600 NS ns.example.com.

subdel.example. 3600 NS ns.example.net.



©!Men!&!Mice!!http://menandmice.com!
DNS!wildcards
15
“.”
“example.”
“*”
“sub”
“host1”
“_tcp”
“_ssh”
“host2”
“_tcp”
“_ssh”
“subdel”
Query:!host.subdel.example. ? IN A ?
Answer:!referral to subdel.example
subdel.example. 3600 NS ns.example.com.

subdel.example. 3600 NS ns.example.net.
Example!zone!with!wildcards!(from!RFC!4592):

$ORIGIN example.

example. 3600 IN SOA <SOA RDATA>

example. 3600 NS ns.example.com.

example. 3600 NS ns.example.net.

*.example. 3600 TXT "this is a wildcard"

*.example. 3600 MX 10 host1.example.

sub.*.example. 3600 TXT "this is not a wildcard"

host1.example. 3600 A 192.0.2.1

_ssh._tcp.host1.example. 3600 SRV <SRV RDATA>

_ssh._tcp.host2.example. 3600 SRV <SRV RDATA>

subdel.example. 3600 NS ns.example.com.

subdel.example. 3600 NS ns.example.net.



©!Men!&!Mice!!http://menandmice.com!
DNS!wildcards
16
“.”
“example.”
“*”
“sub”
“host1”
“_tcp”
“_ssh”
“host2”
“_tcp”
“_ssh”
“subdel”
Query:!ghost.*.example. ? IN MX ?
Example!zone!with!wildcards!(from!RFC!4592):

$ORIGIN example.

example. 3600 IN SOA <SOA RDATA>

example. 3600 NS ns.example.com.

example. 3600 NS ns.example.net.

*.example. 3600 TXT "this is a wildcard"

*.example. 3600 MX 10 host1.example.

sub.*.example. 3600 TXT "this is not a wildcard"

host1.example. 3600 A 192.0.2.1

_ssh._tcp.host1.example. 3600 SRV <SRV RDATA>

_ssh._tcp.host2.example. 3600 SRV <SRV RDATA>

subdel.example. 3600 NS ns.example.com.

subdel.example. 3600 NS ns.example.net.



©!Men!&!Mice!!http://menandmice.com!
DNS!wildcards
16
“.”
“example.”
“*”
“sub”
“host1”
“_tcp”
“_ssh”
“host2”
“_tcp”
“_ssh”
“subdel”
Query:!ghost.*.example. ? IN MX ?
Answer:!NOERROR / NODATA (Answer = 0)
Example!zone!with!wildcards!(from!RFC!4592):

$ORIGIN example.

example. 3600 IN SOA <SOA RDATA>

example. 3600 NS ns.example.com.

example. 3600 NS ns.example.net.

*.example. 3600 TXT "this is a wildcard"

*.example. 3600 MX 10 host1.example.

sub.*.example. 3600 TXT "this is not a wildcard"

host1.example. 3600 A 192.0.2.1

_ssh._tcp.host1.example. 3600 SRV <SRV RDATA>

_ssh._tcp.host2.example. 3600 SRV <SRV RDATA>

subdel.example. 3600 NS ns.example.com.

subdel.example. 3600 NS ns.example.net.



©!Men!&!Mice!!http://menandmice.com!
DNS!wildcards
17
“.”
“example.”
“*”
“sub”
“host1”
“_tcp”
“_ssh”
“host2”
“_tcp”
“_ssh”
“subdel”
Query:!*.example. ? IN TXT ?
Example!zone!with!wildcards!(from!RFC!4592):

$ORIGIN example.

example. 3600 IN SOA <SOA RDATA>

example. 3600 NS ns.example.com.

example. 3600 NS ns.example.net.

*.example. 3600 TXT "this is a wildcard"

*.example. 3600 MX 10 host1.example.

sub.*.example. 3600 TXT "this is not a wildcard"

host1.example. 3600 A 192.0.2.1

_ssh._tcp.host1.example. 3600 SRV <SRV RDATA>

_ssh._tcp.host2.example. 3600 SRV <SRV RDATA>

subdel.example. 3600 NS ns.example.com.

subdel.example. 3600 NS ns.example.net.



©!Men!&!Mice!!http://menandmice.com!
DNS!wildcards
17
“.”
“example.”
“*”
“sub”
“host1”
“_tcp”
“_ssh”
“host2”
“_tcp”
“_ssh”
“subdel”
Query:!*.example. ? IN TXT ?
Answer:!*.example. 3600 TXT "this is a wildcard"

Example!zone!with!wildcards!(from!RFC!4592):

$ORIGIN example.

example. 3600 IN SOA <SOA RDATA>

example. 3600 NS ns.example.com.

example. 3600 NS ns.example.net.

*.example. 3600 TXT "this is a wildcard"

*.example. 3600 MX 10 host1.example.

sub.*.example. 3600 TXT "this is not a wildcard"

host1.example. 3600 A 192.0.2.1

_ssh._tcp.host1.example. 3600 SRV <SRV RDATA>

_ssh._tcp.host2.example. 3600 SRV <SRV RDATA>

subdel.example. 3600 NS ns.example.com.

subdel.example. 3600 NS ns.example.net.



©!Men!&!Mice!!http://menandmice.com!
Empty!non!terminal
“empty non-terminal”:

$ORIGIN example.

example. 3600 IN SOA <SOA RDATA>

example. 3600 NS ns.example.com.

example. 3600 NS ns.example.net.

*.example. 3600 TXT "this is a wildcard"

*.example. 3600 MX 10 host1.example.

sub.*.example. 3600 TXT "this is not a wildcard"

host1.example. 3600 A 192.0.2.1

_ssh._tcp.host1.example. 3600 SRV <SRV RDATA>

_ssh._tcp.host2.example. 3600 SRV <SRV RDATA>

subdel.example. 3600 NS ns.example.com.

subdel.example. 3600 NS ns.example.net.



18
©!Men!&!Mice!!http://menandmice.com!
Empty!non!terminal
“empty non-terminal”:

$ORIGIN example.

example. 3600 IN SOA <SOA RDATA>

example. 3600 NS ns.example.com.

example. 3600 NS ns.example.net.

*.example. 3600 TXT "this is a wildcard"

*.example. 3600 MX 10 host1.example.

sub.*.example. 3600 TXT "this is not a wildcard"

host1.example. 3600 A 192.0.2.1

_ssh._tcp.host1.example. 3600 SRV <SRV RDATA>

_ssh._tcp.host2.example. 3600 SRV <SRV RDATA>

subdel.example. 3600 NS ns.example.com.

subdel.example. 3600 NS ns.example.net.



18
©!Men!&!Mice!!http://menandmice.com!
Empty!non!terminal
“empty non-terminal”:

$ORIGIN example.

example. 3600 IN SOA <SOA RDATA>

example. 3600 NS ns.example.com.

example. 3600 NS ns.example.net.

*.example. 3600 TXT "this is a wildcard"

*.example. 3600 MX 10 host1.example.

sub.*.example. 3600 TXT "this is not a wildcard"

host1.example. 3600 A 192.0.2.1

_ssh._tcp.host1.example. 3600 SRV <SRV RDATA>

_ssh._tcp.host2.example. 3600 SRV <SRV RDATA>

subdel.example. 3600 NS ns.example.com.

subdel.example. 3600 NS ns.example.net.



18
©!Men!&!Mice!!http://menandmice.com!
Empty!non!terminal
“empty non-terminal”:

$ORIGIN example.

example. 3600 IN SOA <SOA RDATA>

example. 3600 NS ns.example.com.

example. 3600 NS ns.example.net.

*.example. 3600 TXT "this is a wildcard"

*.example. 3600 MX 10 host1.example.

sub.*.example. 3600 TXT "this is not a wildcard"

host1.example. 3600 A 192.0.2.1

_ssh._tcp.host1.example. 3600 SRV <SRV RDATA>

_ssh._tcp.host2.example. 3600 SRV <SRV RDATA>

subdel.example. 3600 NS ns.example.com.

subdel.example. 3600 NS ns.example.net.



18
©!Men!&!Mice!!http://menandmice.com!
Empty!non!terminal
19
“.”
“example.”
“*”
“sub”
“host1”
“_tcp”
“_ssh”
“host2”
“_tcp”
“_ssh”
“subdel”
Example!zone!with!wildcards!(from!RFC!4592):

$ORIGIN example.

example. 3600 IN SOA <SOA RDATA>

example. 3600 NS ns.example.com.

example. 3600 NS ns.example.net.

*.example. 3600 TXT "this is a wildcard"

*.example. 3600 MX 10 host1.example.

sub.*.example. 3600 TXT "this is not a wildcard"

host1.example. 3600 A 192.0.2.1

_ssh._tcp.host1.example. 3600 SRV <SRV RDATA>

_ssh._tcp.host2.example. 3600 SRV <SRV RDATA>

subdel.example. 3600 NS ns.example.com.

subdel.example. 3600 NS ns.example.net.



empty!non!terminalempty!non!terminalempty!non!terminal!
nodes
©!Men!&!Mice!!http://menandmice.com!
The!closest!encloser!is!the!node!in!the!zone's!tree!of!
existing!domain!names!that!has!the!most!labels!
matching!the!query!name!(consecutively,!counting!from!
the!root!label!downward).!!Each!match!is!a!"label!match"!
and!the!order!of!the!labels!is!the!same.!
The!closest!encloser!is,!by!definition,!an!existing!name!in!
the!zone.!The!closest!encloser!might!be!an!empty!non-
terminal!or!even!be!a!wildcard!domain!name!itself.!!In!
no!circumstances!is!the!closest!encloser!to!be!used!to!
synthesise!records!for!the!current!query.
20
Closest!Encloser!and!the!Source!of!
Synthesis!(1/2)
©!Men!&!Mice!!http://menandmice.com!
Closest!Encloser!and!the!Source!of!
Synthesis!(2/2)
The!source!of!synthesis!is!defined!in!the!context!of!a!query!
process!as!that!wildcard!domain!name!immediately!
descending!from!the!closest!encloser,!provided!that!this!
wildcard!domain!name!exists.!"Immediately!descending"!
means!that!the!source!of!synthesis!has!a!name!of!the!form:



*.<closest encloser>.!
A!source!of!synthesis!does!not!guarantee!having!a!RRSet!to!
use!for!synthesis.!!The!source!of!synthesis!could!be!an!
empty!non-terminal.
21
©!Men!&!Mice!!http://menandmice.com!22
Domain Name in Query closest encloser source of synthesis
host3.example. example. *.example.
_telnet._tcp.host1.example. _tcp.host1.example. no source
_dns._udp._host2.example. host2.example. no source
_telnet._tcp.host3.example. example. *.example.
_chat._udp.host3.example. example. *.example.
foobar.*.example. *.example. no source
Closest!Encloser!and!the!Source!of!
Synthesis
©!Men!&!Mice!!http://menandmice.com!
other!wildcard!rules!(1)
•DNSSEC!does!not!allow!wildcard!NS!records



; this is not legal DNS data inside a DNSSEC

; signed zone



*.example.com. 3600 IN NS ns1.example.org.

*.example.com. 3600 IN NS ns2.example.org.
23
©!Men!&!Mice!!http://menandmice.com!
other!wildcard!rules!(2)
•in!SRV!record,!the!full!name!is!the!owner-name.!
There!cannot!be!a!wildcard!on!the!domain!part!of!an!
SRV!record!(same!for!TLSA,!DKIM!...)



; this is not a wildcard for the SRV record

_ldap._tcp.*.example.com. IN SRV 10 20 389 ldap-srv.example.com.
24
©!Men!&!Mice!!http://menandmice.com!
other!wildcard!rules!(3)
•Wildcard!DS!(DNSSEC!delegation!signer)!records!
are!ignored!
•Wildcard!DNAME!records!are!not!allowed!

(represents!a!threat!to!the!coherency!of!the!DNS)!
•If!a!source!of!synthesis!is!an!empty!non-terminal,!
the!answer!will!be!NOERROR!/!NODATA!(Answer!=!
0)
25
©!Men!&!Mice!!http://menandmice.com!
TL;DR
26
Be!careful!with!DNS!wildcard!records!
©!Men!&!Mice!!http://menandmice.com!
Thank!you!
!
Questions?!!Comments?
27

Contenu connexe

Similaire à Dns wildcards demystified

20th.陈晓鸣 百度海量日志分析架构及处理经验分享
20th.陈晓鸣 百度海量日志分析架构及处理经验分享20th.陈晓鸣 百度海量日志分析架构及处理经验分享
20th.陈晓鸣 百度海量日志分析架构及处理经验分享
elevenma
 

Similaire à Dns wildcards demystified (9)

PowerDNS Webinar
PowerDNS Webinar PowerDNS Webinar
PowerDNS Webinar
 
RIPE 70 Report Webinar
RIPE 70 Report WebinarRIPE 70 Report Webinar
RIPE 70 Report Webinar
 
WebCamp: Developer Day: The Big, the Small and the Redis - Андрей Савченко
WebCamp: Developer Day: The Big, the Small and the Redis - Андрей СавченкоWebCamp: Developer Day: The Big, the Small and the Redis - Андрей Савченко
WebCamp: Developer Day: The Big, the Small and the Redis - Андрей Савченко
 
Ensuring High Availability for Real-time Analytics featuring Boxed Ice / Serv...
Ensuring High Availability for Real-time Analytics featuring Boxed Ice / Serv...Ensuring High Availability for Real-time Analytics featuring Boxed Ice / Serv...
Ensuring High Availability for Real-time Analytics featuring Boxed Ice / Serv...
 
Tsig 17022011
Tsig 17022011Tsig 17022011
Tsig 17022011
 
An Empirical Study on the Risks of Using Off-the-Shelf Techniques for Process...
An Empirical Study on the Risks of Using Off-the-Shelf Techniques for Process...An Empirical Study on the Risks of Using Off-the-Shelf Techniques for Process...
An Empirical Study on the Risks of Using Off-the-Shelf Techniques for Process...
 
20th.陈晓鸣 百度海量日志分析架构及处理经验分享
20th.陈晓鸣 百度海量日志分析架构及处理经验分享20th.陈晓鸣 百度海量日志分析架构及处理经验分享
20th.陈晓鸣 百度海量日志分析架构及处理经验分享
 
ION San Diego - ARIN Support for DNSSEC and RPKI
ION San Diego - ARIN Support for DNSSEC and RPKIION San Diego - ARIN Support for DNSSEC and RPKI
ION San Diego - ARIN Support for DNSSEC and RPKI
 
PuppetConf 2017: What's in a Name? Scaling ENC with DNS- Cameron Nicholson, A...
PuppetConf 2017: What's in a Name? Scaling ENC with DNS- Cameron Nicholson, A...PuppetConf 2017: What's in a Name? Scaling ENC with DNS- Cameron Nicholson, A...
PuppetConf 2017: What's in a Name? Scaling ENC with DNS- Cameron Nicholson, A...
 

Plus de Men and Mice

Plus de Men and Mice (20)

Cisco Live 2019: New Best Practices for Hybrid and Multicloud Network Strategies
Cisco Live 2019: New Best Practices for Hybrid and Multicloud Network StrategiesCisco Live 2019: New Best Practices for Hybrid and Multicloud Network Strategies
Cisco Live 2019: New Best Practices for Hybrid and Multicloud Network Strategies
 
Part 3 - Local Name Resolution in Linux, FreeBSD and macOS/iOS
Part 3 - Local Name Resolution in Linux, FreeBSD and macOS/iOSPart 3 - Local Name Resolution in Linux, FreeBSD and macOS/iOS
Part 3 - Local Name Resolution in Linux, FreeBSD and macOS/iOS
 
Part 2 - Local Name Resolution in Windows Networks
Part 2 - Local Name Resolution in Windows NetworksPart 2 - Local Name Resolution in Windows Networks
Part 2 - Local Name Resolution in Windows Networks
 
Namespaces for Local Networks
Namespaces for Local NetworksNamespaces for Local Networks
Namespaces for Local Networks
 
How to send DNS over anything encrypted
How to send DNS over anything encryptedHow to send DNS over anything encrypted
How to send DNS over anything encrypted
 
The DNSSEC KSK of the root rolls
The DNSSEC KSK of the root rollsThe DNSSEC KSK of the root rolls
The DNSSEC KSK of the root rolls
 
The CAA-Record for increased encryption security
The CAA-Record for increased encryption securityThe CAA-Record for increased encryption security
The CAA-Record for increased encryption security
 
SMTP STS (Strict Transport Security) vs. SMTP with DANE
SMTP STS (Strict Transport Security) vs. SMTP with DANESMTP STS (Strict Transport Security) vs. SMTP with DANE
SMTP STS (Strict Transport Security) vs. SMTP with DANE
 
DNSSEC signing Tutorial
DNSSEC signing Tutorial DNSSEC signing Tutorial
DNSSEC signing Tutorial
 
BIND 9 logging best practices
BIND 9 logging best practicesBIND 9 logging best practices
BIND 9 logging best practices
 
DNS High-Availability Tools - Open-Source Load Balancing Solutions
DNS High-Availability Tools - Open-Source Load Balancing SolutionsDNS High-Availability Tools - Open-Source Load Balancing Solutions
DNS High-Availability Tools - Open-Source Load Balancing Solutions
 
Fighting Abuse with DNS
Fighting Abuse with DNSFighting Abuse with DNS
Fighting Abuse with DNS
 
What is new in BIND 9.11?
What is new in BIND 9.11?What is new in BIND 9.11?
What is new in BIND 9.11?
 
Yeti DNS - Experimenting at the root
Yeti DNS - Experimenting at the rootYeti DNS - Experimenting at the root
Yeti DNS - Experimenting at the root
 
Windows Server 2016 Webinar
Windows Server 2016 WebinarWindows Server 2016 Webinar
Windows Server 2016 Webinar
 
Kea DHCP – the new open source DHCP server from ISC
Kea DHCP – the new open source DHCP server from ISCKea DHCP – the new open source DHCP server from ISC
Kea DHCP – the new open source DHCP server from ISC
 
DNSTap Webinar
DNSTap WebinarDNSTap Webinar
DNSTap Webinar
 
RIPE 71 and IETF 94 reports webinar
RIPE 71 and IETF 94 reports webinarRIPE 71 and IETF 94 reports webinar
RIPE 71 and IETF 94 reports webinar
 
Keeping DNS server up-and-running with “runit
Keeping DNS server up-and-running with “runitKeeping DNS server up-and-running with “runit
Keeping DNS server up-and-running with “runit
 
PowerDNS Webinar - Part 2
PowerDNS Webinar - Part 2PowerDNS Webinar - Part 2
PowerDNS Webinar - Part 2
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Dernier (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Dns wildcards demystified