CCyberwiki

Ransomware and data destruction

Ransomware and data destruction
ClassAvailability and abuse
Also known asData encrypted for impact; wiper attack (destruction without a way back)
MITRE ATT&CKT1486 Data Encrypted for Impact; T1485 Data Destruction
Typical severityCritical
AffectsServers, databases, cloud storage, code repositories and the backups of each, wherever an attacker holds an account or key with write or delete rights

Ransomware encrypts files so that they, and the systems that depend on them, stop working, and the attacker then asks for money in exchange for the decryption key.1 In data destruction the data is deleted or overwritten instead, and there is no key to sell. Both are attacks on availability.23

Description

The malware encrypts local and remote drives and withholds the key. Without payment, or when the attacker never kept the key, the data stays unreadable.2 Documents, images and source code files are common targets, and some variants also encrypt disk partitions or whole virtual machines on a hypervisor.2

Attackers also copy the data before encrypting it and threaten to publish it. The two pressures together are called double extortion, and some attackers skip the encryption and only threaten publication.1 Other tools work the other way round: Apostle presents itself as ransomware but only destroys data.3

Mechanism

The attack needs write or delete rights over the data. Attackers usually get them through flaws in internet-facing software, compromised credentials, Phishing, earlier malware on the system, and third parties that hold access.1 Once inside, malware may spread through further accounts and stolen credentials.2

In a cloud account, access alone is enough. A leaked key with enough rights can delete storage objects, machine images and database instances.3 It can also encrypt the files in a storage bucket in place, for example with Amazon S3 server-side encryption with customer-provided keys (SSE-C), in which the requester supplies the encryption key.2 Deletion through ordinary commands such as rm often removes only the pointer to a file, which forensic tools can follow back; overwriting the contents makes the data unrecoverable.3

Backups are a target in their own right. Many ransomware variants search for reachable backups and delete or encrypt them, so that only the attacker can restore the data.1 A copy kept in the same account as the original goes with it: on Supabase, deleting a project permanently removes its data together with its backups.4

Notable incidents

On 2 May 2019, users of Bitbucket, GitHub and GitLab found public and private repositories wiped and replaced by a single file. The note demanded 0.1 bitcoin and threatened to publish the code after 10 days. The attacker logged in with valid passwords, app passwords, API keys and personal access tokens, then ran automated Git pushes that replaced each repository's contents with the note and erased its commit history on the server.5 The three companies found no flaw in their own services. Roughly a third of the affected accounts appeared in a public credential dump, and the same IP address had been scanning the web for exposed .git/config files, where Git stores a token written into a clone URL as plain text.5 SecurityWeek reported hundreds of victims and that the bitcoin address showed no payments.6 An owner with a full local clone could restore a repository with one command:5

git push origin HEAD:master --force

Prevention

Copies the attacker cannot reach

Keep offline, encrypted backups of critical data on a system other than the one they protect, and test them regularly by restoring them.12 A cloud-to-cloud backup at a second provider still works when every account at one vendor is affected.1 The Backup and restore article covers restore testing.

Supabase backs up Pro, Team and Enterprise projects daily, keeping 7, 14 or up to 30 days, and offers Point-in-Time Recovery, which archives the database's change log every two minutes.4 Both are removed with the project. Database backups also leave out files kept through Supabase Storage.4 A copy outside the project can be made with the Supabase CLI:7

supabase db dump --remote=[CONNECTION_STRING] -f roles.sql --role-only
supabase db dump --remote=[CONNECTION_STRING] -f schema.sql
supabase db dump --remote=[CONNECTION_STRING] -f data.sql --use-copy --data-only

Storage that refuses deletion

Turn on delete protection or object locking for object, database, file and block storage, and versioning so that earlier copies of a file survive.1 On Amazon S3, Object Lock requires versioning. In its compliance mode, no user can overwrite or delete a locked version before its retention date, the account's root user included; governance mode allows users with a special permission to remove the lock.8 Other S3 safeguards are an IAM policy that blocks SSE-C on buckets, MFA delete, and a short list of people allowed to change a bucket's lifecycle rules, which can delete files on a schedule.23

Fewer keys that can delete

Use phishing-resistant multi-factor authentication, keep the root account out of daily work, and give least privilege to anyone who can change cloud resources.1 The 2019 incident report adds that personal access tokens bypass two-factor sign-in, should be handled like passwords, and must not sit in a .git folder that a web server hands out.5 See Exposed sensitive files and Abuse of leaked API keys.

Prompt for a coding agent

Write a script for this Supabase project that exports the database with the Supabase CLI: run "supabase db dump" three times, for roles (--role-only), schema, and data (--use-copy --data-only), reading the connection string from an environment variable. Save the three files with the date in their names to a folder I name, which is outside this project and outside the Supabase account. Add a short README that explains how to restore the files into a new, empty Supabase project with psql, so the restore can be tested. Do not put any connection string or password in the code.

In SecFlash

The Cloud page reports SF-CLD-525 when a Supabase project has no recent backup and Point-in-Time Recovery is off. For self-managed servers it reports SF-CLD-104 and SF-CLD-205 when the provider's backups are off on a Hetzner server or a DigitalOcean Droplet, SF-CLD-106 and SF-CLD-206 when the newest snapshot is older than 30 days, SF-CLD-105 for a Hetzner volume that no backup covers, and SF-CLD-108 for a Hetzner resource without delete protection. SF-CLD-601 marks a repository whose default branch has no protection rule, so its history can be rewritten or deleted. The Security page reports SF-SEC-652 for a readable .git folder.

See also

References

  1. a b c d e f g h CISA, MS-ISAC, NSA and FBI (September 2023). "#StopRansomware Guide". Cybersecurity and Infrastructure Security Agency.
  2. a b c d e f g "Data Encrypted for Impact, T1486". MITRE ATT&CK. Version 1.5, last modified 12 May 2026.
  3. a b c d e "Data Destruction, T1485". MITRE ATT&CK. Version 1.4, last modified 3 November 2026.
  4. a b c Supabase. "Database Backups". Supabase documentation. Updated 12 November 2026.
  5. a b c d Atlassian Bitbucket, GitHub and GitLab (14 May 2019). "Git ransom campaign incident report: Atlassian Bitbucket, GitHub, GitLab". The GitHub Blog.
  6. back Kovacs, Eduard (May 2019). "Hundreds of Git Repositories Held for Ransom". SecurityWeek.
  7. back Supabase. "Backup and Restore using the CLI". Supabase documentation.
  8. back Amazon Web Services. "Locking objects with Object Lock". Amazon S3 User Guide.