[보안] ssh 관련 x2 exploit 에 대하여

아직 패치되지 않은 sshd 를 이용하여 원격에서 root shell 을 획득할 수 있는

“x2”  라는 exploit 이 인터넷상에 공개되었습니다.

default 로 OpenSSH-1.2.2 가 설치되어 있는 레드햇 6.2 계열의 서버에서

테스트해 보았는데, 아래와 같이 원격에서 root shell 을 얻을 수 있었습니다.

아래는 실제 공격예입니다.

# ./ssh-exploit -t1  211.47.xx.xxx 22

password:xxxxxxxx

Target: Small – SSH-1.5-1.2.27

Attacking: 211.47.xx.xxx:22

Testing if remote sshd is vulnerable # ATTACH NOWYES #

Finding h – buf distance (estimate)

(1 ) testing 0x00000004 # SEGV #

(2 ) testing 0x0000c804 # FOUND #

Found buffer, determining exact diff

Finding h – buf distance using the teso method

…..중략……

No Crash, might have worked

Reply from remote: CHRIS CHRIS

***** YOU ARE IN *****

xxx.tt.co.kr

Linux xxx.tt.co.kr 2.4.12 #1 Fri Oct 19 19:05:21 KST 2001 i686 unknown

uid=0(root) gid=0(root)

groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)

이 상태는 이미 원격의 root shell 이 열린 상태이며 이 상태에서

hostname; uname -a; id; 를 입력한 것을 볼 수 있습니다.

이때 공격을 당한 서버에 남은 로그입니다.

Dec 16 23:56:27 xxx sshd[17385]: Disconnecting: Corrupted check bytes on

input.

Dec 16 23:56:27 xxx sshd[17387]: Disconnecting: Corrupted check bytes on

input.

Dec 16 23:56:27 xxx sshd[17388]: Disconnecting: Corrupted check bytes on

input.

Dec 16 23:56:27 xxx sshd[17389]: Disconnecting: Corrupted check bytes on

input.

Dec 16 23:56:27 xxx sshd[17391]: Disconnecting: Corrupted check bytes on

input.

Dec 16 23:56:27 xxx sshd[17393]: Disconnecting: Corrupted check bytes on

input.

Dec 16 23:56:28 xxx sshd[17399]: Disconnecting: Corrupted check bytes on

input.

Dec 16 23:56:28 xxx sshd[17426]: Disconnecting: crc32 compensation attack:

network attack detected

Dec 16 23:56:37 xxx sshd[17430]: Disconnecting: crc32 compensation attack:

network attack detected

Dec 16 23:56:41 xxx sshd[17432]: Disconnecting: crc32 compensation attack:

network attack detected

Dec 16 23:56:43 xxx sshd[17433]: Disconnecting: crc32 compensation attack:

network attack detected

Dec 16 23:56:49 xxx sshd[17436]: Disconnecting: crc32 compensation attack:

network attack detected

Dec 16 23:56:51 xxx sshd[17437]: Disconnecting: crc32 compensation attack:

network attack detected

Dec 16 23:56:55 xxx sshd[17439]: Disconnecting: crc32 compensation attack:

network attack detected

Dec 16 23:56:58 xxx sshd[17456]: Disconnecting: Corrupted check bytes on

input.

제가 속한 네트워크를 스캔해 보았는데,

이 exploit에 취약한 시스템이 여럿 있었습니다.

혹, 사용하시는 OpenSSH 버전이 3.0.1 이하이신 분들은

http://www.openssh.com/ 에서 반드시 3.0.2 이상으로

업그레이드하시기 바랍니다.

감사합니다.

   ———————————————————

     sec-info Mailing list 탈퇴를 원하시는분은 메시지 본문에

     다음과 같이 쓰신후 <Majordomo at

certcc.or.kr>로 메일을

     보내 주시면 됩니다.

           unsubscribe sec-info your-mail-address

   ———————————————————

*) openssh-3.0.2p1 소스 설치법을 [리눅스서버] 에 올려놓았습니다.

참고하세요..^^

서진우

슈퍼컴퓨팅 전문 기업 클루닉스/ 상무(기술이사)/ 정보시스템감리사/ 시스존 블로그 운영자

You may also like...

1 Response

water music 에 응답 남기기 응답 취소