MQTT (Message Queuing Telemetry Transport) is a lightweight publish/subscribe messaging protocol designed for IoT devices and constrained networks. It runs on TCP 1883 for plaintext connections and TCP 8883 for TLS-encrypted connections. Nmap identifies the service as mqtt.
MQTT brokers (such as Mosquitto, HiveMQ, and EMQ X) are increasingly found during engagements involving IoT, ICS/SCADA, and smart building environments. Many brokers allow anonymous connections by default, letting anyone subscribe to all topics using a wildcard (#). This exposes sensor data, device commands, credentials, and internal telemetry. Publishing to control topics can manipulate connected devices directly.
Enumeration starts with connecting anonymously and subscribing to the wildcard topic to observe all traffic. Topic naming conventions often reveal device types, locations, and organizational structure. Checking for the $SYS topic tree exposes broker statistics, version, and connected client information. Credential brute-forcing and testing for authorization bypass between topics are standard next steps.
Enumeration
Detect brokers, map topics, and extract broker system info
MQTT Service Detection and Version Identification
MQTT Topic Discovery and Structure Mapping
Vulnerability Discovery
Guides for finding MQTT auth flaws, weak creds, and plaintext transport
MQTT Plaintext Transport Detection
MQTT Unauthenticated Access
MQTT Weak and Default Credential Check
Exploitation
Anonymous subscribe, unauthorized publish, retained message harvest guides
MQTT Anonymous Subscribe and Traffic Harvest
MQTT Retained Message Harvest
MQTT Unauthorized Publish and Device Control
Data Exfiltration
Capture and exfiltrate MQTT topic payloads including credentials and teleme