IT Security
IT Security Basics: My Website Was Hacked! What Do I Do Now?
Restoring a hacked website is not as easy as simply running antivirus on the website files and quarantining any infected files. I also doubt, as a small business owner, you have the skill to deal with the technical aspects of recovering from an attack. Therefore, in this post I will provide a step-by-step guide for a non-technical person on how to recover from a hacked website.
The steps in this guide are based on my own experience of having one of my business websites hacked, I hope you will not go through the same pain I did to recover from an attack but instead learn from my experience.
To recover as cheaply and quickly as possible from an attack on your business website you need to be pro-active and first run through the following tasks. These tasks, if completed, will make the recovery process so much easier – believe me.
Pre-Attack Tasks
Pre-Attack Step 1 – Back-ups!
This One Step Will Increase Your Chances of Recovery – Dramatically!
Question: is your website being backed-up?
No?
Then stop reading this post, contact your hosting provider and get it organized ASAP.
Yes?
Then stop reading this post, contact your hosting provider and confirm the following:
- How can you prove that my website is being backed-up?
- What is the process to revert my website to a back-up?
- How long will it take to revert to a back-up?
The absolute importance of having your website backed-up frequently (a minimum of weekly, preferably daily) becomes very apparent when you work out that the website is so infected that it’s cheaper and faster to revert to a back-up.
In the case of my business website being hacked, I was lucky enough to have backups – BUT – no one checked them! So the last 6 months of back-ups were corrupted and I had to revert to a 7-month old back-up causing additional costs to me in the form of refunds to contributors and advertisers.
Pre-Attack Step 2: Lock-In Technical Help
Now that we can tick-off the most important task in our recovery guide let’s look at some additional planning tasks.
I will assume that you don’t have the technical skill to recover your website from an attack. So, you will need a technical person to help you with recovery.
The “person” can be the hosting provider’s support team or a third-party person you know of. What is very important is that before you need them, sometimes at extremely quick notice, day or night depending on your SLA’s, is that they will respond quickly when required.
Hosting Provider Help
Check with your hosting provider first if they provide a service to help you recover from an attack. The reason why you should check with them first is that normally the hosting provider will have not only complete access to your website code and database, but also the webserver that is hosting your website.
Sometimes it’s the webserver that has been hacked first so that needs to be fixed first. A third-party such as your website’s developer or designer will not have “god” access to the webserver so you will waste time and money if you first engage third-party help only to find that you need to contact the hosting provider as well.
If the hosting provider does offer a recovery service, sometimes called “Incident Response”, then confirm the following with them:
- Is the service offered 24x7x365? Sometimes the service is only operational during their business hours, sometimes it costs a lot more to engage them outside of their normal business hours. Ensure you check with them on the availability and costs.
- How long does it take to respond? I have heard of some hosting providers providing a 24x7x365 call center but after business hours they only take a message and make you wait until normal business hours to act on anything!
- What are the contact details for the recovery service? If you can, get more than one contact channel – such email address, contact phone number, webpage form, pager number for example.
- What tasks can they offer to help with recovery? Will they revert to a back-up for you? Will they stop traffic to your site while the recovery process is running? Will they examine the website to see how the attack occurred and fixed anything they see as a vulnerability? Will they help you restore infected files?
Tip: having trust that your host providing will respond as promised when you need them is honorable – but not wise. I recommend that you ring their service out of hours and check that they at least respond.
Third-Party Help
In this post when I refer to “third-party help” I am referring to a person or small business that probably helped build the website and maybe “hosting” it on your behalf using their own account with a hosting provider. I am definitely not referring to a professional incident response organization that charges $500 per hour and can fly people in from around the world to be onsite hosting a “war room”.
To be honest I would much prefer getting help from the hosting provider directly as they are normally setup for responding to attacks, have robust SLAs and have an active and large support team. But if for some reason, you need to use a third-party then it’s vital that you have an understanding between the two of you what will be required in the case of an attack. Get the understanding down on paper too as often peoples recollection of who will do what in the middle of an attack will often change!
The same questions I presented above for a hosting provider applies to a third-party but additionally you will need to ensure you have at least one third-party back-up just in-case you cannot reach them or they can’t help.
When my website was hacked, I relied on my web developer who was a contractor based overseas, this was not a smart idea because he was on a month-long holiday when I reached his rather pissed-off wife at 2am their time. It was a major bummer that he did not tell me about his holiday – I think his wife will also agree.
Create the “Under Maintenance” Web Page
Design an “Under Maintenance” web page that will be displayed to your visitors instead of the hacked website. You do not want your website visitors to be at risk of any malicious code the attackers added to your website that is designed to attempt to compromise your visitor’s computers.
The original website that was attacked should be blocked from Internet visitors and only your IP address and the IP addresses of your technical support people should be allowed to access the hacked website.
Agree on an internal communications plan
One of the most annoying things support people deal with is clients constantly asking for updates on progress. I know of people who ring up support every 10 minutes asking for an update and don’t seem to realize that every time they do this the support person is taken away from fixing the issue.
Agree with the support team on when you will be updated by them with a progress report.
Pre-Attack Step 3: So, Who is Looking After Your Website?
In my line of business, I often provide professional advice to businesses who have had their website hacked. After my own website was hacked 7 years ago, I do have some good advice to offer 🙂
Often, I find there is confusion as to who is supposed to be looking after the website regarding maintenance.
Most of the time, with small business, there is an assumption by the business owner that the web developer who built the website is responsible for its upkeep. The web developer on the other hand believes it’s the clients responsibility.
This results in the website never having patches or security updates applied, which 9 times out of 10 is the reason why the website was hacked.
Make sure that there is a clear and detailed maintenance plan for the website in writing. Ensure that the person responsible for patching and general maintenance is defined within that documented plan and that the person has signed the document as a statement of understanding.
The detail should cover when patching is performed (normally monthly or if a critical security patch has been released that the website is patched within 7 days of the critical patches release), what happens if a patch fails to install (roll-back) and what software is covered by the patching agreement.
Tip: the maintenance plan should also record who is responsible for backups and define the back-up schedule.
Pre-Attack Step 4: Communication Plan
Create a communications plan that defines all the entities that should be alerted to the attack. This must include your clients, staff, business partners, and any external parties that legally you must inform such as applicable government departments.
If your website accepts credit cards as payment, regardless of whether the website directly accepts the credit card details or the customer is redirected to a payment gateway provider you must contact your acquiring bank and the applicable card brands ASAP.
If the media would be interested in the attack ensure you have a statement written up for them. The last thing you need is media ringing you while you’re having a panic attack and there is no pre-written statement to read off from.
Pre-Attack Step 5: Website Alternatives
If the recovery process for the website takes more than a few hours to resolve then you may need to think about alternatives especially if your clients rely on the website for something such as functionality or data. For example, if your website provides a service to allow clients to manage their email marketing or provides share-market data feeds, you may have SLAs to consider.
Depending on your business, alternatives could be standby websites, manual execution of tasks or leveraging off a competitor’s website under an agreement.
This all comes under business continuity planning but my advice in the context of a website attack is, if standing up a backup website is part of your BCP then first consider – whatever caused the attack on your primary website maybe also residing in your standby site such as an un-patched vulnerability. Its not smart standing up your secondary website only to find minutes later its hacked as well. Now you have two websites to clean up!
Game On!
Okay, all pre-attack tasks have been completed. Let’s move to the steps I recommend taking if your website is hacked.
- Contact your primary technical support team that was setup in Pre-Attack Step 2: Lock-In Technical Help. Alert them to the website attack and ask them to display the “Under Maintenance” web page and lock down the hacked website to only be accessed by your IP address and their IP addresses. If you have followed my recommendations for setting up the support team you should know when they will contact you to provide a status update and what they will be able to do regarding recovery tasks.
- Run through your communications plan so you alert the required entities using your communication templates.
- Check that your mobile is fully charged so you don’t invoke Murphy’s Law and run out of battery at a critical point! Check that your email is working also as people will often emailed you regarding the state of your website.
- While you wait for the technical support team to attempt recovery of the website run through your BCP plan that we looked at in Pre-Attack Step 5: Website Alternatives. Depending on the severity of the attack you may be standing up your secondary website – ensure you are ready for this.
- If the technical support team do not contact you at the agreed update time then give them another 30 minutes as they may be at a critical juncture and would rather complete what they are doing. If they still have not contacted you after the 30-minute extension then contact them but don’t be too surprised if they do not answer – sometimes in the heat of the moment having absolute focus on fixing the issue is paramount.
- Hopefully the recovery is a success and your website is back up and running. If not, and the website cannot be recovered then you will probably have to revert to a back-up. This is when you thank me for reminding you to check that your website is backed up and the back-ups actually work. You’re welcome 🙂
- Now that your website is running again contact your technical support team for a debrief of the incident so you understand the following:
- What was the “thing” that allowed the attack to occur? Vulnerability? Weak passwords?
- Has the “thing” that allowed the attack to occur been fixed? If not then what is the plan to fix the “thing” and who is responsible for ensuring the “thing” is fixed. What is the timeline to fix the “thing”?
- Were there any lessons-learned? If so how can we improve of the response plan using the lessons-learned?
- Run through your communication plan updating the interested parties on the success of the recovery. You may want to provide some detail here regarding what steps were executed – this shows a professionalism in your ability to deal with an attack.
Summary
Well done for reading the entire post! If you implement the recommendations I have provided you will definitely be in a very strong position to deal with a website attack.
Finally, I think you will agree that the pre-attack tasks if implemented, make dealing with an attack so much more controlled and chances of a successful recovery much higher than thinking your website will never be hacked.