opencode-skills-collection 4.0.42 → 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 (297) hide show
  1. package/bundled-skills/.antigravity-install-manifest.json +49 -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/lore/SKILL.md +104 -298
  95. package/bundled-skills/lore/references/audit-template.md +21 -4
  96. package/bundled-skills/lore/references/compatibility.md +51 -121
  97. package/bundled-skills/lore/references/config.md +22 -23
  98. package/bundled-skills/lore/references/entry-format.md +33 -3
  99. package/bundled-skills/lore/references/history-command.md +98 -2
  100. package/bundled-skills/lore/references/platform-mirrors.md +45 -16
  101. package/bundled-skills/lore/references/stale-new-markers.md +10 -8
  102. package/bundled-skills/lore/references/summary-template.md +8 -1
  103. package/bundled-skills/lore/references/workflows.md +192 -0
  104. package/bundled-skills/lore/scripts/README.md +14 -13
  105. package/bundled-skills/lore/scripts/README.zh-CN.md +14 -13
  106. package/bundled-skills/lore/scripts/find_duplicates.py +14 -4
  107. package/bundled-skills/lore/scripts/find_stale.py +68 -16
  108. package/bundled-skills/lore/scripts/history.py +235 -23
  109. package/bundled-skills/lore/scripts/id_hash.py +7 -4
  110. package/bundled-skills/lore/scripts/list_entries.py +82 -13
  111. package/bundled-skills/macos-reverse/SKILL.md +85 -0
  112. package/bundled-skills/macos-reverse/references/macho-triage.md +10 -0
  113. package/bundled-skills/malware-analysis/SKILL.md +311 -0
  114. package/bundled-skills/malware-analysis/references/anti-analysis-techniques.md +205 -0
  115. package/bundled-skills/malware-analysis/references/sandbox-orchestration.md +204 -0
  116. package/bundled-skills/malware-analysis/references/yara-sigma-rules.md +232 -0
  117. package/bundled-skills/mobile-reverse/SKILL.md +222 -0
  118. package/bundled-skills/mobile-reverse/references/anti-detection-bypass.md +182 -0
  119. package/bundled-skills/mobile-reverse/references/frida-objection-deep.md +218 -0
  120. package/bundled-skills/mobile-reverse/references/ios-reverse-guide.md +177 -0
  121. package/bundled-skills/muapi-media/SKILL.md +311 -0
  122. package/bundled-skills/ot-ics/SKILL.md +117 -0
  123. package/bundled-skills/ot-ics/references/ot-safe-assessment.md +10 -0
  124. package/bundled-skills/patch-diff-exploit/SKILL.md +278 -0
  125. package/bundled-skills/patch-diff-exploit/references/diff-tools-comparison.md +271 -0
  126. package/bundled-skills/patch-diff-exploit/references/patch-tuesday-workflow.md +253 -0
  127. package/bundled-skills/patch-diff-exploit/references/root-cause-and-poc.md +198 -0
  128. package/bundled-skills/pentest-tools/SKILL.md +346 -0
  129. package/bundled-skills/pentest-tools/references/ai-pentest-agents.md +148 -0
  130. package/bundled-skills/pentest-tools/references/ai-pentesting-landscape-2026.md +73 -0
  131. package/bundled-skills/pentest-tools/references/automation-loop-pattern.md +153 -0
  132. package/bundled-skills/pentest-tools/references/awesome-pentest-digest.md +175 -0
  133. package/bundled-skills/pentest-tools/references/burpsuite-mcp-guide.md +769 -0
  134. package/bundled-skills/pentest-tools/references/client-side-lab-playbook.md +155 -0
  135. package/bundled-skills/pentest-tools/references/kali-mcp-ecosystem.md +119 -0
  136. package/bundled-skills/pentest-tools/references/msf-protocol.md +169 -0
  137. package/bundled-skills/pentest-tools/references/network-attack-defense.md +350 -0
  138. package/bundled-skills/pentest-tools/references/nuclei-guide-2026.md +157 -0
  139. package/bundled-skills/pentest-tools/references/payloads.md +32 -0
  140. package/bundled-skills/pentest-tools/references/pentest-ai-agents-matrix.md +117 -0
  141. package/bundled-skills/pentest-tools/references/pentest-loop.md +270 -0
  142. package/bundled-skills/pentest-tools/references/recon-pipeline.md +154 -0
  143. package/bundled-skills/pentest-tools/references/templates/findings.md +21 -0
  144. package/bundled-skills/pentest-tools/references/templates/progress.md +17 -0
  145. package/bundled-skills/pentest-tools/references/templates/rules.md +35 -0
  146. package/bundled-skills/pentest-tools/references/templates/scope.md +29 -0
  147. package/bundled-skills/pentest-tools/references/templates/task_plan.md +27 -0
  148. package/bundled-skills/pentest-tools/references/web-attack-cheatsheet.md +387 -0
  149. package/bundled-skills/pentest-tools/src-hunter/SKILL.md +243 -0
  150. package/bundled-skills/pentest-tools/src-hunter/references/README.en.md +115 -0
  151. package/bundled-skills/pentest-tools/src-hunter/references/README.md +148 -0
  152. package/bundled-skills/pentest-tools/src-hunter/references/dictionaries/00-index.md +44 -0
  153. package/bundled-skills/pentest-tools/src-hunter/references/dictionaries/chinese-srcfingerprints.md +515 -0
  154. package/bundled-skills/pentest-tools/src-hunter/references/dictionaries/default-credentials-cn.md +274 -0
  155. package/bundled-skills/pentest-tools/src-hunter/references/industry/00-index.md +66 -0
  156. package/bundled-skills/pentest-tools/src-hunter/references/industry/banking-finance.md +338 -0
  157. package/bundled-skills/pentest-tools/src-hunter/references/industry/telecom-isp.md +315 -0
  158. package/bundled-skills/pentest-tools/src-hunter/references/methodology/00-index.md +68 -0
  159. package/bundled-skills/pentest-tools/src-hunter/references/methodology/01-attack-priority.md +143 -0
  160. package/bundled-skills/pentest-tools/src-hunter/references/methodology/02-bypass-toolkit.md +357 -0
  161. package/bundled-skills/pentest-tools/src-hunter/references/methodology/03-evidence-discipline.md +205 -0
  162. package/bundled-skills/pentest-tools/src-hunter/references/methodology/04-control-gap-hunting.md +238 -0
  163. package/bundled-skills/pentest-tools/src-hunter/references/methodology/05-srctimebox-priority.md +161 -0
  164. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet/adcs/346/224/273/345/207/273.md +254 -0
  165. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet/exchange/346/224/273/345/207/273.md +254 -0
  166. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet/sharepoint/346/224/273/345/207/273.md +113 -0
  167. 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
  168. 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
  169. 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
  170. 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
  171. 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
  172. 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
  173. 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
  174. 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
  175. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/ai/345/256/211/345/205/250.md +698 -0
  176. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/api/345/256/211/345/205/250.md +1935 -0
  177. 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
  178. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/jwt/345/256/211/345/205/250.md +496 -0
  179. 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
  180. 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
  181. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/sql-nosql/346/263/250/345/205/245.md +1924 -0
  182. 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
  183. 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
  184. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/websocket/345/256/211/345/205/250.md +487 -0
  185. 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
  186. 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
  187. 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
  188. 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
  189. 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
  190. 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
  191. 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
  192. 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
  193. 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
  194. 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
  195. 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
  196. 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
  197. 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
  198. package/bundled-skills/pentest-tools/src-hunter/references/payloader/index.md +69 -0
  199. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools/web/346/270/227/351/200/217.md +662 -0
  200. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools/windows/346/270/227/351/200/217.md +100 -0
  201. 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
  202. 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
  203. 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
  204. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//345/237/237/346/270/227/351/200/217.md +50 -0
  205. 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
  206. 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
  207. 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
  208. 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
  209. 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
  210. 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
  211. 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
  212. package/bundled-skills/pentest-tools/src-hunter/references/payloader/waf-bypass.md +6504 -0
  213. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/00-index.md +57 -0
  214. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/api-rest.md +2050 -0
  215. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/arbitrary-x-authz.md +481 -0
  216. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/dos.md +615 -0
  217. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/file-upload.md +1365 -0
  218. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/graphql.md +253 -0
  219. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/http-smuggling.md +924 -0
  220. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/info-disclosure.md +432 -0
  221. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/intranet-postexp.md +4845 -0
  222. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/llm-prompt-injection.md +1394 -0
  223. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/logic-flaws.md +1796 -0
  224. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/mobile.md +397 -0
  225. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/oauth-saml-jwt.md +2504 -0
  226. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/path-traversal.md +1297 -0
  227. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/race-conditions.md +207 -0
  228. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/rce.md +4829 -0
  229. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/sqli.md +1620 -0
  230. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/ssrf-cache-host.md +2098 -0
  231. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/unauth-access.md +330 -0
  232. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/xss.md +1159 -0
  233. package/bundled-skills/pentest-tools/src-hunter/references/templates/report-submission.md +346 -0
  234. package/bundled-skills/pentest-tools/src-hunter/references/tools/mcp-jshook.md +174 -0
  235. package/bundled-skills/poka-yoke/SKILL.md +172 -0
  236. package/bundled-skills/project-state-governor/SKILL.md +1 -1
  237. package/bundled-skills/project-state-governor/references/project-state-schema.md +1 -1
  238. package/bundled-skills/protocol-reverse/SKILL.md +108 -0
  239. package/bundled-skills/protocol-reverse/references/protocol-workflow.md +29 -0
  240. package/bundled-skills/pwn-chain/SKILL.md +209 -0
  241. package/bundled-skills/pwn-chain/references/heap-pwn.md +283 -0
  242. package/bundled-skills/pwn-chain/references/kernel-pwn.md +370 -0
  243. package/bundled-skills/pwn-chain/references/stack-pwn.md +312 -0
  244. package/bundled-skills/radare2/SKILL.md +460 -0
  245. package/bundled-skills/radare2/references/cheatsheet.md +129 -0
  246. package/bundled-skills/radio-sdr/SKILL.md +77 -0
  247. package/bundled-skills/radio-sdr/references/sdr-lab-rules.md +6 -0
  248. package/bundled-skills/reverse-browser-automation/SKILL.md +249 -0
  249. package/bundled-skills/reverse-browser-automation/references/playwright-cheatsheet.md +425 -0
  250. package/bundled-skills/reverse-engineering/SKILL.md +213 -0
  251. package/bundled-skills/reverse-engineering/dsl-vm-reverse/SKILL.md +388 -0
  252. package/bundled-skills/reverse-engineering/references/ai-assisted-re.md +149 -0
  253. package/bundled-skills/reverse-engineering/references/anti-analysis.md +836 -0
  254. package/bundled-skills/reverse-engineering/references/awesome-re-resources.md +135 -0
  255. package/bundled-skills/reverse-engineering/references/crypto-decode-tools.md +220 -0
  256. package/bundled-skills/reverse-engineering/references/elf-analysis.md +296 -0
  257. package/bundled-skills/reverse-engineering/references/field-notes.md +540 -0
  258. package/bundled-skills/reverse-engineering/references/go-reverse.md +240 -0
  259. package/bundled-skills/reverse-engineering/references/kernel-driver-reverse.md +298 -0
  260. package/bundled-skills/reverse-engineering/references/languages-compiled.md +587 -0
  261. package/bundled-skills/reverse-engineering/references/languages-platforms.md +486 -0
  262. package/bundled-skills/reverse-engineering/references/languages.md +499 -0
  263. package/bundled-skills/reverse-engineering/references/nonpe-format-cookbook.md +301 -0
  264. package/bundled-skills/reverse-engineering/references/ollvm-deobfuscation.md +501 -0
  265. package/bundled-skills/reverse-engineering/references/patterns-ctf-2.md +397 -0
  266. package/bundled-skills/reverse-engineering/references/patterns-ctf-3.md +719 -0
  267. package/bundled-skills/reverse-engineering/references/patterns-ctf.md +532 -0
  268. package/bundled-skills/reverse-engineering/references/patterns.md +801 -0
  269. package/bundled-skills/reverse-engineering/references/platforms-hardware.md +304 -0
  270. package/bundled-skills/reverse-engineering/references/platforms.md +442 -0
  271. package/bundled-skills/reverse-engineering/references/re-agent-workflow.md +240 -0
  272. package/bundled-skills/reverse-engineering/references/tools-advanced.md +822 -0
  273. package/bundled-skills/reverse-engineering/references/tools-dynamic.md +846 -0
  274. package/bundled-skills/reverse-engineering/references/tools.md +546 -0
  275. package/bundled-skills/spec-driven-loop/SKILL.md +203 -0
  276. package/bundled-skills/spec-driven-loop/references/agent-and-judge-contracts.md +120 -0
  277. package/bundled-skills/spec-driven-loop/references/document-templates.md +184 -0
  278. package/bundled-skills/supply-chain-security/SKILL.md +180 -0
  279. package/bundled-skills/supply-chain-security/references/cicd-pipeline-security.md +137 -0
  280. package/bundled-skills/supply-chain-security/references/sbom-sca-methodology.md +74 -0
  281. package/bundled-skills/thick-client/SKILL.md +104 -0
  282. package/bundled-skills/thick-client/references/thick-client-checklist.md +9 -0
  283. package/bundled-skills/threat-hunting/SKILL.md +94 -0
  284. package/bundled-skills/threat-hunting/references/hunting-loop.md +5 -0
  285. package/bundled-skills/threat-intelligence/SKILL.md +176 -0
  286. package/bundled-skills/threat-intelligence/references/x-public-intelligence.md +93 -0
  287. package/bundled-skills/tree-ring-memory/SKILL.md +29 -9
  288. package/bundled-skills/wifi-wireless/SKILL.md +80 -0
  289. package/bundled-skills/wifi-wireless/references/wireless-lab-rules.md +6 -0
  290. package/bundled-skills/windows-ad/SKILL.md +109 -0
  291. package/bundled-skills/windows-ad/references/ad-attack-paths.md +12 -0
  292. package/package.json +1 -1
  293. package/skills_index.json +1281 -3
  294. package/bundled-skills/lore/README.md +0 -386
  295. package/bundled-skills/lore/README.zh-CN.md +0 -386
  296. package/bundled-skills/lore/WORKFLOWS.md +0 -216
  297. package/bundled-skills/lore/WORKFLOWS.zh-CN.md +0 -216
