Problem solve Get help with specific problems with your technologies, process and projects.

Avoiding the invisible: How to defend against iFrame attacks

How can enterprises and users protect themselves from malicious content embedded in iFrames? Expert Nick Lewis explores iFrame attack mitigations.

I've read that attackers can use iFrames to embed malicious content that is so small on the screen as to be invisible...

to users. Are there any mitigations that enterprises can put in place to defend against iFrame attacks? How can users be advised to avoid a threat they can't see?

Ask the expert

Have questions about enterprise information security threats for expert Nick Lewis? Send them via email today! (All questions are anonymous.)

Embedding an image, iFrame or other content in a way that that is invisible to a user is an old attack method that dates back many years to when images were the same color as the background. Hacker group Fluffi Bunni performed one of the most infamous iFrame or banner attacks when the group forced to serve up compromised ads. IFrame attacks have increased with the widespread adoption of ad networks and the increasing inclusion of content from third-party sites via iFrames. While there are valid uses for iFrames when including content from external websites, enterprises need to trust the security of the content they receive from all sites. In a blog post, Symantec outlined some of the weaknesses exploited in attacks via iFrames, including potential browser and SSL certificate security flaws.

Enterprises can protect their customers from iFrame attacks by not using iFrames to include content from third-party sites. Instead, all of the content can originate from the enterprise's website as did during its encounter with Fluffi Bunni, but this option can cause problems when pulling in new ads. Enterprises can also take a hybrid approach, where the content that would be included in the iFrame is downloaded to the server, checked for malware or potentially malicious external references by a Web reputation service for all external links and then publish locally. To stop malicious links or JavaScript, the content can be changed into benign image files.

End users can do very little to defend themselves against iFrame attacks apart from what they should already be doing, which means following the standard advice of running as a regular user, keeping up to date on patches, running antimalware software, etc. These normal procedures help minimize the risk posed by an iFrame attack.

This was last published in December 2012

Dig Deeper on Web application and API security best practices