Catch ACCESS_DENIED
parent
2c9209f8b1
commit
5fccf986f8
|
@ -121,6 +121,9 @@ module Exploit::Remote::SMB::Psexec
|
||||||
service_exists = true
|
service_exists = true
|
||||||
print_warning("#{peer} - Service already exists, opening a handle...")
|
print_warning("#{peer} - Service already exists, opening a handle...")
|
||||||
svc_handle = dce_openservicew(dcerpc, scm_handle, service_name)
|
svc_handle = dce_openservicew(dcerpc, scm_handle, service_name)
|
||||||
|
when ERROR_ACCESS_DENIED
|
||||||
|
print_error("#{peer} - Unable to create service, ACCESS_DENIED, did AV gobble your binary?")
|
||||||
|
return false
|
||||||
else
|
else
|
||||||
print_error("#{peer} - Failed to create service, ERROR_CODE: #{svc_status}")
|
print_error("#{peer} - Failed to create service, ERROR_CODE: #{svc_status}")
|
||||||
return false
|
return false
|
||||||
|
@ -144,6 +147,8 @@ module Exploit::Remote::SMB::Psexec
|
||||||
print_good("#{peer} - Service started successfully...")
|
print_good("#{peer} - Service started successfully...")
|
||||||
when ERROR_FILE_NOT_FOUND
|
when ERROR_FILE_NOT_FOUND
|
||||||
print_error("#{peer} - Service failed to start - FILE_NOT_FOUND")
|
print_error("#{peer} - Service failed to start - FILE_NOT_FOUND")
|
||||||
|
when ERROR_ACCESS_DENIED
|
||||||
|
print_error("#{peer} - Service failed to start - ACCESS_DENIED")
|
||||||
when ERROR_SERVICE_REQUEST_TIMEOUT
|
when ERROR_SERVICE_REQUEST_TIMEOUT
|
||||||
print_good("#{peer} - Service start timed out, OK if running a command or non-service executable...")
|
print_good("#{peer} - Service start timed out, OK if running a command or non-service executable...")
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue