From 48188e999efc81a56a4d7932f6287309f24b3ff6 Mon Sep 17 00:00:00 2001 From: Jannis Pohl Date: Sat, 23 Sep 2017 23:48:50 +0200 Subject: [PATCH] post/windows/manage/persistence_exe: fix service creation Fixes service creation when in post/windows/manage/persistence_exe --- modules/post/windows/manage/persistence_exe.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/post/windows/manage/persistence_exe.rb b/modules/post/windows/manage/persistence_exe.rb index 76ef787818..a3107f5b33 100644 --- a/modules/post/windows/manage/persistence_exe.rb +++ b/modules/post/windows/manage/persistence_exe.rb @@ -140,7 +140,7 @@ class MetasploitModule < Msf::Post print_status("Installing as service..") nam = Rex::Text.rand_text_alpha(rand(8) + 8) print_status("Creating service #{nam}") - service_create(nam, nam, "cmd /c \"#{script_on_target}\"") + service_create(nam, :path=>"cmd /c \"#{script_on_target}\"") @clean_up_rc << "execute -H -f sc -a \"delete #{nam}\"\n" else print_error("Insufficient privileges to create service")