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,540 @@
1
+ # Reverse Engineering Field Notes
2
+
3
+ Detailed quick notes that support [`SKILL.md`](SKILL.md). Read this file after triage, not before.
4
+
5
+ ## Table of Contents
6
+
7
+ - [Binary Types](#binary-types)
8
+ - [Python .pyc](#python-pyc)
9
+ - [WASM](#wasm)
10
+ - [Android APK](#android-apk)
11
+ - [Flutter APK (Dart AOT)](#flutter-apk-dart-aot)
12
+ - [.NET](#net)
13
+ - [Packed (UPX)](#packed-upx)
14
+ - [Tauri Packed Desktop Apps](#tauri-packed-desktop-apps)
15
+ - [Anti-Debugging Bypass](#anti-debugging-bypass)
16
+ - [Specialized Patterns](#specialized-patterns)
17
+ - [S-Box / Keystream Patterns](#s-box--keystream-patterns)
18
+ - [Custom VM Analysis](#custom-vm-analysis)
19
+ - [Python Bytecode Reversing](#python-bytecode-reversing)
20
+ - [Signal-Based Binary Exploration](#signal-based-binary-exploration)
21
+ - [Malware Anti-Analysis Bypass via Patching](#malware-anti-analysis-bypass-via-patching)
22
+ - [Expected Values Tables](#expected-values-tables)
23
+ - [x86-64 Gotchas](#x86-64-gotchas)
24
+ - [Iterative Solver Pattern](#iterative-solver-pattern)
25
+ - [Unicorn Emulation (Complex State)](#unicorn-emulation-complex-state)
26
+ - [Multi-Stage Shellcode Loaders](#multi-stage-shellcode-loaders)
27
+ - [Timing Side-Channel Attack](#timing-side-channel-attack)
28
+ - [Unstripped Binary Information Leaks](#unstripped-binary-information-leaks)
29
+ - [Custom Mangle Function Reversing](#custom-mangle-function-reversing)
30
+ - [Rust serde_json Schema Recovery](#rust-serde_json-schema-recovery)
31
+ - [Position-Based Transformation Reversing](#position-based-transformation-reversing)
32
+ - [Hex-Encoded String Comparison](#hex-encoded-string-comparison)
33
+ - [CTF Case Notes](#ctf-case-notes)
34
+ - [Embedded ZIP + XOR License Decryption](#embedded-zip--xor-license-decryption)
35
+ - [Stack String Deobfuscation (.rodata XOR Blob)](#stack-string-deobfuscation-rodata-xor-blob)
36
+ - [Prefix Hash Brute-Force](#prefix-hash-brute-force)
37
+ - [Mathematical Convergence Bitmap](#mathematical-convergence-bitmap)
38
+ - [RISC-V Binary Analysis](#risc-v-binary-analysis)
39
+ - [Kernel Module Maze Solving](#kernel-module-maze-solving)
40
+ - [Multi-Threaded VM with Channels](#multi-threaded-vm-with-channels)
41
+ - [CVP/LLL Lattice for Constrained Integer Validation](#cvplll-lattice-for-constrained-integer-validation)
42
+ - [Decision Tree Function Obfuscation](#decision-tree-function-obfuscation)
43
+ - [Android JNI RegisterNatives Obfuscation](#android-jni-registernatives-obfuscation)
44
+ - [Multi-Layer Self-Decrypting Binary](#multi-layer-self-decrypting-binary)
45
+ - [GLSL Shader VM with Self-Modifying Code](#glsl-shader-vm-with-self-modifying-code)
46
+ - [GF(2^8) Gaussian Elimination for Flag Recovery](#gf28-gaussian-elimination-for-flag-recovery)
47
+ - [Z3 for Single-Line Python Boolean Circuit](#z3-for-single-line-python-boolean-circuit)
48
+ - [Sliding Window Popcount Differential Propagation](#sliding-window-popcount-differential-propagation)
49
+ - [Ruby/Perl Polyglot Constraint Satisfaction](#rubyperl-polyglot-constraint-satisfaction)
50
+ - [Verilog/Hardware RE](#veriloghardware-re)
51
+ - [Custom binfmt Kernel Module with RC4 Flat Binaries](#custom-binfmt-kernel-module-with-rc4-flat-binaries)
52
+ - [Hash-Resolved Imports / No-Import Ransomware](#hash-resolved-imports--no-import-ransomware)
53
+ - [ELF Section Header Corruption for Anti-Analysis](#elf-section-header-corruption-for-anti-analysis)
54
+ - [Brainfuck Character-by-Character Static Analysis](#brainfuck-character-by-character-static-analysis)
55
+ - [Brainfuck Side-Channel via Read Count Oracle](#brainfuck-side-channel-via-read-count-oracle)
56
+ - [Brainfuck Comparison Idiom Detection](#brainfuck-comparison-idiom-detection)
57
+ - [Backdoored Shared Library Detection](#backdoored-shared-library-detection)
58
+ - [Go Binary Reversing](#go-binary-reversing)
59
+ - [Go Binary UUID Patching for C2 Enumeration](#go-binary-uuid-patching-for-c2-enumeration)
60
+ - [D Language Binary Reversing](#d-language-binary-reversing)
61
+ - [Rust Binary Reversing](#rust-binary-reversing)
62
+ - [Frida Dynamic Instrumentation](#frida-dynamic-instrumentation)
63
+ - [Frida Firebase Cloud Functions Bypass](#frida-firebase-cloud-functions-bypass)
64
+ - [angr Symbolic Execution](#angr-symbolic-execution)
65
+ - [Qiling Emulation](#qiling-emulation)
66
+ - [VMProtect / Themida Analysis](#vmprotect--themida-analysis)
67
+ - [Binary Diffing](#binary-diffing)
68
+ - [Advanced GDB (pwndbg, rr)](#advanced-gdb-pwndbg-rr)
69
+ - [macOS / iOS Reversing](#macos--ios-reversing)
70
+ - [Embedded / IoT Firmware RE](#embedded--iot-firmware-re)
71
+ - [Kernel Driver Reversing](#kernel-driver-reversing)
72
+ - [Swift / Kotlin Binary Reversing](#swift--kotlin-binary-reversing)
73
+ - [INT3 Patch + Coredump Brute-Force Oracle](#int3-patch--coredump-brute-force-oracle)
74
+ - [Signal Handler Chain + LD_PRELOAD Oracle](#signal-handler-chain--ld_preload-oracle)
75
+ - [Font Ligature Exploitation](#font-ligature-exploitation)
76
+ - [Instruction Counter as Cryptographic State](#instruction-counter-as-cryptographic-state)
77
+ - [Burrows-Wheeler Transform Inversion](#burrows-wheeler-transform-inversion)
78
+ - [FRACTRAN Program Inversion](#fractran-program-inversion)
79
+ - [Opcode-Only Trace Reconstruction](#opcode-only-trace-reconstruction)
80
+ - [Thread Race Signed Integer Overflow](#thread-race-signed-integer-overflow)
81
+ - [ESP32/Xtensa Firmware Reversing](#esp32xtensa-firmware-reversing)
82
+ - [Custom VM Bytecode Lifting to LLVM IR](#custom-vm-bytecode-lifting-to-llvm-ir)
83
+ - [SIGFPE Signal Handler Side-Channel](#sigfpe-signal-handler-side-channel)
84
+ - [Batch Crackme Automation via objdump](#batch-crackme-automation-via-objdump)
85
+ - [Android DEX Runtime Bytecode Patching](#android-dex-runtime-bytecode-patching)
86
+ - [Fork + Pipe + Dead Branch Anti-Analysis](#fork--pipe--dead-branch-anti-analysis)
87
+ - [Web/CTF Auth Bypass Case Notes](#webctf-auth-bypass-case-notes)
88
+ - [Signed Cookie Key Reuse: access token to admin_session](#signed-cookie-key-reuse-access-token-to-admin_session)
89
+ - [Web Phishing Infrastructure](#web-phishing-infrastructure)
90
+ - [Phishing Panel: {domain_a} / {domain_b}](#phishing-panel-domain_a--domain_b)
91
+
92
+ ## Binary Types
93
+
94
+ ### Python .pyc
95
+ Disassemble with `marshal.load()` + `dis.dis()`. Header: 8 bytes (2.x), 12 (3.0-3.6), 16 (3.7+). See [languages.md](languages.md#python-bytecode-reversing-disdis-output).
96
+
97
+ ### WASM
98
+ ```bash
99
+ wasm2c checker.wasm -o checker.c
100
+ gcc -O3 checker.c wasm-rt-impl.c -o checker
101
+
102
+ # WASM patching (challenge binaries):
103
+ wasm2wat main.wasm -o main.wat # Binary → text
104
+ # Edit WAT: flip comparisons, change constants
105
+ wat2wasm main.wat -o patched.wasm # Text → binary
106
+ ```
107
+
108
+ ### Android APK
109
+ `apktool d app.apk -o decoded/` for resources; `jadx app.apk` for Java decompilation. Check `decoded/res/values/strings.xml` for flags. See [tools.md](tools.md#android-apk).
110
+
111
+ ### Flutter APK (Dart AOT)
112
+ If `lib/arm64-v8a/libapp.so` + `libflutter.so` present, use [Blutter](https://github.com/worawit/blutter): `python3 blutter.py path/to/app/lib/arm64-v8a out_dir`. Outputs reconstructed Dart symbols + Frida script. See [tools.md](tools.md#flutter-apk-blutter).
113
+
114
+ ### .NET
115
+ - dnSpy - debugging + decompilation
116
+ - ILSpy - decompiler
117
+
118
+ ### Packed (UPX)
119
+ ```bash
120
+ upx -d packed -o unpacked
121
+ ```
122
+ If unpacking fails, inspect UPX metadata first: verify UPX section names, header fields, and version markers are intact. If metadata looks tampered or uncertain, review UPX source on GitHub to identify likely modification points.
123
+
124
+ ### Tauri Packed Desktop Apps
125
+ Tauri embeds Brotli-compressed frontend assets in the executable. Find `index.html` xrefs to locate asset index table, dump blobs, Brotli decompress. Reference: `tauri-codegen/src/embedded_assets.rs`.
126
+
127
+ ## Anti-Debugging Bypass
128
+
129
+ Common checks:
130
+ - `IsDebuggerPresent()` / PEB.BeingDebugged / NtQueryInformationProcess (Windows)
131
+ - `ptrace(PTRACE_TRACEME)` / `/proc/self/status` TracerPid (Linux)
132
+ - TLS callbacks (run before main — check PE TLS Directory)
133
+ - Timing checks (`rdtsc`, `clock_gettime`, `GetTickCount`)
134
+ - Hardware breakpoint detection (DR0-DR3 via GetThreadContext)
135
+ - INT3 scanning / code self-hashing (CRC over .text section)
136
+ - Signal-based: SIGTRAP handler, SIGALRM timeout, SIGSEGV for real logic
137
+ - Frida/DBI detection: `/proc/self/maps` scan, port 27042, inline hook checks
138
+
139
+ Bypass: Set breakpoint at check, modify register to bypass conditional. pwntools patch: `elf.asm(elf.symbols.ptrace, 'ret')` to replace function with immediate return. See [patterns.md](patterns.md#pwntools-binary-patching-crypto-cat).
140
+
141
+ For comprehensive anti-analysis techniques and bypasses (30+ methods with code), see [anti-analysis.md](anti-analysis.md).
142
+
143
+ ## Specialized Patterns
144
+
145
+ ### S-Box / Keystream Patterns
146
+ **Xorshift32:** Shifts 13, 17, 5
147
+ **Xorshift64:** Shifts 12, 25, 27
148
+ **Magic constants:** `0x2545f4914f6cdd1d`, `0x9e3779b97f4a7c15`
149
+
150
+ ### Custom VM Analysis
151
+ 1. Identify structure: registers, memory, IP
152
+ 2. Reverse `executeIns` for opcode meanings
153
+ 3. Write disassembler mapping opcodes to mnemonics
154
+ 4. Often easier to bruteforce than fully reverse
155
+ 5. Look for the bytecode file loaded via command-line arg
156
+
157
+ See [patterns.md](patterns.md#custom-vm-reversing) for VM workflow, opcode tables, and state machine BFS.
158
+
159
+ **Sequential key-chain brute-force:** When a VM validates input in small blocks (e.g., 3 bytes = 2^24 candidates) with each block's output key feeding the next, brute-force each block sequentially with OpenMP parallelization. Compile solver with `gcc -O3 -march=native -fopenmp`. See [patterns-ctf-3.md](patterns-ctf-3.md#vm-sequential-key-chain-brute-force-midnight-flag-2026).
160
+
161
+ ### Python Bytecode Reversing
162
+ XOR flag checkers with interleaved even/odd tables are common. See [languages.md](languages.md#python-bytecode-reversing-disdis-output) for bytecode analysis tips and reversing patterns.
163
+
164
+ ### Signal-Based Binary Exploration
165
+ Binary uses UNIX signals as binary tree navigation; hook `sigaction` via `LD_PRELOAD`, DFS by sending signals. See [patterns.md](patterns.md#signal-based-binary-exploration).
166
+
167
+ ### Malware Anti-Analysis Bypass via Patching
168
+ Flip `JNZ`/`JZ` (0x75/0x74), change sleep values, patch environment checks in Ghidra (`Ctrl+Shift+G`). See [patterns.md](patterns.md#malware-anti-analysis-bypass-via-patching).
169
+
170
+ ### Expected Values Tables
171
+ Locate with `objdump -s -j .rodata binary | less` — look near comparison instructions, size matches flag length.
172
+
173
+ ### x86-64 Gotchas
174
+ Sign extension and 32-bit truncation pitfalls. See [patterns.md](patterns.md#x86-64-gotchas) for details and code examples.
175
+
176
+ ### Iterative Solver Pattern
177
+ Try each byte (0-255) per position, match against expected output. **Uniform transform shortcut:** if one input byte only changes one output byte, build 0..255 mapping then invert. See [patterns.md](patterns.md) for full implementation.
178
+
179
+ ### Unicorn Emulation (Complex State)
180
+ `from unicorn import *` -- map segments, set up stack, hook to trace. **Mixed-mode pitfall:** 64-bit stub jumping to 32-bit via `retf` requires switching to UC_MODE_32 and copying GPRs + EFLAGS + XMM regs. See [tools.md](tools.md#unicorn-emulation).
181
+
182
+ ### Multi-Stage Shellcode Loaders
183
+ Nested shellcode with XOR decode loops; break at `call rax`, bypass ptrace with `set $rax=0`, extract flag from `mov` instructions. See [patterns.md](patterns.md#multi-stage-shellcode-loaders).
184
+
185
+ ### Timing Side-Channel Attack
186
+ Validation time varies per correct character; measure elapsed time per candidate to recover flag byte-by-byte. See [patterns.md](patterns.md#timing-side-channel-attack).
187
+
188
+ ### Unstripped Binary Information Leaks
189
+ **Pattern:** Debug info and file paths leak author identity. Quick checks: `strings binary | grep "/home/"` (home dirs), `file binary` (stripped?), `readelf -S binary | grep debug` (debug sections).
190
+
191
+ ### Custom Mangle Function Reversing
192
+ Binary mangles input 2 bytes at a time with running state; extract target from `.rodata`, write inverse function. See [patterns.md](patterns.md#custom-mangle-function-reversing).
193
+
194
+ ### Rust serde_json Schema Recovery
195
+ Disassemble serde `Visitor` implementations to recover expected JSON schema; field names in order reveal flag. See [languages-platforms.md](languages-platforms.md#rust-serdejson-schema-recovery).
196
+
197
+ ### Position-Based Transformation Reversing
198
+ Binary adds/subtracts position index; reverse by undoing per-index offset. See [patterns.md](patterns.md#position-based-transformation-reversing).
199
+
200
+ ### Hex-Encoded String Comparison
201
+ Input converted to hex, compared against constant. Decode with `xxd -r -p`. See [patterns.md](patterns.md#hex-encoded-string-comparison).
202
+
203
+ ## CTF Case Notes
204
+
205
+ ### Embedded ZIP + XOR License Decryption
206
+ Binary with named symbols (`EMBEDDED_ZIP`, `ENCRYPTED_MESSAGE`) in `.rodata` → extract ZIP containing license, XOR encrypted message with license bytes to recover flag. No execution needed. See [patterns-ctf-2.md](patterns-ctf-2.md#embedded-zip-xor-license-decryption-metactf-2026).
207
+
208
+ ### Stack String Deobfuscation (.rodata XOR Blob)
209
+ Binary mmaps `.rodata` blob, XOR-deobfuscates, uses it to validate input. Reimplement verification loop with pyelftools to extract blob. Look for `0x9E3779B9`, `0x85EBCA6B` constants and `rol32()`. See [patterns-ctf-2.md](patterns-ctf-2.md#stack-string-deobfuscation-from-rodata-xor-blob-nullcon-2026).
210
+
211
+ ### Prefix Hash Brute-Force
212
+ Binary hashes every prefix independently. Recover one character at a time by matching prefix hashes. See [patterns-ctf-2.md](patterns-ctf-2.md#prefix-hash-brute-force-nullcon-2026).
213
+
214
+ ### Mathematical Convergence Bitmap
215
+ **Pattern:** Binary classifies coordinate pairs by Newton's method convergence (e.g., z^3-1=0). Grid of pass/fail results renders ASCII art flag. Key: the binary is a classifier, not a checker — reverse the math and visualize. See [patterns-ctf.md](patterns-ctf.md#mathematical-convergence-bitmap-ehax-2026).
216
+
217
+ ### RISC-V Binary Analysis
218
+ Statically linked, stripped RISC-V ELF. Use Capstone with `CS_MODE_RISCVC | CS_MODE_RISCV64` for mixed compressed instructions. Emulate with `qemu-riscv64`. Watch for fake flags and XOR decryption with incremental keys. See [tools.md](tools.md#risc-v-binary-analysis-ehax-2026).
219
+
220
+ ### Kernel Module Maze Solving
221
+ Rust kernel module implements maze via device ioctls. Enumerate commands dynamically, build DFS solver with decoy avoidance, deploy as minimal static binary (raw syscalls, no libc). See [patterns-ctf.md](patterns-ctf.md#kernel-module-maze-solving-dicectf-2026).
222
+
223
+ ### Multi-Threaded VM with Channels
224
+ Custom VM with 16+ threads communicating via futex channels. Trace data flow across thread boundaries, extract constants from GDB, watch for inverted validity logic, solve via BFS state space search. See [patterns-ctf.md](patterns-ctf.md#multi-threaded-vm-with-channel-synchronization-dicectf-2026).
225
+
226
+ ### CVP/LLL Lattice for Constrained Integer Validation
227
+ Binary validates flag via matrix multiplication with 64-bit coefficients; solutions must be printable ASCII. Use LLL reduction + CVP in SageMath to find nearest lattice point in the constrained range. Two-phase pattern: Phase 1 recovers AES key, Phase 2 decrypts custom VM bytecode with another linear system (mod 2^32). See [patterns-ctf-2.md](patterns-ctf-2.md#cvplll-lattice-for-constrained-integer-validation-htb-shadowlabyrinth).
228
+
229
+ ### Decision Tree Function Obfuscation
230
+ ~200+ auto-generated functions routing input through polynomial comparisons. Script extraction via Ghidra headless rather than reversing each function manually. Constraint propagation from known output format cascades through arithmetic constraints. See [patterns-ctf-2.md](patterns-ctf-2.md#decision-tree-function-obfuscation-htb-wondersms).
231
+
232
+ ### Android JNI RegisterNatives Obfuscation
233
+ `RegisterNatives` in `JNI_OnLoad` hides which C++ function handles each Java native method (no standard `Java_com_pkg_Class_method` symbol). Find the real handler by tracing `JNI_OnLoad` → `RegisterNatives` → `fnPtr`. Use x86_64 `.so` from APK for best Ghidra decompilation. See [languages-platforms.md](languages-platforms.md#android-jni-registernatives-obfuscation-htb-wondersms).
234
+
235
+ ### Multi-Layer Self-Decrypting Binary
236
+ N-layer binary where each layer decrypts the next using user-provided key bytes + SHA-NI. Use oracle (correct key → valid code with expected pattern). JIT execution with fork-per-candidate COW isolation for speed. See [patterns-ctf-2.md](patterns-ctf-2.md#multi-layer-self-decrypting-binary-dicectf-2026).
237
+
238
+ ### GLSL Shader VM with Self-Modifying Code
239
+ **Pattern:** WebGL2 fragment shader implements Turing-complete VM on a 256x256 RGBA texture (program memory + VRAM). Self-modifying code (STORE opcode) patches drawing instructions. GPU parallelism causes write conflicts — emulate sequentially in Python to recover full output. See [patterns-ctf-3.md](patterns-ctf-3.md#glsl-shader-vm-with-self-modifying-code-apoorvctf-2026).
240
+
241
+ ### GF(2^8) Gaussian Elimination for Flag Recovery
242
+ **Pattern:** Binary performs Gaussian elimination over GF(2^8) with the AES polynomial (0x11b). Matrix + augmentation vector in `.rodata`; solution vector is the flag. Look for constant `0x1b` in disassembly. Addition is XOR, multiplication uses polynomial reduction. See [patterns-ctf-2.md](patterns-ctf-2.md#gf28-gaussian-elimination-for-flag-recovery-apoorvctf-2026).
243
+
244
+ ### Z3 for Single-Line Python Boolean Circuit
245
+ **Pattern:** Single-line Python (2000+ semicolons) with walrus operator chains validates flag as big-endian integer via boolean circuit. Obfuscated XOR `(a | b) & ~(a & b)`. Split on semicolons, translate to Z3 symbolically, solve in under a second. See [patterns-ctf-3.md](patterns-ctf-3.md#z3-for-single-line-python-boolean-circuit-bearcatctf-2026).
246
+
247
+ ### Sliding Window Popcount Differential Propagation
248
+ **Pattern:** Binary validates input via expected popcount for each position of a 16-bit sliding window. Popcount differences create a recurrence: `bit[i+16] = bit[i] + (data[i+1] - data[i])`. Brute-force ~4000-8000 valid initial 16-bit windows; each determines the entire bit sequence. See [patterns-ctf-3.md](patterns-ctf-3.md#sliding-window-popcount-differential-propagation-bearcatctf-2026).
249
+
250
+ ### Ruby/Perl Polyglot Constraint Satisfaction
251
+ **Pattern:** Single file valid in both Ruby and Perl, each imposing different constraints on a key. Exploits `=begin`/`=end` (Ruby block comment) vs `=begin`/`=cut` (Perl POD) to run different code per interpreter. Intersect constraints from both languages to recover the unique key. See [languages-platforms.md](languages-platforms.md#rubyperl-polyglot-constraint-satisfaction-bearcatctf-2026).
252
+
253
+ ### Verilog/Hardware RE
254
+ **Pattern:** Verilog HDL source for state machines with hidden conditions gated on shift register history. Analyze `always @(posedge clk)` blocks and `case` statements to find correct input sequences. See [languages-platforms.md](languages-platforms.md#veriloghardware-reverse-engineering-srdnlenctf-2026).
255
+
256
+ ### Custom binfmt Kernel Module with RC4 Flat Binaries
257
+ **Pattern:** Kernel module registers binfmt handler for encrypted flat binaries. Reverse the `.ko` to find RC4 key (in `movabs` immediates), decrypt the flat binary, import at the fixed virtual address from the module's `vm_mmap` call. See [patterns-ctf.md](patterns-ctf.md#custom-binfmt-kernel-module-with-rc4-flat-binaries-bsidessf-2026).
258
+
259
+ ### Hash-Resolved Imports / No-Import Ransomware
260
+ **Pattern:** Binary with zero visible imports resolves APIs via symbol name hashing at runtime. Skip the hash reversing — hook OpenSSL functions via `LD_PRELOAD` in Docker to capture AES keys directly. See [patterns-ctf.md](patterns-ctf.md#hash-resolved-imports-no-import-ransomware-bsidessf-2026).
261
+
262
+ ### ELF Section Header Corruption for Anti-Analysis
263
+ **Pattern:** Corrupted section headers crash analysis tools but program headers are intact so binary runs normally. Patch `e_shoff` to zero or use `readelf -l` (program headers only). Flag hidden after corrupted sections with magic marker + XOR. See [patterns-ctf.md](patterns-ctf.md#elf-section-header-corruption-for-anti-analysis-bsidessf-2026).
264
+
265
+ ### Brainfuck Character-by-Character Static Analysis
266
+ **Pattern:** BF programs validating input have `,` (read char) followed by `+` operations whose count = expected ASCII value. Extract increment counts per input position to recover expected input without execution. See [languages.md](languages.md#brainfuck-character-by-character-static-analysis-bsidessf-2026).
267
+
268
+ ### Brainfuck Side-Channel via Read Count Oracle
269
+ **Pattern:** BF input validators read more bytes when a character is correct. Count `,` operations per candidate — highest read count = correct byte. Character-by-character recovery. See [languages.md](languages.md#brainfuck-side-channel-via-read-count-oracle-bsidessf-2026).
270
+
271
+ ### Brainfuck Comparison Idiom Detection
272
+ **Pattern:** Compiled BF uses fixed idioms for equality checks (`<[-<->] +<[>-<[-]]>[-<+>]`). Instrument interpreter to detect patterns and extract comparison operands (expected flag bytes). See [languages.md](languages.md#brainfuck-comparison-idiom-detection-bsidessf-2026).
273
+
274
+ ### Backdoored Shared Library Detection
275
+ Binary works in GDB but fails when run normally (suid)? Check `ldd` for non-standard libc paths, then `strings | diff` the suspicious vs. system library to find injected code/passwords. See [patterns-ctf.md](patterns-ctf.md#backdoored-shared-library-detection-via-string-diffing-hacklu-ctf-2012).
276
+
277
+ ### Go Binary Reversing
278
+ Large static binary with `go.buildid`? Use GoReSym to recover function names (works even on stripped binaries). Go strings are `{ptr, len}` pairs — not null-terminated. Look for `main.main`, `runtime.gopanic`, channel ops (`runtime.chansend1`/`chanrecv1`). Use Ghidra golang-loader plugin for best results. See [languages-compiled.md](languages-compiled.md#go-binary-reversing).
279
+
280
+ ### Go Binary UUID Patching for C2 Enumeration
281
+ **Pattern:** Go C2 client with UUID from `-ldflags -X`. Binary-patch UUID bytes (same length), register with C2, enumerate clients/files via API. See [languages-compiled.md](languages-compiled.md#go-binary-uuid-patching-for-c2-client-enumeration-bsidessf-2026).
282
+
283
+ ### D Language Binary Reversing
284
+ D language binaries have unique symbol mangling (not C++ style). Template-heavy, many function variants. Look for `_D` prefix in symbols. See [languages-compiled.md](languages-compiled.md#d-language-binary-reversing-csaw-ctf-2016).
285
+
286
+ ### Rust Binary Reversing
287
+ Binary with `core::panicking` strings and `_ZN` mangled symbols? Use `rustfilt` for demangling. Panic messages contain source paths and line numbers — `strings binary | grep "panicked"` is the fastest approach. Option/Result enums use discriminant byte (0=None/Err, 1=Some/Ok). See [languages-compiled.md](languages-compiled.md#rust-binary-reversing).
288
+
289
+ ### Frida Dynamic Instrumentation
290
+ Hook runtime functions without modifying binary. `frida -f ./binary -l hook.js` to spawn with instrumentation. Hook `strcmp`/`memcmp` to capture expected values, bypass anti-debug by replacing `ptrace` return value, scan memory for flag patterns, replace validation functions. See [tools-dynamic.md](tools-dynamic.md#frida-dynamic-instrumentation).
291
+
292
+ ### Frida Firebase Cloud Functions Bypass
293
+ **Pattern:** Android app validates via Firebase Cloud Functions. Post-login Frida hook constructs valid payload (UID + value + timestamp) and calls Cloud Function directly, bypassing QR/payment validation. See [languages-platforms.md](languages-platforms.md#frida-firebase-cloud-functions-bypass-bsidessf-2026).
294
+
295
+ ### angr Symbolic Execution
296
+ Automatic path exploration to find inputs satisfying constraints. Load binary with `angr.Project`, set find/avoid addresses, call `simgr.explore()`. Constrain input to printable ASCII and known prefix for faster solving. Hook expensive functions (crypto, I/O) to prevent path explosion. See [tools-dynamic.md](tools-dynamic.md#angr-symbolic-execution).
297
+
298
+ ### Qiling Emulation
299
+ Cross-platform binary emulation with OS-level support (syscalls, filesystem). Emulate Linux/Windows/ARM/MIPS binaries on any host. No debugger artifacts — bypasses all anti-debug by default. Hook syscalls and addresses with Python API. See [tools-dynamic.md](tools-dynamic.md#qiling-framework-cross-platform-emulation).
300
+
301
+ ### VMProtect / Themida Analysis
302
+ VMProtect virtualizes code into custom bytecode. Identify VM entry (pushad-like), find handler table (large indirect jump), trace handlers dynamically. For CTF, focus on tracing operations on input rather than full devirtualization. Themida: dump at OEP with ScyllaHide + Scylla. See [tools-advanced.md](tools-advanced.md#vmprotect-analysis).
303
+
304
+ ### Binary Diffing
305
+ BinDiff and Diaphora compare two binaries to highlight changes. Essential when challenge provides patched/original versions. Export from IDA/Ghidra, diff to find vulnerability or hidden functionality. See [tools-advanced.md](tools-advanced.md#binary-diffing).
306
+
307
+ ### Advanced GDB (pwndbg, rr)
308
+ pwndbg: `context`, `vmmap`, `search -s "flag{"`, `telescope $rsp`. GEF alternative. Reverse debugging with `rr record`/`rr replay` — step backward through execution. Python scripting for brute-force and automated tracing. See [tools-advanced.md](tools-advanced.md#advanced-gdb-techniques).
309
+
310
+ ### macOS / iOS Reversing
311
+ Mach-O binaries: `otool -l` for load commands, `class-dump` for Objective-C headers. Swift: `swift demangle` for symbols. iOS apps: decrypt FairPlay DRM with frida-ios-dump, bypass jailbreak detection with Frida hooks. Re-sign patched binaries with `codesign -f -s -`. See [platforms.md](platforms.md#macos-ios-reversing).
312
+
313
+ ### Embedded / IoT Firmware RE
314
+ `binwalk -Me firmware.bin` for recursive extraction. Hardware: UART/JTAG/SPI flash for firmware dumps. Filesystems: SquashFS (`unsquashfs`), JFFS2, UBI. Emulate with QEMU: `qemu-arm -L /usr/arm-linux-gnueabihf/ ./binary`. See [platforms.md](platforms.md#embedded-iot-firmware-re).
315
+
316
+ ### Kernel Driver Reversing
317
+ Linux `.ko`: find ioctl handler via `file_operations` struct, trace `copy_from_user`/`copy_to_user`. Debug with QEMU+GDB (`-s -S`). eBPF: `bpftool prog dump xlated`. Windows `.sys`: find `DriverEntry` → `IoCreateDevice` → IRP handlers. See [platforms.md](platforms.md#kernel-driver-reversing).
318
+
319
+ ### Swift / Kotlin Binary Reversing
320
+ Swift: `swift demangle` symbols, protocol witness tables for dispatch, `__swift5_*` sections. Kotlin/JVM: coroutines compile to state machines in `invokeSuspend`, `jadx` with Kotlin mode for best decompilation. Kotlin/Native: LLVM backend, looks like C++ in disassembly. See [languages-compiled.md](languages-compiled.md#swift-binary-reversing).
321
+
322
+ ### INT3 Patch + Coredump Brute-Force Oracle
323
+ Patch `0xCC` (INT3) after transform output, enable core dumps, brute-force each input character by extracting computed state from coredump via `strings`. Avoids full reverse of transformation. See [patterns.md](patterns.md#int3-patch-coredump-brute-force-oracle-pwn2win-2016).
324
+
325
+ ### Signal Handler Chain + LD_PRELOAD Oracle
326
+ Binary uses signal handler chains for per-character password validation. Hook `signal()` via LD_PRELOAD -- the call to install the next handler confirms the current character is correct. See [patterns.md](patterns.md#signal-handler-chain-ldpreload-oracle-nuit-du-hack-2016).
327
+
328
+ ### Font Ligature Exploitation
329
+ Custom OpenType font maps multi-character ligature sequences to single glyphs; reverse the GSUB table to decode hidden messages. See [patterns-ctf-3.md](patterns-ctf-3.md#opentype-font-ligature-exploitation-for-hidden-messages-hack-the-vote-2016).
330
+
331
+ ### Instruction Counter as Cryptographic State
332
+ **Pattern:** Hand-written assembly uses a dedicated register (e.g., `r12`) as an instruction counter incremented after nearly every instruction. The counter feeds into XOR/ROL/multiply transformations on input bytes, making transformation path-dependent. Byte-by-byte brute force with Unicorn emulation recovers the flag. See [patterns-ctf-3.md](patterns-ctf-3.md#instruction-counter-as-cryptographic-state-metactf-flash-2026).
333
+
334
+ ### Burrows-Wheeler Transform Inversion
335
+ Invert BWT without terminator character by trying all possible row indices. Standard `bwtool` or manual column-sorting reconstruction. See [patterns-ctf-3.md](patterns-ctf-3.md#burrows-wheeler-transform-inversion-without-terminator-asis-ctf-finals-2016).
336
+
337
+ ### FRACTRAN Program Inversion
338
+ Esoteric language using iterated fraction multiplication. Invert by swapping numerator/denominator in fraction table, run output backward. I/O encoded as prime factorization exponents. See [languages.md](languages.md#fractran-program-inversion-boston-key-party-2016).
339
+
340
+ ### Opcode-Only Trace Reconstruction
341
+ Execution traces with only opcodes (no data) still leak info through branch decisions. Sorting algorithm comparisons reveal element ordering. Reconstruct by deduplicating trace, splitting into basic blocks. See [tools-dynamic.md](tools-dynamic.md#opcode-only-trace-reconstruction-0ctf-2016).
342
+
343
+ ### Thread Race Signed Integer Overflow
344
+ Combat-simulation binary with thread-unsafe skill lock. Race between skill selection and damage calculation; `cdqe` sign-extends 0xFFFFFFFF to -1 (signed), causing HP overflow on subtraction. See [patterns-ctf-3.md](patterns-ctf-3.md#thread-race-condition-with-signed-integer-overflow-codegate-2017).
345
+
346
+ ### ESP32/Xtensa Firmware Reversing
347
+ No IDA support — use radare2 + ESP-IDF ROM linker script (`esp32.rom.ld`) for symbol resolution. Cross-reference with public ESP-IDF HTTP server examples to identify app logic. See [patterns-ctf-3.md](patterns-ctf-3.md#esp32xtensa-firmware-reversing-with-rom-symbol-map-insomnihack-2017).
348
+
349
+ ### Custom VM Bytecode Lifting to LLVM IR
350
+ Transpile custom VM bytecode to LLVM IR, then use `opt -O3` to simplify (inlining, constant folding, dead code elimination). Reduces 1300 lines to ~150 lines, revealing the underlying algorithm. See [tools-advanced.md](tools-advanced.md#custom-vm-bytecode-lifting-to-llvm-ir-google-ctf-2017).
351
+
352
+ ### SIGFPE Signal Handler Side-Channel
353
+ SIGFPE signal handlers create implicit control flow invisible to static analysis. Count SIGFPE signals via `strace -e signal=SIGFPE` per candidate character -- correct characters produce more signals. See [anti-analysis.md](anti-analysis.md#sigfpe-signal-handler-side-channel-via-strace-counting-plaidctf-2017).
354
+
355
+ ### Batch Crackme Automation via objdump
356
+ Mass crackme challenges (100s of binaries) with identical structure: script `objdump` to extract CMP immediates and add/sub arithmetic sequences, then reverse-compute keys algebraically without execution. See [patterns-ctf-3.md](patterns-ctf-3.md#batch-crackme-automation-via-objdump-pattern-extraction-def-con-2017).
357
+
358
+ ### Android DEX Runtime Bytecode Patching
359
+ Native JNI library patches Dalvik bytecode in memory via `/proc/self/maps` + `mprotect` + XOR. Static APK analysis alone is insufficient -- extract XOR key and offsets from the native `.so` to reconstruct the runtime DEX. See [languages-platforms.md](languages-platforms.md#android-dex-runtime-bytecode-patching-via-procselfmaps-google-ctf-2017).
360
+
361
+ ### Fork + Pipe + Dead Branch Anti-Analysis
362
+ Fork/pipe IPC where parent writes data and exits, child reads and continues. Real validation hidden in a dead branch (always-false comparison). `strace` reveals the fork/pipe pattern; patch the comparison constant to reach hidden code. See [patterns-ctf-3.md](patterns-ctf-3.md#fork-pipe-dead-branch-anti-analysis-rctf-2017).
363
+
364
+ ## Web/CTF Auth Bypass Case Notes
365
+
366
+ ### Signed Cookie Key Reuse: access token to admin_session
367
+
368
+ **Case:** `class.pangbaoba.me` CTF homework system. Public `/access/<token>` route set a signed `student_gate`; the same access token also worked as the HMAC key for `admin_session`, allowing direct admin API access by forging the exact session payload shape.
369
+
370
+ **Core pattern:** A visible invite/access token is reused as a server-side signing secret. If one signed cookie can be validated offline, test whether sibling auth cookies use the same signing scheme and key.
371
+
372
+ **Triage workflow:**
373
+ 1. Capture `Set-Cookie` from the gated entry route, especially cookies shaped like `<base64url-json>.<base64url-signature>`.
374
+ 2. Decode the first segment; identify compact JSON payloads such as `{"access":"student"}`.
375
+ 3. Recompute `HMAC-SHA256(payload_b64, candidate_key)` using visible route tokens, invite codes, reset tokens, or frontend constants as candidate keys.
376
+ 4. If the signature matches, enumerate *payload shape*, not passwords: try likely authorization claims on the correct cookie name (`admin_session`, `session`, `auth`, etc.).
377
+ 5. Verify with read-only endpoints first (`/api/admin/me`, settings/status/list routes) before any write action.
378
+
379
+ **Important lesson:** The first obvious payload may fail. In this case `{"access":"admin"}`, `{"role":"admin"}`, and `{"access":"student","isAdmin":true}` failed, while the backend actually checked:
380
+
381
+ ```json
382
+ {"admin":true}
383
+ ```
384
+
385
+ **Minimal PoC shape:**
386
+
387
+ ```python
388
+ import base64, hashlib, hmac, json
389
+
390
+ def b64u(data: bytes) -> str:
391
+ return base64.urlsafe_b64encode(data).decode().rstrip("=")
392
+
393
+ access_token = "<token from /access/<token>>"
394
+ payload_b64 = b64u(json.dumps({"admin": True}, separators=(",", ":")).encode())
395
+ sig_b64 = b64u(hmac.new(access_token.encode(), payload_b64.encode(), hashlib.sha256).digest())
396
+ print(f"admin_session={payload_b64}.{sig_b64}")
397
+ ```
398
+
399
+ **Validation signals:**
400
+ - `GET /api/admin/me` changes from `401 {"error":"unauthorized"}` to `200 {"admin":true}`.
401
+ - Other read-only admin endpoints return real data with the forged cookie.
402
+ - A JSON-cookie value like `admin_session=j:{}` causing `500` suggests Express/cookie-parser type confusion and confirms fragile cookie parsing; it is not required for the bypass but helps identify the stack and parsing assumptions.
403
+
404
+ **What to avoid:** Do not brute-force admin passwords or enumerate unrelated user IDs when a signed-cookie structure is visible. Work offline on signatures and use low-frequency read-only verification.
405
+
406
+ **Fix guidance:** Never use public route/access tokens as HMAC secrets. Use server-only cookie signing secrets, separate student/admin secrets, server-side sessions for admin identity, strict cookie type checks, and return `401` on parse/verify failure instead of `500`.
407
+
408
+ ## Web Phishing Infrastructure
409
+
410
+ ### Phishing Panel: {target_domain_a} / {target_domain_b}
411
+ **完整分析**: [phishing-case-study.md](phishing-case-study.md)
412
+
413
+ Two-server phishing infrastructure impersonating a government agency. Full victim control system with server-driven status code redirection.
414
+
415
+ **Architecture:**
416
+ - `{target_domain_a}` — Presentation layer (phishing pages, JS polling client)
417
+ - `{target_domain_b}` — Data layer (PHP+MySQL backend, admin panel)
418
+ - Both behind NAT ({internal_ip} internal), nginx, SSL-only
419
+ - Web root: `/www/wwwroot/{target_domain_b}/`
420
+
421
+ **Victim Flow:** Landing page (fake subsidy quotas) → 1.html (ID/bank card form → `submit.php`) → 4.html (PIN → `get-ayment.php`) → server-controlled staged pages (9-16) via 1-second `status_check.php` polling.
422
+
423
+ **Key Findings:**
424
+ - Admin panel at `register.php` → `qichuang.php` (login form), `list.php` (dashboard template)
425
+ - Auth via PHP session (`PHPSESSID`); `login.php` and `check_login_ajax.php` removed (404)
426
+ - **Data leak**: `db.php` returns victim name list without auth (49+ records, **no bank details** — only id/username/note/description fields)
427
+ - **No-auth write**: `save_note.php` accepts data without authentication
428
+ - `backend.php` gives SQL error suggesting admin registration endpoint (broken)
429
+ - Rate limiting on `submit.php` (multi-factor), no SQLi or session bypass found
430
+ - Status code system: admin sets 1-16, victim browser auto-redirects to `N.html`
431
+
432
+ **Infrastructure:**
433
+ | Domain | Public IP | Role |
434
+ |--------|-----------|------|
435
+ | {target_domain_1} | {target_ip_1} | Backend + Admin |
436
+ | {target_domain_2} | {target_ip_2} | Frontend (phishing pages) |
437
+
438
+
439
+
440
+ ---
441
+
442
+ ## 分析前预判:文件伪装与名字欺骗
443
+
444
+ ### 文件后缀不可信
445
+
446
+ **核心原则:永远用 `file` 命令或 magic bytes 判断文件类型,不要相信后缀名。**
447
+
448
+ 常见伪装手法:
449
+
450
+ | 伪装后缀 | 实际类型 | 目的 |
451
+ |---------|---------|------|
452
+ | `.sh` | ELF 二进制 | 让人以为是脚本,降低警惕 |
453
+ | `.txt` | PE/ELF | 绕过简单的文件类型过滤 |
454
+ | `.jpg`/`.png` | 可执行文件或压缩包 | 隐藏在图片中 |
455
+ | `.dll` | 实际是 .NET assembly | 混淆分析方向 |
456
+ | `.so` | 实际是加密 payload | 需要先解密 |
457
+ | 无后缀 | 任何类型 | Linux 下常见 |
458
+
459
+ ```bash
460
+ # 正确做法:用 file 命令
461
+ file suspicious_file.sh
462
+ # 输出: ELF 64-bit LSB executable, ARM aarch64...
463
+
464
+ # 用 xxd 看 magic bytes
465
+ xxd suspicious_file.sh | head -1
466
+ # 7f454c46 = ELF magic
467
+ ```
468
+
469
+ ### 文件名不可信
470
+
471
+ **"DriverLoader" 不一定加载驱动,"Updater" 不一定更新。**
472
+
473
+ 常见名字欺骗:
474
+
475
+ | 文件名暗示 | 实际行为 |
476
+ |-----------|---------|
477
+ | `DriverLoader` | 可能是 ptrace 注入器 / 进程 hook |
478
+ | `SystemService` | 可能是后门 / C2 agent |
479
+ | `Updater` / `Update` | 可能是 dropper / 下载器 |
480
+ | `Helper` / `Assistant` | 可能是提权工具 |
481
+ | `lib*.so` | 可能是注入 payload |
482
+
483
+ **分析时应该:**
484
+ - 忽略文件名暗示,按实际代码行为判断
485
+ - 关注 `mmap`、`ptrace`、`/proc/self/mem` 等系统调用
486
+ - 如果看到"加载驱动"但没有 `insmod`/`init_module` 调用,说明名不副实
487
+
488
+ ### 静态分析不够时的动态补充
489
+
490
+ 纯静态分析只能看到代码骨架。以下场景必须配合动态分析:
491
+
492
+ | 场景 | 推荐动态方法 |
493
+ |------|-------------|
494
+ | 代码有解密/解压逻辑 | 在解密后下断点,dump 明文 |
495
+ | 大量间接调用(函数指针表) | strace/ltrace 跟踪实际调用 |
496
+ | 疑似反调试 | 先 strace 看 ptrace 调用 |
497
+ | 内嵌 shellcode/payload | QEMU 用户态模拟执行 |
498
+ | 网络通信协议未知 | tcpdump/Wireshark 抓包 |
499
+
500
+ ```bash
501
+ # strace 跟踪系统调用(重点关注)
502
+ strace -f -e trace=open,mmap,ptrace,execve,connect ./binary
503
+
504
+ # ltrace 跟踪库函数调用
505
+ ltrace -f ./binary
506
+
507
+ # QEMU 用户态模拟(不需要真实设备)
508
+ qemu-aarch64 -strace ./binary_arm64
509
+
510
+ # 检查反调试:看是否 ptrace 自追踪
511
+ strace ./binary 2>&1 | grep ptrace
512
+ # 如果看到 ptrace(PTRACE_TRACEME, ...) 说明有反调试
513
+ ```
514
+
515
+ ### 进程注入/保护壳类样本的常见模式
516
+
517
+ 这类样本(如 `LinYuDriverLoader`)通常:
518
+
519
+ 1. **不是真正加载内核驱动**(需要 root 权限,大多数场景没有)
520
+ 2. **实际行为是进程注入**:
521
+ - `ptrace` attach 到目标进程
522
+ - 通过 `/proc/<pid>/mem` 读写目标内存
523
+ - `mmap` 映射 shellcode 到目标进程空间
524
+ 3. **内嵌加密 payload**:
525
+ - 运行时解密一段 shellcode
526
+ - 解密后的 payload 才是真正的 hook 代码
527
+ 4. **反调试保护**:
528
+ - `ptrace(PTRACE_TRACEME)` 自追踪
529
+ - 时间检测(`clock_gettime` 前后对比)
530
+ - `/proc/self/status` 检查 TracerPid
531
+
532
+ **分析策略**:
533
+ ```text
534
+ 1. file 命令确认真实类型
535
+ 2. strings 看有没有明显的路径/库名/错误信息
536
+ 3. rabin2 -I 看架构/编译器/保护
537
+ 4. 静态找 mmap/ptrace/open 调用
538
+ 5. 如果有解密逻辑 → 动态跑到解密后 dump
539
+ 6. 如果有反调试 → 先 patch 掉或用 LD_PRELOAD 绕过
540
+ ```