Privexec 使用特定的用户权限运行程序
安装
使用 baulk 安装 Privexec
baulk install wsudo wsudo --version
当然你可以直接下载压缩包,然后使用 7z/WinRar/资源管理器等提取到任意目录运行 Privexec/AppExec/wsudo,下载链接: https://github.com/M2Team/Privexec/releases/latest
别名
Privexec 和 wsudo 能够解析别名,另外 wsudo 添加或者删除别名,使用 vscode 编辑 Privexec.json 修改别名也是不错的选择,当 Privexec 通过 baulk 安装时,Privexec.json 的存储目录为 $BAULK_ROOT/bin/etc,如果 Privexec 直接下载解压,那么 Privexec.json 则在 Privexec.exe 相同的目录。
{
"alias": [
{
"description": "Edit Hosts",
"name": "edit-hosts",
"target": "Notepad %windir%\\System32\\Drivers\\etc\\hosts"
},
{
"description": "Windows Debugger",
"name": "windbg",
"target": "\"%ProgramFiles(x86)%\\Windows Kits\\10\\Debuggers\\x64\\windbg.exe\""
}
]
}
截图

别名:

AppContainer:

wsudo 帮助信息输出:

wsudo Verbose 模式:

AppExec AppContainer 启动器:

使用帮助
Privexec 是一个 GUI 客户端, 当以标准用户运行时你可以启动管理员进程;当以管理员运行时则可以提权到 System 或者 TrustedInstaller,需要注意 System 或者 TrustedInstaller 拥有太多特权,容易破坏系统运行,使用的时候需要慎重。
AppExec 是一个启动 AppContainer 进程的程序,有一些开发者使用该程序去研究 Windows AppContainer 的运行细节,研究 AppContaner 的漏洞,UWP 应用便是运行在 AppContainer 容器中的。
wsudo 是 Privexec/AppExec 的控制台版本,详细使用帮助如下:
wsudo