File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,9 @@ def psexec(command, disconnect=true)
121
121
service_exists = true
122
122
print_warning ( "#{ peer } - Service already exists, opening a handle..." )
123
123
svc_handle = dce_openservicew ( dcerpc , scm_handle , service_name )
124
+ when ERROR_ACCESS_DENIED
125
+ print_error ( "#{ peer } - Unable to create service, ACCESS_DENIED, did AV gobble your binary?" )
126
+ return false
124
127
else
125
128
print_error ( "#{ peer } - Failed to create service, ERROR_CODE: #{ svc_status } " )
126
129
return false
@@ -144,6 +147,8 @@ def psexec(command, disconnect=true)
144
147
print_good ( "#{ peer } - Service started successfully..." )
145
148
when ERROR_FILE_NOT_FOUND
146
149
print_error ( "#{ peer } - Service failed to start - FILE_NOT_FOUND" )
150
+ when ERROR_ACCESS_DENIED
151
+ print_error ( "#{ peer } - Service failed to start - ACCESS_DENIED" )
147
152
when ERROR_SERVICE_REQUEST_TIMEOUT
148
153
print_good ( "#{ peer } - Service start timed out, OK if running a command or non-service executable..." )
149
154
else
You can’t perform that action at this time.
0 commit comments