http://www.yuyong.net

Win11怎么获取Trustedinstaller权限?Win11获取Trustedinstaller权限方法 如何获取

近日有一些小伙伴咨询小编Win11怎么获取Trustedinstaller权限?下面就为大家带来了Win11怎么获取Trustedinstaller权限的方法,有需要的小伙伴可以来了解了解哦。 Win11怎么获取Trustedinstaller权限...

近日有一些小伙伴咨询小编Win11怎么获取Trustedinstaller权限?下面就为大家带来了Win11怎么获取Trustedinstaller权限的方法,有需要的小伙伴可以来了解了解哦。

Win11怎么获取Trustedinstaller权限?Win11获取Trustedinstaller权限方法

拥有完全控制权限的 Trustedinstaller 用户组

它的全名是:NT SERVICETrustedInstaller。从名字中我们不难发现,这其实是 NT 服务,并非一个实际存在的用户组。

Win11怎么获取Trustedinstaller权限?Win11获取Trustedinstaller权限方法 如何获取

在本地用户和组内无法找到 Trustedinstaller

那如果我是 DIY 玩家,又或者因为一些原因,想要修改某些系统功能,该如何操作呢?如今,网络上提供的方法,大部分都是修改文件的所有者为系统管理员用户,然后再对管理员用户添加完全控制权限。

Win11怎么获取Trustedinstaller权限?Win11获取Trustedinstaller权限方法 如何获取

修改系统文件所有者

这个方法虽然可以实现修改系统文件,但是每次修改完成后,很多人都会忘记把权限和所有权修改回来,留下安全隐患。而且如果需要修改某文件夹内的多个文件时,除非将整个文件夹内的所有文件一起修改,不然会很繁琐。

还有一种获得 Trustedinstaller 的方式是,通过交互式服务检测,但是在最新的 Windows 11(Windows 10)中,这种方法已经失效了。

Win11怎么获取Trustedinstaller权限?Win11获取Trustedinstaller权限方法 如何获取

那在新的系统中又该如何获得 Trustedinstaller 权限呢?

其实我们还可以通过 Set-NtTokenPrivilege 窃取 Trustedinstaller 的本体 Trustedinstaller.exe 的 Token,来创建其子进程。在开始之前我们需要保证你的 Powershell 版本为 5.0 以上(Windows 10 以上版本已经自带 Powershell 5.0 了,其他版本 Windows 需要进行更新)。

准备工作

首先,我们需要下载并安装 Set-NtTokenPrivilege 命令所需模块,我们先在系统 C 盘根目录新建名为“token”的文件夹。

Win11怎么获取Trustedinstaller权限?Win11获取Trustedinstaller权限方法 如何获取

接着,我们以管理员身份运行 Powershell,然后输入(其中 C:token,为我们刚刚新建文件夹的路径):

Save-Module -Name NtObjectManager -Path c:token

并回车(第一次安装会出现询问,输入“Y”并回车):

Win11怎么获取Trustedinstaller权限?Win11获取Trustedinstaller权限方法 如何获取

稍等片刻下载完成后,我们输入:

Install-Module -Name NtObjectManager

并回车,正式安装。若出现不受信任的存储库,输入“A”并回车:

Win11怎么获取Trustedinstaller权限?Win11获取Trustedinstaller权限方法 如何获取

稍等片刻,等待安装结束。结束后,我们需要让系统允许使用 Powershell 脚本,我们输入:

Set-ExecutionPolicy Unrestricted

并回车。接着系统会显示执行策略更改,我们输入”A“并回车确认:

Win11怎么获取Trustedinstaller权限?Win11获取Trustedinstaller权限方法 如何获取

接着,我们导入 NtObjectManager 模块,我们输入:

Import-Module NtObjectManager

并回车。至此,我们前期准备工作结束:

Win11怎么获取Trustedinstaller权限?Win11获取Trustedinstaller权限方法 如何获取

正式开始

现在,我们开始正式获得 Trustedinstaller 权限。在 Powershell 中依次输入:

sc.exe start TrustedInstallerSet-NtTokenPrivilege SeDebugPrivilege$p = Get-NtProcess -Name TrustedInstaller.exe$proc = New-Win32Process cmd.exe -CreationFlags NewConsole -ParentProcess $p

并回车。

Win11怎么获取Trustedinstaller权限?Win11获取Trustedinstaller权限方法 如何获取

接下来系统会打开一个命令提示符,该命令提示符就具有 Trustedinstaller 权限,可以直接修改系统文件。我们可以通过:

whoami /groups /fo list

进行测试:

Win11怎么获取Trustedinstaller权限?Win11获取Trustedinstaller权限方法 如何获取

郑重声明:本文版权归原作者所有,转载文章仅为传播更多信息之目的,如作者信息标记有误,请第一时间联系我们修改或删除,多谢。