Malicious iframes have a basic configuration as shown below:
[iframe src= url/ width=1 height=1 stye=visibility: hidden;][/iframe]
They have this configuration so that hackers can hide these unwanted iframes by making them invisible. The iframe is created with width and height of 1 pixel, visually it’s just a point. They also specify a style that makes it invisible: hidden;’
These iframes are invisible to web surfers but they can be detected in the HTML code of your web page.
Let us take the previous malicious iframe example and pack it. It would look like the following:
If you look at the above code, it is hard to see if it is malicious or not. You will notice some words that appear suspicious, but may not be. Sometimes you may not see any suspicious text at all.
Simply copy the complete code, eval(function……..) and paste into the upper box. Click on the “Unpack” button. The final result will be shown in the second box and should be the actual code which should now be completely readable. Once the code is readable, you need to make sure that it is malicious or not before you delete it.
To hide malicious code, hackers sometime encode their scripts multiple times, so that even if you execute such a script you’ll get just another obfuscated or compressed script. The malicious script decodes itself and creates another encoded script which in turn creates another hidden malicious iframe.