Skip to content
KitploitKITPLOIT
أدواتعمليات الاستغلالالمدونة
Log in
إرسال
أدواتعمليات الاستغلالالمدونة
إرسال

أدوات الاختراق واختبار الاختراق والأمن السيبراني لترسانتك الأمنية!

Kitploit هو دليل لأدوات الاختراق والأمن السيبراني واختبار الاختراق. اكتشف آخر تحديثات المشاريع للعثور على الثغرات وتحليل الأنظمة وأتمتة الاختبارات وتعزيز أمنك.

الخلاصاتاتصالالخصوصية© 2026 Kitploit

دليل الأدوات

الفئات

عرض جميع الفئات
Loading categories
mqattack — واجهة سطر أوامر Rust لاختبار اختراق MQTT: الاشتراك/النشر، والبصمة التعريفية للوسيط، واستكشاف ACL، وتعداد المواضيع، وتخمين بيانات الاعتماد بالقوة الغاشمة، وحقن Last Will عبر TLS/mTLS. | Kitploit
أدوات/GitHubGitHub/affolter-engineering/mqattack
الاستطلاعأمان إنترنت الأشياءهجمات كلمات المرورتحليل الثغرات الأمنيةجمع المعلوماتأمن الشبكاتاختبار الاختراقالأدوات والمكوناتأمان الأجهزة وإنترنت الأشياءالمصادقة
GitHub
115منذ 4 أياملم تتم المراجعة بعد

الأكثر شعبية

عرض الكل →

اكتشف الأدوات الأكثر استخدامًا من قبل مجتمعنا.

استكشف جميع الأدوات

تصفح مجموعتنا من الأدوات

عرض جميع الأدوات →
مشاركة
affolter-engineering/mqattack

mqattack

واجهة سطر أوامر Rust لاختبار اختراق MQTT: الاشتراك/النشر، والبصمة التعريفية للوسيط، واستكشاف ACL، وتعداد المواضيع، وتخمين بيانات الاعتماد بالقوة الغاشمة، وحقن Last Will عبر TLS/mTLS.

عرض المستودع

mqattack

أداة اختبار اختراق MQTT مبنية بلغة Rust لسطر الأوامر.

الميزات

  • الاشتراك - الاستماع إلى مرشح موضوع واحد أو أكثر
  • النشر - إرسال حمولة إلى موضوع
  • البصمة - تتيح التعرف على وسيط MQTT
  • فحص ACL - اختبار أذونات الاشتراك/النشر لموضوع واحد أو قائمة كلمات
  • TLS - التحقق من الوسيط باستخدام CA النظام أو CA مخصص
  • mTLS - TLS متبادل مع شهادة العميل والمفتاح الخاص
  • مصادقة JWT - إرسال رمز JWT ككلمة مرور MQTT
  • الوضع غير الآمن - تخطي التحقق من الشهادة للاختبار السريع

التثبيت

من المصدر (مع Nix)

$ nix-shell
$ cargo build --release

يتم وضع الملف التنفيذي في target/release/mqattack.

من المصدر (بدون Nix)

يتطلب Rust 1.80+، ومترجم C، وترويسات تطوير OpenSSL.

$ cargo build --release

Nixpkgs

لمستخدمي Nix أو NixOS تتوفر حزمة. ضع في اعتبارك أن أحدث الإصدارات قد تكون موجودة فقط في قناة unstable.

 $ nix-env -iA nixos.mqattack

الاستخدام

تتشارك جميع الأوامر مجموعة مشتركة من خيارات الاتصال والمصادقة:

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

الاشتراك

$ 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

النشر

$ 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'

البصمة

تحديد برنامج الوسيط وإصداره من خلال الاشتراك في $SYS/# وتحليل الرسائل المجمعة. لا يتم إرسال أي حزم تتجاوز SUBSCRIBE القياسي — يكشف الوسيط عن نفسه من خلال ما ينشره.

الوسطاء المعروفون وإشارات الكشف الخاصة بهم:

الوسيطإشارة الكشف
Mosquittoقيمة $SYS/broker/version تبدأ بـ mosquitto version
HiveMQقيمة $SYS/broker/version تبدأ بـ HiveMQ
VerneMQقيمة $SYS/broker/version تبدأ بـ VerneMQ
EMQXمواضيع تحت $SYS/brokers/ (جمع)؛ يتم استخراج اسم العقدة من مسار الموضوع
NanoMQمواضيع تحت نطاق $SYS/nanomq/
RabbitMQقيمة $SYS/broker/version تحتوي على rabbitmq

يتم الإبلاغ عن الثقة كـ high عند تطابق توقيع معروف، وlow عندما يكون $SYS/broker/version موجودًا ولكن غير معروف، وunknown عندما يكون $SYS قابلًا للوصول لكنه لا ينتج أي معلومات تعريفية.

$ mqattack fingerprint [OPTIONS]

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

أمثلة

# 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

مثال على المخرجات (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)

فحص ACL

اختبار أذونات الاشتراك و/أو النشر لموضوع واحد أو قائمة مواضيع. يتصل كل اختبار بشكل جديد بالوسيط ويفحص SubAck/PubAck المُعاد. يتم الإبلاغ عن النتائج كـ ALLOWED، DENIED، INCONCLUSIVE (لم يتم استلام إقرار)، أو SKIPPED.

ملاحظة: تتطلب اختبارات النشر QoS 1 أو 2 (-q 1 أو -q 2) للحصول على إقرار من الوسيط. يعطي QoS 0 دائمًا INCONCLUSIVE للنشر.

$ 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

تعداد المواضيع

# Wordlist enumeration
mqattack enum-topics -H 192.168.1.10 -w mqtt-topics.txt

# Brute-force single-level topics under "home/"
mqattack enum-topics -H 192.168.1.10 --brute --prefix home --max-length 4

# Two-level brute-force (home/word/word) with longer window
mqattack enum-topics -H 192.168.1.10 --brute --prefix home --depth 2 -t 10

القوة الغاشمة للمصادقة

تنزيل الأداة