From 2549f088d157c969ce1d2a1dd617a93139924f4f Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Tue, 22 Jun 2021 15:26:06 -0400 Subject: [PATCH] agent: Do not encrypt Windows shortcuts in ransomware simulation In order to keep Infection Monkey safe for production environments, the ransomware payload will explicitly ignore Windows shortcuts to prevent important files from accidentally getting encrypted. --- monkey/infection_monkey/ransomware/ransomware_payload.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/monkey/infection_monkey/ransomware/ransomware_payload.py b/monkey/infection_monkey/ransomware/ransomware_payload.py index 3ad33c29f..d2c8f578d 100644 --- a/monkey/infection_monkey/ransomware/ransomware_payload.py +++ b/monkey/infection_monkey/ransomware/ransomware_payload.py @@ -6,6 +6,7 @@ from infection_monkey.utils.dir_utils import ( file_extension_filter, filter_files, get_all_regular_files_in_directory, + is_not_shortcut_filter, is_not_symlink_filter, ) from infection_monkey.utils.environment import is_windows_os @@ -27,6 +28,7 @@ class RansomewarePayload: def _find_files(self): file_filters = [ file_extension_filter(VALID_FILE_EXTENSIONS_FOR_ENCRYPTION), + is_not_shortcut_filter, is_not_symlink_filter, ]