IFrame Injection Attacks in the wild

March 7, 2014

An HTML element is an individual component of an HTML document or web page. "iFrame" is one of these HTML elements, it defines an inline frame in the web page. An iFrame has the following format:


The Document Object Model (DOM) is a cross-platform and language-independent convention for representing and interacting with objects in HTML, XHTML and XML documents. With DOM, a user can easily manipulate the HTML elements with a script. A sample JavaScript code of the DOM is listed below:

 var node=document.getElementById("myList2").lastChild; document.getElementById("myList1").appendChild(node); 

iFrame Injection Attack is a method for an a attacker to embed code from another site by leveraging the iFrame tag with DOM. It is a popular way for drive-by-downloads. iFrame injection attacks are not quite as common as they once were on the web, however from time to time they do still happen. Dell SonicWALL Threat research team has observed multiple iFrame Injection Attacks in the wild.

iframe-injection image

Another example of the iFrame Injection can be in one of our recent SonicAlert Adobe Flash Zero Day(CVE-2014-0502) Exploit Analysis (Feb 27, 2014).

Dell SonicWALL Threat research team has created multiple IPS signatures to detect malicious iFrame tag in the web pages:

  • 7292 Suspicious HTML Iframe Tag 1
  • 7378 Suspicious HTML Iframe Tag 2
  • 9767 Suspicious HTML Iframe Tag 3
  • 10202 Suspicious HTML Iframe Tag 4