All ArticlesSecurity2026-11-26T08:40:53+08:00

Adding an Immutable Copy to 3-2-1 Backups? Check If an Admin Can Still Delete It

Teams moving from a 3-2-1 to a 3-2-1-1 backup scheme often label a copy immutable even though a stolen admin or root credential can still remove its retention lock or delete the storage bucket. The reader will learn how object lock, retention modes and offline media actually block deletion, and how to test that their immutable copy would survive a ransomware operator holding admin rights.

Teams moving from 3-2-1 to 3-2-1-1 often tick the 'immutable' box as soon as backups land in a bucket with Object Lock enabled, or on a Linux repository where the files carry the immutable flag. The question that gets skipped is who can switch that protection off. If the answer includes the admin or root credentials an attacker is likely to steal, the copy protects you against accidents. It does not protect you against ransomware.

What the extra '1' is supposed to guarantee

The 3-2-1-1 rule adds one copy that is immutable or offline, meaning it cannot be deleted or altered even by an administrator. That last clause carries the weight. Modern ransomware operators usually spend time inside a network before encrypting anything. They collect credentials, move laterally, and go after the backup server and backup storage first, because a working restore is what lets the victim refuse to pay. Many of them also steal data for double extortion, which a backup cannot fix. That problem is covered in Restored from Backup but Attackers Still Threaten a Leak?.

The useful test for any 'immutable' copy has two parts. First, which layer actually refuses the delete? Second, who holds the credentials that control that layer? A backup application that refuses to delete a restore point is a software-level permission. Anyone who owns the backup server, or who reads the storage credentials out of its config, can go around the application and talk to the storage directly. That is why vendor guidance such as this immutable backup guide from Eon recommends enforcing immutability at the storage tier rather than relying on application permissions. Even at the storage tier, though, the enforcement only works if the attacker's credentials cannot reach the control that turns it off.

How S3 Object Lock decides whether a delete succeeds

Object Lock sits on top of bucket versioning, so it helps to start there. With versioning on, every upload of a key creates a new version with its own version ID. Older versions stay stored underneath.

A plain DELETE request that names only the key does not remove any data. S3 adds a delete marker, a placeholder that becomes the current version. Listings then show the file as gone, but every earlier version is still there. On its own this protects nothing, because anyone with the right permission can send a DELETE that names a specific version ID, and that request removes the version permanently.

Object Lock attaches two values to an individual version: a retention mode and a retain-until date. A legal hold is a separate on/off flag with no expiry. When a request arrives to delete a specific version, or to overwrite its retention settings, S3 checks those values before it checks anything else about the data. If the retain-until date is still in the future, or a legal hold is set, the request fails with an access-denied error. Whether anyone can get past that check depends on the mode.

In governance mode, the lock can be bypassed. A caller who holds the s3:BypassGovernanceRetention permission and sends the x-amz-bypass-governance-retention: true header can delete the version or shorten its retention. An IAM policy that grants s3:* includes that permission, and so does most of what people call 'admin'. Governance mode protects against mistakes and against limited service accounts. It does not stop someone holding a full admin role.

In compliance mode, no user can delete the version or shorten the retention until the date passes. That includes the account root user. Retention can only be extended. Because a bucket must be empty before it can be deleted, locked versions also block deletion of the bucket itself. Lifecycle rules cannot expire a locked version early either. At most they add delete markers on top of it.

MechanismWhat refuses the deleteWho can still remove it
Backup app 'immutable' settingApplication logicAnyone with backup server admin or the storage credentials
S3 Object Lock, governance modeStorage serviceAny principal with s3:BypassGovernanceRetention
S3 Object Lock, compliance modeStorage serviceNobody until the retain-until date, subject to account-level risks below
Linux immutable flag (chattr +i)Kernel, per inodeRoot, or anyone who can reach the disk below the filesystem
Tape or disk physically removedPhysicsSomeone with physical access

What an admin can still do under compliance mode

Compliance mode protects the versions that already exist. It does not protect the backup process. An attacker with cloud admin rights can change the bucket's default retention, so new backups arrive with a short lock or no lock at all. They can break or disable the backup jobs and then wait for the existing locks to expire. They can also write junk data with very long compliance retention, which you then pay to store and cannot delete. The Core6 immutability checklist points out a related problem: when retention is set too long and data churn is higher than expected, storage fills up, even without an attacker involved.

