JavaScript Obfuscation Moves to Phishing Emails
Attackers are hiding malicious payloads in phishing emails via a technique traditionally used to hide malicious code planted on websites.
October 30, 2020
![](https://eu-images.contentstack.com/v3/assets/blt6d90778a997de1cd/bltc94608acf452fd67/655cf371ab171e040a838b2a/329050_DR23_Graphics_Website_V5_Default_Image_v1.png?width=1280&auto=webp&quality=95&format=jpg&disable=upscale)
JavaScript, the ubiquitous scripting language used across Web applications worldwide, is becoming a key ingredient in phishing campaigns looking to plant malicious code on victims' computers, new research shows.
Phishing attacks using JavaScript obfuscation techniques rose more than 70% from November 2019 through August 2020, according to Akamai lead researcher Or Katz.
Katz says that the reason for the rise in this attack technique is simple. "The fact that JavaScript is a scripting language that runs on the client side gives [attackers] the ability to create content, but only once that content is rendered on the browser of the potential victims, will the actual page be rendered and be presented to the victim," Katz says. "Only at that point in time will you see the actual phishing website asking for credentials or other personal information."
In the first of a series of blog posts on his research, he said "content escaping," while not a sophisticated obfuscation technique, is effective at hiding - or obfuscating - the malicious content of a message. It is also far more commonly used on malicious websites than in phishing or scam email messages. It's the technique's growing use in email that caught Katz's attention.
JavaScript has been used in fairly simple obfuscation techniques, but the obfuscation is becoming more sophisticated, he found. Take XOR decryption, which he's seeing in more and more campaigns. XOR (exclusive-or) is a technique taken from cryptography that makes contents smaller while creating a block of text that is unique for each message. The result is something that can't easily be defeated by simple signature-matching anti-malware techniques.
Katz then took a closer look a specific campaigns using the JavaScript obfuscation techniques. He notes In the second blog post that single malicious email messages are now carrying JavaScript code that uses multiple obfuscation and re-direction techniques, including URL cloaking, content escaping, and polymorphic functions at the same time. These techniques are "just the tip of the iceberg, as more complex techniques, including huge chunks of embedded dead code and anti-debugging, are constantly being used in the wild," he said in the post.
He told Dark Reading he believes JavaScript obfuscation will increase in email phishing attacks.
"There is a movement from using solely emails as a way to propagate phishing scams into social networks and messaging and social messaging platforms to deliver a lot of those scams," he says. "When you try to distribute attacks through of social media, then you are actually using the power of that platform to do a very rapid kind of distribution that is dependent on the trustworthiness of the people that are distributing them."
Because the techniques are being so successful, Katz says that they're not limited to a single criminal organization or geographic area: they're being used worldwide by a wide variety of threat actors. And because they can come from so many sources, and hide in so many ways, Katz says that basic user education may still be one of the most powerful tools to use against them.
It starts, he says, with reminding users that an email message that seems too good to be true probably is. And if the URL seems unusual, or appears from an unusual location in a message or on a Web page, that should be a red flag.
"Stop at that point, think twice and try to figure out if you need to give any personal information." If it's suspicious enough to make you think, he says, then it's almost certainly suspicious enough to make you stop.
About the Author
You May Also Like
Catch the Threat Before it Catches you: Proactive Ransomware Defense
September 5, 2024How to Evaluate Hybrid-Cloud Network Policies and Enhance Security
September 18, 2024DORA and PCI DSS 4.0: Scale Your Mainframe Security Strategy Among Evolving Regulations
September 26, 2024Harnessing the Power of Automation to Boost Enterprise Cybersecurity
October 3, 2024
[Virtual Event] The Essential Guide to Cloud Management
October 17, 2024Black Hat Europe - December 9-12 - Learn More
December 10, 2024SecTor - Canada's IT Security Conference Oct 22-24 - Learn More
October 22, 2024