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.
This commit is contained in:
Mike Salvatore 2021-06-22 15:26:06 -04:00
parent 41bf137ee4
commit 2549f088d1
1 changed files with 2 additions and 0 deletions

View File

@ -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,
]