Ransomware Attack: Your First 24 Hours, Step by Step
Ransomware is the one incident where the first hour genuinely decides the outcome - not because you need to move fast, but because three or four instinctive reactions in that hour permanently remove options you'll want later. This is the order that keeps them open.
Want to see what a professional report looks like? Read the sample report
Hour 0: isolate, and nothing else
Encryption spreads across a network faster than any human can respond, so the only thing that matters in the first few minutes is cutting the paths it travels.
Disconnect, don't shut down
Pull affected machines off the network - unplug Ethernet, disable Wi-Fi, disconnect VPN - and leave them powered on. This is the step people get wrong under pressure. A running machine holds evidence in memory that disappears on shutdown, and in some cases the encryption key itself is still resident there; several strains have been beaten that way. Shut it down and that possibility is gone for good.
The one exception: if you can watch files being encrypted right now, stopping the process beats preserving it. Active destruction outranks evidence.
Cut the shared paths immediately
Ransomware reaches the things that hurt most through shares and backups, so in the first few minutes: disconnect mapped network drives and file shares, isolate your backup systems from the network (this is the highest-value action on this page - encrypted backups are what turns an incident into a catastrophe), suspend sync clients for OneDrive, Google Drive, Dropbox and similar, since they will happily replicate encrypted files over your good cloud copies, and take hypervisor management interfaces off any network segment the attacker can reach.
Don't touch the ransom note
Photograph it, screenshot it, save a copy of the note file itself. It identifies the strain, and the strain determines whether a free decryptor exists. Deleting it to "clean up" throws away the most useful artefact you have.
Hour 1: identify what you're dealing with
Before any recovery decision, you need three facts: which strain, how far it spread, and whether data left the building.
Identify the strain
Take the ransom note and one encrypted file (a small, non-sensitive one) and run them through ID Ransomware, then check No More Ransom, the Europol-backed project that hosts free decryptors for many families. This takes ten minutes and occasionally ends the incident outright - some strains have broken crypto, some have had keys published after a law-enforcement takedown, and some are cheap imitations that never encrypted properly in the first place. Ten minutes against a five- or six-figure ransom demand is the best-value check in this entire guide.
Map the blast radius
Work out what's encrypted and what isn't: which servers, which workstations, which shares, which cloud storage, which backups, and which hypervisors. Be systematic - the instinct is to look at the loudest machine, but the one that matters is the quietest one that's still clean. You're drawing the line between what needs recovery and what needs protecting.
Assume exfiltration until you've checked
Most serious crews steal before they encrypt, because a stolen copy is leverage that survives your backups. Look for large outbound transfers in firewall and proxy logs in the days before the encryption, unusual archive files staged on servers, and traffic to cloud storage or file-transfer services that nobody uses. If data left, the incident is a notification and legal problem as much as a technical one, and the clock on that is often tighter than the recovery.
Hours 1-4: preserve, then notify
Preserve evidence before you start fixing
You will need this for the insurer, the regulator, and the question you most want answered - how they got in. Collect disk images or snapshots of a representative affected machine before rebuilding, copies of the ransom note and sample encrypted files, firewall, VPN, authentication and EDR logs for at least thirty days before the incident, and your own timeline of what was noticed when. Store it off the affected network. Log retention is the thing that bites here: thirty- and ninety-day defaults mean the evidence of the initial access - often weeks before detonation - is already expiring while you work.
Notify in the right order
- Your cyber insurer, first. Policies usually require notice within a fixed window and many mandate the use of their own incident-response panel. Engaging your own vendor before you call them can void coverage - check the policy before you hire anyone, including me.
- Legal counsel. They own the notification analysis: GDPR's 72-hour clock if EU personal data is involved, sector rules for regulated firms, and the sanctions question if payment is ever considered.
- Law enforcement. IC3 in the US, Action Fraud and the NCSC in the UK, your national police cybercrime unit or CSIRT elsewhere. The full country-by-country list is in how to report a cybercrime.
- Staff. Tell them what not to do: don't reconnect machines, don't plug in USB drives, don't discuss specifics externally. Give them one named contact for questions.
- Customers and partners - with counsel's input on timing. If their data or your service to them is affected, they will find out; the only question is whether they hear it from you first.
Hours 4-12: find the entry point
This is the step that decides whether you get hit again, and it's the one most often skipped in the rush to restore. Ransomware is the last act of an intrusion, not the first - someone had access for days or weeks before anything was encrypted.
The usual entry points, in rough order of frequency: an unpatched internet-facing appliance (VPN concentrators, firewalls and file-transfer products have been the dominant route for years), exposed RDP or SSH with weak or reused credentials, a phishing email that led to credential theft or a loader, a compromised third party or managed service provider with access into your network, and valid credentials bought from an initial-access broker - which leaves no malware to find at all.
Once inside, the path is almost always the same: privilege escalation, then Active Directory. If a domain controller was reached, treat every domain credential as compromised - that includes service accounts, and it means a krbtgt reset in the recovery plan. This is the part of an incident where how an attacker moves through Active Directory stops being theoretical.
Hours 12-24: plan recovery, don't improvise it
Validate backups before trusting them
Restore a sample to an isolated environment and actually open the files. The three failure modes, in order of how often they appear: the backups were reachable from the compromised network and are encrypted too; they run but the data is incomplete because nobody ever tested a full restore; or they're clean but they contain the attacker's foothold, because they were taken while the intruder was already inside.
Rebuild clean, in the right order
Don't decrypt and carry on - rebuild. Stand up a clean environment, restore data into it, and keep the compromised segment isolated until it's rebuilt or discarded. Reset credentials across the board, from domain and service accounts outward. Patch the entry point before anything goes back online, because restoring onto the same hole is the single most common way organisations get encrypted twice.
Sequence by business need
Identity and directory services first, then the systems that make money, then everything else. Decide the order at this stage, calmly, rather than letting whoever shouts loudest set the priority on day three.
What not to do
- Don't pay in the first hour. Check for a free decryptor, verify your backups, and talk to your insurer and counsel. The demand will still be there tomorrow, usually with a discount.
- Don't wipe machines before imaging. It destroys the answer to how they got in, which is how you end up back here.
- Don't reconnect "just to check something". One reconnected laptop re-encrypts a restored environment.
- Don't negotiate on your own. If payment is genuinely on the table, that goes through counsel and a professional negotiator, partly for leverage and partly because sanctions exposure is a real legal risk.
- Don't restore before finding the entry point. Recovery without root cause is a rehearsal for the next incident.
After the incident
Two things are worth doing once the business is running again. The first is a written post-incident report: the timeline, the entry point, what was accessed, what was done about it. Insurers, auditors, enterprise clients and boards all ask for it, and reconstructing it six months later is far harder than writing it now.
The second is testing the assumption the attack just disproved. An assumed-breach and ransomware readiness assessment starts from a foothold inside the network and measures how far it can actually get - which is precisely the question the incident asked and your defences answered badly. Where the entry point was internet-facing, external and internal network testing is the companion piece, and a free perimeter scan will at least show you what's still exposed today.
If you're in the middle of this now: the general emergency checklist covers the containment steps that apply to any compromise, and getting in touch gets you a direct answer from the person who'd be doing the work. If your insurer mandates their own panel, say so - I'd rather tell you that in the first message than complicate your claim.
Ransomware questions
Not in the first hour, and not before you've checked three things: whether a free decryptor exists for your strain, whether your backups are genuinely intact, and what your insurer and counsel say. Paying has real costs beyond the money - roughly a third of victims who pay don't get usable data back, decryptors are often slow and buggy, payment marks you as a paying target for the next crew, and in some jurisdictions a payment to a sanctioned entity is itself illegal. There are situations where paying is the rational choice, usually when backups are gone and the business cannot survive the downtime. That's a board decision with legal advice, taken on day two with facts, not a panic decision in hour one.
No. Law enforcement investigates, occasionally seizes infrastructure, and sometimes publishes keys recovered from a takedown - but no agency will decrypt your files on request. Report anyway: it feeds the intelligence that drives takedowns, it is often required for insurance claims, and some jurisdictions mandate it. The No More Ransom project is the one place where a law-enforcement operation might hand you a working key, and it's free to check.
With tested, offline backups and a rehearsed plan: days. With untested backups: one to three weeks, because most of that time goes on discovering which backups actually restore. With no viable backups and no payment: a rebuild from scratch, measured in weeks to months. The variable that matters most isn't the strain or the ransom amount - it's whether anyone has ever actually restored from your backups before this week.
Yes, substantially. Double extortion means the encryption is only half the leverage - they also hold a copy and threaten to publish it. That turns a technical recovery problem into a notification and legal one: restoring from backup resolves the downtime but does nothing about the stolen copy, and paying buys only a promise to delete data you cannot verify was deleted. Treat exfiltration claims as credible until disproved, get counsel involved on notification duties, and look for the outbound transfer in your network logs to understand what actually left.
Only if you've found and closed the entry point first. Restoring onto the same unpatched VPN appliance, the same exposed RDP port or the same compromised domain admin account gets you encrypted a second time, often within weeks - and re-infection is the most common outcome of a rushed recovery. Also check your backups for the dormant foothold: attackers typically sit in a network for days or weeks before detonating, so backups from that window may contain their access. Validate, then restore.
Encrypted and not sure where to start?
Containment, entry-point analysis and a report your insurer will accept. Remote, worldwide.