From d30a8b007a8c7aac60b93d7fb5abb0f47bb9004c Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Wed, 1 Sep 2021 13:48:13 -0400 Subject: [PATCH] Agent: Add comment explaining user/password == None in PowerShell --- .../infection_monkey/exploit/powershell_utils/credentials.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/monkey/infection_monkey/exploit/powershell_utils/credentials.py b/monkey/infection_monkey/exploit/powershell_utils/credentials.py index 3d09498d7..a04d9f395 100644 --- a/monkey/infection_monkey/exploit/powershell_utils/credentials.py +++ b/monkey/infection_monkey/exploit/powershell_utils/credentials.py @@ -20,6 +20,8 @@ def get_credentials( return credentials +# On Windows systems, when username == None and password == None, the current user's credentials +# will be used to attempt to log into the victim. def _get_empty_credentials(is_windows: bool) -> List[Credentials]: if is_windows: return [Credentials(username=None, password=None)] @@ -27,6 +29,8 @@ def _get_empty_credentials(is_windows: bool) -> List[Credentials]: return [] +# On Windows systems, when password == None, the current user's password will bu used to attempt to +# log into the victim. def _get_username_only_credentials(usernames: List[str], is_windows: bool) -> List[Credentials]: credentials = [Credentials(username=username, password="") for username in usernames]