@@ -0,0 +1,442 @@
1
+ # CTF Reverse - Platform-Specific Reversing
2
+
3
+ macOS/iOS, embedded/IoT firmware, kernel driver, and automotive reverse engineering.
4
+
5
+ ## Table of Contents
6
+ - [macOS / iOS Reversing](#macos--ios-reversing)
7
+ - [Mach-O Binary Format](#mach-o-binary-format)
8
+ - [Code Signing & Entitlements](#code-signing--entitlements)
9
+ - [Objective-C Runtime RE](#objective-c-runtime-re)
10
+ - [Swift Binary Reversing](#swift-binary-reversing)
11
+ - [iOS App Analysis](#ios-app-analysis)
12
+ - [dyld / Dynamic Linking](#dyld--dynamic-linking)
13
+ - [Embedded / IoT Firmware RE](#embedded--iot-firmware-re)
14
+ - [Firmware Extraction](#firmware-extraction)
15
+ - [Firmware Unpacking](#firmware-unpacking)
16
+ - [Architecture-Specific Notes](#architecture-specific-notes)
17
+ - [RTOS Analysis](#rtos-analysis)
18
+ - [Kernel Driver Reversing](#kernel-driver-reversing)
19
+ - [Linux Kernel Modules](#linux-kernel-modules)
20
+ - [eBPF Programs](#ebpf-programs)
21
+ - [Windows Kernel Drivers](#windows-kernel-drivers)
22
+ - [Automotive / CAN Bus RE](#automotive--can-bus-re)
23
+
24
+ ---
25
+
26
+ ## macOS / iOS Reversing
27
+
28
+ ### Mach-O Binary Format
29
+
30
+ ```bash
31
+ # File identification
32
+ file binary # "Mach-O 64-bit executable arm64" or "x86_64"
33
+ otool -l binary # Load commands (segments, dylibs, entry point)
34
+ otool -L binary # Linked dynamic libraries
35
+
36
+ # Universal (fat) binaries — multiple architectures in one file
37
+ lipo -info universal_binary # List architectures
38
+ lipo universal_binary -thin arm64 -output binary_arm64 # Extract one arch
39
+
40
+ # Segments and sections
41
+ otool -l binary | grep -A5 "segment\|section"
42
+ # Key segments: __TEXT (code), __DATA (globals), __LINKEDIT (symbols)
43
+ # Key sections: __text (instructions), __cstring (C strings), __objc_methname
44
+ ```
45
+
46
+ **Key Mach-O concepts:**
47
+ - Load commands drive the dynamic linker (`dyld`)
48
+ - `LC_MAIN` → entry point (replaces `LC_UNIXTHREAD`)
49
+ - `LC_LOAD_DYLIB` → shared library dependencies
50
+ - `LC_CODE_SIGNATURE` → code signing blob
51
+ - `__DATA_CONST.__got` → Global Offset Table
52
+ - `__DATA.__la_symbol_ptr` → Lazy symbol pointers (like PLT)
53
+
54
+ ### Code Signing & Entitlements
55
+
56
+ ```bash
57
+ # Check code signature
58
+ codesign -dvvv binary
59
+ codesign --verify binary
60
+
61
+ # Extract entitlements (capability permissions)
62
+ codesign -d --entitlements - binary
63
+ # Key entitlements: com.apple.security.app-sandbox, com.apple.security.network.client
64
+
65
+ # Remove code signature (for patching)
66
+ codesign --remove-signature binary
67
+
68
+ # Re-sign (ad-hoc, for testing)
69
+ codesign -f -s - binary
70
+ ```
71
+
72
+ **CTF relevance:** Patched binaries need re-signing to run on macOS. Ad-hoc signing (`-s -`) works for local testing.
73
+
74
+ ### Objective-C Runtime RE
75
+
76
+ ```bash
77
+ # Dump Objective-C class info
78
+ class-dump binary > classes.h
79
+ # Shows: @interface, @protocol, method signatures with types
80
+
81
+ # Runtime inspection with lldb
82
+ (lldb) expression -l objc -O -- [NSClassFromString(@"ClassName") new]
83
+ (lldb) expression -l objc -O -- [[ClassName alloc] init]
84
+
85
+ # Method swizzling detection (anti-tamper)
86
+ # Look for: method_exchangeImplementations, class_replaceMethod
87
+ ```
88
+
89
+ **Objective-C in disassembly:**
90
+ ```text
91
+ # objc_msgSend(receiver, selector, ...) is THE dispatch mechanism
92
+ # RDI = self (receiver), RSI = selector (char* method name)
93
+
94
+ # In Ghidra/IDA, look for:
95
+ objc_msgSend(obj, "checkPassword:", input)
96
+ # Selector strings are in __objc_methname section
97
+ # Cross-reference selectors to find implementations
98
+ ```
99
+
100
+ **class-dump alternatives:**
101
+ - `dsdump` — faster, supports Swift + Objective-C
102
+ - `otool -oV binary` — dump Objective-C segments
103
+ - Ghidra: Enable "Objective-C" analyzer in Analysis Options
104
+
105
+ ### Swift Binary Reversing
106
+
107
+ ```bash
108
+ # Detect Swift
109
+ strings binary | grep "swift"
110
+ otool -l binary | grep "swift" # __swift5_* sections
111
+
112
+ # Swift demangling
113
+ swift demangle 's14MyApp0A8ClassC10checkInput6resultSbSS_tF'
114
+ # → MyApp.MyAppClass.checkInput(result: String) -> Bool
115
+
116
+ # xcrun swift-demangle < mangled_names.txt
117
+ ```
118
+
119
+ **Swift in disassembly:**
120
+ ```text
121
+ # Swift uses value witness tables (VWT) for type operations
122
+ # Protocol witness tables (PWT) for dynamic dispatch (like vtables)
123
+
124
+ # Key runtime functions to watch:
125
+ swift_allocObject → heap allocation
126
+ swift_release → reference count decrement
127
+ swift_bridgeObjectRetain → bridged (ObjC ↔ Swift) retain
128
+ swift_once → lazy initialization (like dispatch_once)
129
+
130
+ # String layout:
131
+ # Small strings (≤15 bytes): inline in 16-byte buffer, tagged pointer
132
+ # Large strings: heap-allocated, pointer + length + flags
133
+
134
+ # Array<T>: pointer to ContiguousArrayStorage (header + elements)
135
+ # Dictionary<K,V>: hash table with open addressing
136
+ ```
137
+
138
+ **Ghidra for Swift:** Enable "Swift" language module. Swift metadata sections (`__swift5_types`, `__swift5_proto`) contain type descriptors that Ghidra can parse.
139
+
140
+ ### iOS App Analysis
141
+
142
+ ```bash
143
+ # Extract IPA (iOS app package)
144
+ unzip app.ipa -d extracted/
145
+ ls extracted/Payload/*.app/
146
+
147
+ # Check if encrypted (App Store encryption / FairPlay DRM)
148
+ otool -l extracted/Payload/*.app/binary | grep -A4 "LC_ENCRYPTION_INFO"
149
+ # cryptid = 1 means encrypted, 0 means decrypted
150
+
151
+ # Decrypt with frida-ios-dump (requires jailbroken device)
152
+ # Or use Clutch / bfdecrypt on device
153
+ frida-ios-dump -H jailbroken_ip -p 22 "App Name"
154
+
155
+ # Analyze decrypted binary
156
+ class-dump decrypted_binary > headers.h
157
+ ```
158
+
159
+ **Jailbreak detection and bypass:**
160
+ ```javascript
161
+ // Common jailbreak checks:
162
+ // 1. Check for Cydia/Sileo
163
+ // 2. Check /private/var/lib/apt
164
+ // 3. fork() succeeds (sandboxed apps can't fork)
165
+ // 4. Open /etc/apt, /bin/sh with write
166
+ // 5. Check for substrate/substitute libraries
167
+
168
+ // Frida bypass:
169
+ var paths = ["/Applications/Cydia.app", "/bin/sh", "/etc/apt",
170
+ "/private/var/lib/apt", "/usr/bin/ssh"];
171
+ Interceptor.attach(Module.findExportByName(null, "access"), {
172
+ onEnter(args) {
173
+ this.path = Memory.readUtf8String(args[0]);
174
+ },
175
+ onLeave(retval) {
176
+ if (paths.some(p => this.path && this.path.includes(p))) {
177
+ retval.replace(-1); // File not found
178
+ }
179
+ }
180
+ });
181
+ ```
182
+
183
+ ### dyld / Dynamic Linking
184
+
185
+ ```bash
186
+ # DYLD environment variables (for analysis, blocked in hardened runtime)
187
+ DYLD_PRINT_LIBRARIES=1 ./binary # Print loaded dylibs
188
+ DYLD_INSERT_LIBRARIES=hook.dylib ./binary # Inject dylib (like LD_PRELOAD)
189
+ # Note: SIP (System Integrity Protection) blocks this for system binaries
190
+
191
+ # Inspect dyld shared cache (contains all system frameworks)
192
+ dyld_shared_cache_util -list /System/Cryptexes/OS/System/Library/dyld/dyld_shared_cache_arm64e
193
+ ```
194
+
195
+ ---
196
+
197
+ ## Embedded / IoT Firmware RE
198
+
199
+ ### Firmware Extraction
200
+
201
+ ```bash
202
+ # binwalk — firmware analysis and extraction
203
+ binwalk firmware.bin # Identify embedded filesystems, compressed data
204
+ binwalk -e firmware.bin # Extract all identified components
205
+ binwalk -Me firmware.bin # Recursive extraction (matryoshka)
206
+ binwalk --dd='.*' firmware.bin # Extract everything raw
207
+
208
+ # Manual extraction by signature
209
+ strings firmware.bin | head -50 # Look for version strings, filesystem markers
210
+ hexdump -C firmware.bin | grep "hsqs" # SquashFS magic
211
+ hexdump -C firmware.bin | grep "UBI#" # UBI magic
212
+ ```
213
+
214
+ **Hardware extraction methods (physical access):**
215
+ ```text
216
+ UART: Serial console — often gives root shell or bootloader access
217
+ Tools: USB-UART adapter, baudrate detection (usually 115200)
218
+ Identify: 4 pins (GND, TX, RX, VCC), use multimeter
219
+
220
+ JTAG: Direct CPU debug — read/write flash, halt CPU, set breakpoints
221
+ Tools: OpenOCD, J-Link, Bus Pirate
222
+ Identify: 10/14/20-pin header, use JTAGulator for auto-detection
223
+
224
+ SPI Flash: Direct chip read — dump entire firmware
225
+ Tools: flashrom, CH341A programmer
226
+ Identify: 8-pin SOIC chip (Winbond, Macronix, etc.)
227
+
228
+ eMMC: Embedded MMC — common in routers, phones
229
+ Tools: eMMC reader, direct solder to test pads
230
+ ```
231
+
232
+ ### Firmware Unpacking
233
+
234
+ ```bash
235
+ # SquashFS (most common in routers)
236
+ unsquashfs -d output/ squashfs-root.sqfs
237
+ # If custom compression: try different compressors (-comp xz|lzma|lzo|gzip)
238
+
239
+ # JFFS2
240
+ jefferson -d output/ jffs2.img
241
+
242
+ # UBI/UBIFS
243
+ ubireader_extract_images firmware.ubi
244
+ ubireader_extract_files ubifs.img
245
+
246
+ # CPIO (initramfs)
247
+ cpio -idv < initramfs.cpio
248
+
249
+ # Device tree blob
250
+ dtc -I dtb -O dts -o output.dts device_tree.dtb
251
+
252
+ # Kernel extraction
253
+ binwalk -e firmware.bin
254
+ # Look for: zImage, uImage, vmlinux
255
+ # Extract vmlinux from compressed: vmlinux-to-elf tool
256
+ ```
257
+
258
+ ### Architecture-Specific Notes
259
+
260
+ **ARM (most common in IoT):**
261
+ ```bash
262
+ # Cross-toolchain
263
+ apt install gcc-arm-linux-gnueabihf gdb-multiarch
264
+
265
+ # QEMU emulation
266
+ qemu-arm -L /usr/arm-linux-gnueabihf/ ./arm_binary
267
+ qemu-arm -g 1234 ./arm_binary # Start GDB server on port 1234
268
+ gdb-multiarch -ex 'target remote :1234' ./arm_binary
269
+
270
+ # ARM vs Thumb: ARM instructions are 4 bytes, Thumb are 2 bytes
271
+ # LSB of function pointer indicates mode: 0=ARM, 1=Thumb
272
+ # Ghidra: Right-click → Processor Options → ARM/Thumb mode
273
+ ```
274
+
275
+ **ARM64/AArch64:** See [platforms-hardware.md](platforms-hardware.md#arm64aarch64-reversing-and-exploitation) for AArch64 calling convention, ROP gadgets, and qemu-aarch64-static emulation.
276
+
277
+ **MIPS (routers, embedded):**
278
+ ```bash
279
+ # Big-endian vs little-endian — check ELF header or file command
280
+ file binary # "MIPS, MIPS32 rel2 (MIPS-II), big-endian" or "little-endian"
281
+
282
+ # Emulation
283
+ qemu-mips -L /usr/mips-linux-gnu/ ./mips_binary # Big-endian
284
+ qemu-mipsel -L /usr/mipsel-linux-gnu/ ./mipsel_binary # Little-endian
285
+
286
+ # Key MIPS patterns:
287
+ # Branch delay slots — instruction AFTER branch always executes
288
+ # $gp (global pointer) — used for PIC, points to .got
289
+ # lui + addiu pair — loads 32-bit constant (upper 16 + lower 16)
290
+ ```
291
+
292
+ **RISC-V:** See main [tools.md](tools.md#risc-v-binary-analysis-ehax-2026) for Capstone disassembly and [platforms-hardware.md](platforms-hardware.md#risc-v-advanced) for advanced extensions and debugging.
293
+
294
+ ### RTOS Analysis
295
+
296
+ ```text
297
+ FreeRTOS:
298
+ - Tasks (like threads): xTaskCreate → function pointer + stack
299
+ - Strings: "IDLE", "Tmr Svc", task names
300
+ - xQueueSend/xQueueReceive → inter-task communication
301
+ - Look for vTaskDelay() for timing, xSemaphoreTake() for sync
302
+
303
+ Zephyr:
304
+ - k_thread_create → kernel thread creation
305
+ - k_msgq_put/k_msgq_get → message queues
306
+ - CONFIG_* symbols reveal kernel configuration
307
+
308
+ Bare metal (no OS):
309
+ - Interrupt vector table at address 0x0 or 0x08000000 (STM32)
310
+ - main loop pattern: while(1) { read_input(); process(); output(); }
311
+ - Peripheral registers at memory-mapped addresses (check datasheet)
312
+ ```
313
+
314
+ ---
315
+
316
+ ## Kernel Driver Reversing
317
+
318
+ ### Linux Kernel Modules
319
+
320
+ ```bash
321
+ # Identify kernel module
322
+ file module.ko # "ELF 64-bit LSB relocatable"
323
+ modinfo module.ko # Module info (description, author, license)
324
+
325
+ # List module symbols
326
+ nm module.ko | grep -v " U " # Exported symbols
327
+
328
+ # Strings for quick recon
329
+ strings module.ko | grep -i "flag\|secret\|ioctl\|device"
330
+
331
+ # Find ioctl handler
332
+ # Key pattern: .unlocked_ioctl = my_ioctl_handler in file_operations struct
333
+ # In Ghidra: find struct with function pointers, identify by position
334
+
335
+ # Load in Ghidra
336
+ # Language: x86:LE:64:default
337
+ # Base address: doesn't matter for .ko (relocatable)
338
+ # Look for init_module / cleanup_module entry points
339
+ ```
340
+
341
+ **Common kernel module CTF patterns:**
342
+ ```c
343
+ // Device creation (creates /dev/challenge)
344
+ alloc_chrdev_region(&dev, 0, 1, "challenge");
345
+ cdev_init(&cdev, &fops);
346
+
347
+ // ioctl handler (main interface)
348
+ long my_ioctl(struct file *f, unsigned int cmd, unsigned long arg) {
349
+ switch (cmd) {
350
+ case CUSTOM_CMD_1: /* operation */ break;
351
+ case CUSTOM_CMD_2: /* operation */ break;
352
+ }
353
+ }
354
+
355
+ // copy_from_user / copy_to_user — data transfer with userspace
356
+ copy_from_user(kernel_buf, (void __user *)arg, size);
357
+ copy_to_user((void __user *)arg, kernel_buf, size);
358
+ ```
359
+
360
+ **Debugging kernel modules:**
361
+ ```bash
362
+ # QEMU + GDB for kernel debugging
363
+ qemu-system-x86_64 -kernel bzImage -initrd initrd.cpio -s -S \
364
+ -append "console=ttyS0 nokaslr" -nographic
365
+
366
+ # In another terminal
367
+ gdb vmlinux
368
+ (gdb) target remote :1234
369
+ (gdb) lx-symbols # Load module symbols (requires scripts)
370
+ (gdb) add-symbol-file module.ko 0x<loaded_address>
371
+ ```
372
+
373
+ ### eBPF Programs
374
+
375
+ ```bash
376
+ # Dump eBPF programs from running system
377
+ bpftool prog list
378
+ bpftool prog dump xlated id <N> # Disassemble
379
+ bpftool prog dump jited id <N> # JIT'd machine code
380
+
381
+ # eBPF bytecode analysis
382
+ # eBPF has 11 registers (r0-r10), 64-bit
383
+ # r0 = return value, r1-r5 = arguments, r10 = frame pointer
384
+ # Instructions are 8 bytes each
385
+
386
+ # Disassemble .o file containing eBPF
387
+ llvm-objdump -d ebpf_prog.o
388
+
389
+ # Key eBPF patterns:
390
+ # bpf_map_lookup_elem → read from map
391
+ # bpf_map_update_elem → write to map
392
+ # bpf_probe_read → read kernel memory
393
+ # bpf_trace_printk → debug output
394
+ ```
395
+
396
+ ### Windows Kernel Drivers
397
+
398
+ ```bash
399
+ # .sys files are PE format — load in IDA/Ghidra as normal PE
400
+ # Entry point: DriverEntry(PDRIVER_OBJECT, PUNICODE_STRING)
401
+
402
+ # Key patterns:
403
+ # IoCreateDevice → creates device object
404
+ # IRP_MJ_DEVICE_CONTROL → ioctl handler
405
+ # MmMapIoSpace → memory-mapped I/O
406
+ # ObReferenceObjectByHandle → get kernel object from handle
407
+ # ZwCreateFile/ZwReadFile → kernel-mode file operations
408
+ ```
409
+
410
+ ---
411
+
412
+ ## Automotive / CAN Bus RE
413
+
414
+ ```bash
415
+ # CAN bus interface setup
416
+ sudo ip link set can0 type can bitrate 500000
417
+ sudo ip link set up can0
418
+
419
+ # Capture CAN traffic
420
+ candump can0 # Live capture
421
+ candump -l can0 # Log to file
422
+ cansniffer can0 # Filter/highlight changes
423
+
424
+ # Replay CAN messages
425
+ canplayer -I logfile.log can0
426
+ cansend can0 7DF#0201000000000000 # Send single frame (OBD-II request)
427
+
428
+ # UDS (Unified Diagnostic Services) — common in automotive CTF
429
+ # Service 0x27: Security Access (seed-key authentication)
430
+ # Service 0x2E: Write Data By Identifier
431
+ # Service 0x31: Routine Control
432
+
433
+ # Decode CAN frames
434
+ # ID: 11-bit or 29-bit identifier
435
+ # DLC: Data Length Code (0-8 bytes)
436
+ # Data: up to 8 bytes payload
437
+ ```
438
+
439
+ **CTF automotive patterns:**
440
+ - Seed-key bypass: Reverse the key derivation algorithm from ECU firmware
441
+ - CAN message replay: Capture legitimate command, replay to unlock feature
442
+ - Firmware extraction from ECU via UDS/KWP2000
@@ -0,0 +1,240 @@
1
+ # RE Agent 工作流门闩(静态↔动态)
2
+
3
+ > 来源启发:binary-re 阶段划分、社区 RE skill(Frida/r2/Ghidra/IDA 循环)、Cerberus 三头环(静/动/插桩)
4
+ > Issue #65 增量:IAT 修复铁律、六阶段映射、.NET/DLL·SYS 等价路径;用户指令可行性门闩;旁路补丁 6–10;反调试/混淆菜谱 A–T;非 PE 多格式菜谱 U–AV(2026-08-12)
5
+ > 适用:`reverse-engineering/`、`ida-reverse/`、`radare2/`、`malware-analysis/`、与 cre 角色交接
6
+
7
+ ## 0. 启动
8
+
9
+ ```text
10
+ □ scope.md:offline 样本路径 或 授权设备/靶机
11
+ □ tool-index:file/strings/r2/ida/frida 等实际路径
12
+ □ 角色:cre(ops/role-map)
13
+ ```
14
+
15
+ ## 0.1 Transition handoff(decision delta)
16
+
17
+ 阶段之间不重新注入完整 case context。`scope.md` / `workitems.md` / Evidence 保持 authoritative;`timeline.md` 只承载 transition delta:
18
+
19
+ 1. stage/turn 结束时只写真正改变后续动作的 `decision_delta`;无变化写 `[]`。
20
+ 2. unchanged route/auth/scope/network profile/tool state/hypothesis 只放 `carry_forward_refs`,consumer 依引用读取,不重新 serialize / emit。
21
+ 3. `decision_delta` 不是完整 state;consumer 必须先继承 refs,再应用 delta。
22
+ 4. 只有两个或以上 evidence-supported 分支会导致不同下一动作时才停在 next-step menu;确定性 gate 直接推进。
23
+
24
+ 例:Triage 完成且唯一合法下一步是 Static 时,transition 只需 `decision_delta: [phase=triage->static]` + `carry_forward_refs: [scope.md, evidence/E-triage.md]`。
25
+
26
+ ## 0.5 用户指令可行性门闩(Issue #65)
27
+
28
+ **原则**:服从用户**目标**,不盲从用户**步骤顺序**。跳步前必须说明前提并请确认;确认后的强制步骤必须做,且诚实标注 Evidence 质量。
29
+
30
+ | 情况 | Agent MUST |
31
+ |------|------------|
32
+ | 用户要做 X,且当前状态可得到**有效** Evidence | 执行 X,更新 Evidence |
33
+ | 用户要做 X,但存在**已知阻塞前提**(例:已判定加壳且静态 IAT 不可读) | **禁止**假装完成有意义的 IAT;① 一句话说清阻塞;② 给出推荐顺序(先脱壳/修 IAT,或直接动态抓 API);③ **请用户确认**是「仍强制看当前花表」还是「按推荐顺序」 |
34
+ | 用户明确**强制**当前步骤(如未脱壳也要看 IAT) | 执行并记 Evidence,MUST 标注 `quality=unreadable` / `packed`(或等价);**禁止**据此下「无网络能力」等结论 |
35
+ | 用户接受推荐顺序 | 先做前提步骤;完成后自动或再应要求做 X;**禁止**用前提步骤(如脱壳)**冒充**「已完成导入表检查」 |
36
+
37
+ **与「重做 X」的关系**:重做 X 仍 = 重做被点名步骤(或其经确认的合法前提协商结果),禁止偷换成无关步骤。脱壳是导入表的**前提**,不是导入表的**替代品**。
38
+
39
+ 典型冲突:用户在加壳样本上说「先不要脱壳,先看导入表」→ 壳常篡改导入目录/加密描述符,静态表花且无意义 → 走本表「阻塞前提」行,不得默默脱壳冒充,也不得默默交出花表当完成。
40
+
41
+ ## 1. Triage(5–15 分钟 · 强制起点)
42
+
43
+ ```text
44
+ □ 计算样本 Hash(MD5/SHA256)→ 唯一 ID
45
+ □ 识别文件类型:EXE / DLL / SYS / ELF / Mach-O / .NET / 脚本(bat/ps1/vba) / JS / APK 等
46
+ □ 非 PE/脚本/APK/驱动专项:见 §3.4 与 `references/nonpe-format-cookbook.md`(U–AV)
47
+ □ file / DIE / 熵 / 壳特征(PEiD / DIE / Exeinfo 等)
48
+ □ 架构:x86 / x64 / ARM;编译语言线索(VC++ / Delphi / .NET / Go / Rust)
49
+ □ 加壳类型线索:UPX / ASPack / VMProtect / Themida / 未知混淆
50
+ □ strings / rabin2 -z 捡漏
51
+ □ MUST 导入/导出锚点(见下方「导入表硬门与等价路径」);若用户抢跑且有壳 → 先走 §0.5
52
+ □ 产出:E-triage(MUST 含 imports 或等价锚点分类摘要,含 quality 标注如适用)+ 假设清单
53
+ ```
54
+
55
+ **阶段门闩(Triage → Static/Dynamic)**:E-triage 中未记录 imports **或** 合法等价锚点摘要前,MUST NOT 进入 Dynamic(除非已记录 IAT 修复失败并选择动态旁路,见 §1.2),也 MUST NOT 声称「基础分诊完成」。解析失败时仍 MUST 把失败输出写入 Evidence,不得跳过。用户要求「重做导入表检查」时 MUST 重做 imports/等价步骤本身(或先完成 §0.5 协商后的前提),禁止改换其他分析步骤冒充。
56
+
57
+ ### 1.1 导入表硬门与等价路径
58
+
59
+ | 样本类型 | MUST 锚点(Evidence) | 说明 |
60
+ |----------|----------------------|------|
61
+ | 原生 PE/ELF/Mach-O(IAT 可读) | `E-imports` / `E-triage-imports`:导入分类摘要 | `rabin2 -i` / IDA imports / 等价 |
62
+ | DLL / SYS / 共享库 | **并列** `E-imports` + `E-exports`(`rabin2 -i` + `rabin2 -E`) | 导出表优先级等同导入表(对外入口) |
63
+ | .NET 托管(无传统 IAT) | **等价路径**:dnSpy/IL/元数据/程序集引用与敏感 API 摘要 → 仍写入 `E-imports` 或 `E-triage-imports` 语义槽 | **禁止** 因「没有 IAT」而空过硬门;dnSpy 查看 = 原生「查导入表」 |
64
+ | 导入表解析失败 / 为空 / 加壳花表 | 仍记失败或花表输出为 Evidence,并标 `quality` | 不得静默跳过;花表不得支撑能力否定结论 |
65
+
66
+ **干净导入表警告(MUST 提醒)**:若导入表「过干净」(仅 kernel32/ntdll 等基础 DLL、几乎无业务 API),高度怀疑 `LoadLibrary` + `GetProcAddress` 动态加载 → 在 Evidence 注明嫌疑,并 **SHOULD** 转入 Dynamic 抓取内存 API;不得仅凭静态 IAT 宣称「无网络/无文件能力」。
67
+
68
+ **高危 API 组合(补丁 8 · SHOULD)**:导入表过长时,优先输出**恶意组合聚类**,过滤纯系统基础调用。示例(非穷尽):
69
+
70
+ - 高危簇:`FindWindowA/W` + `WriteProcessMemory` + `CreateRemoteThread`(注入)
71
+ - 高危簇:`CryptEncrypt` / `CryptAcquireContext` + 大量 `FindFirstFile` / `DeleteFile`(勒索倾向)
72
+ - 高危簇:`InternetOpen` / `WinHttp` / `URLDownloadToFile` + 持久化 API(`RegSetValue` / `CreateService`)
73
+ - 单独 `CreateFile` / `ReadFile` 等多为良性噪声,除非与上簇共现
74
+
75
+ ### 1.2 脱壳与 IAT 处理(高风险分岔 · Issue #65)
76
+
77
+ ```text
78
+ 分支 A:无壳 / .NET 托管
79
+ → 直接进入 §2 Static(.NET 走等价锚点)
80
+
81
+ 分支 B:有壳 / 强混淆
82
+ Step 1:尝试脱壳(自动脱壳机 / 手动找 OEP)— 须在授权与隔离环境
83
+ Step 2:尝试修复 IAT
84
+ 工具:x86 → ImportREC(或等价);x64 → Scylla(或等价)。禁止 64 位样本死磕 ImportREC。
85
+ 情况 B1:修复成功且可解析 → 记 E-imports(修复后)→ §2 Static
86
+ 情况 B2:ImportREC/Scylla 报错、修复后无法运行、或 IAT 全乱码(VMP/加密壳)
87
+ → 【IAT 修复铁律】立即终止继续静态 IAT 修复
88
+ → MUST 记录 E-iat-repair-fail(命令、工具、失败现象、决定转动态)
89
+ → 直接进入 §3 Dynamic:API 断点 / 硬件执行断点 / 内存搜索抓取导入
90
+ → 这不算「跳过导入表」:导入表路径已尝试并记 Evidence
91
+ 情况 B3(补丁 6):脱壳并修 IAT 后双击闪退 / 蓝屏(疑文件 CRC/大小自校验)
92
+ → 放弃继续静态修文件;记 E-self-check-crash 或并入 E-iat-repair-fail
93
+ → 转入 §3 Dynamic:对 CreateFile / GetFileSize / 哈希相关 API 下断,定位校验绕过点
94
+ ```
95
+
96
+ **IAT 修复铁律(MUST)**:优先尝试自动/半自动修复;一旦修复工具报错或修复后程序无法运行,**立即停止**在静态导入表上死磕,切换动态调试,用 API 断点(如 `bp CreateFile` / 关键网络 API)在运行时捕获导入函数。
97
+
98
+ ## 2. Static(基础静态锚点 → 深挖)
99
+
100
+ | 工具 | 何时 |
101
+ |------|------|
102
+ | radare2 / rabin2 | 快速函数/导入/字符串(imports 已在 Triage MUST 完成或已记失败旁路) |
103
+ | IDA / Ghidra(MCP 或 headless) | 深挖、交叉引用、类型;survey 阶段复核 imports 分类 |
104
+ | jadx / dnSpy | Android / .NET |
105
+ | OLLVM 文档 | 控制流平坦化怀疑 |
106
+
107
+ ```text
108
+ □ 确认 E-imports / E-triage 已含导入表或等价锚点 Evidence(缺失则先补,禁止后置)
109
+ □ 若 DLL/SYS:确认 E-exports 已记录
110
+ □ 敏感 API 分组 + 高危组合聚类(补丁 8)
111
+ □ 硬编码域名/IP/URL 字符串;资源节是否藏 Payload
112
+ □ 定位关键函数(加密/校验/网络/授权)→ 地址/符号写入 Evidence
113
+ □ 一条路不通 → 换工具(IDA↔r2↔Ghidra)
114
+ □ 时间盒(补丁 9 · SHOULD 默认):静态深挖约 15 分钟仍无关键路径 → 强制转入 §3 Dynamic(用户/任务可覆盖时长)
115
+ ```
116
+
117
+ **无 MCP 时**:可用导出反编译文本再分析(对照 P4nda0s reverse-skills / IDA-NO-MCP 思路),仍写 Evidence 路径。
118
+
119
+ ## 3. Dynamic(交叉验证循环区)
120
+
121
+ 核心理念:**静态提供线索 → 动态验证 → 验证卡壳 → 回静态重审**(无固定唯一顺序)。
122
+
123
+ ### 3.0 断点起手式(补丁 7 + 10 · MUST 顺序)
124
+
125
+ 在用户态调试器(x64dbg 等)启动样本前,按「四级火箭」预置断点(可因架构/工具略名不同,顺序不变):
126
+
127
+ 1. **TLS 回调**断点(调试器 EP 之前可能已跑)
128
+ 2. **入口点 EP** 断点
129
+ 3. **敏感 API** 断点(如 `CreateRemoteThread` / 网络 / 文件写)
130
+ 4. **保底**:`ExitProcess` / 进程退出路径断点(补丁 10)— 一旦因反调试直接退出,**不急着重启**;立即 dump memory,将崩溃前镜像路径写入 Evidence,供字符串/数据恢复
131
+
132
+ ```text
133
+ □ Frida / x64dbg / gdb / emulator:验证静态假设
134
+ □ 按 §3.0 预置断点后再跑;单步跟踪栈/寄存器(白盒)
135
+ □ 行为监控:沙箱 / Procmon / RegShot(黑盒)
136
+ □ IAT 修复失败 / 自校验闪退样本:硬件执行断点或内存搜索强行捕捉 API;CreateFile/GetFileSize 查 CRC
137
+ □ 反调试/反 Frida → reverse-engineering/anti-analysis
138
+ □ Android:root 检测 / SSL pinning 绕过脚本按需生成,**须在授权设备**
139
+ □ 崩溃日志驱动下一轮 hook(自适应循环)
140
+ □ 时间盒(补丁 9 · SHOULD 默认):单步跟踪约 200 条指令仍无恶意行为线索 → 强制回静态搜字符串/换锚点(可覆盖)
141
+ ```
142
+
143
+ ### 3.1 沙箱 / 动态无行为应急分支(MUST)
144
+
145
+ ```text
146
+ 无行为或立刻退出 / 无限休眠
147
+ → 检查反调试 / 反虚拟机例程(CPUID、高精度计时、沙箱特征等)
148
+ → 尝试硬件断点绕过、修补检测点、或换物理机/更高保真环境
149
+ → 将「无行为 + 疑似 anti-VM」写入 Evidence,禁止写成「样本无害」而不加条件
150
+ ```
151
+
152
+ ### 3.2 时间盒策略(补丁 9 · SHOULD)
153
+
154
+ | 阶段 | 默认阈值(可被用户/任务覆盖) | 动作 |
155
+ |------|------------------------------|------|
156
+ | Static 深挖无关键路径 | ~15 分钟 | 转入 Dynamic |
157
+ | Dynamic 单步无进展 | ~200 条指令 | 回 Static 字符串/交叉引用重锚 |
158
+ | 任一路径重复失败 | 记 Evidence 后换工具或旁路 | 禁止同一失败手法空转 |
159
+
160
+
161
+ ### 3.3 反调试 / 混淆旁路速查(Issue #65 补丁 A–T · 高频)
162
+
163
+ 完整索引与动作细节见 `reverse-engineering/anti-analysis.md`「Agent 响应菜谱 A–T」。此处只列 **P0 必查 + 常见转场**。默认 **授权隔离 lab**;patch/改标志位不是未授权生产动作。
164
+
165
+ | 触发特征 | 首选动作(摘要) | Evidence |
166
+ |----------|------------------|----------|
167
+ | `cpuid` 后 jz/jnz(A) | lab:改标志位或 patch 走真实分支;记检测点地址 | `E-anti-debug-cpuid` |
168
+ | `rdtsc` + sub/cmp(B) | bp rdtsc 或 hook 时间源;禁止无限空转等沙箱超时当「无害」 | `E-anti-debug-rdtsc` |
169
+ | PEB BeingDebugged / NtGlobalFlag(K) | ScyllaHide 或手改 PEB;patch 条件跳 | `E-anti-debug-peb` |
170
+ | `NtQueryInformationProcess` DebugPort/Flags/Object(P) | ScyllaHide / hook 返回值;记 class 参数 | `E-anti-debug-ntqip` |
171
+ | 导入极少但行为丰富 → API 哈希(N) | bp GetProcAddress;哈希反查回注 IDA | `E-api-hash` |
172
+ | strings 空但有网/文件行为 → 串加密(I) | 找 decode 例程 xref;解密后 dump 回注 | `E-string-decrypt` |
173
+ | 有签名但来源可疑(F) | SigCheck:有效/吊销/时间;**无效不降**威胁等级 | `E-sig-forge` |
174
+ | 标准 strings 无 IOC → 试宽字符(T) | `strings -el` / UTF-16LE;Alt+A unicode | `E-wide-strings` |
175
+ | 调试器名字符串 / Toolhelp 扫描(C) | bp CreateToolhelp32Snapshot 链 | `E-anti-debug-procscan` |
176
+ | AddVectoredExceptionHandler + 故意异常(D) | bp VEH 注册;分析 handler | `E-anti-debug-veh` |
177
+ | int3 / DR0–DR7(M) | patch int3;软断点或 ScyllaHide 藏硬件 BP | `E-anti-debug-bp` |
178
+ | 多 PE 头/重叠节(G) | 节表真实映射 + 熵;不信节名 | `E-pe-anomaly` |
179
+ | 文件尾 > 节总和 Overlay(J) | 提取 overlay;file/熵;找加载偏移 xref | `E-overlay` |
180
+ | .rsrc 异常大/高熵 RT_RCDATA(Q) | 提取资源;FindResource 链 + 解密 dump | `E-rsrc-payload` |
181
+ | 运行时才加载 DLL(R) | 查 Delay Import;bp delay-load helper | `E-delay-import` |
182
+ | while+switch 星形 CFG(H) | **See** `ollvm-deobfuscation.md`;插件失败则动态路径 | `E-cff` |
183
+ | 恒真/恒假分支(S) | **See** ollvm / 符号执行;动态为准 | `E-opaque-pred` |
184
+ | `/proc/self/status` TracerPid(L) | **Linux/ELF**;hook 或 patch;Windows 主路径不强制 | `E-anti-debug-tracerpid` |
185
+
186
+ **约束**:绕过失败也记 Evidence;禁止把「反调试触发退出」写成「样本无害」。完整 A–T 与 P2(E 编译时间、O 花指令)见 anti-analysis 菜谱节。
187
+
188
+ ### 3.4 非 PE / 多格式旁路(Issue #65 补丁 U–AV · 路由)
189
+
190
+ 完整索引:`reverse-engineering/references/nonpe-format-cookbook.md`。此处只列 **类型 → 入口**;动作细节在 cookbook / 对应 skill。
191
+
192
+ | 类型 | 跳转 | P0 Evidence 锚点(示例) |
193
+ |------|------|---------------------------|
194
+ | BAT/CMD | cookbook §1 + malware | `E-batch-deobf` |
195
+ | PowerShell | cookbook §2 + malware | `E-ps-decode-layer-N` |
196
+ | VBA 宏 | cookbook §3 + malware | `E-vba-pcode` |
197
+ | JS 强混淆 / JSVMP | **js-reverse** + cookbook §4 | `E-js-vmp` / `E-js-deobf` |
198
+ | SYS 驱动 | kernel-driver-reverse + cookbook §5 | `E-driver-irp-handlers` / `E-driver-ioctl` |
199
+ | DLL 侧重点 | cookbook §6(AM≡A–T **R**) | `E-dll-tls-dllmain` / `E-exports` |
200
+ | Android 格机/隐藏图标 | **apk-reverse** + cookbook §7–8 | `E-android-wiper-*` / `E-android-hidden-icon-*` |
201
+
202
+ **约束**:不另起「非 PE 六阶段」;与 §3.3 A–T 分工(PE 反调试 vs 多格式)。授权 lab;格机/BYOVD/反射 = 检测取证表述。
203
+
204
+
205
+ ## 4. Synthesis(IOC / 攻击链 / 报告)
206
+
207
+ ### Decision quality overlay (Issue #77)
208
+
209
+ Before closing Synthesis, apply [analysis-decision-framework.md](../../ops/analysis-decision-framework.md) **P0 checklist**: R41 grounded claims, R4* validated sufficiency, R1 confidence->dynamic, R2 hypothesis exit, R43 deadlock replan (under feasibility gate), R8/R23 no default malice/IOC. Multi-module -> R50; anti-analysis effort -> R51 + A-T cookbook.
210
+
211
+ Blindspots (Rust/Go/VMP/injection/OLE/PDF/agent-meta): [analysis-blindspot-cookbook.md](../../ops/analysis-blindspot-cookbook.md) R52-R81 — detection-oriented; not a parallel master flow.
212
+
213
+
214
+
215
+ ```text
216
+ □ Finding:算法/校验逻辑/可利用点 / 行为结论
217
+ □ Path:callflow 或 solve 步骤挂 E-*
218
+ □ IOC:网络指纹 + 主机指纹(有则表;无则 n/a+原因)
219
+ □ 报告 docs-generator(malware/apt/null/vuln overlay 按任务选型)+ 可选图
220
+ □ 可选:YARA / Snort·Suricata 规则化沉淀
221
+ □ field-journal 脱敏
222
+ ```
223
+
224
+ ## 5. 六阶段实战映射(Issue #65 思维导图 → 本文件)
225
+
226
+ | 实战阶段 | 本文件章节 | 硬门 / 铁律 |
227
+ |----------|------------|-------------|
228
+ | 1 初步快速研判 | §0–§1 Triage | Hash、架构、文件类型、查壳;imports/等价锚点;§0.5 指令门闩 |
229
+ | 2 脱壳与 IAT | §1.2 | IAT 铁律;失败/自校验闪退 → Evidence → Dynamic |
230
+ | 3 基础静态锚点 | §2 Static | 高危 API 组合;时间盒 SHOULD |
231
+ | 4 深度交叉验证 | §3 Dynamic | 断点四级火箭;无行为应急;时间盒;§3.3 A–T;§3.4 U–AV 类型路由 |
232
+ | 5 提取 IoC 与攻击链 | §4 Synthesis | IOC + Kill Chain / Path |
233
+ | 6 归档与规则化 | §4 + docs-generator / YARA | 结构化报告;规则可选 |
234
+
235
+ ## 6. 与「堆 RE skill 插件」的差异
236
+
237
+ - 本包用 **阶段门闩 + tool-index**,不默认启用 Hex-Rays「unsafe 全自动执行」类插件
238
+ - 动态插桩默认 **offline/lab** network_profile
239
+ - IAT/导入表:**尝试 + 记录** 优先于「无限静态死磕」或「静默跳过」
240
+ - 用户指令:**目标优先 + 前提协商**,禁止用无关步骤冒充被点名步骤