Insights

PDNS 2 Surabaya Lost Agency Data to Ransomware. Test Isolated Restores Monthly

November 18, 2026
0:00
In June 2024, ransomware hit Indonesia's Temporary National Data Center (PDNS 2) in Surabaya and encrypted data belonging to 282 government agencies. Many of those agencies had no usable backup copy. The data inside PDNS 2 could not be recovered. If you run infrastructure and have never actually restored from an isolated backup, you are exposed to the same class of failure — not because you are a government data center, but because untested backups are not backups. This article walks through what happened, why the backup situation made it catastrophic, and how to set up a monthly isolated restore test so you know your copies work before you need them.
The ransomware variant was Brain Cipher, derived from LockBit 3.0. It encrypted production data across PDNS 2, which served as a shared national data center for hundreds of central and regional government agencies. Services went down. Immigration processing, licensing portals, and other public-facing systems stopped working. The attackers demanded a ransom (reported as around 8 million USD equivalent). The Indonesian government refused to pay. The critical problem was not the encryption itself — ransomware encrypts things, that is what it does. The critical problem was that when teams went to restore from backups, many agencies discovered they had no usable fallback copy. Representatives from the data center operator publicly acknowledged that data affected by the encryption could not be recovered using conventional methods.
Based on findings from BSSN (Indonesia's National Cyber and Crypto Agency), the attacker gained access and disabled Windows Defender days before the main encryption event. This means the intrusion was not a sudden strike — the attacker moved laterally, disabled security tooling, and prepared the environment before triggering the payload. Key observations from public reporting:
  1. Initial access occurred before the encryption event. The attacker was inside the environment long enough to disable endpoint protection.
  2. Security monitoring did not catch the Defender disablement in time. No active 24/7 threat monitoring flagged the change, or if it did, it was not acted on.
  3. Cross-agency coordination was fragmented. Different agencies had different security postures and no unified incident response protocol, which slowed the initial response.
This pattern — attacker inside for days, security tooling quietly disabled, no alarm raised — is not unique to this incident. It is a well-documented ransomware playbook. The difference between a recoverable incident and a catastrophic one is almost always the backup situation.
The reason recovery failed for so many agencies comes down to one architectural gap: backup copies were not isolated from the production environment. When backups live on storage that is network-accessible from the same environment as production, ransomware that compromises production credentials can reach the backups too. This is exactly the scenario that the 3-2-1 backup strategy is designed to prevent:
  • 3 copies of data
  • 2 different storage media or types
  • 1 copy offsite and offline (isolated from the production network)
The "1 copy offline" part is what most setups skip or half-implement. Common failure modes:
  • Offsite storage mounted via NFS or SMB with credentials stored on the production server. Ransomware reads those credentials and encrypts the remote share.
  • Backup jobs push to cloud storage using an API key stored in a config file on the compromised host. Attacker uses the same key to delete or encrypt remote objects.
  • Backups exist but have never been tested. The files are there, but they are corrupt, incomplete, or missing critical components (like a database schema or an encryption key needed to decrypt the backup itself).
For a deeper look at how offsite backups can still get destroyed when credentials are reachable from production, see Cara Cek Backup Offsite Tidak Ikut Terhapus Saat Server Kena Ransomware. After the PDNS 2 incident, Indonesian authorities mandated that all national data must follow a layered backup strategy with isolated copies — essentially codifying 3-2-1 as policy. But policy without testing is just a document.
Agencies that had any form of local copy — even partial — attempted manual reconstruction. Some rebuilt from application-level exports, spreadsheets, or data that individual offices had kept locally. This is slow, error-prone, and incomplete, but when the central copy is gone, it is all you have. For the broader infrastructure, the response involved isolating affected systems, standing up replacement environments, and beginning the slow process of re-entering or re-collecting data. There was no "restore from backup" moment for most affected agencies because there was nothing to restore from.
Having backups is necessary. Knowing they restore is the part that matters. Here is a practical approach to proving your isolated copy works, on a monthly schedule.
An isolated copy means the production environment cannot reach it with its own credentials. Options:
  • A separate storage account with credentials that only the backup pull mechanism knows (and that mechanism runs outside production).
  • Object storage with object lock or WORM (Write Once Read Many) enabled, so even if an attacker gets the write key, they cannot delete or overwrite existing objects.
  • A physically separate machine that pulls backups from production on a schedule, then disconnects or restricts inbound access.
The key test: if your production server is fully compromised (root access, all credentials exposed), can the attacker delete or encrypt your backup copy? If yes, it is not isolated.
Pick a non-production machine (a test VPS, a local VM, anything that is not serving live traffic). Write a script that:
  1. Pulls the latest backup from isolated storage
  2. Restores it (database import, file extraction, config placement)
  3. Runs a basic health check (can the application start, does the database respond, do key tables have rows)
  4. Logs the result
Here is a minimal example for a MySQL database and a document root, using a pull-based approach:
BASH
#!/bin/bash
# monthly-restore-test.sh — run on a test/staging machine, NOT production
set -euo pipefail

BACKUP_SOURCE='s3://your-isolated-bucket/latest'
RESTORE_DIR='/tmp/restore-test'
DB_NAME='testdb_restore'
LOG_FILE='/var/log/restore-test.log'

echo "[(date)] Starting restore test" >> "LOG_FILE"

# Pull backup files from isolated storage
mkdir -p "$RESTORE_DIR"
aws s3 cp "BACKUP_SOURCE/db-dump.sql.gz" "RESTORE_DIR/" --quiet
aws s3 cp "BACKUP_SOURCE/files.tar.gz" "RESTORE_DIR/" --quiet

# Restore database
gunzip -f "$RESTORE_DIR/db-dump.sql.gz"
mysql -u restore_user -p'USE_ENV_VAR_IN_REAL_SETUP' -e "DROP DATABASE IF EXISTS DB_NAME; CREATE DATABASEDB_NAME;"
mysql -u restore_user -p'USE_ENV_VAR_IN_REAL_SETUP' "DB_NAME" < "RESTORE_DIR/db-dump.sql"

# Restore files
tar -xzf "RESTORE_DIR/files.tar.gz" -C "RESTORE_DIR/docroot"

# Basic health check: verify key table exists and has rows
ROW_COUNT=(mysql -u restore_user -p'USE_ENV_VAR_IN_REAL_SETUP' -N -e "SELECT COUNT(*) FROMDB_NAME.users;" 2>/dev/null || echo '0')

if [ "$ROW_COUNT" -gt 0 ]; then
  echo "[(date)] PASS — database restored, users table hasROW_COUNT rows" >> "$LOG_FILE"
else
  echo "[(date)] FAIL — database restore problem, users table empty or missing" >> "LOG_FILE"
fi

# Cleanup
rm -rf "$RESTORE_DIR"
echo "[(date)] Restore test complete" >> "LOG_FILE"
Adapt this to your stack. If you use PostgreSQL, swap mysql for pg_restore. If your backups are encrypted, add the decryption step. The point is not the specific commands — it is that the restore runs end-to-end and a health check confirms the data is actually there.
Add a cron entry on your test machine:
BASH
# Run restore test on the 1st of each month at 04:00
0 4 1 * * /usr/local/bin/monthly-restore-test.sh
Then monitor the log. If the test fails, you want to know immediately — not the next time you need to restore for real. Pipe the result to your existing alerting (email, webhook to a chat channel, whatever you already use for monitoring).
A backup file that exists but is silently corrupt is worse than no backup, because it gives false confidence. After pulling the backup, compare checksums against what the backup job recorded at creation time:
BASH
# Illustrative: compare SHA-256 of pulled file against recorded checksum
sha256sum "RESTORE_DIR/db-dump.sql.gz" | awk '{print1}'
# Compare this output against the checksum stored alongside the backup
Your backup job should write a checksum file (.sha256) next to each backup artifact when it creates them. The restore test reads that checksum and compares. Mismatch means corruption in transit or at rest. For more on why a successful backup job does not guarantee a working restore, see Why a Successful Backup Job Does Not Guarantee a Working Database Restore.
A monthly restore test takes maybe 30 minutes to set up the first time and runs unattended after that. What it gives you:
  • Proof that your isolated copy exists and is reachable from a non-production context.
  • Proof that the data inside is intact — not just a file on disk, but a database that loads and an application directory that extracts.
  • Proof that your restore procedure works — the commands, credentials, and paths are correct. When you need to restore under pressure, you are running a script you have run dozens of times, not improvising.
  • Early warning when something breaks — storage credentials rotate, bucket policies change, backup jobs silently fail. The monthly test catches these before they matter.
The PDNS 2 incident was not caused by a lack of backup policy. Policies existed. What was missing was proof that the backups worked and that they were out of reach of an attacker who owned the production environment. That proof only comes from testing the restore, from an isolated copy, on a regular schedule. If you have never restored from your offsite backup, schedule the first test this week. Not next quarter. This week. The restore test is the backup.

Join My Newsletter & Get Updates!

Get notified whenever a new technical guide, server infrastructure breakdown, or personal reflection goes live, plus a curated weekly digest.