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

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

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

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

工具目录

分类

查看所有分类
Loading categories
PrivKit — PrivKit 是一个简单的信标对象文件,用于检测 Windows 操作系统上因配置错误导致的权限提升漏洞。 | Kitploit
工具/GitHubGitHub/mertdas/privkit
权限提升漏洞分析漏洞利用后渗透利用渗透测试二进制分析红队
GitHubmertdas/privkit

PrivKit

PrivKit 是一个简单的信标对象文件,用于检测 Windows 操作系统上因配置错误导致的权限提升漏洞。

查看仓库
611717个月前Kitploit 审核通过

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

PrivKit

一个用于 Windows 本地权限提升检查的信标对象文件(BOF)集合。



GitHub License GitHub Repo stars
GitHub forks GitHub watchers GitHub contributors

描述

PrivKit 是一款开源工具,可帮助红队成员和渗透测试人员使用 Cobalt Strike 信标对象文件(BOF)快速识别常见的 Windows 本地权限提升向量。

Static Badge Static Badge Static Badge Static Badge Static Badge

有关命令行用法和示例,请参阅 使用 部分。

如果您发现任何错误,欢迎随时报告它们。您的反馈对改进本项目质量至关重要!

免责声明

本项目的作者和贡献者不对任何非法使用该工具的行为负责。该工具仅用于教育和授权的安全测试目的。用户有责任确保合法使用。

目录

  • PrivKit
    • 描述
    • 免责声明
    • 目录
    • 致谢
    • 功能
    • 安装
    • 使用
    • 示例
    • 参考

致谢

特别感谢我的朋友 @nickvourd 的所有贡献。

特别感谢 TrustedSec 团队出色的 CS-Situational-Awareness-BOF 项目,它为本工具提供了灵感。

衷心感谢 Cobalt Strike 团队提供的全面 BOF 文档和示例。

PrivKit 由 @merterpreter 倾心制作 ❤️。

功能

PrivKit 提供了一套全面的权限提升检查,包括:

为什么选择 BOF?

  • ✅ 内存执行 - 无需将文件写入磁盘
  • ✅ 轻量级 - 最小信标足迹
  • ✅ 快速 - 原生执行速度
  • ✅ 隐蔽 - 在信标的进程上下文中运行
  • ✅ 跨架构 - 支持 x64 和 x86

PrivKit 使用 C 语言编写,编译为信标对象文件,兼容 Windows 目标上的 Cobalt Strike 4.x。

安装

⚠️ 请确保您的系统已安装 MinGW-w64。

ℹ️ 对于 Linux 平台(Ubuntu/Debian),安装以下软件包:

root@kitploit:~
sudo apt update && sudo apt install mingw-w64 -y

ℹ️ 对于 macOS 平台,安装以下软件包:

root@kitploit:~
brew install mingw-w64
  1. 执行以下命令克隆仓库:
root@kitploit:~
git clone https://github.com/mertdas/PrivKit.git
  1. 克隆完成后,进入 PrivKit 目录:
root@kitploit:~
cd PrivKit
  1. 使用 make_all.sh 脚本编译所有 BOF(x64 和 x86 架构):
root@kitploit:~
./make_all.sh
  1. 在 Cobalt Strike 中加载攻击脚本:
root@kitploit:~
Cobalt Strike -> Script Manager -> Load -> PrivCheck.cna
  1. 在信标中验证安装:
root@kitploit:~
beacon> help

使用

运行所有检查

一次性执行所有权限提升检查:

root@kitploit:~
beacon> PrivCheck

运行单项检查

根据需要运行特定检查:

root@kitploit:~
beacon> AlwaysInstallElevatedCheck
beacon> AutologonCheck
beacon> CredentialManagerCheck
beacon> HijackablePathCheck
beacon> ModifiableAutorunCheck
beacon> ModifiableSVCCheck
beacon> TokenPrivilegesCheck
beacon> UnquotedSVCPathCheck
beacon> PowerShellHistoryCheck
beacon> UACStatusCheck

示例

AlwaysInstallElevatedCheck

root@kitploit:~
beacon> AlwaysInstallElevatedCheck
[*] BOF by @merterpreter && @nickvourd
[*] Checking AlwaysInstallElevated privilege escalation vulnerability...

=== AlwaysInstallElevated Check ===

[*] HKCU\...\Installer\AlwaysInstallElevated = 1
[*] HKLM\...\Installer\AlwaysInstallElevated = 1

[+] VULNERABLE: AlwaysInstallElevated is set in both HKCU and HKLM

UACStatusCheck

root@kitploit:~
beacon> UACStatusCheck
[*] BOF by @merterpreter && @nickvourd
[*] Checking UAC status, integrity level, and admin membership...

=== UAC Status Check ===

[11/27 15:08:08] [+] received output:
[*] UAC Enabled (EnableLUA): Yes

[11/27 15:08:08] [+] received output:
[*] ConsentPromptBehaviorAdmin: 5 
[11/27 15:08:08] [+] received output:
(Prompt for consent for non-Windows binaries)

[11/27 15:08:08] [+] received output:
[*] PromptOnSecureDesktop: Yes

[11/27 15:08:08] [+] received output:


[11/27 15:08:08] [+] received output:
[*] Integrity Level: 
[11/27 15:08:08] [+] received output:
Medium

[11/27 15:08:08] [+] received output:
[*] Local Admin Group Member: Yes

[11/27 15:08:08] [+] received output:

[*] Summary:

[11/27 15:08:08] [+] received output:
[+] User is local admin but NOT elevated (UAC filtered token)

[11/27 15:08:08] [+] received output:
[+] UAC bypass may be possible

参考

  • Cobalt Strike BOF Documentation
  • TrustedSec CS-Situational-Awareness-BOF
  • TrustedSec CS-Remote-OPs-BOF
  • Windows-Local-Privilege-Escalation-Cookbook GitHub by nickvourd
  • Windows Privilege Escalation - PayloadsAllTheThings
  • WIN32 APIs Microsoft Documentation
  • Offensive Coding by Mr.Un1k0der
  • Sektor7 Institute
下载工具
检查项描述
AlwaysInstallElevatedCheck检查 HKCU 和 HKLM 中 AlwaysInstallElevated 配置错误
AutologonCheck枚举 Winlogon 注册表中存储的自动登录凭据
CredentialManagerCheck从 Windows 凭据管理器中转储凭据
HijackablePathCheck识别系统 PATH 中的可写目录
ModifiableAutorunCheck查找 Run/RunOnce 键中可写的自动运行可执行文件
ModifiableSVCCheck查找具有可修改权限(DACL)的服务
TokenPrivilegesCheck枚举当前进程令牌的特权
UnquotedSVCPathCheck检测包含空格且未加引号的服务路径
PowerShellHistoryCheck检查 PowerShell PSReadLine 历史记录文件
UACStatusCheck检查 UAC 状态、完整性级别和本地管理员组成员身份