Skip to content
KitploitKITPLOIT
工具漏洞利用博客
Log in
提交
工具漏洞利用博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
mqattack — Rust CLI for MQTT penetration testing: subscribe/publish, broker fingerprinting, ACL probing, topic enumeration, credential brute-force, and Last Will injection over TLS/mTLS. | Kitploit
工具/GitHubGitHub/affolter-engineering/mqattack
ReconnaissanceIoT SecurityPassword AttacksVulnerability AnalysisInformation GatheringNetwork SecurityPenetration TestingUtilities & FrameworksHardware & IoT SecurityAuthentication
GitHub
1795天前尚未审核
分享
affolter-engineering/mqattack

mqattack

Rust CLI for MQTT penetration testing: subscribe/publish, broker fingerprinting, ACL probing, topic enumeration, credential brute-force, and Last Will injection over TLS/mTLS.

查看仓库
内容在请求的语言中不可用。显示英文版本。

mqattack

A Rust-based MQTT penetration testing tool for the command line.

Features

  • Subscribe - listen to one or more topic filters
  • Publish - send a payload to a topic
  • Fingerprinting - allows to identify the MQTT broker
  • Check ACL - probe subscribe/publish permissions for one topic or a wordlist
  • Anonymous probe - single-shot check for unauthenticated access and what topics it can reach
  • TLS - broker verification with system or custom CA
  • mTLS - mutual TLS with client certificate and private key
  • JWT authentication - send a JWT token as the MQTT password
  • Insecure mode - skip certificate verification for quick testing

Installation

From source (with Nix)

nix-shell
cargo build --release

The binary is placed at target/release/mqattack.

From source (without Nix)

Requires Rust 1.80+, a C compiler and OpenSSL development headers.

cargo build --release

Nixpkgs

For Nix or NixOS users is a package available. Keep in mind that the latest releases might only be present in the unstable channel.

nix-env -iA nixos.mqattack

Usage

All commands share a common set of connection and authentication options:

Connection options:
  -H, --host <HOST>        Broker hostname or IP        [default: localhost]
  -p, --port <PORT>        Broker port                  [default: 1883]
  -u, --username <USER>    Username
  -P, --password <PASS>    Password (mutually exclusive with --jwt)
      --jwt <TOKEN>        JWT token sent as MQTT password
      --client-id <ID>     MQTT client identifier       [default: mqattack]
      --keepalive <SECS>   Keep-alive interval          [default: 60]

TLS options:
      --tls                Enable TLS with system root CAs
      --cafile <PATH>      Custom CA certificate in PEM format (implies --tls)
      --cert <PATH>        Client certificate for mTLS in PEM format (requires --key)
      --key <PATH>         Client private key for mTLS in PEM format (requires --cert)
      --insecure           Disable certificate verification — for testing only

Subscribe

$ mqattack subscribe [OPTIONS] -t <TOPIC>...

  -t, --topic <TOPIC>    Topic filter, repeatable
  -q, --qos <QOS>        QoS level 0/1/2         [default: 0]
  -C, --count <N>        Exit after N messages
      --hex              Print payload as hexadecimal
# Subscribe to all topics
$ mqattack subscribe -t '#'

# Subscribe to multiple filters, exit after 5 messages
$ mqattack subscribe -t 'home/#' -t 'sensors/#' -C 5

# Plaintext with credentials
$ mqattack subscribe -H 192.168.1.10 -u admin -P secret -t '#'

# TLS using system root CAs (default port 8883)
$ mqattack subscribe --tls -H broker.example.com -p 8883 -t '#'

# TLS with a custom CA
$ mqattack subscribe --cafile ca.crt -H broker.example.com -p 8883 -t '#'

# mTLS with client certificate
$ mqattack subscribe --cert client.crt --key client.key --cafile ca.crt \
  -H broker.example.com -p 8883 -t '#'

# JWT authentication over TLS
$ mqattack subscribe --tls --jwt 'eyJhbGci...' -H broker.example.com -p 8883 -t '#'

# Self-signed cert — skip verification
$ mqattack subscribe --insecure -H 192.168.1.10 -p 8883 -t '#'

# Collect for 5 seconds, print a grouped summary
$ mqattack sys-info -H 192.168.1.10

# Longer collection window
$ mqattack sys-info -H broker.example.com --tls -p 8883 -w 15

# Stream values live
$ mqattack sys-info -H 192.168.1.10 --live

Publish

$ mqattack publish [OPTIONS] -t <TOPIC> -m <MESSAGE>

  -t, --topic <TOPIC>    Target topic
  -m, --message <MSG>    Payload; use '-' to read from stdin
  -q, --qos <QOS>        QoS level 0/1/2         [default: 0]
  -r, --retain           Set the retain flag
# Publish a simple message
$ mqattack publish -t test/topic -m 'hello'

# Publish with QoS 1 and retain flag
$ mqattack publish -H 192.168.1.10 -t alerts/door -m 'open' -q 1 -r

# Pipe payload from stdin
$ echo '{"cmd":"reboot"}' | mqattack publish -t device/1/cmd -m -

# Publish over TLS with JWT
$ mqattack publish --tls --jwt 'eyJhbGci...' \
  -H broker.example.com -p 8883 -t device/1/cmd -m 'reboot'

