Catch ACCESS_DENIED

bug/bundler_fix
Meatballs 2014-04-05 19:11:29 +01:00
parent 2c9209f8b1
commit 5fccf986f8
No known key found for this signature in database
GPG Key ID: 5380EAF01F2F8B38
1 changed files with 5 additions and 0 deletions

View File

@ -121,6 +121,9 @@ module Exploit::Remote::SMB::Psexec
service_exists = true
print_warning("#{peer} - Service already exists, opening a handle...")
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
print_error("#{peer} - Failed to create service, ERROR_CODE: #{svc_status}")
return false
@ -144,6 +147,8 @@ module Exploit::Remote::SMB::Psexec
print_good("#{peer} - Service started successfully...")
when ERROR_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
print_good("#{peer} - Service start timed out, OK if running a command or non-service executable...")
else