A sophisticated website hijack campaign initially detected in February has seen a dramatic escalation, with security analysts now estimating that approximately 150,000 websites have been compromised.
The initial discovery flagged over 35,000 targeted websites. Himanshu Anand, a software engineer and security analyst at c/side, has continued to monitor the threat actor’s activities and uncovered new tactics and techniques employed in this expanding operation.
What’s new in this attack?
According to Anand’s latest findings, while the core method of attack remains consistent, the threat actor has introduced several notable changes.
UI/UX changes
While the UI of the injected malicious page has only undergone a slight redesign, the fundamental technique of using an iframe injection to display a full-screen overlay in the website visitor’s browser persists. This suggests the attackers are refining their approach to potentially evade less sophisticated detection mechanisms or to appear more legitimate to unsuspecting users.
Further analysis has revealed variations in the website hijack attack, with injected scripts and iframes designed to mimic well-known betting sites like Bet365. The attackers are often reusing official logos and branding to increase the plausibility of the fraudulent overlay.
HTML entity encoding
A development in this campaign is the use of HTML entity encoding within the injected code. In the static code, the malicious JavaScript is injected.
“This is an instance of HTML Entity encoding, a different way of obfuscating code. It makes the injected script less obvious at first glance,” Anand explained.
The analysis further uncovered JavaScript within the attack that decodes itself to reveal another layer of malicious intent. This ultimately results in another script being written to the compromised webpage.
Anand highlights that attackers “use obfuscation to hide the true nature of the script from quick scans or less sophisticated detections.”
This multi-layered obfuscation demonstrates the increasing sophistication of the threat actors involved.
Analysing the final JavaScript payload
Further scrutiny of the final JavaScript payload reveals several key aspects of the attack:
- Keyword-based detection logic
The script incorporates an array of keywords associated with betting, gambling, and casino brands in both English and Chinese. Examples provided include “bet365”, “WilliamHill”, “tyc”, “bwin”, “12bet”, “w88”, “宝威”, and “太阳城”.
The script then proceeds to examine the
The malicious code also includes a function called handleViewportTag() along with a mutation observer and a setInterval call. These mechanisms work to repeatedly inject a mobile-friendly viewport meta tag. This ensures that the fullscreen overlay is displayed correctly and optimally on mobile devices, which are increasingly used for web Browse.
- Fullscreen overlay and iframe injection
The attacker’s script generates a