News for hackers. Stuff that matters.
Re:History of ZFS Part 2: Exploding in Popularity by tinus_hn on Friday June 04, 2021 @04:26AM (#27391721)
Why would ransomware that can encrypt all your files not be able to delete your snapshots?
Re:History of ZFS Part 2: Exploding in Popularity by rainbowzootsuit on Friday June 04, 2021 @05:03AM (#27391878)
In the scenario where a client computer with access to files via a network share becomes infected and encrypts files, but the server is snapshotting the file system that those files are stored on.

Also, OpenZFS can export ZVOLs over iSCSI so you can have formatted block storage for other devices that can be rolled back by snapshot on the OpenZFS.

In a virtualized environment all of the VMs' storage could be protected with snapshots.

Re:History of ZFS Part 2: Exploding in Popularity by drbawb on Friday June 04, 2021 @11:09AM (#27394354)
There's a number of reasons I feel this assumption is valid in most cases:

1) Unless it's a targeted attack it's highly unlikely that a ransomware strain will be designed to target a specific filesystem. Snapshot deletion requires filesystem specific APIs, whereas reading/writing files is just standard libc fare. You would need to maintain different strains of a virus to target an organization running Btrfs vs ZFS vs ReFS, for example. - If the attacker has deep knowledge of your storage stack, and has gained privileged access to it, you've already lost: go to step 4.

2) Separation of privileges. Deleting a snapshot is a privileged command. A ransomware infection that doesn't successfully elevate privileges might be able to encrypt my home directory, which would suck, but it wouldn't have permissions to delete snapshots of my home directory.

3) Virtualization / network storage: snapshots are transparent to virtual guests, a virus inside a guest can't delete snapshots if it's not aware they exist. With network shares and ZFS: you can choose whether or not you want to expose snapshots. If you do expose them: don't grant network clients privileges to delete them.

4) Replication: with any ransomware infection the only real defense is off-site backups. Snapshots makes backups trivial. You can incrementally replicate and restore from them easily (e.g: zfs send/recv.) This alone makes using a CoW filesystem worthwhile in the defense against ransomware. Ransomware will have a hard time deleting snapshots on an air-gapped disk.

Re:History of ZFS Part 2: Exploding in Popularity by rsync on Friday June 04, 2021 @11:27AM (#27394555)
"Why would ransomware that can encrypt all your files not be able to delete your snapshots?"

If you keep your backups on a third party cloud storage provider that runs on ZFS then those snapshots are taken by their root, not yours.

You send your backups to this cloud storage provider and they take the snapshots on your behalf.

You have an unprivileged login and have the ability to read the snapshots, but not destroy them.

In this scenario, Mallory can destroy your data and gain access to all of your cloud credentials and destroy the primary dataset ... but cannot destroy the snapshots.

I'm sure there must be some cloud provider, somewhere that offers this ... right ?

Re:History of ZFS Part 2: Exploding in Popularity by tinus_hn on Saturday June 05, 2021 @04:27AM (#27403268)
Your service does so and does so well but I would go further and say that any service that does not is not suitable as a backup solution. No matter if the service runs tapes the customer can't decide to overwrite, snapshots they can’t remove or whatever solution they use, the customer should not be able to delete old versions prematurely.
Re:History of ZFS Part 2: Exploding in Popularity by pizza234 on Friday June 04, 2021 @05:15AM (#27391924)
Re:History of ZFS Part 2: Exploding in Popularity by rainbowzootsuit on Friday June 04, 2021 @05:34AM (#27392017)
The windows clients cannot delete the ZFS snapshots that are presented as shadow copies.
Re:History of ZFS Part 2: Exploding in Popularity by Wowfunhappy on Friday June 04, 2021 @07:37AM (#27392569)
If there was ever a use case for certain operations to require a privilege level higher than or separate from root, snapshot deletion is it. I’m generally a bit skeptical of such measures, but the purpose here is obvious.
Re:History of ZFS Part 2: Exploding in Popularity by Geezus_42 on Friday June 04, 2021 @09:46AM (#27393536)
I don't see how that is anything more than adding an additional hurdle that the attackers would overcome. If they can already jump through the hoops to get root access then what's to stop them from doing the same for this other theoretical access level?
Re:History of ZFS Part 2: Exploding in Popularity by Wowfunhappy on Friday June 04, 2021 @09:57AM (#27393637)
The user may have granted root access to do something relatively normal and unrelated to ZFS. You probably only want one or two programs to ever be able to delete snapshots.
Re:History of ZFS Part 2: Exploding in Popularity by aljarry on Friday June 04, 2021 @05:49AM (#27392082)
ZFS on Ubuntu requires root to destroy snapshots, I don't know about ZFS on root, but I would guess the same.
Re:History of ZFS Part 2: Exploding in Popularity by rleigh on Saturday June 05, 2021 @08:00AM (#27404177)
This is a permission which can be delegated to users on a per-dataset basis. See "zfs allow". It didn't used to work on Linux, but has been possible since Ubuntu 20.04.
Re:History of ZFS Part 2: Exploding in Popularity by dagw on Friday June 04, 2021 @05:15AM (#27391926)
Often ransomware runs with user or local admin access since all they want to do is encrypt your work files. Hopefully deleting snapshots would requite a different level of access.
Re:History of ZFS Part 2: Exploding in Popularity by chalst on Friday June 04, 2021 @05:18AM (#27391934)
Zfs allows remote replication, which would prevent this.