Security/CVE

CVE-2020-14871 분석

Hyeon Gu 2024. 4. 25. 00:16

취약점 명

CVE-2020-14871 - SunSSH Solaris 10-11.0 x86 libpam remote root exploit


소개

  • Oracle Solaris 제품에서 발견된 사전 인증 스택 기반 버퍼 오버플로 취약점 입니다. - 해당 취약점은 인증되지 않은 공격자가 여러 프로토콜을 통해 네트워크에 액세스하여 Oracle Solaris를 손상시킬 수 있습니다.

Twitter

 

X의 hackerfantastic.x님(@hackerfantastic)

CVE-2020-14871 - well that was easy, SSH pre-auth RCE on Solaris through libpam. As a PoC trigger you need to ensure the remote host is using keyboard-interactive and then reach the vulnerable code path by specifying a blank username to get PAM to hit the

twitter.com

 

CVE - CVE-2020-14871

Vulnerability in the Oracle Solaris product of Oracle Systems (component: Pluggable authentication module). Supported versions that are affected are 10 and 11. Easily exploitable vulnerability allows unauthenticated attacker with network access via multipl

cve.mitre.org


영향을 받는 버전

  • Solaris 9, Solaris 10, Solaris 11

해결 방법

  • Solaris 10, 11 버전의 경우 2020년 10월 패치 이후 버전 업데이트
  • 패치가 불가피 할 경우 /etc/ssh/sshd_config 파일 편집하여 Chal-lengeResponseAuthentication no , KbdInteractiveAuthentication no 줄 추가 권고

실습 (상세 분석)

Solaris 취약점 공격 툴

  • 해당 툴은 Solaris 버전에 맞게 구성이 되어 있으며 쉘 코드에서 9999번 포트에 접근 할건지 8888번 포트에 접근을 할 것 인지 혹은 Solaris 11버전의 경우 execve를 바꾸고 브레이크를 걸어 접근 할 것인지로 선택할 수 있게 구성 되어 있습니다.

[취약점 툴 다운로드] (https://github.com/hackerhouse-opensource/exploits/blob/master/hfsunsshdx.tgz?fbclid=IwAR1nPvm90Ak-c688Cn6A9f22ETJuTh1RURcJW6161hKwNlXRs-5KYmfBTDk)


Solaris 버전 및 IP 주소

 

해당 Solaris 서버 SSH 접속

  • Solaris 서버 IP(192.168.48.131)와 Sun_SSH 버전과 포트에 맞게 설정 하게 되면 Solaris SSH에 접속하게 됩니다. 해당 IP와 버전만 알게 된다면 ID와 비밀번호 모르고도 root 권한으로 접속을 할 수 있게 됩니다.

호스트에 로그인한 사용자 정보 출력

  • 자세한 정보를 보기 위해 Solaris 콘솔창에 who를 입력해 본결과 console 의 경우 취약점을 이용한 SSH 이며, pts/3의 경우 해당 솔라리스 이고 pts/4는 Putty를 이용하여 SSH를 접속한 정보인 것으로 확인 되었습니다.