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.”

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

Advertisement. Scroll to continue reading.

“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

Click to comment

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.

SecurityWeek’s Threat Detection and Incident Response Summit brings together security practitioners from around the world to share war stories on breaches, APT attacks and threat intelligence.

Register

Securityweek’s CISO Forum will address issues and challenges that are top of mind for today’s security leaders and what the future looks like as chief defenders of the enterprise.

Register

Expert Insights

Related Content

Cybercrime

The changing nature of what we still generally call ransomware will continue through 2023, driven by three primary conditions.

Cybercrime

Luxury retailer Neiman Marcus Group informed some customers last week that their online accounts had been breached by hackers.

Cybercrime

As it evolves, web3 will contain and increase all the security issues of web2 – and perhaps add a few more.

Cybercrime

A recently disclosed vBulletin vulnerability, which had a zero-day status for roughly two days last week, was exploited in a hacker attack targeting the...

Cybercrime

Satellite TV giant Dish Network confirmed that a recent outage was the result of a cyberattack and admitted that data was stolen.

Cybercrime

Zendesk is informing customers about a data breach that started with an SMS phishing campaign targeting the company’s employees.

Artificial Intelligence

The release of OpenAI’s ChatGPT in late 2022 has demonstrated the potential of AI for both good and bad.

Artificial Intelligence

The degree of danger that may be introduced when adversaries start to use AI as an effective weapon of attack rather than a tool...