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

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

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

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

工具目录

分类

查看所有分类
Loading categories
Locksmith — 一个小工具,用于发现并修复 Active Directory 证书服务中的常见配置错误。 | Kitploit
工具/GitHubGitHub/jakehildreth/locksmith
防御工具漏洞扫描器漏洞分析配置审计错误配置
GitHubjakehildreth/locksmith

Locksmith

一个小工具,用于发现并修复 Active Directory 证书服务中的常见配置错误。

查看仓库
1.6k14720天前Kitploit 审核通过

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
网站

Locksmith

root@kitploit:~
 _       _____  _______ _     _ _______ _______ _____ _______ _     _
 |      |     | |       |____/  |______ |  |  |   |      |    |_____|
 |_____ |_____| |_____  |    \_ ______| |  |  | __|__    |    |     |
     .--.                  .--.                  .--.
    /.-. '----------.     /.-. '----------.     /.-. '----------.
    \'-' .---'-''-'-'     \'-' .--'--''-'-'     \'-' .--'--'-''-'
     '--'                  '--'                  '--'

一个用于查找并修复 Active Directory 证书服务中常见错误配置的小工具。

GitHub release GitHub top language PowerShell Gallery Platform Support GitHub contributors PRs Welcome GitHub Actions Workflow Status PowerShell Gallery Downloads

目录

  1. 安装
  2. 运行 Locksmith
    1. 模式 0
    2. 模式 1
    3. 模式 2
    4. 模式 3
    5. 模式 4
    6. 扫描
  3. 安全与支持

安装

先决条件

  1. Locksmith 必须在已加入域的系统上运行。
  2. 在导入 Locksmith 模块之前,必须安装 ActiveDirectory 和 ServerManager PowerShell 模块。
  3. 某些检查及修复操作可能需要管理员权限。

标准模块安装

打开 PowerShell 提示符,然后从 PowerShell 库安装 Locksmith:

root@kitploit:~
Install-Module -Name Locksmith -Scope CurrentUser

其他安装方法

  1. 下载并直接使用模块(无需安装)

    1. 下载最新模块版本。
    2. 打开 PowerShell 提示符,切换到解压文件所在位置并运行:
    root@kitploit:~
    Unblock-File .\Locksmith.zip # if necessary to unblock the download
    Expand-Archive .\Locksmith.zip
    Import-Module .\Locksmith\Locksmith.psd1
    Invoke-Locksmith
    
  2. 下载独立脚本(无需模块)

    1. 下载最新单体(all-in-one)脚本版本。
    2. 打开 PowerShell 提示符,切换到下载文件所在位置并运行:
    root@kitploit:~
    Unblock-File .\Invoke-Locksmith.zip
    Expand-Archive .\Invoke-Locksmith.zip -DestinationPath .\
    .\Invoke-Locksmith.ps1
    

运行 Locksmith

运行 Invoke-Locksmith 时有多种模式可供选择。你还可以使用 Scans 参数来选择要执行的扫描。

模式 0:识别问题,输出到控制台(默认)

不带参数或使用 -Mode 0 运行 Invoke-Locksmith.ps1 将扫描当前 Active Directory 林,并以表格式将所有发现的 AD CS 问题输出到控制台。

root@kitploit:~
# Module Syntax
Invoke-Locksmith
root@kitploit:~
# Script Syntax
.\Invoke-Locksmith.ps1

模式 0 的示例输出:https://github.com/jakehildreth/Locksmith/blob/main//Docs/Examples/Mode0.md

模式 1:识别问题及修复方案,输出到控制台

此模式扫描当前林,并以列表格式将所有发现的 AD CS 问题和可能的修复方案输出到控制台。

root@kitploit:~
# Module Syntax
Invoke-Locksmith -Mode 1
root@kitploit:~
# Script Syntax
.\Invoke-Locksmith.ps1 -Mode 1

模式 1 的示例输出:https://github.com/jakehildreth/Locksmith/blob/main/Docs/Examples/Mode1.md

模式 2:识别问题,输出到 CSV

Locksmith 模式 2 扫描当前林,并将所有发现的 AD CS 问题输出到当前工作目录下的 ADCSIssues.CSV 文件中。

root@kitploit:~
# Module Syntax
Invoke-Locksmith -Mode 2
root@kitploit:~
# Script Syntax
.\Invoke-Locksmith.ps1 -Mode 2

模式 2 的示例输出:https://github.com/jakehildreth/Locksmith/blob/main/Docs/Examples/Mode2.md

模式 3:识别问题及修复方案,输出到 CSV

在模式 3 中,Locksmith 扫描当前林,并将所有发现的 AD CS 问题及示例修复方案输出到当前工作目录下的 ADCSRemediation.CSV 文件中。

root@kitploit:~
# Module Syntax
Invoke-Locksmith -Mode 3
root@kitploit:~
# Script Syntax
.\Invoke-Locksmith.ps1 -Mode 3

模式 3 的示例输出:https://github.com/jakehildreth/Locksmith/blob/main/Docs/Examples/Mode3.md

模式 4:修复所有问题

模式 4 是“一键解决”按钮。以模式 4 运行 Locksmith 将识别所有错误配置,并逐一提供修复选项。如果任何修复可能存在运维影响,Locksmith 会向你发出警告。

root@kitploit:~
# Module Syntax
Invoke-Locksmith -Mode 4
root@kitploit:~
# Script Syntax
.\Invoke-Locksmith.ps1 -Mode 4

模式 4 的示例输出:https://github.com/jakehildreth/Locksmith/blob/main/Docs/Examples/Mode4.md

扫描

使用 -Scans 参数选择要扫描的漏洞。可接受的值包括 All、Auditing、ESC1、ESC2、ESC3、ESC4、ESC5、ESC6、ESC7、ESC8、ESC9、ESC11、ESC13、ESC15、EKEUwu、 或 。 选项会显示一个交互式列表,允许你选择一个或多个扫描。

root@kitploit:~
# Run all scans
Invoke-Locksmith -Scan All
root@kitploit:~
# Prompt the user for a list of scans to select
Invoke-Locksmith.ps1 -Scans PromptMe
root@kitploit:~
# Scan for ESC1 vulnerable paths
Invoke-Locksmith.ps1 -Scans ESC1
root@kitploit:~
# Scan for ESC1, ESC2, and ESC8 vulnerable paths
Invoke-Locksmith.ps1 -Scans ESC1,ESC2,ESC8

安全与支持

如需报告漏洞,请参阅安全策略。 如需使用问题和支持指南,请参阅支持。

感谢你使用 Locksmith!💜

下载工具
ESC16
PromptMe
PromptMe