forked from p15670423/monkey
PR fix (smb exploiters sends telem if service execution failed)
This commit is contained in:
parent
452724c487
commit
f5ed7e7422
|
@ -131,10 +131,12 @@ class SmbExploiter(HostExploiter):
|
||||||
resp = scmr.hRCreateServiceW(scmr_rpc, sc_handle, self._config.smb_service_name, self._config.smb_service_name,
|
resp = scmr.hRCreateServiceW(scmr_rpc, sc_handle, self._config.smb_service_name, self._config.smb_service_name,
|
||||||
lpBinaryPathName=cmdline)
|
lpBinaryPathName=cmdline)
|
||||||
service = resp['lpServiceHandle']
|
service = resp['lpServiceHandle']
|
||||||
T1035Telem(ScanStatus.USED, "SMB exploiter ran the monkey by creating a service via MS-SCMR.").send()
|
|
||||||
try:
|
try:
|
||||||
scmr.hRStartServiceW(scmr_rpc, service)
|
scmr.hRStartServiceW(scmr_rpc, service)
|
||||||
|
T1035Telem(ScanStatus.USED, "SMB exploiter ran the monkey by creating a service via MS-SCMR.").send()
|
||||||
except:
|
except:
|
||||||
|
T1035Telem(ScanStatus.SCANNED,
|
||||||
|
"SMB exploiter failed to run the monkey by creating a service via MS-SCMR.").send()
|
||||||
pass
|
pass
|
||||||
scmr.hRDeleteService(scmr_rpc, service)
|
scmr.hRDeleteService(scmr_rpc, service)
|
||||||
scmr.hRCloseServiceHandle(scmr_rpc, service)
|
scmr.hRCloseServiceHandle(scmr_rpc, service)
|
||||||
|
|
Loading…
Reference in New Issue