This question is specific to some measures that I have already taken with a pen drive as described below. I have a pendrive that’s always connected to my Windows PC. I run a script at logon that takes backup of my important data on that pendrive.
To secure the backup data on it in some way I have done the following thru the backup script and other programs
Using diskpart set the pen drive Read Write Mode
Take the backup (There's no encryption anywhere)
Using diskpart, set the drive to Read Only mode
Using a third party program called 'removedrive' eject the pen drive with error code -47
However the pen drive is physically connected to the USB port. I however know that this is not enough as a program can anyways run diskpart and set the drive to read-write mode and even if it’s error code -47, the entire USB Hub can be reinitialized resulting in that pendrive being online again.
What else I would need to do here to secure the backup data on that pen drive from any ransomware? Physically disconnecting it and reconnecting again before logon is the last option.