MQTT
— Message Queuing Telemetry TransportMQTT is an extremely lightweight, publish/subscribe messaging protocol created for constrained devices and low-bandwidth, high-latency or unreliable networks. It is the dominant communication backbone of smart homes, connected vehicles, and industrial telemetry.
Interactive Session: How MQTT Works
Step through the packet exchange sequence between nodes.
Interactive Execution Sandbox
Interact with a live or clearly-labelled simulated instance of MQTT.
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.
Topic hijack and ACL gap
InjectionA client that can subscribe to wildcards or publish to another device topic can forge sensor data or commands.
Connect to the broker
Weak or anonymous authentication lets the attacker join.
New client IDs and anonymous connections.
False telemetry, unauthorised actuation and data disclosure.
Defences that matter
- Per-client topic ACLs
- TLS with client certificates
- Disable anonymous access and monitor subscriptions
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
- Publish/Subscribe architecture decoupled by topics
- Tiny 2-byte header footprint for minimal battery & bandwidth consumption
- Three Quality of Service (QoS) delivery tiers (0, 1, and 2)
- Last Will and Testament (LWT) for automatic offline detection
- Persistent sessions and retained messages
Real-World Use Cases
- Smart home sensors (temperature, motion, light switches)
- Automotive telematics and GPS fleet tracking
- Industrial automation and SCADA sensor telemetry
- Mobile push notifications with low battery overhead
Advantages & Strengths
- Ultra low overhead and power usage
- Supports millions of concurrent connected sensors
- Bi-directional messaging between client and cloud
Limitations & Vulnerabilities
- Requires a centralized broker that can be a single point of failure without clustering
- Payload format is agnostic (usually raw bytes or JSON) with no built-in schema validation