进程隐藏与进程保护(SSDT Hook 实现)(三)
进程
LPTSTR lpszSvcBinaryPath, DWORD dwSvcType, DWORD dwStartType)
SC_HANDLE hSCM = NULL;
(NULL == hSCM)
OutputErrorMessage(TEXT());
FALSE;
{
hSvc = CreateService(hSCM, lpszSvcName, lpszDisplayName, SERVICE_ALL_ACCESS,
lpszSvcBinaryPath, NULL, NULL, NULL, NULL, NULL);
{
{
}
TRUE;
}
OutputErrorMessage(TEXT());
CloseServiceHandle(hSCM);
FALSE;
{
SC_HANDLE hSvc = NULL;
(NULL == hSCM)
OutputErrorMessage(TEXT());
FALSE;
(NULL == hSvc)
OutputErrorMessage(TEXT());
CloseServiceHandle(hSCM);
FALSE;
CloseServiceHandle(hSCM);
rtResult;
{
SC_HANDLE hSvc = NULL;
(NULL == hSCM)
OutputErrorMessage(TEXT());
FALSE;
(NULL == hSvc)
OutputErrorMessage(TEXT());
CloseServiceHandle(hSCM);
FALSE;
CloseServiceHandle(hSCM);
(FALSE == rtResult)
(ERROR_SERVICE_ALREADY_RUNNING == GetLastError())
TRUE;
OutputErrorMessage(TEXT());
FALSE;
}
{
}
{
SC_HANDLE hSvc = NULL;
(NULL == hSCM)
OutputErrorMessage(TEXT());
FALSE;
(NULL == hSvc)
OutputErrorMessage(TEXT());
CloseServiceHandle(hSCM);
FALSE;
(rtResult == FALSE)
OutputErrorMessage(TEXT());
CloseServiceHandle(hSvc);