Hit by Ransomware: What to Do in the First 24 Hours
You arrive at work in the morning to find that files will not open, their extensions have changed and a ransom note has appeared on the desktop. This is one of the most stressful moments a company can face, and the decisions made in the first hours directly determine how much damage is done.
In this article we go through, in order, what to do and what not to do in the first 24 hours after a ransomware attack is discovered.
The first minutes: stop the spread
Ransomware often spreads across the network and encrypts every share it can reach. The first goal is to stop it spreading.
- Disconnect affected devices from the network. Unplug the network cable and turn off Wi-Fi.
- Do not switch the devices off. Shutting down a computer destroys traces in memory that can be extremely valuable to the investigation (in some cases even decryption keys). It is better to disconnect it and leave it as it is.
- Protect your backups. Immediately disconnect network-attached backup devices and cloud sync. Attackers specifically target backups. To make backups resilient to attacks, see the 3-2-1 backup rule.
- Cut remote access. Temporarily shut down VPN, remote desktop and remote management tools.
What not to do
- Do not contact the addresses in the ransom note. Talking to the attacker increases the pressure to pay and gives them information about your situation.
- Do not pay the ransom straight away. Paying does not guarantee your data will be returned or not published. First assess your recovery options with an expert.
- Do not rebuild systems from scratch immediately. Systems rebuilt without knowing how the attacker got in will be taken over again through the same door, and you destroy the evidence as well.
- Do not change passwords from a device that may be infected. If there is a keylogger on it, your new password goes to the attacker too. Use a clean device.
The first hours: understand the situation
Once the spread has been stopped, you need answers to these questions:
- Which systems and which data are affected?
- Are the backups intact, and when was the last clean backup taken?
- Is the attacker still inside the network?
- Could data have been exfiltrated before encryption?
The last question is especially important. Most ransomware groups today copy data before encrypting files and apply a second form of pressure: "pay or we publish". In that case, restoring from backup solves only half the problem.
Note down everything you notice at this stage: times, screenshots, a copy of the ransom note, accounts and programs that look unusual. These notes are needed for both the technical investigation and official notifications.
Whom should you notify?
- An incident response team: if your internal team lacks experience in this, get expert help without delay. We respond to cyber incident response requests the same day.
- Management and legal: the incident requires management decisions on business continuity, customer communication and legal obligations.
- The data protection authority: if personal data was affected, you must notify the authority within 72 hours of becoming aware (Turkey's Personal Data Protection Board under KVKK, or your supervisory authority under the GDPR). More: data breach notification and the 72-hour rule.
- The police: we recommend filing a criminal complaint. Preserved evidence matters in this process.
- Your insurer: if you have cyber insurance, your policy very likely requires the incident to be reported immediately.
At the end of the first 24 hours
In a well-managed incident, by the end of the first day the spread has stopped, the attacker's access has been cut off, the affected systems and data have been identified, intact backups have been found, preparation of the necessary notifications has begun and a recovery plan exists. After that, systems are cleaned, restored from clean backups and the entry point the attacker used is closed. For the most common entry points, see our article on RDP and VPN security; to prepare for future incidents, see our article on incident response plans.
Be ready next time
Most ransomware attacks start through a few well-known routes: unpatched internet-facing systems, remote access without multi-factor authentication, phishing emails and weak passwords. Once inside, the attacker usually spreads across the whole network thanks to weaknesses in Active Directory.
- Keep your backups separate from the network (offline or immutable) and test restores regularly.
- Require multi-factor authentication for remote access and email.
- Prepare an incident response plan that defines who does what.
- Commission a network penetration test and an Active Directory security assessment to see the attacker's paths in advance.
If you are facing an attack right now, contact us immediately.