This is a script that simulates a single directory being hit by ransomware, but with the ability to easily restore any files affected.
- Make sure
ruby
is available on your system. On windows, you can run RubyInstaller. On MacOS and Linux it should be installed by default. - The ransomware tool is
fake_ransomware.rb
. It must be in a directory that has two child folders:Files
andBackup
. Initially,Files
directory should contain the files which are to be encrypted (hit by ransomware), and theBackup
directory should be empty. - Run
fake_ransomware.rb
. It should "encrypt" the files inFiles
, while backing them up inBackup
. - Run
fake_ransomware.rb
again to restore from the backup directory.
Don't use this with the only copy of your files.