Cybersecurity from the Ground Up · Course book
Chapter 5: Malware, Ransomware and Incident Response
Every organisation that uses computers will eventually face a security incident. A laptop will be stolen, a member of staff will click a convincing link, or a vulnerability will be exploited before a patch is applied. What separates a minor disruption from a disaster is usually not whether an incident happens but how quickly it is noticed and how well the response has been prepared. This chapter looks closely at how modern malware and ransomware attacks unfold, how their effects are reduced through backups and recovery planning, and how organisations respond to incidents using a structured life cycle. It also covers the distributed denial-of-service attacks that target availability, and the lessons-learned process that turns each incident into stronger defences for the next.
How a modern ransomware attack unfolds
Ransomware is now the most disruptive form of cybercrime for many organisations, and it rarely happens in a single moment. A typical attack moves through several stages over days or weeks. First comes initial access: a phishing email that installs a small program, a stolen password for an internet-facing remote access service, or an unpatched vulnerability in a public server. Next the attackers establish persistence, so that they keep access even if a computer is restarted, and begin discovery, mapping the network, finding file servers and identifying backup systems. They then attempt privilege escalation, gaining administrator rights, often by stealing credentials stored on the machines they have reached, and lateral movement to other systems.
Many groups now steal data before doing anything visible, so that they can threaten to publish it, a tactic called double extortion. Only at the end do they encrypt files across as many machines as possible, frequently at night or over a weekend when fewer staff are watching, and display a ransom note. Because they have studied the network, they often try to delete or encrypt backups first.
The long middle of this sequence is the defender's opportunity. Every stage leaves traces: unusual logins, new administrator accounts, large data transfers, scanning activity and attempts to switch off security tools. An organisation that monitors for these signs can often stop an attack before the encryption stage, which is why detection and response matter as much as prevention.
Backups, recovery objectives and resilience
The single most important defence against ransomware is a backup that the attackers cannot reach. If backups are stored on a drive permanently connected to the network, or protected by the same administrator password that the attackers have stolen, they will be encrypted along with everything else. Good practice is to keep at least one copy offline or immutable, meaning it cannot be changed or deleted for a set period, even by an administrator, and to test regularly that data can actually be restored. An untested backup is only a hope.
Two measures express how much disruption an organisation can tolerate. The recovery point objective (RPO) is the maximum amount of data, measured in time, that it can afford to lose; if backups run every night, up to a day's work could be lost. The recovery time objective (RTO) is how quickly a system must be working again. A hospital's patient system may need an RTO of minutes, while a marketing archive might tolerate several days.
Resilience goes beyond backups. It includes keeping critical systems separated so that one infection cannot reach everything, keeping paper copies of essential contact lists and procedures in case computers are unavailable, and deciding in advance who has the authority to shut systems down. Paying a ransom is a separate and difficult decision: it does not guarantee that data will be returned or kept private, it funds further crime, and in some countries payments to certain groups are illegal. Law enforcement agencies generally advise against payment, and organisations with tested backups are rarely forced to consider it.
Denial-of-service attacks
Not all attacks aim to steal or encrypt data. A denial-of-service (DoS) attack tries to make a system unavailable by overwhelming it with traffic or requests. When the traffic comes from thousands of compromised devices at once, typically a botnet of infected computers, routers and cameras, it is called a distributed denial-of-service (DDoS) attack. Some DDoS attacks flood the network connection with sheer volume; others target a protocol, for example by opening many half-finished connections; and others send a modest number of expensive requests, such as complex searches, that tie up the application itself.
Because the traffic comes from so many sources, simply blocking a few addresses does not work. Defences include using content delivery networks and specialist DDoS protection services that absorb traffic across many data centres, limiting how many requests a single source can make, caching pages so they are cheap to serve, and planning with the internet service provider in advance. DDoS attacks are sometimes used as a distraction while another attack takes place, so a flood of traffic should prompt closer monitoring of other systems too.
The incident response life cycle
An incident response plan sets out in advance what the organisation will do when something goes wrong, so that decisions are not improvised under pressure. The most widely used structure, from the United States National Institute of Standards and Technology (NIST), describes four phases that form a cycle.
| Phase | Purpose | Typical actions |
|---|---|---|
| 1. Preparation | Be ready before anything happens | Write the plan, assign roles, set up logging, keep contact lists, run practice exercises |
| 2. Detection and analysis | Recognise and understand the incident | Review alerts, confirm what happened, judge scope and severity, start a written timeline |
| 3. Containment, eradication and recovery | Stop the spread, remove the cause, restore service | Isolate affected machines, reset stolen credentials, remove malware, patch, restore from clean backups |
| 4. Post-incident activity | Learn and improve | Hold a lessons-learned review, update the plan and controls, meet reporting duties |
Several practical rules apply across the phases. Containment comes before cleaning: disconnecting an infected laptop from the network stops the spread, while switching it off may destroy evidence held in memory, so plans should say which to do. Evidence must be preserved, with logs and disk images kept intact and a record of who handled them, in case of legal action or insurance claims. Communication must be planned: staff, customers, regulators and sometimes police need accurate information at the right time, and many data protection laws require serious breaches involving personal data to be reported within a fixed period, which under the European Union's GDPR is 72 hours after the organisation becomes aware of the breach.
Learning from incidents
The final phase is the one most often skipped, and arguably the most valuable. A lessons-learned review, held soon after the incident while memories are fresh, asks what happened and when, what went well, what was missing, and what should change. It should be blameless: the aim is to fix weaknesses in systems and procedures, not to punish the person who clicked a link, because people who fear blame hide mistakes and delay reporting, which makes every future incident worse.
Useful outcomes are specific and owned by someone: enable MFA on the remote access service by the end of the month; add alerts for new administrator accounts; shorten the backup interval for the order database to one hour; run a phishing awareness session for the finance team. Organisations also track measures over time, such as the mean time to detect and mean time to respond, because shrinking the window between initial access and response reduces the damage of almost every kind of attack. Practising the plan through tabletop exercises, in which a team talks through a realistic scenario around a table, reveals gaps such as missing phone numbers or unclear authority long before a real crisis does.
Check your understanding
- List the stages of a typical ransomware attack in order, and suggest one sign a defender could watch for at three of the stages.
- Why should at least one backup be offline or immutable?
- Explain the difference between a recovery point objective and a recovery time objective, using a school's coursework system as the example.
- A business takes 50 orders an hour and backs up every 6 hours. Calculate the expected and worst-case number of orders lost in an attack.
- Why can a DDoS attack not usually be stopped simply by blocking the attacking addresses?
- Explain why lessons-learned reviews should be blameless, and give two specific improvements that might result from one.
This course book is available to read online only at chrysolites.org.