Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

Cybercrime

New iFrame Injection Technique Attempts to Dodge Detection

Researchers with Sucuri have uncovered a new method being used by attackers to infect users via malicious iframes that have taken an extra step to mask their payloads.

Researchers with Sucuri have uncovered a new method being used by attackers to infect users via malicious iframes that have taken an extra step to mask their payloads.

“In today’s attacks, especially when we’re talking about drive-by-downloads, leveraging the iFrame tag is often the preferred method,” blogged researcher Peter Gramantik. “It’s simple and easy, and with a few attribute modifications, the attacker is able to embed code from another site, often compromised, and load something via the client’s browser without them knowing (i.e., silently).”

But recently, Sucuri found an example of attackers doing something different.

“The uniqueness is not in the use of an iFrame tag to embed the content, but rather in how it distributes the malware,” he explained. “You see, the attacker obfuscated the payload inside a PNG file.”

The iFrame loaded what appeared to be a valid file that was totally benign, jquery.js. 

“At first…we were stumped,” he blogged. “I mean the code is good, no major issues, right? Then we noticed this little function, loadFile(). The function itself wasn’t curious, but the fact that it was loading a PNG was – var strFile = ‘./dron.png. You’d be surprised how long of staring it takes to notice something like that. I know hindsight is a real kicker.”

Advertisement. Scroll to continue reading.

After opening the file, the researchers noticed a decoding loop.

“It’s taking the normal behavior of an iFrame injection, embedding it within the meta of the PNG file and just like that we have a new distribution mechanism,” Gramantik wrote.

“This is unique because in the level of effort being taken to obfuscate the payload,” he continued. “Most scanners today will not decode the meta in the image, they would stop at the JavaScript that is being loaded, but they won’t follow the cookie trail. This also talks to the benefit, at least for attackers, it’s exceptionally difficult to detect.”

“Do make note however that while in this specific case we’re talking about PNG, the concepts do and can apply to other image file types as well,” he added. “This only puts more emphasis on the importance of being aware of the state of your web server, understanding what files are and aren’t being added and modified and ensuring that vulnerabilities are not being exploited.”

Written By

Marketing professional with a background in journalism and a focus on IT security.

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing for the latest cybersecurity threats, trends, and expert insights.

Click to comment

Trending

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts.

Today’s attackers are no longer breaking in — they’re logging in. Join this live webinar as we break down the modern identity attack chain and examine how recent breaches exploited weaknesses in authentication, identity verification, and access management processes.

Register

AI has accelerated both sides of the fight. Adversaries are weaponizing vulnerabilities faster, while defenders are racing to ship detections and configurations. Join this live webinar as we explore how to prove your controls actually hold against new threats, map your security maturity, and unite breach simulation with automated pentesting into a single, coordinated program.

Register

People on the Move

Stephen Garcia has been named Chief Information Security Officer at BreachRx.

Kasper Lindgaard has been appointed Vice President of Security Strategy at CoreView.

Chaim Mazal has been named Chief Information Security Officer at GitLab.

More People On The Move

Expert Insights

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest cybersecurity news, threats, and expert insights. Unsubscribe at any time.