Menu: runbooks, process, how-to, NIS2, wireless

Runbook R1

Status
Published
Last reviewed
Written
Ask the runbooksSearches AdminCycle runbook content only. It does not generate answers.

    Results are passages quoted word for word from the runbooks, with a link to the section. Your question stays in this browser: it is not sent or stored.

    War-room mode: background text is hidden. Steps, commands, sources, warnings and decision points stay. Turn it off with the button above.

    Ransomware with isolated backups

    Files are being encrypted or a ransom note appeared. Contain it, protect the backups, and decide when to restore.

    What you are probably seeing

    • Users report files with a strange extension and a text note on the desktop or in every folder.
    • Documents on a file share open as garbage or not at all.
    • EDR or antivirus alerts about mass file changes or deleted shadow copies.
    • Backup alerts that make no sense: jobs deleted, retention shortened, a repository password changed.
    • Many accounts locked at once, or admin sign-ins at night from a machine you do not recognise.

    First 5 minutes

    1. Isolate, do not power off. Pull the network cable or Wi-Fi of the machines you know are affected, or use EDR network containment. Leave them running. CISA advises powering down only if you cannot disconnect them.
    2. Find the machine doing the writing on the file server (check below) and isolate it too.
    3. Pause backup jobs and replication that could overwrite your last good copy. Pause, do not delete.
    4. Start the incident log on paper or on your phone. If mail and chat run in the same tenant, assume the attacker can read them.
    5. Call from the printed contact list: your manager or the business owner, then the cyber insurer’s hotline if you have one. The copy on the file share may be encrypted, and the password manager may sign in through the directory the attacker now controls.

    Do not touch yet

    • Do not reboot or shut down “to stop it”, unless encryption is still spreading and you cannot isolate.
    • Do not connect the offline or immutable backup to anything on this network “to check it”.
    • Do not delete ransom notes, encrypted files, accounts or scheduled tasks. They are evidence.
    • Do not restore anything yet.
    • Do not contact the attacker and do not pay. That is a decision for management with legal and the insurer, not for IT tonight.

    Checks

    Which machine and account are writing to the share?

    On the Windows file server, read-only:

    Get-SmbOpenFile | Select-Object ClientComputerName, ClientUserName, Path | Sort-Object ClientComputerName

    Source: Get-SmbOpenFile, Microsoft Learn

    • One client and one account dominate, with files getting a new extension: isolate that client at the switch or with EDR, then disable the account (next check).
    • Many clients and many accounts: it is spreading or running from a server or privileged account. Contain the network segment, not machine by machine, and escalate now.

    Disable the account that is doing it

    Disable-ADAccount -Identity <samAccountName>

    Source: Disable-ADAccount, Microsoft Learn

    Disabling a service account stops whatever legitimately runs under it, such as printing or backups. Do it anyway if it is the account doing the encrypting, and log the time and the account name. Disable, do not delete or reset the password yet: the investigation needs the account as it was.

    Are the shadow copies still there?

    vssadmin list shadows /for=D:

    Source: vssadmin list shadows, Microsoft Learn

    • Present: do not restore from them on this server now. The attacker may still be inside.
    • Gone, and you had them yesterday: the attacker had admin rights on that server. Assume the domain is in scope.

    Is the backup still there, checked from a clean machine?

    Use a machine that is not on the affected network. If your backups are in a restic repository on separate storage, list the snapshots for the affected host:

    restic -r <repository> snapshots --host <hostname>

    Source: restic: working with repositories

    For other backup products, open the console or the repository from the clean machine and check the newest snapshot date and whether retention was changed. If the backup console signs in through the same directory, do not use it from the affected network.

    Are the hypervisors encrypted too?

    If VMs will not start and the datastore or host files have new extensions, the hosts themselves are in scope. Do not reconnect those hosts to the network. Rebuild hosts from clean media before you restore any VM onto them.

    Decision points

    • Every 30 minutes: send management an update on time, even when it is “no change”. Write the update time in the log.
    • Restore before you know how they got in? Often you will not know for days, and the business will not wait. Restore only if all four hold: (1) you restore into a new isolated network, not the old one; (2) every admin, service and backup credential is new; (3) remote access stays off except one MFA-protected path you built today; (4) management or the insurer has accepted the risk in writing. Log: “HH:MM restoring without confirmed root cause. Accepted by: ___.” If any of the four fails, keep investigating and give management a new update time.
    • Keep one way in for yourself. Cutting VPN and remote management tools may cut your own access, and the remote management tool may be how they got in. Decide which single path you keep, and log it.

    Alone?

    You drive and you write the log. Write one line before each change. Where this runbook needs a second person to accept a risk, get the business owner or the insurer on the phone and record their name, or take the non-destructive path and wait.

    Stop and escalate when

    • Encryption keeps spreading after you isolated what you know about.
    • Domain admin accounts or backup admin accounts were used by someone who is not you.
    • The backups are deleted, encrypted or you cannot check them from a clean machine.
    • Personal data may have been taken. Reporting deadlines may apply (for example GDPR, 72 hours). This is a reminder, not legal advice.
    • You need forensics. Call the insurer’s or an incident response firm’s responders before you wipe anything. For a first defensive look at a suspicious file, under written authorisation and in an isolated lab only, see H11 Analyse a malware sample from your own systems.

    What to tell management

    “We have a ransomware incident since about [time]. I am isolating machines now. Nobody should log on or reboot anything. We need the insurer and legal on the phone, and this will take days, not hours. Next update at [time + 30 min].”

    When someone says “just pay”:

    “Paying is a decision for management with legal and the insurer, not for IT tonight. It does not guarantee a working key, it can be unlawful if the group is under sanctions, and we still have to rebuild. I am continuing the recovery path meanwhile.”

    Points of no return

    • Wiping or reimaging any machine destroys evidence. Not before the insurer or responders agree.
    • Restoring over production overwrites what the investigation needs. Restore into a new isolated network.
    • Resetting the krbtgt password affects Kerberos for the whole domain. Follow Microsoft’s procedure (reset the krbtgt password, Microsoft Learn) together with the responders, not a script from a forum.

    After it is back up

    Run the incident review and record which steps of this runbook helped and which did not: P6 Handover, drills and learning after incidents. Check the backup routine: P2 Backup verification cadence.

    Sources

    Was this useful?

    Esc
    ↑ ↓ moveEnter openEsc close