Lesson 4 of 4 Cryptanalytic and Credential Attacks

Ransomware

Ransomware turns cryptography against its victims and has become one of the most damaging threats to organisations. This lesson covers how ransomware operates and how to prevent and recover from it.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe how human-operated ransomware attacks unfold.
  • Explain the controls that prevent ransomware and enable recovery.

How ransomware attacks work

Ransomware encrypts data and systems and demands payment, usually in cryptocurrency, for the decryption key. Modern attacks are human-operated: initial access through phishing, stolen credentials, exposed remote desktop services or unpatched internet-facing systems; privilege escalation and lateral movement; deletion of backups and shadow copies; data theft; and finally encryption across the network.

Double extortion adds the threat of publishing stolen data, and some groups add DDoS attacks or contact customers directly. Ransomware-as-a-service lets affiliates rent ransomware and infrastructure from developers in exchange for a share of payments.

The time between initial access and encryption is often days or weeks, and this is the defender's best opportunity. During that period the attacker runs reconnaissance tools, creates or steals administrator accounts, disables security software, locates and deletes backups and copies large volumes of data to external storage. Each of these steps can be detected: a new domain administrator account, an endpoint agent being switched off, mass deletion of backup snapshots or unusually large outbound transfers are all strong signals. Organisations that monitor for these behaviours can often stop an attack before any data is encrypted.

The encryption itself is usually technically sound. Modern ransomware generates a unique symmetric key for each file or system, encrypts the data quickly with it, and then encrypts that key with the attacker's public key. Only the attacker's private key can recover the file keys, which is why decryption without the attacker's cooperation is rarely possible, except where researchers find a flaw in a particular ransomware family and publish a free decryptor.

Put in order

A human-operated attack

Exam skills 3.7.13

Arrange the stages of a typical human-operated ransomware attack.

Log in to try this activity Interactive activities are free with an account.

Prevention and recovery

Prevention combines many controls: patching internet-facing systems, MFA on remote access and email, removing exposed remote desktop services, least privilege and tiered administration, endpoint detection and response, application allowlisting, network segmentation and user awareness.

Recovery depends on backups the attacker cannot reach: offline or immutable copies that cannot be modified or deleted, following the 3-2-1 rule, with regular restore tests that prove recovery within the RTO. An incident response plan prepared for ransomware defines who decides, how systems are isolated, how to communicate and which systems to restore first.

The 3-2-1 rule means keeping at least three copies of data, on two different types of media, with one copy off-site. For ransomware, the critical property is that at least one copy cannot be altered by an attacker who controls the production environment. Immutable storage, such as object storage with a retention lock, refuses deletion or modification until the retention period expires, even for administrators. Offline copies, such as tapes removed from the library, cannot be reached over the network at all.

Restoration order matters as much as having backups. Restoring application servers first is pointless if the identity infrastructure they depend on is still compromised, because the attacker can return immediately. A typical recovery sequence rebuilds a clean identity service and administrative workstations, then core infrastructure, then the most critical business applications according to the BIA, scanning restored data before it is reconnected to make sure the attacker's tools are not restored with it.

The following diagram compares backups that ransomware can reach with isolated, immutable backups.

Backups that survive ransomware. Backups on domain-joined servers and network shares can be reached, encrypted or deleted by an attacker with domain administrator rights. At least one copy must be offline or immutable, the backup infrastructure isolated with separate credentials and MFA, and restores tested regularly.
Tested restores are what prove recovery.

Paying is not a recovery plan

Paying a ransom does not guarantee a working decryptor or deletion of stolen data, funds further attacks and may be illegal if the recipient is subject to sanctions. Decisions about payment involve senior management, legal counsel and often law enforcement.

Worked example

Recovery readiness

A company backs up all servers nightly to a backup server joined to its Windows domain, with the backup files stored on a network share. Is this adequate protection against ransomware?

No. An attacker with domain administrator rights can reach the backup server and share and encrypt or delete the backups, as modern ransomware groups routinely do. The company needs at least one copy that is offline or immutable (for example write-once object storage or tape stored offsite), backup infrastructure isolated from the production domain with separate credentials and MFA, and regular restore tests.

Check yourself

What is double extortion?

Show answer

Stealing data before encrypting it, then threatening to publish it as well as withholding the decryption key.

Exam Tips

Remember for the exam

  • Immutable or offline backups are the key ransomware recovery control.
  • Ransomware groups target backups first.
  • Double extortion adds data theft to encryption.
  • Involve legal counsel in any payment decision.