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

KerberOPSEC

> 编程语言
开源

在 C# 中使用 OPSEC 安全的 Kerberoasting

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

工具介绍

在 C# 中使用 OPSEC 安全的 Kerberoasting

KerberOPSEC

I came across an article (Kerberoasting With OPSEC) talking about some of the ways Kerberoasting gets detected and how to potentially avoid making such common mistakes.

Chief among them were LDAP queries that search the entire domain for accounts with an SPN, requesting too many tickets at once, and/or not taking care to look at key user attributes indicating a honeypot account.

So I thought it would be cool to write this in C# to help myself learn some coding and who knows, maybe it will come in handy one day.

Usage

C:\>KerberOPSEC.exe -h

-GetDN                                  : Retreives current domain Distinguished Name
-ListOUs       : Lists all OUs in the domain
-CheckOU           : Checks an OU for sub-OUs, Groups, and Users
-CheckGroup     : Checks a Group for Users
-CheckSPN        : Checks an account for an SPN and shows OPSEC info
-GetSPN     : Retreives hash for specified SPN
C:\>KerberOPSEC.exe -GetDN

Distinguished Name:

---> DC=contoso,DC=local
C:\>KerberOPSEC.exe -ListOUs "DC=contoso,DC=local"

OUs:

---> OU=Domain Controllers,DC=contoso,DC=local
---> OU=SERVERS,DC=contoso,DC=local
---> OU=WORKSTATIONS,DC=contoso,DC=local
---> OU=USERS,DC=contoso,DC=local
---> OU=IT,OU=USERS,DC=contoso,DC=local
C:\>KerberOPSEC.exe -CheckOU "OU=IT,OU=USERS,DC=contoso,DC=local"

OUs:

Groups:

---> CN=Admins,OU=IT,OU=USERS,DC=contoso,DC=local
---> CN=HelpDesk,OU=IT,OU=USERS,DC=contoso,DC=local

Users:

---> CN=SQLUser,OU=IT,OU=USERS,DC=contoso,DC=local
C:\>KerberOPSEC.exe -CheckGroup "CN=Admins,OU=IT,OU=USERS,DC=contoso,DC=local"

Users:

---> CN=Mark,OU=CORP USERS,DC=contoso,DC=local

C:\>KerberOPSEC.exe -CheckSPN "CN=Mark,OU=USERS,DC=contoso,DC=local"

---> No SPN found for [email protected]

C:\>KerberOPSEC.exe -CheckGroup "CN=HelpDesk,OU=IT,OU=USERS,DC=contoso,DC=local"

Users:

---> CN=Ryan,OU=USERS,DC=contoso,DC=local

C:\>KerberOPSEC.exe -CheckSPN "CN=Ryan,OU=USERS,DC=contoso,DC=local"

---> No SPN found for [email protected]
C:\>KerberOPSEC.exe -CheckSPN "CN=SQLUser,OU=IT,OU=USERS,DC=contoso,DC=local"

User Attributes:

---> sAMAccountName                : sqluser
---> Description                   : MSSQL
---> servicePrincipalName          : MSSQLSvc/FileSRV:1433
---> whenCreated                   : 1/8/2021 4:52:54 AM
---> whenChanged                   : 1/10/2022 8:29:36 PM
---> userAccountControl            : 66048
---> msds-SupportedEncryptionTypes : 8
---> pwdLastSet                    : 10/14/2021 9:30:37 PM
---> lastLogon                     : 1/15/2022 12:29:36 PM
…

References

Microsoft 365 Security: Kerberoast With OPSEC
Stack Overflow: Difference between PrincipalSearcher and DirectorySearcher
Stack Overflow: Active Directory - PropertiesToLoad get all properties
GhostPack: SharpRoast GhostPack: Rubeus

Issues· 0 开放

查看全部 Issues在 GitHub 打开

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

> 标签

C#

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

> 工具信息

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

> 相关工具

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