命令行方式强制终止AlibabaProtect.exe进程


普通 taskkill 和 PowerShell 被拒绝,说明这个进程有进程保护(通常是 ObRegisterCallbacks 回调保护)。可以试试下面几种强制终止的方法:
方法一:使用 ntsd 命令(Windows 调试工具)
这个命令比 taskkill 权限更高,很多系统级进程都能杀。
ntsd -c q -p [PID]
先用 tasklist | findstr AlibabaProtect 查一下进程 PID,然后替换进去。
如果提示
ntsd不是内部命令,需要先安装 Windows SDK 中的调试工具,或者从别的机器复制ntsd.exe过来。
末尾有脚本之家下载地址

方法二:使用 wmic 强制终止
wmic process where "name='AlibabaProtect.exe'" call terminate
如果这个提示拒绝,可以加 /force:
wmic process where "name='AlibabaProtect.exe'" delete /nointeractive
PS:wmic可以

方法三:用 Sysinternals 的 PsSuspend 挂起进程(不终止,但让它不工作)
虽然没杀掉,但挂起后 CPU 占用会归零,效果类似暂停:
pssuspend AlibabaProtect.exe
下载地址:Microsoft Sysinternals PsTools
方法四:用 Process Explorer 以 SYSTEM 权限强行结束
- 下载 Process Explorer
- 以管理员身份运行
- 找到
AlibabaProtect.exe,右键 → Properties → Service 标签页里看看是不是服务 - 右键 → Kill Process Tree,如果还不行,右键 → Suspend 先挂起再结束
方法五:提权后用 taskkill
拒绝访问通常是因为令牌权限不够,可以先用 whoami /priv 看看有没有 SeDebugPrivilege。如果没有,用以下命令给自己提权:
runas /user:Administrator "taskkill /f /im AlibabaProtect.exe"
PS:试了不行

或者先用 takeown + icacls 抢占进程所有权(但比较麻烦,不一定能成)。
PS:SeDebugPrivilege默认禁用,且无法全局打开,只可以通过脚本在当前窗口启用。

管理员启用powershell后复制粘贴回车
Add-Type @"
using System;
using System.Runtime.InteropServices;
public class TokenManipulator {
[DllImport("advapi32.dll", SetLastError = true)]
public static extern bool OpenProcessToken(IntPtr ProcessHandle, uint DesiredAccess, out IntPtr TokenHandle);
[DllImport("advapi32.dll", SetLastError = true)]
public static extern bool LookupPrivilegeValue(string lpSystemName, string lpName, out long lpLuid);
[DllImport("advapi32.dll", SetLastError = true)]
public static extern bool AdjustTokenPrivileges(IntPtr TokenHandle, bool DisableAllPrivileges, ref TOKEN_PRIVILEGES NewState, int BufferLength, IntPtr PreviousState, IntPtr ReturnLength);
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct TOKEN_PRIVILEGES {
public int PrivilegeCount;
public long Luid;
public uint Attributes;
}
public static void EnablePrivilege() {
IntPtr hToken;
if (!OpenProcessToken(System.Diagnostics.Process.GetCurrentProcess().Handle, 0x0028, out hToken)) return;
long luid;
if (!LookupPrivilegeValue(null, "SeDebugPrivilege", out luid)) return;
TOKEN_PRIVILEGES tp = new TOKEN_PRIVILEGES();
tp.PrivilegeCount = 1;
tp.Luid = luid;
tp.Attributes = 0x00000002; // 启用
AdjustTokenPrivileges(hToken, false, ref tp, 0, IntPtr.Zero, IntPtr.Zero);
}
}
"@
[TokenManipulator]::EnablePrivilege()

secpol.msc里的该参数只能代表有了可以启用SeDebugPrivilege这个参数的资格,不代表就全局启用了,具体启用操作还得单独操作。

所以最终总结下:
MU5735 R.I.P
浙公网安备 33010602011771号