mqtwister

A Tool for Man-in-the-Middle (MitM) Attacks on the MQTT Protocol.

https://github.com/danielfeitopin/mqtwister

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.2%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

A Tool for Man-in-the-Middle (MitM) Attacks on the MQTT Protocol.

Basic Info
  • Host: GitHub
  • Owner: danielfeitopin
  • License: gpl-2.0
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 482 KB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created about 1 year ago · Last pushed 6 months ago
Metadata Files
Readme Contributing License Code of conduct Citation Codeowners Security Support Governance

README.md

MQTwister

***A Tool for Man-in-the-Middle (MitM) Attacks on the MQTT Protocol.*** [![Python](https://img.shields.io/badge/Python-black?logo=python&logoColor=white&labelColor=grey&color=%233776AB)](<#> "Python") [![License]()]( "License") [![GitHub issues](https://img.shields.io/github/issues/danielfeitopin/mqtwister)]( "Issues") [![GitHub stars](https://img.shields.io/github/stars/danielfeitopin/mqtwister)]( "Stars") [![GitHub watchers](https://img.shields.io/github/watchers/danielfeitopin/mqtwister)]( "Watchers") [![GitHub forks](https://img.shields.io/github/forks/danielfeitopin/mqtwister)]( "Forks")
![Usage Example](./docs/img/readme-terminal.gif)

Table of Contents

Setup

Using requirements.txt

For a classic installation, the file requirements.txt is provided.

  1. Clone the repository: sh git clone https://github.com/danielfeitopin/mqtwister.git cd mqtwister

  2. Create and activate a virtual environment: sh python -m venv .venv source .venv/bin/activate

  3. Install dependencies: sh pip install -r requirements.txt

[!NOTE] On Windows run .venv\Scripts\activate instead of source .venv/bin/activate.

Using Pipenv

For added convenience, the files Pipfile and Pipfile.lock are also provided.

  1. Clone the repository: sh git clone https://github.com/danielfeitopin/mqtwister.git cd mqtwister

  2. Install dependencies: sh pipenv install

Usage

  1. Configure the tool by editing the mqtwister/config.py file:

    python INTERFACE_NAME = '' # E.g. 'eth0' (Debian), 'Ethernet' (Windows), 'Wi-Fi' (Windows) TARGET_IP = ''

  1. Run the tool using the package as a module:

    sh python -m mqtwister

[!IMPORTANT] - Be sure to execute the command inside the virtual environment (if used). - Ensure you have the necessary permissions to run network sniffing tools.

[!TIP]

There is a useful function in mqtwister/utils/network.py to get a list of the available network interfaces: get_interfaces().

sh python -c "import mqtwister.utils.network as net; print(net.get_interfaces())"

License

📃 This project is licensed under the GNU General Public License version 2. A copy of this license can be found in the LICENSE file, and in the LICENSES folder.

| Permissions | Conditions | Limitations | | ---------------- | ------------------------------ | ----------- | | 🟢 Commercial use | 🔵 Disclose source | 🔴 Liability | | 🟢 Distribution | 🔵 License and copyright notice | 🔴 Warranty | | 🟢 Modification | 🔵 Same license | | | 🟢 Private use | 🔵 State changes | | _Table based on [choosealicense.com]()_
Why this license? ___ The initial intention was to license this project under the GNU General Public License version 3 (GPLv3) due to its enhanced legal protections, ethical considerations, and long-term sustainability. However, after reviewing the dependencies, it was determined that one of them is licensed under "GPLv2 only," which is incompatible with GPLv3. To ensure compliance and compatibility with all dependencies, the project is licensed under GPLv2. This decision aligns with the licensing terms of the included components while preserving the principles of open-source software. The permissive BSD-3-Clause-licensed components used in the project remain compatible with GPLv2, as their terms allow integration into projects under more restrictive copyleft licenses. ___
Used dependencies and their licenses ___
| Component | License | | :----------------------------------: | :--------------------------------------------: | | [![scapy_badge]][scapy_repository] | [![scapy_license_badge]][scapy_license_file] | | [![psutil_badge]][psutil_repository] | [![psutil_license_badge]][psutil_license_file] |
___

Contributing

🤝 Contributions are welcome! If you have improvements or bug fixes, feel free to submit a pull request.

❓ For support, please refer to the SUPPORT file for details on how to get help with this project.

📜 Please make sure to review the CONTRIBUTING guidelines and the GOVERNANCE document before getting started.

✅ By participating in this project, you agree to abide by our Code of Conduct.

🔒 Security is a top priority for this project. If you discover any vulnerabilities or have concerns regarding the security of this tool, please report them responsibly by following the SECURITY guidelines.

Support this project

⭐ If you find this project useful, please consider giving it a star on GitHub. Your support helps to improve and maintain the project!

Contact

📧 Feel free to get in touch with me!

[![GitHub](https://img.shields.io/badge/GitHub-%23181717?style=for-the-badge&logo=github&logoColor=%23181717&color=white)]() [![LinkedIn](https://img.shields.io/badge/LinkedIn-white?style=for-the-badge&logo=linkedin&logoColor=white&color=%230A66C2)]()

Owner

  • Name: Daniel Feito Pin
  • Login: danielfeitopin
  • Kind: user
  • Location: A Coruña
  • Company: @informaticapau

Graduado en Ingeniería Informática en la UDC. Interesado en programación (principalmente con Python) y ciberseguridad. Creador de @informaticapau.

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: MQTwister
message: >-
  A Tool for Man-in-the-Middle (MitM) Attacks on the MQTT
  Protocol.
type: software
authors:
  - given-names: Daniel
    family-names: Feito-Pin
    affiliation: Universidade da Coruña
    orcid: 'https://orcid.org/0000-0002-2548-457X'
repository-code: 'https://github.com/danielfeitopin/mqtwister'
keywords:
  - mqtt
  - cybersecurity
  - MitM
  - Man-in-the-Middle
license: GPL-2.0

GitHub Events

Total
  • Watch event: 1
  • Push event: 24
  • Create event: 4
Last Year
  • Watch event: 1
  • Push event: 24
  • Create event: 4