Zscaler 블로그

Zscaler 블로그의 최신 업데이트를 이메일로 받아보세요

Security Research

Malicious Hidden Iframes Using Publicly Available Base64 Encode/decode Script

image
THREATLABZ
May 02, 2010 - 2 분 소요
>Malicious Hidden Iframes Using Publicly Available Base64 Encode/decode Script

As we have seen, many websites are infected with malicious IFRAMES. The IFRAMES are either injected as plain text or they are heavily obfuscated using JavaScript. Obfuscation is intentionally used by attackers to bypass AV or IPS engines. Attackers are not only using simple obfuscation techniques to encode malicious IFRAMES, they are also using publicly available Base64 encoding/decoding routines to encode their content. Recently, we found one website which was infected with a malicious IFRAME leveraging such a technique. Here is the screenshot of the webpage:

image

As can be seen, the JavaScript code after the tag looks suspicious. Strings such as CRYPT.decode, CRYPT.obfuscate and eval() tell us that this script is likely malicious. Let’s format the code JavaScript so that it’s easier to read. Here is the formatted code:

image

This is the initial part of the JavaScript, which is being used to encrypt the script using signature and key strings. The key string is a long string containing upper and lower case characters, numbers and special characters. Let’s look at the remainder of the script:

image

Here, we see a function called _utf8_decode() being used to decode the script and there is also a call to an eval() function. If we decode it using a tool called Malzilla, you will see the following hidden malicious IFRAME:

image

Interestingly, the code used for this encoding technique is publicly available on the Internet. In fact, this Base64 encoding/decoding routine is a part of the webtoolkit. The name of the JavaScript file in question is “webtoolkit.base64.js”. Here is the screenshot of webpage:

image

In this case, the attacker has used the same code to encode the malicious script with a few minor changes such as adding an eval() function to the script. This shows just how easy for an attacker to create obfuscated JavaScript using publicly available code. Though, the webtoolkit JavaScript is being written for a legitimate purpose, attackers are taking advantage of the freely available code. Detection of this technique remains poor among antivirus vendors. Only 17 vendors out of 41 are detecting this malicious script. The Virustotal results also show that’s many large vendors such as Symantec, Microsoft, Mcafee, etc. are still missing protection for this malicious script. The IFRAME attacks are not new but we are now seeing attackers taking advantages of additional techniques to obfuscate their attacks. Has your source code used in such attacks?

That’s it for now.

Umesh

 

 

 

 

 

 

 

 

 


 

form submtited
읽어주셔서 감사합니다

면책 조항: 이 블로그 게시물은 정보 제공만을 목적으로 Zscaler에서 작성하였으며, 정확성, 완전성 또는 신뢰성에 대한 어떠한 보증도 없이 "있는 그대로" 제공됩니다. Zscaler는 제공된 정보를 기반으로 수행된 조치나 오류 또는 누락에 대해 어떠한 책임도 지지 않습니다. 이 블로그 게시물에 링크된 제3자 웹사이트나 리소스는 편의를 위해서만 제공되며, Zscaler는 해당 웹사이트의 콘텐츠나 관행에 대해 책임을 지지 않습니다. 모든 콘텐츠는 예고 없이 변경될 수 있습니다. 이 블로그에 접속함으로써 귀하는 본 약관에 동의하며 귀하의 필요에 따라 정보를 확인하고 사용할 전적인 책임이 귀하에게 있음을 인정합니다.

Zscaler 블로그의 최신 업데이트를 이메일로 받아보세요

양식을 제출함으로써 귀하는 당사의 개인정보 보호정책에 동의하는 것입니다.