Skip to content

Inspect MQTT over TLS traffic with ease!

License

Notifications You must be signed in to change notification settings

nikitastupin/mitmproxy-mqtt-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

This script is ad-hoc solution for inspecting MQTT over TLS traffic. As far as I know Wireshark solves this problem but obtaining TLS master keys from IoT device might be a pain. Also you can log MQTT topics, just uncomment lines at the bottom of the mqtt_message.py.

Usage

Run mitmproxy as mitmproxy --mode transparent --tcp-hosts '.*' -s mqtt_message.py. Messages will be displayed at the event log (press shift + e).

Of course before that you have to prepare a target device and your host running mitmproxy:

If server requires x509 client authentication --set client_certs=cert.pem mitmproxy's option might be useful.

Roadmap

  • Add support for non-HTTP flows to the UI.
  • Implement parsing of MQTT packet types other than CONNECT, PUBLISH and SUBSCRIBE.
  • Add support for MQTT to mitmproxy including interception, modification and replay.

Credits