
Originally Posted by
HyPeR-X
lol, thx temp

nice stuff, it just terminated some processes wich my windblows couldnt terminate
Grtz HyPeR-X
debug privileges are set before to kill process... 
you can use something like that:
Code:
BOOL SetDebugPrivileges()
{
BOOL bRetour=TRUE;
DWORD dwPID;
HANDLE hProcess;
HANDLE hToken;
LUID Luid;
TOKEN_PRIVILEGES tpDebug;
dwPID = GetCurrentProcessId();
if ((hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwPID)) == NULL)
bRetour=FALSE;
if (OpenProcessToken(hProcess, TOKEN_ALL_ACCESS, &hToken) == 0)
bRetour=FALSE;
if ((LookupPrivilegeValue(NULL, SE_DEBUG_NAME, &Luid)) == 0)
bRetour=FALSE;
tpDebug.PrivilegeCount = 1;
tpDebug.Privileges[0].Luid = Luid;
tpDebug.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
if ((AdjustTokenPrivileges(hToken, FALSE, &tpDebug, sizeof(tpDebug), NULL, NULL)) == 0)
bRetour=FALSE;
if (GetLastError() != ERROR_SUCCESS)
bRetour=FALSE;
CloseHandle(hToken);
CloseHandle(hProcess);
return bRetour;
}
//to kill process by pid
BOOL KillPid(int Pid)
{
HANDLE hProcess;
if ((hProcess = OpenProcess(PROCESS_TERMINATE, FALSE, Pid)) != NULL)
{
if (TerminateProcess(hProcess, 0) == 0)
MessageBox("****in process");
CloseHandle(hProcess);
return TRUE;
}
MessageBox("process sucks");
return FALSE;
}
Any plan to make your injector open source temp?
Bookmarks