Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
DiagTrackEoP — 滥用 SeImpersonate 的 Windows 权限提升漏洞利用,通过 DiagTrack RPC,利用 Secondary Logon 获取 INTERACTIVE 令牌并取得 SYSTEM 权限。 | Kitploit
工具/GitHubGitHub/wh04m1001/diagtrackeop
权限提升漏洞利用后渗透利用渗透测试红队对抗性攻击
GitHubwh04m1001/diagtrackeop

DiagTrackEoP

滥用 SeImpersonate 的 Windows 权限提升漏洞利用,通过 DiagTrack RPC,利用 Secondary Logon 获取 INTERACTIVE 令牌并取得 SYSTEM 权限。

查看仓库
881474年前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

DiagTrackEoP

这只是滥用 SeImpersonate 权限的另一种方式。

本 PoC 基于 @crisprss 的这篇博客。

在这篇博客中,@crisprss 展示了一种使用 AzureAttestService 滥用 SeImpersonate 权限的有趣方法,AzureAttestService 随近期版本的 SQL Server 一起提供,相关 PoC 可在此处找到:https://github.com/crisprss/magicAzureAttestService。

在同一篇博客中,他还展示了另一种利用 DiagTrack 服务滥用 SeImpersonate 权限的可能方式,但作者未能将其武器化。以下内容摘自该博客(原文为中文翻译而来,因此可能并非 100% 准确):

root@kitploit:~
But just when I thought it could be triggered normally, I didn't realize that this service is transparent to service users, which also means that it is not feasible to simulate pipeline privilege escalation through service users, because service users such as sqlserver There is no way to call the RPC interface, which also means that you can only escalate rights from the administrator user to SYSTEM in this way, so here is just a process sharing

是的,如果你尝试以服务用户身份调用该 RPC 服务器公开的方法,就会收到“拒绝访问”的错误。

imgage

但是,为什么普通、非特权用户却能调用这个方法呢?

我的猜测是,由于服务用户在会话 0 中运行,他们的令牌中不会有 NT AUTHORITY\INTERACTIVE SID,而通过 RDP 或交互方式登录的正常用户则会拥有该 SID。

那么我们如何才能从会话 0 中获取 NT AUTHORITY\INTERACTIVE SID 呢?实际上非常简单,Secondary Logon 服务会帮我们做到这一点。 我们可以使用 LogonUser API 调用来获取带有 NT AUTHORITY\INTERACTIVE SID 的令牌,并且我们不需要有效的凭据,因为我们将使用 NewCredentials(9) 登录类型。 当使用 NewCredentials 登录类型时,Secondary Logon 会创建一个新的登录会话并复制调用者的令牌,同时还会插入 NT AUTHORITY\INTERACTIVE SID。这对我们来说非常理想,因为我们不需要有效凭据(使用 NewCredentials 登录类型的凭据只有在用户尝试访问网络资源时才会被验证)。

那么,既然我们拥有了带 NT AUTHORITY\INTERACTIVE SID 的令牌,这个利用能成功吗?是的,可以 :D

image

该 PoC 已在 Windows 10 和 Windows 2019 上测试。

致谢

@crisprss - https://www.crisprx.top/archives/561

@itm4n - https://github.com/itm4n/PrintSpoofer

@splinter_code - https://github.com/antonioCoco/RunasCs

下载工具