IT Pro is supported by its audience. When you purchase through links on our site, we may earn an affiliate commission. Learn more

A quarter of all malicious JavaScript is obfuscated

Hackers using concealed packers to avoid detection

JavaScript code on a screen

Hackers obfuscate over 25% of malicious JavaScript code to avoid detection, new research has found.

Analysis of 10,000 malicious JavaScript samples, representing threats like malware droppers, phishing pages, scammers, and cryptominers’ malware, revealed that at least 25% of the examined samples used JavaScript obfuscation techniques to evade detection, according to security researchers at Akamai

Obfuscation makes it harder for humans to understand the code running, but this is not the case for the machine, which will run it as normal.

Researchers said this significant percentage of files indicates continued adoption of obfuscation techniques by cyber criminals that want to stay under the radar.

While hackers use packers to compress and encrypt code to prevent detection, the obfuscated code samples appear similar. This is because the same packers are used, making the code structure similar despite having different functions. 

Researchers gave an example of four pieces of JavaScript code — two phishing codes, one malware dropper, and one Magecart scammer — with the same structure and executing the same obfuscation functionality.

“These four examples are the output of the same unique packer functionality being used to obfuscate any given JavaScript code,” said researchers.

By profiling packers and their functionality, researchers said they could evaluate 30,000 benign and malicious JavaScript files and see that at least 25% of the malicious files used one of five profiled packer functionalities.

Related Resource

How to plan for endpoint security against ever-evolving cyber threats

Safeguard your devices, data, and reputation

Man and woman looking at a laptop in an office building Free download

While many obfuscated code samples appeared to be malicious, the report said  0.5% of the 20,000 top-ranking websites on the web were also using obfuscation techniques.

The researchers found that legit websites use obfuscation for various reasons. Some use it to conceal their client-side code functionality, while others have code that a third-party provider obfuscated. Some also use it to protect sensitive information, like email addresses.

Researchers said this evidence sheds more light on the challenges of detecting malicious JavaScript. It shows that obfuscation alone is not enough to indicate the presence of malicious code.

“The approach for detecting malicious obfuscation requires more advanced machine learning techniques that enable differentiation between malicious and benign obfuscated JavaScript,” said researchers.

“A better approach for detection should be one that uses additional indicators and considers obfuscated code as suspicious till proven otherwise. Indicators can be in the form of website features, like domain age and website popularity rank, or in the form of JavaScript code features, like code size and complexity,” they added.

Featured Resources

The Total Economic Impact™ Of Turbonomic Application Resource Management for IBM Cloud® Paks

Business benefits and cost savings enabled by IBM Turbonomic Application Resource Management

Free Download

The Total Economic Impact™ of IBM Watson Assistant

Cost savings and business benefits enabled by Watson Assistant

Free Download

The field guide to application modernisation

Moving forward with your enterprise application portfolio

Free Download

AI for customer service

Discover the industry-leading AI platform that customers and employees want to use

Free Download

Recommended

Cyber resiliency and end-user performance
Whitepaper

Cyber resiliency and end-user performance

17 Aug 2022
Can't choose between public and private cloud? You don't have to with IaaS
Whitepaper

Can't choose between public and private cloud? You don't have to with IaaS

12 Aug 2022
Twilio account breach result of sophisticated social engineering campaign
Security

Twilio account breach result of sophisticated social engineering campaign

9 Aug 2022
Over 200,000 DrayTek routers vulnerable to total device takeover
Security

Over 200,000 DrayTek routers vulnerable to total device takeover

3 Aug 2022

Most Popular

UK water supplier confirms hack by Cl0p ransomware gang
ransomware

UK water supplier confirms hack by Cl0p ransomware gang

16 Aug 2022
Why convenience is the biggest threat to your security
Sponsored

Why convenience is the biggest threat to your security

8 Aug 2022
How to boot Windows 11 in Safe Mode
Microsoft Windows

How to boot Windows 11 in Safe Mode

29 Jul 2022