Moderator Note – While this is off-topic, we’re leaving it up for now since there seems to be a widespread issue. We do not need similar posts popping up, and there are useful answers. Do not take this as a sign that future questions like this will be welcomed. WordPress administration in general is off-topic, and Stack Overflow is not a resource to diagnose why any given site was hacked.
Until yesterday my site was working fine, I don’t know what happens from morning, site is not opening, when I try to open it’s automatically redirecting to tracking line site then to some other website, when I try to login for wp-admin
it shows this error:
window.stop();var step = "https://away.trackersline.com/away.php?id=43436-22-4734573234"; document.location.href=step; window.location.replace(step);
What is this? And what happened to my site? How can I get it back? and How can I protect my site from this kind of hacks?
3
Answers
I’m having the same issue starting a few hours ago. It seems like it’s exploiting some common flaw.
I’m solving it… and possible will have more info in an hour or so.
For now I can share the following:
And after it started redirecting to different url and chained redirects with spam and ads.
I’ll keep on digging and when find a solution for my case I’ll share it. Still have no clue on what was the flaw that allowed this and how to protect it from future attacks.
Following update:
So has some friends pointed out here, the vulnerability comes from Elementor Pro + Woocommerce. Thank you all cause did put me in right direction to solve it. After changing siteurl field at _options table, and regain access to wp cpanel and updating Elementor Pro plugin from version 3.5 to 3.12 (info says the vulnerability happens from 3.6 bellow) things started to get back in shape. After updating elementor it has also corrected the field _elementor_assets_data from the table _options, so no need to mess in there. I did change the following fields mailserver_url, mailserver_login, mailserver_pass, siteurl at table _options (just in case). I’m not so used to use phpmyadmin and was not seeing all the fields until I noticed the listbox to change the number of visible results. Also the search %away.trackersline% helped me to check if there were any leftovers.
The spam scan from bluehost gave the bellow result, but after opening the file and checking the code, I didn’t find any sign of it. So I guess it’s a false positive due to this being related to access drive.
Also doing a checkup to removing and updating some plugins. I have some backups from UpdraftPlus, but sincerily I think it’s safer not to restore and with least damaging to not use them. I’ve been also checking new users from past week no matter the role and deleted some clearly spam.
Nothing like a major shutdown at the website to clean the website and wondering about future, life and a good excuse to drink another coffee.
The issues are with the Elementor PRO vulnerability.
We got these issues across many of our sites earlier today, the catch was ELEMENTOR PRO which had BROKEN ACCES CONTROL that provided hacker to modify the SITEURL, Admin email and add new ADMIN users.
Symptoms
Investigation
For any redirection issues that happen on WordPress site, the problem lies under
<?php EVAL functions
before the opening tags of<?php
Solution
Read more about Vulnerability: https://wpscan.com/vulnerability/73e8e030-8e8b-43de-a602-c699ab2eafaf
OK so as Naqi pointed out the issue seems to be coming from an out of date Elementor plugin or vulnerability.
We couldn’t get into the website dashboard so I had to login to the main server and do everything by hand on the command line; I’m on Ubuntu.
First, the "wp_options" table had been changed. The home value was still set to the actual site but the SiteUrl option had been changed to the one you’re seeing in the redirect.
I’ve managed to reset this back to the original value and get back into the dashboard; I would advise this is the first thing you do.
Once in, go to your users and check how many admins you have; we had one extra with the details shared by Geme; delete that user immediately!
Then get yourself a plugin like WordFence and do a full scan of the system; change your scan options so that scans will check files outside of your WordPress installation. Ours reported some changes in plugins and it will let you change them or delete them. Go through it with a fine tooth comb.
Then have WordFence update your .htaccess file for added security.
Once you’ve done all that
Then, update ALL of your plugins and delete any that are not active.
This is one of the pitfalls of WordPress unfortunately.
Big lesson: Keep backups, (off your server, use a plugin like Duplicator Pro to export to an external storage like Dropbox, Google Drive etc and keep your plugins up to date.
I am still doing more scans since I had emails about a sql database and if I find anything else, I’ll post it here.