forked from p34709852/monkey
Fixed sudo usage + added debug logs
This commit is contained in:
parent
37fac9c613
commit
4f912d9d1e
|
@ -94,7 +94,8 @@ class CommunicateAsNewUser(PBA):
|
|||
try:
|
||||
linux_cmds = BackdoorUser.get_linux_commands_to_add_user(username)
|
||||
commandline = "'ping -c 2 google.com'"
|
||||
linux_cmds.extend([";", "sudo", "-", username, "-c", commandline])
|
||||
linux_cmds.extend([";", "sudo", "-u", username, commandline])
|
||||
logger.debug("Trying these commands: {}".format(str(linux_cmds)))
|
||||
output = subprocess.check_output(linux_cmds, stderr=subprocess.STDOUT, shell=True)
|
||||
PostBreachTelem(self, (
|
||||
CREATED_PROCESS_AS_USER_LINUX_FORMAT.format(commandline, username, output[:50]), True)).send()
|
||||
|
|
Loading…
Reference in New Issue