L0CK3D (C3RB3R) ransomware is hitting NAS devices. What to do now, and what not to do.
Our team at DracoSec Research has completed a static analysis of the attacker-supplied L0CK3D decryptor and an encryptor sample. Sharing the key points to help prevent more victims.
The hard truth first: there is no free universal decryptor. Each attack generates a random master key, protected by the attackers' RSA-2048 key. But there is still a lot you can do.
If you have been hit:
- Do not reboot or kill the process if encryption may still be running. The master key sits in memory during the attack. Capture memory (and swap or VM memory snapshots) first.
- Do not run the attackers' decryptor on a live system. Before decrypting anything, it runs "rm -rf /var/log/*" and wipes your evidence. Preserve /var/log, DSM and Docker logs first.
- Check your Btrfs snapshots. The encryptor overwrites files in place and contains no code to delete snapshots, so read-only snapshots should survive.
- Do not write off large files. Files over 5 MB are only partly encrypted: by default about 88% of the data stays readable (79% for VM and disk images). Files of 1 to 5 MB lose only their first 1 MB.
- Image the volume before any recovery work, so older data is not overwritten.
Prevention:
- Patch DSM and all installed packages, including Docker, now.
- Remove direct internet exposure of NAS management and services.
- Keep offline or immutable backups and read-only snapshots.
- Interim measure: the encryptor exits at start if another process holds a lock on /var/lock/init-rsysd.lo. It is not foolproof, as the attackers can bypass it with -nomutex.
Indicators of Compromise
| IOC | Description |
|---|---|
| Encrypted file extension | .L0CK3D (zero, not letter O) |
| Ransom note | read-me3.txt |
| Log file | C3RB3R_LOG.txt |
| Lock files | /var/lock/init-rsysd.lo /dev/shm/init-rsysd.lo /var/tmp/init-rsysd /tmp/init-rsysd |
| Marker files | /tmp/log.0 (start) /tmp/log.1 (end) |
| Encryptor arguments | -p, -m, -size, -n, -log, -nomutex |
| SHA-256, shelled encryptor (x86-64) | 802ac85d19dc6db2b1849bb3499877280544d04a0ae94d4c408b6c321669903d |
| SHA-256, shelled decryptor (ARM) | 57e428feb0adf6063a871809a3780ba2e2ad0eac57b861558a3d71efd16b3aa0 |