stfbk/mqttsa

Unable to perform attacks

duttaprayakhi opened this issue · 1 comments

We have successfully cloned mqttsa but after cloning we are unable to perform the attacks on normal mqtt traffic.

Please look into the matter ASAP.

Hi, sorry for the delay and thanks for the notice. Issues related to the use of Python 3.9+, the fpdf and pyshark Python modules. Until now I was not able to replicate the error since all hosts I tried use up to Python 3.8. Everything should work now.

To test MQTTSA with Docker, run:
docker run --rm -it ubuntu:20.04 (Python 3.8.10)
or
docker run --rm -it debian:11 (Python 3.9)

Then, from the running container:

apt update && apt install -y git python3 python3-pip mosquitto mosquitto-clients tshark
git clone https://github.com/stfbk/mqttsa.git
cd mqttsa && make

python3 mqttsa.py -t 5 --ni test.mosquitto.org

mosquitto > /dev/null 2>&1 &
python3 mqttsa.py -t 10 -fc 10 -sc 10 -mq 10 -mp 10 --md 127.0.0.1

If using a different container or environment, remember to allow non-superusers to capture packets, issue sudo adduser $USER wireshark and remove fpdf (with pip3) if already installed. Inside a Docker container it is not possible to use pyshark: from a VM, you can run mosquitto with no output (mosquitto > /dev/null 2>&1 &) and then python3 mqttsa.py -i lo -t 10 -fc 10 -sc 10 -mq 10 -mp 10 --md 127.0.0.1.