百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
P

PrivKit

> 编程语言
开源

PrivKit 是一个简单的信标对象文件,可检测 Windows 操作系统中配置不当导致的权限提升漏洞。

609 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

PrivKit 是一个简单的信标对象文件,可检测 Windows 操作系统中配置不当导致的权限提升漏洞。

PrivKit

A collection of Beacon Object Files (BOFs) for Windows Local Privilege Escalation Checks.

Description

PrivKit is an open-source tool that empowers red teamers and penetration testers to quickly identify common Windows local privilege escalation vectors using Cobalt Strike Beacon Object Files (BOFs).

For command-line usage and examples, please refer to the Usage section.

If you find any bugs, don't hesitate to report them. Your feedback is valuable in improving the quality of this project!

Disclaimer

The authors and contributors of this project are not liable for any illegal use of the tool. It is intended for educational and authorized security testing purposes only. Users are responsible for ensuring lawful usage.

Table of Contents

  • PrivKit
    • Description
    • Disclaimer
    • Table of Contents
    • Acknowledgement
    • Features
    • Instalation
    • Usage
    • Examples
    • References

Acknowledgement

Speacial thanks to my friend @nickvourd for all his contributions.

Special thanks to the TrustedSec team for their excellent CS-Situational-Awareness-BOF project, which served as an inspiration for this tool.

Grateful acknowledgment to the Cobalt Strike team for their comprehensive BOF documentation and examples.

PrivKit was created with :heart: by @merterpreter.

Features

PrivKit offers a comprehensive suite of privilege escalation checks, including:

Check Description
AlwaysInstallElevatedCheck Checks for AlwaysInstallElevated misconfiguration in HKCU and HKLM
AutologonCheck Enumerates stored Autologon credentials in Winlogon registry
CredentialManagerCheck Dumps credentials from Windows Credential Manager
HijackablePathCheck Identifies writable directories in system PATH
ModifiableAutorunCheck Finds writable autorun executables in Run/RunOnce keys
ModifiableSVCCheck Finds services with modifiable permissions (DACL)
TokenPrivilegesCheck Enumerates current process token privileges
UnquotedSVCPathCheck Detects unquoted service paths with spaces
PowerShellHistoryCheck Checks for PowerShell PSReadLine history file
UACStatusCheck Checks UAC status, integrity level, and admin group membership

Why BOFs?

  • ✅ In-memory execution - No files dropped to disk
  • ✅ Lightweight - Minimal beacon footprint
  • ✅ Fast - Native execution speed
  • ✅ Stealthy - Runs within beacon's process context
  • ✅ Cross-architecture - Supports both x64 and x86

PrivKit is written in C and compiled as Beacon Object Files, making it compatible with Cobalt Strike 4.x on Windows targets.

Installation

⚠️ Please ensure that MinGW-w64 is installed on your system.

ℹ️ For Linux platforms (Ubuntu/Debian) install the following package:

bash
sudo apt update && sudo apt install mingw-w64 -y

ℹ️ For MacOS platforms install the following package:

bash
brew install mingw-w64
  1. Clone the repository by executing the following command:
bash
git clone https://github.com/mertdas/PrivKit.git
  1. Once the repository is cloned, navigate into the PrivKit directory:
bash
cd PrivKit
  1. Use the make_all.sh script compiles all BOFs for both x64 and x86 architectures:
./make_all.sh
  1. Load the aggressor script in Cobalt Strike:
Cobalt Strike -> Script Manager -> Load -> PrivCheck.cna
  1. Verify installation in beacon:
beacon> help

Usage

Run All Checks

Execute all privilege escalation checks at once:

beacon> PrivCheck

Run Individual Checks

Run specific checks as needed:

beacon> AlwaysInstallElevatedCheck
beacon> AutologonCheck
beacon> CredentialManagerCheck
beacon> HijackablePathCheck
beacon> ModifiableAutorunCheck
beacon> ModifiableSVCCheck
beacon> TokenPrivilegesCheck
beacon> UnquotedSVCPathCheck
beacon> PowerShellHistoryCheck
beacon> UACStatusCheck

Examples

AlwaysInstallElevatedCheck

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

…

References

  • 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

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言