From f30b81eec7afcd99de83ba46140a9914f56d0ec1 Mon Sep 17 00:00:00 2001 From: Shreya Date: Mon, 3 Aug 2020 17:39:11 +0530 Subject: [PATCH] Remove "Public" from USERS in windows modify shell startup PBA Otherwise it'll look for a profile.ps1 file in the Public folder too --- .../windows/shell_startup_files_modification.py | 1 + 1 file changed, 1 insertion(+) diff --git a/monkey/infection_monkey/post_breach/shell_startup_files/windows/shell_startup_files_modification.py b/monkey/infection_monkey/post_breach/shell_startup_files/windows/shell_startup_files_modification.py index 32f0718a7..f39f1c1dd 100644 --- a/monkey/infection_monkey/post_breach/shell_startup_files/windows/shell_startup_files_modification.py +++ b/monkey/infection_monkey/post_breach/shell_startup_files/windows/shell_startup_files_modification.py @@ -13,6 +13,7 @@ def get_windows_commands_to_modify_shell_startup_files(): # get list of usernames USERS = subprocess.check_output('dir C:\\Users /b', shell=True).decode().split("\r\n")[:-1] # noqa: DUO116 + USERS.remove("Public") STARTUP_FILES_PER_USER = ['\\'.join(SHELL_STARTUP_FILE_PATH_COMPONENTS[:2] + [user] +