Is your website hacked? Most website admin, who reach out to us, see symptoms like their website redirecting, or spam pop-ups on their website. This can understandably be stressful. Let us put your mind at ease, you can fix your hacked website.
Before we get into cleaning the website, we need to make sure that your website is hacked. Scan your website with a security plugin to confirm the hack on your website.
Once you confirm the hack, the next steps will become a lot easier. In this article, we are going to explain step-by-step how you can identify and clean up the malware on your website.
TL;DR: Repair your hacked website with MalCare in minutes. MalCare’s algorithm helps you identify and clean even the most stubborn malware. Remember to act fast, because hacks get worse with time.
How do you know if a website has been hacked?
Before you can start cleaning up your hacked website, you need to confirm whether your website is hacked at all. Scanning is the best way to confirm a hack, but you should also be aware of the symptoms of a hack to help you identify a hack.
Symptoms of a hacked website
You cannot always be sure if a website is hacked. Depending on the type of malware, the symptoms of a hack can vary, or not appear at all. And if you’re not sure what to look for, malware can sneak up on you. Given that hacks get worse with time, it is important to identify them quickly. Therefore, you should know what symptoms to look out for in case you have a hacked website. Here are some of the most common symptoms that hacked websites show.
Check your Google search results
Google is very good at detecting malware. Their bots are on the constant lookout for malware as they crawl your website because they want to promote a safer browsing experience for their search engine users. If your website gets hacked, chances are that it will be visible on Google soon.
To check your Google search results, google your website specifically. For instance, if you are trying to search Twitter on Google, you can look up site:twitter.com. You can also search for specific keywords on your website by adding this after your search term. You will see the following issues on your Google search results, in case of a hack.
Junk meta descriptions
Meta descriptions are the small descriptions you see under search results that explain what the web page is about. Usually, it will be something that you set or a relevant snippet from your webpage. But if your website has been hacked, your meta description may show junk values, Japanese characters, or even unrelated keywords.
Hacks can often lead to spam pages being added to your website. You can check if this has happened by searching for your website on Google and checking if the indexed pages are around the same number as the pages on your website. If the number is way higher, these are spam pages being indexed on your website and is a sign of a hack.
As we discussed before, Google is committed to encouraging a safe experience for its users. As a part of this, they have launched the Google Safe Browsing initiative which crawls websites every day and flags them if it detects malware. The Google blacklist can come up as a number of notices, including a warning on the search results or a big red screen before you visit the website. Some of the warnings are:
Phishing site ahead
This site has been reported as unsafe
If you see any of these flags on your website search results, most likely your website has been hacked.
Check your website for issues
Some website hacks don’t show any symptoms at all. But some symptoms can appear on your website. The visible parts of your website that you visit every day, can tell you a lot about the overall health of your website. So watch out for some of these symptoms on your website.
If you see an unauthorized pop-up on your website, it is likely malware. These spam pop-ups are either meant to lure your customers to spam sites or get them to download malware disguised as freebies. While spam pop-ups are a strong indication of malware, they can also appear due to enabling ad networks on your website. If you notice this, scan and clean your website at the earliest to confirm.
Redirects to spam sites
Malicious redirects are a big problem. They can get chaotic as sometimes, along with the other pages on the website, the login page also redirects to other websites. If this happens, you can’t even log in to your website or stay on it for long enough to figure out what the issue is. Automatic redirects to spam sites are a sure sign of malware on your website.
Phishing is a type of social engineering attack that employs spoofing tactics to gain personal and financial information from users. Usually, a phishing page tries to look like an official page and has a bank logo or branding to make it look more convincing. If you see phishing pages on your website, it is definitely a sign of a website hack.
If you see pages that have random code at the top or bottom or see that the elements on the page look in a disarray, it could be a sign of malware. While broken pages can occur due to a malfunctioning plugin or theme, malware is a strong possibility.
White screen of death
The white screen of death is what happens when you visit your website and your browser goes blank. This is a stressful situation because you have no idea what went wrong or how to fix it. Also, there is no way to access your wp-admin when this happens, and you are locked out of your own website
Check your website backend
The backend of your website can also indicate if your website has been hacked. You can look out for symptoms on the backend as well. Although, if you are not an expert or someone who understands code logic, these can be impossible to detect.
A good way to look for symptoms on the website backend is to look at the activity log of your website. You can install a plugin such as WP Activity log to access the activity on your website and see if you notice any suspicious activity.
Strange code on your site
Your website is made up of code, and malware is also disguised as part of the code. So it could hide anywhere on your website and appear innocuous. If you notice any changes to the website code, or strange code on your website, you need to act fast and confirm the hack before it gets worse.
Unusual user activity
If there is any unusual activity from a certain user such as creating too many new posts in a short span, or changing the settings, this could be a symptom of a hack, or a compromised account, which can lead to a hack.
Escalation of privileges
Hackers often use existing website users, access their accounts, and escalate their privileges to get access to your entire website. This is why you need to look out for any website users whose privileges have suddenly been escalated without authorization.
Hackers don’t want you to find the malware. Therefore, they hide it in legitimate-looking folders like themes and plugins folders. Fake plugins are a propagator of malware. Fake plugin folders only have one or two files and are named strangely.
Look for any communication from your web host
Your web host is invested in the security of your website as a hacked website on their servers can cause them a lot of headaches. Therefore, most web hosts scan their websites on a regular basis.
If your web host sends you an email saying that they have detected malware, or if they suspend your site stating malware as the reason, it is a pretty safe bet to assume that your website has been hacked.
Another thing to look out for is server usage. If your web host tells you that your server usage has shot up without a significant change in your website traffic, this could be due to malware.
Pay attention to visitor feedback
Sometimes, hackers hide the malware from website admin specifically. So you may not see any of the mentioned symptoms, but your visitors may. If any of your visitors complain about spam pages on your site, or the site acting erratically, take this feedback very seriously and conduct a scan at the earliest.
Visitors often see symptoms that are missed by the admin such as getting spam emails from your website, or getting redirected when visiting your site. Even if the feedback is a complaint about your website not loading fast enough, you want to look into it as even the smallest of the symptoms can be a sign of malware.
Take a look at your website analytics
Your website analytics can tell you about more than customer behavior and CTRs. If you know what to look for, you can find the symptoms of malware in your website analytics. Here are a few things you can look out for.
The Google Search console scans your website intermittently and can detect malware on your website. If it finds malware, it will flag it and you can see the details under the ‘Security issues’ tab.
Spike in traffic from specific regions
If you suddenly see a spike in your traffic from specific regions or countries that are not necessarily a part of your target geographies, this could be a sign of malicious traffic on your websites, like bots or hackers. Spikes in traffic can be a forerunner to malware, or an indication of traffic going to spam pages. As a rule of thumb, it is just better to check these out regularly.
Pay attention to performance issues
When your website is hacked, you may not always get a big red notice that tells you it has been hacked. Sometimes, it shows up as smaller, less visible symptoms. These symptoms can be of any nature, but performance issues in your website are easy to miss if you aren’t vigilant. Pay attention to the following issues, as their presence could be a sign of malware on your website.
Site is slow
When your website is hacked, it is injected with malicious code and files. While malicious code in itself can wreak havoc on your website, its presence itself can cause issues. With the additional data of the malware, your website servers can get overwhelmed and your website’s loading time may be affected.
Certain hacks, like bot attacks, can riddle your website with requests and increase the loading time even more.
Site is inaccessible
Malware can make your site inaccessible for users and visitors alike. DoS attacks or redirect hacks can make it impossible to access your website or sometimes parts of it. Although it is impossible to not notice that your site is inaccessible, it is an added concern to gain access at the earliest so that you can clean it up.
Emails from the website go into the spam folder
Email services want to offer their users a safe experience, so they filter the incoming mails and send emails to spam if they notice anything suspicious about them. Hacked websites compromise their users’ online security. Therefore, any emails coming from hacked websites go directly to the spam folder.
While there are other reasons such as spam keywords or overtly promotional messaging for ending up in the spam folder, malware is a big reason. If the emails being sent from your website are regularly ending up in spam folders, this could be because your website is hacked.
Scan your hacked website
Just suspecting a hack is not enough, you need to confirm the hack before you can go ahead and clean it up. Scanning is the best way to diagnose your website and confirm a hack. There are a few ways in which you can scan your website.
Scan your website with a deep scanner
A deep scanner such as MalCare thoroughly scans your website and looks for well-concealed malware. Deep scanners are the perfect way to locate malware as they crawl through every nook and corner of your website and find even the slightest hints of malware, even if it is hidden in the most unlikely spaces.
Once you install MalCare, MalCare will scan your website automatically the first time. After that, you can set up an automatic scan schedule, or click on the scan button to scan your website.
In a matter of minutes, you will know if your website is hacked.
Scan your website with an online scanner
Online scanners such as the Sucuri Site Check scan the visible parts of your website for malware. While this is not completely effective, it can be a good first step in your diagnostics process.
Certain types of malware such as the pharma hack or the Japanese keyword hack can show up on the visible code of your website as these hacks alter the frontend code of your website.
But bear in mind that online scanners cannot be the only tool you use for diagnosing your website. If you get a positive result for malware, you can rest assured your site is hacked. Conversely, though, a clean chit doesn’t mean that your site isn’t hacked.
Scan your website manually
You can scan your website for malware manually. But we absolutely do not recommend this course of action. We are including this section so that you know all your options, but unless you know exactly what you are doing, it is unwise to do so. Chances are that you will miss something or potentially flag legitimate code as malware.
Additionally, there is no blueprint for malware. Junk code could be anything and hide anywhere on your website. So you have to be well acquainted with the code in the first place to detect malware.
Having said that, the first step to identifying malware manually is to look up the recently modified files on your website. You can do this through the File Manager. If you haven’t made the changes to the file that shows up, it is most likely malware.
The best course of action, as we have previously mentioned, is to use a security plugin like MalCare. MalCare is thorough and fast, which is necessary because hacks should be dealt with quickly. Once you have a definitive answer to whether or not your site is hacked, all you need to do is upgrade to clean it.
Some simple diagnostics to run
While scanning is the best way to confirm a hack, there are also some other simple ways in which you can diagnose a hack on your website. These diagnostics are not as accurate as security scanners but can give you a good insight into the health of your website.
Visit your website from an incognito window, and check if any symptoms show up.
Check the number of pages on your website when you run a site search on Google. If the number is much higher than the actual number of pages, it could be an indication of spam pages being indexed on your site.
Check the activity log for sudden user privilege escalation or ghost users.
Check for fake plugins in the wp-content folder. Fake plugins usually have odd names and only have one or two files.
Check if any plugins or themes you use have reported vulnerabilities. If yes, update these at the earliest.
These diagnostics can show up symptoms and give you a fair idea regarding the security of your website. But you should still use a security scanner to confirm the hack and be thorough.
How to repair a hacked website?
At this stage, you should have a confirmation of the hack. This information is what is going to help you with the next step i.e. cleaning your hacked website.
There are various ways to fix your hacked website and we have listed the three most common ways in which you can do it.
[RECOMMENDED] Fix hacked website with MalCare
The most effective and quickest way to repair your hacked website is to use MalCare. MalCare is designed by security experts after painstaking research and development. This expertise allows you to clean up every trace of malware from your site with the click of a button.
If you have already installed MalCare on your website, all you need to do is upgrade your account and click the auto-clean button, and voila! Your website is clean.
If you haven’t installed MalCare yet, go to the MalCare website, install MalCare, and auto clean your website. It’s as easy as that.
Hire a security expert
Another way to repair your hacked website is to hire a security expert who can manually clean your website for you. While this is not the best course of action, it is still preferred to a DIY clean-up.
Cleanup services by experts take time, as they do it manually. And consequently, they are expensive. While we cannot guarantee the quality of the services provided by every security solution, MalCare offers an emergency service with your subscription, if you require additional support along with the plugin clean-ups.
This also applies to repeated hacks or malware, where experts usually charge a fee per clean-up, but MalCare’s services are covered throughout the year within your subscription.
Repair your hacked website manually
Manual cleanups are not the most effective or quick, because unless you are a security expert, a lot of what you do will be trial and error. This takes time, which can worsen the hack. But if you accidentally make a mistake, it can actually worsen your situation.
We often deal with frantic calls from website admin who have tried to clean up their website manually and broken their website by accident. This takes way more time to fix than if you use any other method in the first place.
If you still need to repair your hacked website manually for any reason, here is how you can do it.
Make sure you have access to your website
In case your web host has suspended your account, and you have lost access to your website, the first thing to do is regain access. You can email your web host and request them to grant access for cleanup purposes. If they do not comply, you will have to use FTP to get a copy of your website, so you can clean it locally.
You can also ask your web host for the list of malware on your website. To know more about how to deal with a web host account suspension, you can go through our guide.
Take a backup of your website
The next step is to back up your website. It may be hacked, but at least you still have a website. In case something goes wrong during the cleanup, you can always restore it. But without a backup, you may lose all your website data if everything doesn’t go according to the plan.
Download WordPress core, plugins, and theme files from the repository
Before you can start cleaning, you need a reference. For this, you need to download clean installs of the WordPress core, plugin, and theme files. You can download them from the WordPress repository. But make sure that you download the same versions as the ones on your website. Otherwise, there may be differences in the code and you won’t be able to compare files.
Reinstall WordPress core
Now comes the tricky part. You will have to reinstall the core files to your website. Start with the wp-admin and wp-includes folders. You can directly replace these two folders as they do not contain any user content.
Once this is done, check the wp-uploads folder. This folder should not have any malicious PHP files. So if you come across any, delete them. Now you have to start looking for strange code in the files. Look into these files specifically:
We realize that strange code is a vague explanation but there isn’t one specific code that constitutes malware. So you will have to be extra careful. Especially since these are core files, do not delete anything unless you are absolutely sure it is malware.
Clean plugins and themes
Moving on, it is time to clean up the plugin and theme files. You will find these files in the wp-content folder. You will have to compare the clean installs with the files on your website. This can take a significant amount of time, so we recommend using an online diffchecker for this. This will help you find any differences in the two files. You can start by looking for the following active theme files:
Note: Given that themes and plugins are customizable, the customizations can show up as additional code. So in case you are deleting any code that is different from the clean installs, it might wipe out the customizations or stop the plugins and themes from working.
Clean database tables
The final step in the core clean-up process is the database. To clean up the database tables, you will require phpMyAdmin with which you can download and open the database tables and take a look at the code.
Now take a look at the database tables and see if you find any odd code or scripts. Start with your existing pages and posts because you know how they are supposed to look. You can find them in the wp-posts table. Also, look for newly created pages and posts, and see if you find any that were not created by you. Next, you can look into the wp-options table. These two tables often carry malware.
Remove all the backdoors
The cleaning of the files is only half the battle won. The malware came from backdoors in your website, and as long as the backdoors are still there, your site is still at risk. So the next step is to remove all the backdoors.
Backdoors can be present anywhere on your website so you need to look for them thoroughly. You can look for popular backdoor keywords such as eval, base64_decode, gzinflate, preg_replace, or str_rot13.
Note: These keywords are often present in backdoors but they also have some legitimate uses in plugins and themes and deleting these could cause problems in the functioning of the extensions.
Reupload clean files
It is now time to reupload all your cleaned files back onto your website. You need to first delete the existing files and database and then re-upload all the files that you have cleaned. You can use File Manager and phpMyAdmin for this.
Given that this process is exactly like restoring a manual backup, you can take a look at our comprehensive guide on how to do that.
The last thing to do is to clear the cache on your WordPress website. Cache is used to create copies of your website in order to load it faster. But if your website is hacked, chances are that the cached versions of it also have traces of malware. So even after the cleanup, your website might still have malware.
So to remove malware entirely from your website, clear the cache entirely from your website.
Use a security scanner to confirm
The worst is over, the clean-up is done! Now all you need to do is use a security scanner to confirm that your website is malware-free. This step is important because it tells you if your attempt was successful. If yes, you can move forward. But if not, you will have to recheck everything again. In this case, it is best to invest in a security solution.
What is the impact of a hacked website?
A hack can get your website blacklisted, your web host account suspended, and leave you with no website. But is that all? The impact of a hacked website is a lot more profound than the immediate effects. If not fixed in time, the consequences of a hack can get exponentially worse. These are some of the ways in which a hack can impact you:
Loss of revenue
Loss of traffic
Plummeting SEO rankings
Loss of customer trust
Damage to brand reputation
Clean up costs
This list is not exhaustive in any way. Depending on your website, the nature of your business, and the data on your website, the impact of a hacked website can be far wider.
How to revert the damage of a website hack?
A website hack affects your business, and users in many ways. Once the website is hacked, there is already a ton of damage, as we discussed earlier. You will need to take steps to revert this damage. Here are a few measures you can take to recover from a hacked site.
Scan your website for vulnerabilities
Request Google to take your website off the blacklist
Change all your passwords and ensure that strong passwords are used
Review all user accounts and check for any privilege escalations
Never use nulled themes or plugins
Use a security plugin with a strong firewall
How to prevent your website from getting hacked again
Your website is now malware-free. But did you know that a hacked website has a higher chance of getting hacked again? You might have spent hours or days cleaning up your website and still see another hack in a few weeks. This can be disheartening, but there are ways to avoid any future hacks.
Use a security plugin
The easiest way to make sure that your website is secure is to install a security plugin for WordPress. Of the many basic and advanced plugins available online, MalCare is one of the best. MalCare does a stellar job of scanning and cleaning hacks, but it also works in a protective capacity.
Plugins like MalCare can protect your sites from a variety of threats, including bots, spam links, and more. By using advanced firewalls and intelligent threat detection, Malcare’s plugins can make sure that your website is defended, even from new threats.
Update your website
Update everything on your website, no exceptions. Your themes, your plugins, your WordPress core, whatever you have installed on your website should be updated to its latest version as soon as possible.
The reason behind this is simple—updates patch critical software vulnerabilities. If you ever take a look at the changelog of your latest updates, you will notice a list of bugs and vulnerabilities that have been patched in that update. These vulnerabilities are usually discovered by security researchers, who inform the creators of that theme or plugin, allowing them to patch it immediately. Once the patch has been released, the vulnerabilities are made public, enabling hackers to target any website running the vulnerable code.
Unfortunately, many websites aren’t updated regularly, since the owners worry that the updates might break something. While this is true, the fact remains that not updating your website is far more likely to cause you losses than any delays caused by updating it.
Also, there are ways to update your website safely. You can take regular backups of your website that can be restored if an update breaks your website. But the safest way to update your website is using a staging server. You can safely test out new updates and features on a staging server before you deploy them on your website, this way updates are taken care of without compromising your website.
Harden your WordPress website
WordPress recommends a list of measures that website admin should take in order to secure their websites. This is known as WordPress hardening and includes a list of things such as using strong passwords and two-factor authentication. Take a look at how to harden your WordPress site in order to get detailed instructions for the same.
Use two-factor authentication
Two-factor authentication allows you to add an extra line of defense on your login page, which deters attacks on your login page such as brute force attacks. Two-factor authentication will usually ask you for a one-time password after your login credentials so that your website is extra secure from hacks.
SSL is basically encryption that protects any communication happening with your website. By installing SSL on your website, you make sure that none of the data is intercepted by hackers while sending or receiving requests from other servers.
SSL also helps you improve your SEO efforts as Google has started actively penalizing sites that do not use SSL.
Use strong passwords
This may seem like a common-sense measure, but even today weak passwords are one of the most common reasons for websites getting hacked. Admins usually pick an easy password so that they can remember it. But doing so can affect your website security.
We recommend using a password manager so that you can pick a strong password without having to memorize it for logging in every time.
Reset user accounts
User accounts are often responsible for hacks. Hackers gain access to one account and make their way towards the rest of your website through the account. So in order to make sure that your accounts are secure, change the credentials for all the accounts every once in a while.
How did your website get hacked?
Given that your website is made up of code, hacks are common. Because code cannot be foolproof, and there is no such thing as a 100% secure website. But that does not mean you cannot prevent hacks at all. In fact, with the right measures, you can secure your website really well.
So if you’re wondering how your website got hacked, it is probably one of the following reasons.
As we discussed in a previous section, backdoors are a big risk. Backdoors are basically loopholes in the website code that hackers exploit in order to gain access. These backdoors are usually injected through malware in one way or another. Since hackers design malware so that it stays hidden, backdoors often go undetected unless you have a strong security plugin.
Vulnerabilities in themes and plugins
Your themes and plugins files may have vulnerabilities that are exploited to hack your website. Vulnerabilities are mistakes or oversights in the website code that occur due to human error. Vulnerabilities, by themselves, are inevitable. But hacks can be prevented by frequently updating your website.
Developers patch vulnerabilities as soon as they are discovered, but in order to get the patch, you need to update your themes and plugins. If you have a strong security plugin like MalCare, it will detect vulnerabilities, as well as help you update themes and plugins from the dashboard itself.
Poor user management
If your users all have more access than they require, or their accounts aren’t secured, it can lead to a hack. The best course of action is to follow the principle of least privilege and hand down the access only as needed.
Also, it is important to delete old or inactive user accounts as they can be exploited by hackers to gain access.
Web host issues
While a rare occurrence, your web host could be responsible for a hack on your website. This hack could originate in the cPanel itself or one of the software that your web host uses. When this happens, all the websites on the web host’s servers are vulnerable to hacks.
If you find no other reason for your website getting hacked, look for the recent communication from your web host. Most web hosts usually inform their customers in case any issues arise from their end.
If your communication is unsecured, it can be intercepted by hackers or anyone on the same network as you. In order to avoid this, it is important to use SSL on your website.
SSL encrypts the communication to and from your website, so that no data or information falls into the wrong hands.
Why do websites get hacked?
Attackers and malicious actors hack websites for several reasons. But the primary reason that websites get hacked is that every website is valuable. Websites have resources that can be exploited if they are hacked. Even small websites can be used as a part of a botnet or their data can be exploited for phishing scams.
With bots being easy to use, brute force attacks are not even high effort. Hackers have to do very little to try and break into your website, and the payoff is still pretty good. Some hackers also hack websites for confidential information or financial data that can be exploited.
Given that hackers have nearly nothing to lose when they attack your websites, the onus of security falls onto the website admin. It is best to use a security plugin like MalCare to secure your website from any potential attack.
Website security is not a one-time task. You need a security plan that is frequently updated and worked upon. In order to do this, you also need to stay informed on website security.
One of the best ways to secure your website, in the long run, is to use a security plugin like MalCare. MalCare’s firewall protects your website from attacks and alerts you in case it finds anything suspicious on your website.
My website is hacked, what should I do?
If you think your website is hacked, scan your website to confirm. Use a deep scanner such as MalCare’s which will scan your entire website and notify you of any malware if detected. If the scanner detects a hack, all you need to do is click the ‘auto-clean’ button and MalCare will take care of the cleanup for you.
What happens if your website is hacked?
A hacked website can have far-ranging consequences, including but not limited to, customer loss, revenue loss, legal issues, data loss, business interruption, loss of brand reputation, loss of customer trust, and plummeting SEO rankings. These consequences can seriously affect the survivability of a business if not addressed in time.
How did my website get hacked?
There are several reasons for a website to be hacked, like:
Web host issues
Unsecured user accounts
Can a hacked website be fixed?
Yes, you can fix your hacked website. Depending on the malware and the extent of the hack, you will need to assess the damage and then take steps to clean it.
Here is how you can repair hacked website:
Scan your website with a security plugin
Get access to your website if it is suspended
Clean up your website with the security plugin
Get your website off any blacklists
Repair Your Hacked WordPress Website With MalCare!
The post How To Easily Repair Hacked Website? (Complete Guide) appeared first on MalCare.