Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

Malware & Threats

Hacked WordPress Sites Target Random Users

Malicious actors have compromised thousands of WordPress websites and are randomly redirecting their visitors to sites that host malware and scams.

Malicious actors have compromised thousands of WordPress websites and are randomly redirecting their visitors to sites that host malware and scams.

According to Sucuri, attackers injected 10-12 lines of malicious code into the header.php file of the WordPress theme. The code checks the user agent and if the visitor is not a crawler, they are taken to various types of malicious websites via a redirect chain that involves the default7(dot)com, test246(dot)com, test0(dot)com, distinctfestive(dot)com and ableoccassion(dot)com domains.

Interestingly, not all users are redirected to malicious websites. The code injected into WordPress websites is designed for random redirects, with a 15 percent chance of a user being redirected. The attack sites also set a cookie to track returning visitors.

If the hacked website is accessed via Internet Explorer, the redirect chain is different and the user is served a malware downloader disguised as a Java or Flash update. Jérôme Segura, lead malware intelligence analyst at Malwarebytes, reported seeing tech support scam websites delivered via this attack.

A bug in the malicious code causes PHP to display the following notice: “Undefined index: 6FoNxbvo73BHOjhxokW3.” Searching for this string on Google returns more than 6,000 results — although the actual number of compromised websites is likely much higher considering that PHP notices are disabled on many servers.

Searching for this string on Google revealed that the malicious code had also been injected into the footer.php file of WordPress websites. The attackers appear to have switched to targeting the header.php file in April, but researchers discovered that the footer.php injections were more sophisticated as the malicious code was designed not only to redirect visitors, but also to push pop-ups, and the redirect URL could be easily updated by the attacker by sending a request to the infected website.

“In most cases, the infected sites had multiple vulnerabilities. The infection itself was part of a number of other infections in the environment (it wasn’t an isolated event). In some cases, the infection was the only infection and found within the active theme’s header.php file. This is a typical infection scenario when attackers have access to WordPress admin interface and can edit the current theme’s files directly from there,” explained Denis Sinegubko, senior malware researcher at Sucuri.

It’s worth noting that the same malicious code has been injected into the administrator/includes/help.php file of some Joomla websites, but there only appear to be a handful of affected sites.

Advertisement. Scroll to continue reading.

Last month, IBM Security warned WordPress website owners about an increase in attacks involving the C99 webshell. The company reported seeing nearly 1,000 attacks in February and March.

Related Reading: WordPress Sites Used to Power Layer 7 DDoS Attacks

Related Reading: Backdoor in WordPress Plugin Steals Admin Credentials

Written By

Eduard Kovacs (@EduardKovacs) is a managing editor at SecurityWeek. He worked as a high school IT teacher for two years before starting a career in journalism as Softpedia’s security news reporter. Eduard holds a bachelor’s degree in industrial informatics and a master’s degree in computer techniques applied in electrical engineering.

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.

Understand how to go beyond effectively communicating new security strategies and recommendations.

Register

Join us for an in depth exploration of the critical nature of software and vendor supply chain security issues with a focus on understanding how attacks against identity infrastructure come with major cascading effects.

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

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

Malware & Threats

The NSA and FBI warn that a Chinese state-sponsored APT called BlackTech is hacking into network edge devices and using firmware implants to silently...

Application Security

Virtualization technology giant VMware on Tuesday shipped urgent updates to fix a trio of security problems in multiple software products, including a virtual machine...

Malware & Threats

Unpatched and unprotected VMware ESXi servers worldwide have been targeted in a ransomware attack exploiting a vulnerability patched in 2021.

Cyberwarfare

An engineer recruited by intelligence services reportedly used a water pump to deliver Stuxnet, which reportedly cost $1-2 billion to develop.

Malware & Threats

Apple’s cat-and-mouse struggles with zero-day exploits on its flagship iOS platform is showing no signs of slowing down.

Cybercrime

No one combatting cybercrime knows everything, but everyone in the battle has some intelligence to contribute to the larger knowledge base.