News

Ransomware: a response plan for the first 24 hours

What to do when ransomware hits: isolate, preserve evidence, pay or not, notify the APDA, AEPD and INCIBE-CERT within 72 hours, restore and communicate.

The first 24 hours of a ransomware attack are worked in this order: isolate the affected machines from the network, preserve the evidence, do not pay without advice, warn the authorities and, if personal data is involved, notify within 72 hours, and restore only from verified backups. INCIBE, CCN-CERT and NIST agree on the essentials; none of them sets exact hours.

We should say where we have an interest: BDR Group offers cybersecurity through TutumSec, which includes incident response (DFIR). The guidance in this article comes from public bodies and applies with any provider. The order by hours is our own.

The plan in a table

Timeline of the first 24 hours of a ransomware attack: isolate the machines and cut remote access, preserve evidence and check the backups, warn advisers and authorities, then notify and prepare the restoration.
MomentWhat is done
First hourDisconnect the affected machines from the network, cut remote access, appoint who leads and start a log of actions
Hours 1 to 4Preserve evidence, delimit the scope, check that the backups are intact and isolated
Hours 4 to 12Warn advisers and authorities, assess whether personal data is involved, decide on the ransom
Hours 12 to 24Notify, communicate to whoever needs it and prepare the restoration from clean backups

First hour: isolate and confirm what is happening

INCIBE (Spain’s national cybersecurity institute) sums it up in one step: isolate the machine from the network so the attack does not spread, and be suspicious of the disks, network drives and cloud services connected to it. CCN-CERT (the computer emergency response team of Spain’s National Cryptologic Centre), in its guide BP/21 (April 2021), details the order when the encryption has not finished yet: disconnect the network drives (pull the cable or turn off wifi), check whether the malicious process is still active, take a memory dump of it if it is identified, stop it and, if it could not be identified, switch the machine off manually and immediately. If the attacker has remote access, it must be cut straight away. Switching off discards volatile memory, which is why CCN-CERT asks for the dump first when it is possible.

At the same time: appoint one person to lead the response, check that the backup servers are not on the affected network and do not format or reinstall anything yet. NIST (the US National Institute of Standards and Technology) asks for the facts discovered and the actions taken to be noted down; write down the time of each step.

Preserve the evidence before cleaning

NIST SP 800-61 Rev. 3 (April 2025) asks for the incident’s data and metadata to be collected and preserved, keeping their integrity and provenance, according to the organisation’s evidence retention procedures, and for the possibility of legal proceedings to be taken into account. A formal chain of custody does not always apply, but the data collected remains evidence.

In practice, keep:

  • The original ransom note, or a screenshot.
  • Two small encrypted files, without personal data: INCIBE asks for Word or Excel documents of less than 1 MB, and CCN-CERT accepts up to 2 MB.
  • The email or file that started the attack, if known.
  • The logs of the servers, the firewall and the antivirus.

INCIBE recommends cloning the disk before disinfecting it: the clone lets you test recovery without touching the original, and if there is no decryption tool today, there may be one in the future. This evidence also serves for the police report and for the notification.

Paying the ransom: what the authorities say

All the official sources we consulted advise against paying. INCIBE says "never pay", because there is no guarantee of recovering the data, the payment can attract new attacks or a higher demand, and it feeds the criminals’ business. CCN-CERT adds that paying does not guarantee that they will send the tool or the key and only rewards the campaign. ENISA (the EU Agency for Cybersecurity) recalls that there is no guarantee that the encryption was done properly or that payment will solve anything, and speaks of a consistent recommendation not to pay and to contact the authorities. The Andorran Police (Policia d’Andorra) said so in its 2014 and 2015 statements: it advises entirely against any payment.

In our view, the decision belongs to management, not to whoever is sitting at the affected machine, and it must be taken with legal advice and from an incident response team before any contact is opened with the attacker. Having clean backups is what takes the pressure off this decision. ENISA includes data theft among the actions of ransomware and points out that attackers may also pressure the victim’s customers and partners: check whether data has left, because it changes what must be notified and communicated.

Whom to warn

