Ransomware: what to do in the first hours, and how to prevent it
You open a file on the company server and it won't open. Its extension has changed, and a message on screen asks for money to give your data back. That's ransomware: malicious software that encrypts your files and holds them to ransom. What you do in the first hours decides how much you lose. What you did before decides whether you can get back at all.
What ransomware is, and how it gets in
Ransomware is malicious software that encrypts the files and databases on your computers and servers. They stay where they are, but nothing can open them. The attacker then demands a ransom, usually in cryptocurrency, for the decryption key. Many attackers now copy your data before encrypting it, and threaten to publish it if you don't pay.
Attacks rarely start with anything sophisticated. These are the usual ways in:
- A convincing email with an attachment or link, made to look like an invoice, a shipping notice or a message from the bank.
- A stolen or reused password for an email or VPN account, especially without two-step sign-in.
- A service exposed to the internet for no reason, such as Remote Desktop (RDP) open to the world.
- A computer or firewall that hasn't been updated for a while and has a known flaw.
- Pirated or "cracked" software from an untrusted source.
Attackers often spend time inside the network before encrypting anything, looking for the servers and the backups so they can reach them first. So having a backup isn't enough. The attacker must not be able to reach it.
What to do in the first hours
If a ransom note appears or files start changing to a strange extension, your first goal is to stop the spread, not to fix everything at once.
- Disconnect affected computers from the network: unplug the network cable and turn off Wi-Fi. Avoid shutting them down if you can, because some evidence is lost on restart.
- Disconnect any attached backups: external drives, NAS devices or backup folders on the network, before the encryption reaches them.
- Pause syncing on affected computers: OneDrive, Google Drive and shared network folders, so encrypted files don't spread everywhere.
- From a clean computer, change the passwords of important accounts: administrator accounts, email, VPN and the backup system. Turn on two-step sign-in if it isn't on already.
- Write down what you see: photograph the ransom note with your phone, and note which computers are affected, when the problem was noticed and the new file extension. You'll need this to identify the ransomware and how it got in.
- Tell the right people: management, your IT lead or the company that runs your IT, and your legal adviser if customer or staff data may have been stolen.
What not to do
- Don't wipe or reinstall affected computers straight away. You'll lose the evidence of how the attacker got in, and may erase files that could have been recovered.
- Don't plug the backup drive into a computer you haven't confirmed is clean to try a restore.
- Don't contact the attackers or open their links before you've agreed a plan with whoever is handling the incident.
- Don't trust unknown decryption tools from the internet. Some of them are more malware.
- Don't put systems back on the network until you know how the attacker got in, or they'll come back the same way.
Should you pay the ransom?
It's management's decision in the end, but paying guarantees nothing. The key may never arrive, or arrive and not work on every file, and stolen data can be published anyway. A company that paid once is a known target for another attempt. That's why cybersecurity agencies generally advise against paying.
Before deciding anything, check the No More Ransom (opens in a new tab) project. It collects free decryption tools for some types of ransomware, provided by law enforcement agencies and well-known security companies. Identify the ransomware from the note and the file extension, then search for it there.
The best position is never to face this decision at all: to have a clean copy you can restore from.
Recovery: back to work on clean systems
Recovery isn't just copying files back from the backup. Restore them onto systems the attacker is still inside, and they'll be encrypted again.
- Find out how the attacker got in and close that route: the stolen account, the exposed service or the unpatched computer.
- Rebuild affected servers and computers, or wipe and reinstall them, rather than "cleaning" them and carrying on.
- Choose a backup from before the attack began, and check it before relying on it. Encryption may have started before anyone noticed.
- Restore systems in the agreed order: what the company can't work without comes first, such as accounting, databases and email.
- Watch the network closely in the days that follow, and change every password that may have been exposed.
This is where you see the difference between a company with a written recovery plan it has rehearsed, and one that finds out mid-crisis that its backup is incomplete.
How to prevent an attack
No single product stops ransomware. What works is a few simple layers applied to every device and every account, not just some of them:
- Two-step sign-in on email, VPN and every form of remote access. A stolen password on its own is then not enough.
- Regular updates for operating systems and software, and for firewalls and network devices too, which are often forgotten.
- Nothing exposed to the internet without a reason: no open RDP, and remote access through a VPN only.
- Administrator rights aren't for everyday use: staff work from standard accounts, and admin accounts stay separate and few.
- Managed protection on every computer and server, with its alerts watched, not a free program installed and forgotten.
- Protected email: filtering for dangerous attachments and links, and SPF, DKIM and DMARC so nobody can send as your company. Our guide why company emails go to spam explains them.
- Training staff on phishing: what it looks like, and what to do after doubting a message or clicking a link by mistake. Reporting quickly, without fear of blame, limits the damage.
- Separate networks: guests, cameras and servers each on their own, so one infected computer can't easily reach everything.
- No pirated software on company computers.
Backups: your last way back
Everything above makes an attack less likely, but not impossible. What decides whether you get back to work without paying is your backup, as long as the attacker can't reach it.
- At least one isolated copy: disconnected from the network, or immutable, so nobody can change or delete it for a set period.
- Separate credentials for the backup system, not tied to everyday network accounts, and protected with two-step sign-in.
- A copy off-site or in the cloud, so one incident can't take everything.
- Regular, real restore tests, not just a backup job that says it succeeded.
We cover this in detail in Business backup: the 3-2-1 rule and restore testing.
When to get help
If an attack is happening now, don't wait. Every hour the attacker stays inside the network adds to what they can reach. If it hasn't happened, the best time to review your protection and backups is before you need them.
We build ransomware protection as part of our cybersecurity service: two-step sign-in, updates, firewalls, device protection and a written incident procedure. Through our backup and disaster recovery service we keep a copy ransomware can't reach, and test restoring from it.
Think your systems are infected, or want to know where you stand? Get in touch and an engineer will review your situation and tell you the next step.
Common questions
Can files be decrypted without paying the ransom?
Sometimes. Some types of ransomware have free decryption tools on the No More Ransom site, but many newer types don't. The reliable way back is restoring from a clean backup.
Is antivirus enough to stop ransomware?
It helps, but it's one layer. Many attacks start with a stolen password, an unpatched computer or a convincing email, and antivirus on its own stops none of those. So we combine it with two-step sign-in, updates, email protection and isolated backups.
Are files on OneDrive or Google Drive safe from ransomware?
Not automatically. If files are encrypted on a synced computer, the encrypted versions sync to the cloud. Version history may help you roll back, but it isn't an independent backup under your control.
Are small companies targeted too?
Yes. Many attacks are automated and look for any open gap, whatever the size of the company. Smaller companies are often less protected and less ready to recover, so an attack hits them harder.
Should we report the attack?
Tell management and whoever runs your IT straight away. If personal data about customers or staff may have been stolen, check with your legal adviser what Egypt's Personal Data Protection Law requires of you.
Can Double Backslash help if we're attacked?
Yes. We contain it first: we isolate affected devices, reset compromised accounts and cut off the attacker's access. Then we restore from clean backups, and write up what happened and what we changed to make a repeat less likely.


Let's talk about your IT.
Tell us how IT is handled in your company today. One of our engineers reads it and gets back to you. The first conversation is free and doesn't commit you to anything.
Talk to an IT expertWhat happens next
- You tell us about your environment
- We review your needs
- We schedule a conversation
- We propose the right approach

