mDNS
— Multicast Domain Name SystemMulticast DNS reuses the DNS message format and record types but sends queries to the multicast group 224.0.0.251 and to ff02::fb on port 5353. Every device acts as its own authoritative name server for names ending in .local, which is why printers, speakers and laptops can be discovered on a network with no configuration.
Interactive Session: How mDNS Works
Step through the packet exchange sequence between nodes.
Interactive Execution Sandbox
Interact with a live or clearly-labelled simulated instance of mDNS.
Threat Model & Attack Simulation
How this protocol is attacked in practice, what defenders can see, and which control stops it.
Threat model & attack simulation
SimulatedDefensive education. Every step runs in this page; no traffic is generated or sent.
mDNS answer spoofing
SpoofingA forged multicast answer maps a local service name to the attacker address.
Observe a query
The attacker watches multicast traffic for a printer or service discovery request.
Unusual hosts answering service discovery.
Service impersonation and possible credential capture.
Defences that matter
- Segment untrusted devices
- Filter mDNS at network boundaries
- Verify service identities where the application supports it
This is a conceptual model for defenders, not an exploit toolkit. It contains no payloads, tooling or instructions for attacking systems you do not own.
Protocol Specification & Architecture
Key characteristics, real-world deployment patterns, and trade-offs.
Core Technical Features
- DNS wire format with the same record types (A, AAAA, PTR, SRV, TXT)
- Queries and responses sent to 224.0.0.251 and ff02::fb on UDP 5353
- Probing and announcing to detect and defend name conflicts
- Cache-flush bit and a default TTL of 120 seconds for host records
- Often paired with DNS-SD for service instance discovery
Real-World Use Cases
- Zero-configuration discovery of printers and file shares
- AirPlay, Chromecast and smart home device discovery
- Resolving hostname.local on a home or lab network
Advantages & Strengths
- No server, no configuration and no DHCP option required
- Works across operating systems and is built into most platforms
Limitations & Vulnerabilities
- Traffic stays on the local link and does not cross routers
- Chatty on large networks and reveals device names to the segment