trustedinstaller权限(TrustedInstaller)

trustedinstaller权限
前言:前几天百度自己,然后突然有一个大胆的想法。

大家可以打开百度,搜索关键字:查鲁特 帅哥

1.trustedinstaller权限
    要介绍trustedinstaller之前先介绍一下什么是WRP(Windows Resource Protection),WRP会保护注册表键值、文件夹和关键系统文件。
    Windows文件保护基于在Winlogon中注册文件更改通知。如果检测到任何对受保护系统文件的修改,修改的文件会被恢复为位于压缩文件夹 %WinDir%System32dllcache 的缓存副本。
    Windows资源保护(WRP)基于对预定义的受保护资源设置自主访问控制列表(DACL)和访问控制列表(ACL)工作。完全访问和修改WRP保护的资源被限制到使用Windows模块安装服务(TrustedInstaller.exe)的进程。管理员不再拥有对系统文件的完全访问权,他们必须使用SetupAPI,或者获取资源的所有权并添加适当的访问控制条目(ACE)才能修改或替换它。“Trusted Installer”帐户用于保护核心操作系统文件和注册表键值。
上面一大段话,可以得出结论:

1.trustedinstaller是为了保护系统文件不被更改
2.trustedinstaller权限比system大

2.如何get trustedinstaller权限
权限比system还大一定要拿到,TrustedInstaller权限有多大,点开windows/system32文件夹的可执行文件可以直观地看出来。

既然权限比system大当然要拿下来喽。如何get TrustedInstaller权限,大概分三步走。
1.启动TrustedInstaller服务+进程
2.获取TrustedInstaller进程token
3.通过token创建拥有TrustedInstaller权限的子进程

2.1启动TrustedInstaller服务+进程
觉得麻烦,要123,可以先分享一个一步到位的操作
system启动cmd
sc config TrustedInstaller binPath= “cmd.exe /C ren C:WindowsSystem32calc.exe C:WindowsSystem32call.exe”sc.exe start TrustedInstalle当然使用完别忘了把binPath改回:
“%SystemRoot%servicingTrustedInstaller.exe”
我们接着前面的话题,启动TrustedInstaller服务
sc.exe start TrustedInstalle2.2获取TrustedInstaller进程token
这里通过powershell下载NtObjectManager工具
网址:
https://www.powershellgallery.com/packages/NtObjectManager/1.1.1环境是win10 powershell5以上,奉劝大家不要用Windows7去升powershell5,虽然最终能执行成功但是最终坑点可以写好几篇文章。
以超管权限运行powershell

Install-Module -Name NtObjectManagerImport-Module NtObjectManagerSet-NtTokenPrivilege SeDebugPrivilege$3gstuniubi = Get-NtProcess -Name TrustedInstaller.exe$proc = New-Win32Process cmd.exe -CreationFlags NewConsole -ParentProcess $3gstuniubi然后就会弹出个cmd框,我们执行命令
ren calc.exe call.exe可以明显看到我们已经有TrustedInstaller的权限了。

写在最后
不出意外,这是本个公众号的最后一篇文章,因为特殊原因底裤被人脱了
导致虚拟身份和真人关联起来
但是这也不妨碍大家在百度搜索关键字:查鲁特 帅哥

再见了,祝大家技术越来越牛逼

trustedinstaller权限相关文章

版权声明