# mTLS publish
$ mqattack publish --cert client.crt --key client.key --cafile ca.crt \
  -H broker.example.com -p 8883 -t test -m 'hello'

Fingerprint

Identify the broker software and version by subscribing to $SYS/# and analyzing the collected messages. No packets beyond a standard SUBSCRIBE are sent. The broker reveals itself through what it publishes.

Recognised brokers and their detection signals:

BrokerDetection signal
Mosquitto$SYS/broker/version value starts with mosquitto version
HiveMQ$SYS/broker/version value starts with HiveMQ
VerneMQ$SYS/broker/version value starts with VerneMQ
EMQXTopics under $SYS/brokers/ (plural); node name extracted from topic path
NanoMQTopics under $SYS/nanomq/ namespace
RabbitMQ$SYS/broker/version value contains rabbitmq

Confidence is reported as high when a known signature matches, low when $SYS/broker/version is present but unrecognized, and unknown when $SYS is accessible but yields no identifying information.

$ mqattack fingerprint [OPTIONS]

  -w, --wait <SECS>   Collection window in seconds   [default: 5]
      --verbose        Print all collected $SYS messages after the summary

Examples

# Fingerprint a broker on the default port
$ mqattack fingerprint -H 192.168.1.10

# Longer collection window for slow brokers, then dump everything
$ mqattack fingerprint -H 192.168.1.10 -w 10 --verbose

# Fingerprint over TLS with credentials
$ mqattack fingerprint --cafile ca.crt -H broker.example.com -p 8883 \
  -u admin -P secret

Example output (Mosquitto):

[+] Broker Fingerprint
    Software:              Mosquitto
    Version:               2.0.18
    Confidence:            high
    Build info:            With OpenSSL 3.0.2 15 Mar 2022

    Uptime:                12345 seconds
    Clients connected:     3
    Clients total:         47
    Messages received:     1082
    Messages sent:         2341

[*] 47 $SYS message(s) collected (use --verbose to see all)

Check ACL

Probe subscribe and/or publish permissions for one topic or a list of topics. Each test connects fresh to the broker and inspects the SubAck/PubAck returned. Results are reported as ALLOWED, DENIED, INCONCLUSIVE (no acknowledgement received) or SKIPPED.

Note: publish probes require QoS 1 or 2 (-q 1 or -q 2) to get a broker acknowledgement. QoS 0 always yields INCONCLUSIVE for publish.

$ mqattack check-acl [OPTIONS] (-t <TOPIC> | -w <FILE>)

  -t, --topic <TOPIC>     Single topic to probe (mutually exclusive with --wordlist)
  -w, --wordlist <FILE>   File with one topic per line (mutually exclusive with --topic)
      --no-subscribe      Skip subscribe permission tests
      --no-publish        Skip publish permission tests
      --payload <TEXT>    Payload used for publish probes    [default: mqattack]
  -q, --qos <QOS>         QoS for publish probes (1 or 2)   [default: 1]
      --wait <SECS>       Seconds to wait for a broker response per test [default: 5]
# Test a single topic (both subscribe and publish)
$ mqattack check-acl -H 192.168.1.10 -u admin -P secret -t 'home/lights/1'

# Test all topics from a wordlist, subscribe only
$ mqattack check-acl -H 192.168.1.10 -w topics.txt --no-publish

# Test publish permissions only with QoS 2
$ mqattack check-acl -H 192.168.1.10 -t 'cmd/device/1' --no-subscribe -q 2

# Check ACL over TLS with a custom CA
$ mqattack check-acl --cafile ca.crt -H broker.example.com -p 8883 -w topics.txt

# Use a custom payload and a longer wait window
$ mqattack check-acl -H 192.168.1.10 -t 'sensor/temp' --payload 'test' --wait 10

Probe anonymous access

下载工具

最受欢迎

查看全部 →

发现我们社区最常用的工具。

  • 1

    ghostlock-app

    yukonga/ghostlock-app

    针对 CVE-2026-43499 的一键式 Android 内核漏洞利用应用,通过内核模块加载实现权限提升,并提供偏移提取与设备端分析工具。

    960
  • 2

    wifit3

    derv82/wifit3

    Wifite 但仅限 USB 且跨平台。

    754
  • 3

    OsintHunter

    letox4/osinthunter

    🎯 终极 OSINT 工具包:调查图谱、置信度评分、别名家族、地图、时间线和报告。49 个模块、400+ 个站点,无需 API 密钥。

    631
  • 4

    jumpserver

    jumpserver/jumpserver

    JumpServer是一个开源的特权访问管理(PAM)平台,为DevOps和IT团队提供通过Web浏览器按需安全访问SSH、RDP、Kubernetes、数据库和RemoteApp端点的能力。

    501
  • 5

    SafeLine

    chaitin/safeline

    自托管WAF和反向代理,可过滤恶意HTTP流量、阻止SQL注入、XSS和机器人攻击,具备速率限制和动态HTML/JS加密功能。

    456
  • 6

    mcp-reverse

    1llu50ry/mcp-reverse

    MCP 服务器,提供 180 多个逆向工程工具,聚合了 Ghidra、IDA、x64dbg、Frida 以及其他 56 个后端,并内置原生二进制解析器和包含 4,200 项技能的知识库。

    343

探索所有工具

浏览我们的工具集合

查看所有工具 →