I’m trying make a script to monitor if a file name is changing within a specific folder, and then if true to trigger the action of shutting down that device.
The whole idea is to be one step ahead of the cryptolockers.
If they will be still able to access our network and to run the encryption software then when the name of the file will change the device will just shut down.
Did anyone already run a script like that? Any advice is welcome (I don't know much about writing a script)
Thanks!
Post update
Indeed the SO will be Windows. The whole ideea is to set this script on the shared servers and into the important folders to create a folder which should contain a specific file. That file will be monitored thrugh the script, and at any moment when the name of that file will be modified, the action should be $shutdown.exe /f /r /t 00 So the script will only monitor one file (let's say file.xyz) from a one folder, and as long as the file name not change, the script should just run in a loop. And yes the script should run on a timer to regularly check the specific file. To apply the script on the target servers - we are using N-Central - and we can deploy the script from N-Central.