Identification & causes: everything you need to know 👇
Last week, I revealed on LinkedIn an apparently widespread hack affecting owners of WordPress sites hosted with o2switch. As a WordPress security expert, and thanks to an investigation with a few colleagues, both affected and unaffected, we were able to learn more.
UPDATE 07/31/2024 – Summary
According to an internal source, the host would not be at fault at all. The hypothesis of insufficient maintenance of the hacked sites therefore remains the favored one. Still according to this internal source, the means the host has put in place to determine the precise origin of this issue are remarkable (I was given a few examples, and I approve of the strategy). Finally, even though the number of affected sites may seem high, it needs to be put in perspective with o2switch’s large customer base: the actual impact would remain very limited in proportion, and the vast majority of customers should not be affected by this specific issue.
What’s more, on the evening of 07/30/2024, o2switch made a remarkable gesture, very rare among big web hosts, by cleaning up the hack on the affected sites. It was a courageous reaction that surprised me coming from a host. Indeed, the biggest hosts tend to do the opposite, leaving customers to fend for themselves when the problem comes from the end sites themselves. The host’s commitment here is real and earns my utmost respect.
As a reminder, in security the most important thing is prevention: maintain your site with automatic updates and good backups, and don’t forget to use the latest compatible PHP versions. If you need help with that, it’s my specialty 😉
📄 How the hack works
The hack redirects mobile users to fraudulent sites, notably related to the Ukraine/Russia war, via a URL shortener hosted in the United Arab Emirates.
Technically, it consists of an injection of obfuscated JavaScript code into all of the site’s WordPress posts. It is therefore loaded in pages and articles, and sometimes in other plugins such as cookie plugins, user review plugins, and so on.
Here is a preview of the malicious code after de-obfuscation. Even without speaking this language, you can tell that the action takes place on click and that a random URL is selected based on the “UserAgent”, that is, the browser being used:

Additional info 07/31/2024
The request carrying out the hack could be a simple POST request on the site’s index.php file, as a log suggests, which seems to correspond to an actual hack from a US IP address (IP and site masked):
Jul-2024:213287:199.195.252.[HIDDEN] - - [27/Jul/2024:20:10:59 +0200] "POST /index.php?s=captcha HTTP/1.1" 200 102292 "https://www.[HIDDEN].fr/index.php?s=captcha" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MS-RTC LM 8; InfoPath.3; .NET4.0C; .NET4.0E) chromeframe/8.0.552.224"
Here we can see a 102,292-byte request made to the index, which is 100x larger than the usual requests of around 1,000 bytes. Especially since this site has no Captcha… What’s troubling is that the request results in a 200 code, meaning the request is accepted and processed without error, whereas visiting this URL should instead give a 404 (Not Found) error.
🔍 Identification
- The hack is sometimes inserted incorrectly into posts and displays as plain text in the body of pages instead of executing
- Most of the time it is invisible. You can check whether your site is affected by searching for “_0x365b”, or “0x3023”, or “function _0x”, using the inspector in your browser’s developer console when visiting the site, or by searching in phpMyAdmin
- Eset and Avast antivirus programs block access to the affected sites
- Update 07/31/2024 – One of the affected sites doesn’t show the code in the developer console; you need to use the “curl” command-line tool instead to see the malicious code. This may be due to the site’s cache.
Here is an example of the malicious code as seen from the developer console:

🌐 Spread of the hack
By searching for the hack’s pattern on Google and Bing, I found many infected sites. I contacted all of the site owners to alert them, advise them to contact their provider, and offer my help if needed.
- Out of 40 affected domains found in France and Belgium, only 2 are not with o2switch – update 07/30/2024: Some sites with OVH, Hostinger and various other hosts are also affected, but are rarer for now.
- Other foreign server providers are affected too, but I found fewer than in France.
- This suggests a targeted attack on sites located on o2switch IPs, which the hacker would have found through public lists that catalog them. This type of attack can target any host, which can’t do anything about it. That is why you need to be proactive about your security.
💡 Causes still uncertain
Here is what we were able to observe and deduce by cross-checking information among colleagues:
- Since the hack is insidious, many sites are not diagnosed and detected quickly, but the oldest occurrence appears to date from May – update 07/30/2024: potentially July instead
- It does not affect a specific plugin or theme
- o2switch’s Tiger plugin therefore doesn’t seem to be the cause of the problem either, since sites without this plugin are affected
- The affected sites generally seem to be less well maintained than others, but that’s true of most sites; and fairly well-maintained sites (perhaps not well enough) are affected too
- The exploited vulnerability may have come from WordPress core when it wasn’t updated quickly enough
- It may come from the use of an outdated PHP version set by the hosting account’s manager (the end customer)
- It’s possible that a second WordPress instance (a dev instance, for example) on the same hosting account, one that isn’t up to date, could affect the main instance due to a lack of isolation (it’s the same hosting account, the same system user, the same permissions, and there doesn’t seem to be an open_basedir rule to restrict the directory at the PHP level at o2switch)
- It doesn’t affect the customers of one specific o2switch server; they are spread across several shared servers, and some servers aren’t affected at all, which points to a marginal issue (so no server-wide or host-wide intrusion)
- There is a tiny probability that a broader intrusion or host-level vulnerability occurred (for example a flaw in a system package that enables the hack), but we have no evidence to verify it, and since o2switch hasn’t reported anything, it is more reasonable to think the problem comes from the end application (WordPress) or from the PHP version used by the end customer.
- – Update 07/29/2024 Finally, it’s possible that an Apache web server vulnerability was exploited, either before it had been properly patched, or because o2switch took too long to update its software versions. The dates seem to match for the most recent hacks. Here again, there’s no certainty without an official announcement from the host.
- – Update 07/31/2024 Vulnerabilities in PHP minor versions, notably in certain revisions of PHP 8.0, could explain the hack. This matches the observed requests, which could cause a buffer overflow and allow code injection. If the host’s PHP 8.0 minor versions are not up to date, that explains how the hack was possible. In any case, the customer is at fault if this is the cause, because PHP 8.0 is obsolete either way and should no longer be used at all. It is also no longer available for selection on LRob hosting plans.
- No hacks to report on LRob hosting.
🔨 Fixing the hack
The fix consists of cleaning the database by deleting the rows matching the hack’s pattern. Before any operation, back up your database. The website files don’t seem to be affected by this hack, but a full manual check is always recommended, as with any hack. Also remember to clear the various caches so the malicious code is removed from them as well.
Need help fixing your sites and staying secure in the future? Check out my WordPress repair and security services as well as my secure WordPress hosting.
If you have more info, share it in the comments or by private message!









Leave a Reply
You must be logged in to post a comment.