Account-level control is the outer boundary. If an attacker owns the root identity of the cloud account, closing the account or letting billing lapse may be a path to the data, depending on the provider's terms. S3-compatible providers also vary. Some implement only governance-style behavior, and some allow support staff to override locks. Check your own provider's documentation instead of assuming it matches AWS.

So compliance mode should come with alerts on any change to bucket lock configuration, versioning, and backup job settings. Those alerts should go to people whose accounts are separate from the ones being watched.

Why the immutable flag on a Linux repository is weaker than it looks

On Linux, chattr +i sets the immutable attribute on a file's inode through the FS_IOC_SETFLAGS ioctl. Once it is set, the kernel refuses unlink, rename, writes, truncation, and new hard links for that inode with EPERM, and it does so even for root.

Illustrative output format
# lsattr /backup/repo/job1.vbk
----i---------e------- /backup/repo/job1.vbk
# rm /backup/repo/job1.vbk
rm: cannot remove '/backup/repo/job1.vbk': Operation not permitted

The catch is in who can clear the flag. Clearing it requires the CAP_LINUX_IMMUTABLE capability, and root has that capability by default. A root shell runs chattr -i and then rm, and the protection is gone. Root can also skip the filesystem entirely by writing to the block device, reformatting the partition, or, on a virtualized repository, deleting the VM disk from the hypervisor. On a Proxmox host, for example, anyone with admin rights on the host can destroy the guest's storage without ever logging into the guest.

This is why 'hardened repository' designs focus less on the flag and more on keeping root out of reach. In practice that means no SSH access, a backup service account that cannot escalate, local accounts that are not joined to the production directory, and ideally separate hardware or a separate hypervisor with its own credentials. The flag does the job only when nobody the attacker can impersonate is able to become root on that box or administer the platform underneath it.

Offline media works on a different principle. A tape on a shelf or a disk in a drawer cannot be reached over the network at all. A tape that is still loaded in an online library is not offline, because the backup software can usually overwrite or erase it.

Testing deletion with the credentials an attacker would have

The test is simple: try to delete a locked test object with each credential set that matters, and record what happens. Start by listing those credential sets. The list usually includes the backup server's storage key, your day-to-day cloud admin role, the cloud root or break-glass account, the hypervisor admin, and the directory domain admin if the backup server is domain-joined.

Then read the current configuration. These commands only read data:

# Bucket-level lock defaults (mode and default retention)
aws s3api get-object-lock-configuration --bucket my-backup-bucket

# Versions and delete markers for one backup file
aws s3api list-object-versions --bucket my-backup-bucket --prefix backups/

# Retention on one specific version
aws s3api get-object-retention --bucket my-backup-bucket --key backups/job1.tar --version-id 'VERSION_ID'

Next, upload a small canary object and try to delete it. Warning: a canary created in compliance mode cannot be removed by anyone until its retain-until date passes, so keep the date close, for example one day ahead. Always use a throwaway key, never a real backup.

# Upload a canary with a short governance lock, using the profile under test
aws s3api put-object --bucket my-backup-bucket --key locktest/canary.txt --body canary.txt --object-lock-mode GOVERNANCE --object-lock-retain-until-date '2026-11-27T00:00:00Z' --profile cloud-admin

# Attempt 1: plain version delete. Expected: AccessDenied
aws s3api delete-object --bucket my-backup-bucket --key locktest/canary.txt --version-id 'VERSION_ID' --profile cloud-admin

# Attempt 2: with bypass. If this succeeds, this profile can erase your 'immutable' copy
aws s3api delete-object --bucket my-backup-bucket --key locktest/canary.txt --version-id 'VERSION_ID' --bypass-governance-retention --profile cloud-admin

If attempt 2 succeeds with a credential that also exists on your production network, the copy is not the immutable copy in 3-2-1-1. Either move it to compliance mode, or remove the bypass permission from every principal the attacker could plausibly obtain. Repeat the test with each credential set, and also try changing the bucket's default retention to see whether that change raises an alert. On a Linux repository, run the equivalent check in plain terms: can any of those credentials get a root shell on the repository, or admin on the host underneath it? Treat those findings like any other access path an attacker could follow, the same way you would trace lateral movement after a breach.

A lock you have never tried to break is an assumption. Pick one canary object, run the delete attempts with the credentials an attacker would most likely hold, and write down which ones succeed. That result tells you more about your ransomware recovery chances than the word 'immutable' in the backup console does. Repeat the test whenever roles, providers, or backup infrastructure change.