WhomWhen and how
APDA (Andorran Data Protection Agency)If personal data is involved: without delay and, if possible, within 72 hours of becoming aware of it, unless the breach is unlikely to result in a risk to people’s rights and freedoms (Article 36 of Andorra’s Llei 29/2021 on personal data protection). APDA form, with a partial notification within 72 hours and complete information within a maximum of 30 days
CSIRT-AD (Andorra’s computer security incident response team) and ANC-AD (the Andorran National Cybersecurity Agency)Mandatory for essential and important entities (Llei 22/2022, Article 15). Any company can ask for advice with an ANC-AD form
Andorran Police (Policia d’Andorra)Police report. Telephone 110 or 872000 and policia@policia.ad; in 2014 it reported a Technological Crimes Section
AEPD (Spanish Data Protection Agency; Spain, Catalonia)If personal data is involved, Article 33 of the General Data Protection Regulation (GDPR): 72 hours, including weekends and public holidays. Initial notification and amendment within 30 working days (AEPD guide)
INCIBE-CERT (Spain)Report the incident with the ransom note and two encrypted files. 017 helpline: free and confidential, every day from 8:00 to 23:00
Policía Nacional, Guardia Civil, Mossos d’Esquadra (the Catalan police)Police report, which INCIBE recommends so that the origin of the crime can be investigated

Four notes. The APDA clarifies that ransomware that encrypts data is a breach of availability, and that weekend and public holiday hours count. If you are a processor, warn the controller without delay (Article 36.2 of Llei 29/2021; Article 33(2) of the GDPR). In Catalonia, a private company notifies the AEPD, because the Catalan Data Protection Authority covers the Catalan public sector and the private sector carrying out public functions. And review insurance policies and contracts with customers: they may set their own deadlines.

Article 15 of Andorra’s Llei 22/2022 on the security of networks and information systems provides for an initial notification to CSIRT-AD within 24 hours and, in paragraph 1, a limit of 72 hours. On 23 June 2026 the Council of Ministers approved a draft amendment to that law which, according to the Government’s note, extends the obligation to notify incidents to all entities; it is a draft, not a law in force, and we have not reviewed its text. Check the applicable deadline.

Restoring from clean backups

INCIBE describes the order: isolate the machine, clone the disk, disinfect the clone by removing the malware and its persistence mechanisms (otherwise the data could be encrypted again) and either try to recover the files or restore. For recovery it recommends nomoreransom.org, a project backed by Europol with decryption tools when there are any. To restore, use a new or formatted disk, a clean installation of the system and the most recent backup from before the infection.

NIST adds three checks: verify the integrity of the backups before using them, look for indicators of compromise in the restored assets and fix the cause of the incident before returning to production, and restore essential services in the right order. We would start with authentication and the network, continue with the business applications and leave for last what can wait, changing passwords and keys before reconnecting.

CCN-CERT recalls what makes a backup useful: daily incremental backups, a backup server isolated from the rest of the network, room for more than one copy of the same asset (otherwise the encrypted copy could replace the only good one) and, ideally, a monthly disconnected copy.

Communication: internal, customers and suppliers

NIST asks for coordination of who needs to know what and when, for written procedures to be followed and for notifications to be made according to the applicable laws and contracts, including law enforcement and regulators as the plan provides. If the incident may pose a high risk to the people affected, Llei 29/2021 (Article 37) and the GDPR (Article 34) require informing them without delay, in clear language without technical jargon: what has happened, a contact point, the likely consequences and the measures taken. It is not required if the data was unintelligible because of encryption or if the risk has already been ruled out.

A single person speaks on behalf of the company, with short and exact messages. If the company’s email may be compromised, use an alternative channel to coordinate the team.

What to do now

  1. Write a one-page plan with the phone numbers of management, IT, suppliers, legal adviser and insurer, stored outside the systems that can be encrypted.
  2. Check the backups: isolated, with earlier versions and with a tested restoration.
  3. Decide who takes the decisions on payment and on notifications.
  4. Keep the contacts to hand: APDA, ANC-AD and the Andorran Police, or AEPD, INCIBE (017) and Mossos.
  5. Run a short drill with management: what do we do if tomorrow every machine shows a ransom note?

Frequently asked questions

Do you always have to notify the data protection authority?

Only if personal data is involved and the breach may pose a risk to people. If that is unlikely, there is no need to notify, but the breach must be documented (Article 36.5 of Llei 29/2021; Article 33(5) of the GDPR).

When do the 72 hours start counting?

From when the organisation becomes aware of the breach, and they include weekends and public holidays, according to the AEPD and the APDA. If the deadline is not met, the delay must be justified.

Can the affected servers be switched off?

Disconnecting them from the network is the safe step. CCN-CERT recommends switching off only if the malicious process cannot be identified, at the cost of losing volatile memory.

Are there tools to decrypt the files?

Sometimes. INCIBE refers to nomoreransom.org, which has a database of variants and tools. If there is no solution, keep the encrypted disk in case one appears.

Sources

Want a response plan before you need one?

If you want to prepare the plan or review your backups, start with the service page: Cybersecurity for businesses. The specialist work is done by TutumSec.

Back to News

News

Related articles