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

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

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

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

工具目录

分类

查看所有分类
Loading categories
LACheck — 多线程C# .NET程序集,用于通过SMB、WMI和WinRM枚举Windows主机上的本地管理员权限,集成了BloodHound以进行Active Directory侦察。 | Kitploit
工具/GitHubGitHub/mitchmoser/lacheck
权限提升侦察横向移动信息收集渗透测试红队
GitHubmitchmoser/lacheck

LACheck

多线程C# .NET程序集,用于通过SMB、WMI和WinRM枚举Windows主机上的本地管理员权限,集成了BloodHound以进行Active Directory侦察。

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

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

LACheck

多线程 C# .NET 程序集 本地管理权限枚举

参数

root@kitploit:~
> ./LACheck.exe help
  _                  _____ _               _
 | |        /\      / ____| |             | |
 | |       /  \    | |    | |__   ___  ___| | __
 | |      / /\ \   | |    | '_ \ / _ \/ __| |/ /
 | |____ / ____ \  | |____| | | |  __/ (__|   <
 |______/_/    \_\  \_____|_| |_|\___|\___|_|\_\

Usage:
    LACheck.exe smb rpc /targets:hostname,fqdn.domain.tld,10.10.10.10 /ldap:all /ou:"OU=Special Servers,DC=example,DC=local" /verbose /bloodhound /user:[email protected]

Local Admin Checks:
    smb   - Attempts to access C$ share
    rpc   - Attempts WMI query of Win32_ComputerSystem Class provider over RPC
    winrm - Attempts WMI query of Win32_ComputerSystem Class Provider over WinRM Session

Arguments:
    /bloodhound - generate bloodhound-digestible AdminTo and Session collection file
                  output file is zipped and enypted with randomized name and password
    /dc         - specify domain controller to query (if not ran on a domain-joined host)
    /domain     - specify domain name (if not ran on a domain-joined host)
    /edr        - check host for EDR (requires smb, rpc, or winrm)
    /logons     - return logged on users on a host (requires smb, rpc, or winrm)
    /registry   - enumerate sessions from registry hive (requires smb)
    /services   - return services running as users (requires smb, rpc, or winrm)
    /socket     - send bloodhound output to TCP socket instead of writing to disk
                  ex: ""127.0.0.1:8080""
    /targets    - comma-separated list of hostnames to check
    /threads    - specify maximum number of parallel threads (default=25)
    /user       - specify username that collection was run under (useful during token manipulation)
    /validate   - check credentials against Domain prior to scanning targets (useful during token manipulation)
    /verbose    - print additional logging information
    /ou         - specify LDAP OU to query enabled computer objects from
                  ex: "OU=Special Servers,DC=example,DC=local"
    /ldap - query hosts from the following LDAP filters:
         :all - All enabled computers with 'primary' group 'Domain Computers'
         :dc  - All enabled Domain Controllers (not read-only DCs)
         :exclude-dc - All enabled computers that are not Domain Controllers or read-only DCs
         :servers - All enabled servers
         :servers-exclude-dc - All enabled servers excluding Domain Controllers or read-only DCs

执行程序集

root@kitploit:~
execute-assembly /opt/SharpTools/LACheck smb rpc winrm /ldap:servers-exclude-dc /targets:WEB01,DEV02.contoso.com,10.10.10.10 /logons /threads:10 /verbose

输出

root@kitploit:~
[*] Tasked beacon to run .NET program: LACheck smb rpc winrm /ldap:servers-exclude-dc /targets:WEB01,DEV02.contoso.com,10.10.10.10 /logons /threads:10 /verbose
[+] host called home, sent: 111705 bytes
[+] received Output
[+] Parsed Aguments:
        rpc: True
        smb: True
        winrm: True
        /bloodhound: False
        /edr: False
        /logons: True
        /registry: False
        /services: False
        /ldap: servers-exclude-dc
        /ou:
        /targets:
        /threads: 10
        /user: svcadmin
        /validate: False
        /verbose: False
[+] Performing LDAP query for all enabled computers that are not Domain Controllers or read-only DCs...
[+] This may take some time depending on the size of the environment
[+] LDAP Search Results: 2
[SMB] Admin Success: WEB01 as svcadmin
[session] WEB01 - contoso\devadmin (svcadmin)
[session] WEB01 - contoso\devuser (svcadmin)
[session] WEB01 - contoso\WEB01$ (svcadmin)
[session] WEB01 - contoso\devadmin (svcadmin)
[session] WEB01 - contoso\devuser (svcadmin)
[rdp] WEB01 - contoso\devadmin rdp-tcp#2 Active Last Connection: 00:00:50:26 Last Input: 00:00:00:00  (svcadmin)
[session] WEB01 - contoso\devadmin  4/20/2021 11:00:05 AM (svcadmin)
[session] WEB01 - contoso\devuser 4/20/2021 1:40:52 PM (svcadmin)
[session] WEB01 - contoso\WEB01$ 4/20/2021 5:51:43 PM (svcadmin)
[session] WEB01 - contoso\devadmin 4/20/2021 09:54:38 AM (svcadmin)
[session] WEB01 - contoso\devuser 4/20/2021 10:14:32 AM (svcadmin)
[WinRM] Admin Success: DESKTOP-118GDCE as svcadmin
[WinRM] Admin Success: DEV02.contoso.com as svcadmin
[!] RPC on DEV02.contoso.com - Access denied.
[!] SMB on DEV02.contoso.com - Attempted to perform an unauthorized operation.
[RPC] Admin Success: 10.10.10.10  as svcadmin
[!] SMB on 10.10.10.10 - Attempted to perform an unauthorized operation.
[!] WinRM on 10.10.10.10 - The WinRM client cannot process the request. Default authentication may be used with an IP address under the following conditions: the transport is HTTPS or the destination is in the TrustedHosts list, and explicit credentials are provided. Use winrm.cmd to configure TrustedHosts. Note that computers in the TrustedHosts list might not be authenticated. For more information on how to set TrustedHosts run the following command: winrm help config.

WinRM 认证

如上述示例输出所示,尝试在 IP 地址为 10.10.10.10 的主机上检查 WinRM 时会出错,因为 WinRM 客户端不会尝试通过 IP 地址对主机进行身份验证。

尝试检查 WinRM 访问时,请使用主机名。

指定目标

/targets、/ldap 和 /ou 标志可以一起使用或单独使用,以生成要枚举的主机列表。

这些标志返回的所有主机在枚举开始前都会被合并并去重。

Bloodhound

LACheck 支持将收集到的 AdminTo 和 Session 信息写入 JSON 输出,这些输出可以上传到 BloodHound。

此输出仅用于通过单个用户的更新管理权限以及从已识别出管理权限的主机收集的会话信息,来扩充现有的 BloodHound 收集数据。

/bloodhound 开关会将一个随机命名的加密 zip 文件写入磁盘,该文件可以下载、解压并上传到 BloodHound。

/user

BloodHound 需要将用户和计算机解析为 SID。由于使用了模拟技术(例如 Cobalt Strike 的 make_token 和 kerberos_ticket_use),LACheck 可能无法准确确定收集时的用户上下文。/user 参数是必需的,它向 LACheck 提供其运行时上下文的用户主体名称(格式为 [email protected]),以便准确关联收集的信息。

/socket

BloodHound 输出可以发送到 TCP 套接字,而不是写入磁盘。

如果 TCP 连接失败,BloodHound 输出将写入磁盘。

在 Cobalt Strike beacon 中,可以使用 rportfwd_local 将 TCP 连接从主机转发回操作员的本地机器:

root@kitploit:~
rportfwd_local 8888 127.0.0.1 8888

然后操作员可以使用 netcat 将 TCP 流的输出通过管道传送到本地文件:

root@kitploit:~
nc -lvnp 8888 > computers.json 

枚举方法

性能总结

  • = 未实现

SMB

/edr

灵感来源于 harleyQu1nn 的 EDR.cna 脚本

Directory.GetFiles 方法从以下路径返回驱动程序列表:

  • \\host\C$\windows\system32\drivers
  • \\host\C$\windows\sysnative\drivers

驱动程序会与 EDR 供应商使用的已知驱动程序列表进行比对。

以 svcadmin 用户运行时的示例输出

root@kitploit:~
[EDR] WEB01 - Found: CrowdStrike, SentinelOne (svcadmin)
[EDR] DEV02 - no EDR found (svcadmin)

/logons

NetWkstaUserEnum 返回交互式、服务和批处理登录的用户列表。

WTSEnumerateSessionsA 返回主机上的 RDP 会话列表。

WTSQuerySessionInformationA 检索每个 RDP 会话的详细信息。

以 svcadmin 用户运行时的示例输出

root@kitploit:~
[session] WEB01 - contoso\devadmin (svcadmin)
[session] WEB01 - contoso\devuser (svcadmin)
[session] WEB01 - contoso\WEB01$ (svcadmin)
[session] WEB01 - contoso\devadmin (svcadmin)
[session] WEB01 - contoso\devuser (svcadmin)
[rdp] WEB01 - contoso\devadmin rdp-tcp#2 Active Last Connection: 00:00:50:26 Last Input: 00:00:00:00  (svcadmin)

/registry

遍历 \\Computer\HKEY_USERS\ 配置单元中的 SID,尝试访问每个 SID 的 Volatile Environment,并检索 USERDOMAIN 和 USERNAME 键的值。

此方法要求远程主机上的远程注册表服务正在运行。如果未运行:

  1. 记录远程注册表服务的初始启动类型
  2. 将启动类型更改为 Automatic
  3. 启动远程注册表服务
  4. 枚举注册表配置单元
  5. 停止远程注册表服务
  6. 将启动类型恢复为初始记录的值

由于枚举每个主机可能需要多步过程,此方法可能比替代技术慢。smb /logons 更快。

以 svcadmin 用户运行时的示例输出

root@kitploit:~
[registry] WEB01 - contoso\devadmin (svcadmin)

/services

ServiceController.GetServices 方法 检索主机上的服务列表。

查询每个服务以确定其配置为哪个用户运行。

由于每个服务都需要单独查询,此方法可能比替代技术慢。wmi /services 更快。

以 svcadmin 用户运行时的示例输出

root@kitploit:~
[service] WEB01 - [email protected] Service: secretsvc State: Running (svcadmin)

WMI

/edr

灵感来源于 harleyQu1nn 的 EDR.cna 脚本

CIM_DataFile 类 从以下路径返回驱动程序列表:

  • \host\C$\windows\system32\drivers
  • \host\C$\windows\sysnative\drivers

驱动程序会与 EDR 供应商使用的已知驱动程序列表进行比对。

以 svcadmin 用户运行时的示例输出

root@kitploit:~
[EDR] WEB01 - Found: CrowdStrike, SentinelOne (svcadmin)
[EDR] DEV02 - no EDR found (svcadmin)

/logons

Win32_LoggedOnUser 类 返回已登录会话的列表。 Win32_LogonSession 类 返回每个会话的详细信息。

以 svcadmin 用户运行时的示例输出

root@kitploit:~
[session] WEB01 - contoso\devadmin  4/20/2021 11:00:05 AM (svcadmin)
[session] WEB01 - contoso\devuser 4/20/2021 1:40:52 PM (svcadmin)
[session] WEB01 - contoso\WEB01$ 4/20/2021 5:51:43 PM (svcadmin)
[session] WEB01 - contoso\devadmin 4/20/2021 09:54:38 AM (svcadmin)
[session] WEB01 - contoso\devuser 4/20/2021 10:14:32 AM (svcadmin)

/registry

查询 Win32_UserProfile 类 以检索系统上用户配置文件的 SID。

StdRegProv 类的 EnumKey 方法 检索 \\Computer\HKEY_USERS\ 配置单元,并尝试访问每个返回的 SID 的 Volatile Environment,以获取 USERDOMAIN 和 USERNAME 键的值。

以 svcadmin 用户运行时的示例输出

root@kitploit:~
[registry] WEB01 - contoso\devadmin (svcadmin)

/services

查询 Win32_Service 类 以检索服务的名称、用户和状态。

以 svcadmin 用户运行时的示例输出

root@kitploit:~
[service] WEB01 - [email protected] Service: secretsvc State: Running (svcadmin)

WinRM

每个 WMI 检查也通过 WinRM 使用 WMI 资源 和 WMI 枚举 实现。

这避免了使用 PowerShell runspaces。

下载工具
SMBWMIWinRM
/edrfastfastfast
/logonsfastfastfast
/servicesslowfastfast
/registryslowfast-