opencode-skills-collection 4.0.43 → 4.0.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (270) hide show
  1. package/bundled-skills/.antigravity-install-manifest.json +47 -1
  2. package/bundled-skills/api-rate-limit-handler/SKILL.md +282 -0
  3. package/bundled-skills/api-security/SKILL.md +205 -0
  4. package/bundled-skills/api-security/references/jwt-oauth-testing.md +123 -0
  5. package/bundled-skills/api-security/references/rest-graphql-testing.md +137 -0
  6. package/bundled-skills/apk-reverse/SKILL.md +438 -0
  7. package/bundled-skills/apk-reverse/references/android-advanced.md +365 -0
  8. package/bundled-skills/apk-reverse/references/apk-security-checklist.md +230 -0
  9. package/bundled-skills/apk-reverse/references/frida-bypass-kit.md +70 -0
  10. package/bundled-skills/apk-reverse/references/frida-cookbook.md +472 -0
  11. package/bundled-skills/attack-chain/SKILL.md +185 -0
  12. package/bundled-skills/attack-chain/references/attack-playbooks.md +126 -0
  13. package/bundled-skills/attack-chain/references/evasion-cheatsheet.md +133 -0
  14. package/bundled-skills/attack-chain/references/lifecycle-checklist.md +37 -0
  15. package/bundled-skills/attack-chain/references/phases.md +490 -0
  16. package/bundled-skills/binary-diff/SKILL.md +320 -0
  17. package/bundled-skills/binary-diff/references/prompt-template.md +173 -0
  18. package/bundled-skills/browser-extension-reverse/SKILL.md +99 -0
  19. package/bundled-skills/browser-extension-reverse/references/extension-analysis.md +10 -0
  20. package/bundled-skills/case-review/SKILL.md +167 -0
  21. package/bundled-skills/cloud-k8s/SKILL.md +124 -0
  22. package/bundled-skills/cloud-k8s/references/k8s-cloud-checklist.md +16 -0
  23. package/bundled-skills/code-audit/SKILL.md +92 -0
  24. package/bundled-skills/code-audit/references/sast-review-checklist.md +10 -0
  25. package/bundled-skills/database-security/SKILL.md +81 -0
  26. package/bundled-skills/database-security/references/db-misconfig-checklist.md +9 -0
  27. package/bundled-skills/diagram-generator/SKILL.md +199 -0
  28. package/bundled-skills/diagram-generator/references/README.md +3 -0
  29. package/bundled-skills/diagram-generator/references/diagram-patterns.md +254 -0
  30. package/bundled-skills/digital-forensics/SKILL.md +93 -0
  31. package/bundled-skills/digital-forensics/references/forensics-triage.md +10 -0
  32. package/bundled-skills/docs/integrations/jetski-cortex.md +3 -3
  33. package/bundled-skills/docs/integrations/jetski-gemini-loader/README.md +1 -1
  34. package/bundled-skills/docs/maintainers/repo-growth-seo.md +1 -1
  35. package/bundled-skills/docs/maintainers/skills-update-guide.md +1 -1
  36. package/bundled-skills/docs/sources/sources.md +9 -0
  37. package/bundled-skills/docs/users/aas-core.md +1 -1
  38. package/bundled-skills/docs/users/bundles.md +1 -1
  39. package/bundled-skills/docs/users/claude-code-skills.md +1 -1
  40. package/bundled-skills/docs/users/gemini-cli-skills.md +1 -1
  41. package/bundled-skills/docs/users/kiro-integration.md +1 -1
  42. package/bundled-skills/docs/users/usage.md +3 -3
  43. package/bundled-skills/docs/users/visual-guide.md +4 -4
  44. package/bundled-skills/docs-generator/SKILL.md +197 -0
  45. package/bundled-skills/docs-generator/references/security-report-templates.md +348 -0
  46. package/bundled-skills/docs-generator/references/templates.md +102 -0
  47. package/bundled-skills/docs-generator/references/vendor-report-rules.md +263 -0
  48. package/bundled-skills/dotnet-reverse/SKILL.md +197 -0
  49. package/bundled-skills/dotnet-reverse/references/common-workflow.md +171 -0
  50. package/bundled-skills/dotnet-reverse/references/obfuscators.md +145 -0
  51. package/bundled-skills/dotnet-reverse/references/sharp-tools.md +164 -0
  52. package/bundled-skills/edr-bypass-re/SKILL.md +248 -0
  53. package/bundled-skills/edr-bypass-re/references/hook-survey.md +226 -0
  54. package/bundled-skills/edr-bypass-re/references/telemetry-blinding.md +346 -0
  55. package/bundled-skills/edr-bypass-re/references/unhook-techniques.md +338 -0
  56. package/bundled-skills/email-security/SKILL.md +81 -0
  57. package/bundled-skills/email-security/references/email-auth-checklist.md +8 -0
  58. package/bundled-skills/firmware-pentest/SKILL.md +381 -0
  59. package/bundled-skills/firmware-pentest/references/emba-automated-analysis.md +192 -0
  60. package/bundled-skills/firmware-pentest/references/emulation-and-fuzz.md +337 -0
  61. package/bundled-skills/firmware-pentest/references/extraction-methodology.md +285 -0
  62. package/bundled-skills/ghidra-reverse/SKILL.md +98 -0
  63. package/bundled-skills/ghidra-reverse/references/ghidra-cheatsheet.md +12 -0
  64. package/bundled-skills/go-rust-reverse/SKILL.md +82 -0
  65. package/bundled-skills/go-rust-reverse/references/go-rust-notes.md +5 -0
  66. package/bundled-skills/hardware-security/SKILL.md +80 -0
  67. package/bundled-skills/hardware-security/references/debug-interface-triage.md +7 -0
  68. package/bundled-skills/ida-reverse/SKILL.md +401 -0
  69. package/bundled-skills/ida-reverse/references/LOCAL-SETUP.md +66 -0
  70. package/bundled-skills/ida-reverse/references/ida-mcp-cheatsheet.md +515 -0
  71. package/bundled-skills/identity-federation/SKILL.md +81 -0
  72. package/bundled-skills/identity-federation/references/sso-flow-checklist.md +9 -0
  73. package/bundled-skills/instructree/SKILL.md +94 -0
  74. package/bundled-skills/js-reverse/SKILL.md +239 -0
  75. package/bundled-skills/js-reverse/references/ast-deobfuscation.md +3 -0
  76. package/bundled-skills/js-reverse/references/automation-entry.md +12 -0
  77. package/bundled-skills/js-reverse/references/env-patching.md +6 -0
  78. package/bundled-skills/js-reverse/references/fallbacks.md +8 -0
  79. package/bundled-skills/js-reverse/references/instrumentation.md +9 -0
  80. package/bundled-skills/js-reverse/references/local-rebuild.md +11 -0
  81. package/bundled-skills/js-reverse/references/mcp-task-template.md +30 -0
  82. package/bundled-skills/js-reverse/references/node-env-rebuild.md +9 -0
  83. package/bundled-skills/js-reverse/references/output-contract.md +9 -0
  84. package/bundled-skills/js-reverse/references/task-artifacts.md +11 -0
  85. package/bundled-skills/js-reverse/references/task-input-template.md +11 -0
  86. package/bundled-skills/js-reverse/references/tool-defaults.md +7 -0
  87. package/bundled-skills/llm-security/SKILL.md +160 -0
  88. package/bundled-skills/llm-security/references/agent-obedience-engineering.md +243 -0
  89. package/bundled-skills/llm-security/references/agent-security-testing.md +116 -0
  90. package/bundled-skills/llm-security/references/owasp-llm-top10.md +48 -0
  91. package/bundled-skills/llm-security/references/prompt-injection-methodology.md +107 -0
  92. package/bundled-skills/loki-mode/examples/todo-app-generated/backend/package-lock.json +4 -4
  93. package/bundled-skills/loki-mode/examples/todo-app-generated/backend/package.json +1 -1
  94. package/bundled-skills/macos-reverse/SKILL.md +85 -0
  95. package/bundled-skills/macos-reverse/references/macho-triage.md +10 -0
  96. package/bundled-skills/malware-analysis/SKILL.md +311 -0
  97. package/bundled-skills/malware-analysis/references/anti-analysis-techniques.md +205 -0
  98. package/bundled-skills/malware-analysis/references/sandbox-orchestration.md +204 -0
  99. package/bundled-skills/malware-analysis/references/yara-sigma-rules.md +232 -0
  100. package/bundled-skills/mobile-reverse/SKILL.md +222 -0
  101. package/bundled-skills/mobile-reverse/references/anti-detection-bypass.md +182 -0
  102. package/bundled-skills/mobile-reverse/references/frida-objection-deep.md +218 -0
  103. package/bundled-skills/mobile-reverse/references/ios-reverse-guide.md +177 -0
  104. package/bundled-skills/muapi-media/SKILL.md +311 -0
  105. package/bundled-skills/ot-ics/SKILL.md +117 -0
  106. package/bundled-skills/ot-ics/references/ot-safe-assessment.md +10 -0
  107. package/bundled-skills/patch-diff-exploit/SKILL.md +278 -0
  108. package/bundled-skills/patch-diff-exploit/references/diff-tools-comparison.md +271 -0
  109. package/bundled-skills/patch-diff-exploit/references/patch-tuesday-workflow.md +253 -0
  110. package/bundled-skills/patch-diff-exploit/references/root-cause-and-poc.md +198 -0
  111. package/bundled-skills/pentest-tools/SKILL.md +346 -0
  112. package/bundled-skills/pentest-tools/references/ai-pentest-agents.md +148 -0
  113. package/bundled-skills/pentest-tools/references/ai-pentesting-landscape-2026.md +73 -0
  114. package/bundled-skills/pentest-tools/references/automation-loop-pattern.md +153 -0
  115. package/bundled-skills/pentest-tools/references/awesome-pentest-digest.md +175 -0
  116. package/bundled-skills/pentest-tools/references/burpsuite-mcp-guide.md +769 -0
  117. package/bundled-skills/pentest-tools/references/client-side-lab-playbook.md +155 -0
  118. package/bundled-skills/pentest-tools/references/kali-mcp-ecosystem.md +119 -0
  119. package/bundled-skills/pentest-tools/references/msf-protocol.md +169 -0
  120. package/bundled-skills/pentest-tools/references/network-attack-defense.md +350 -0
  121. package/bundled-skills/pentest-tools/references/nuclei-guide-2026.md +157 -0
  122. package/bundled-skills/pentest-tools/references/payloads.md +32 -0
  123. package/bundled-skills/pentest-tools/references/pentest-ai-agents-matrix.md +117 -0
  124. package/bundled-skills/pentest-tools/references/pentest-loop.md +270 -0
  125. package/bundled-skills/pentest-tools/references/recon-pipeline.md +154 -0
  126. package/bundled-skills/pentest-tools/references/templates/findings.md +21 -0
  127. package/bundled-skills/pentest-tools/references/templates/progress.md +17 -0
  128. package/bundled-skills/pentest-tools/references/templates/rules.md +35 -0
  129. package/bundled-skills/pentest-tools/references/templates/scope.md +29 -0
  130. package/bundled-skills/pentest-tools/references/templates/task_plan.md +27 -0
  131. package/bundled-skills/pentest-tools/references/web-attack-cheatsheet.md +387 -0
  132. package/bundled-skills/pentest-tools/src-hunter/SKILL.md +243 -0
  133. package/bundled-skills/pentest-tools/src-hunter/references/README.en.md +115 -0
  134. package/bundled-skills/pentest-tools/src-hunter/references/README.md +148 -0
  135. package/bundled-skills/pentest-tools/src-hunter/references/dictionaries/00-index.md +44 -0
  136. package/bundled-skills/pentest-tools/src-hunter/references/dictionaries/chinese-srcfingerprints.md +515 -0
  137. package/bundled-skills/pentest-tools/src-hunter/references/dictionaries/default-credentials-cn.md +274 -0
  138. package/bundled-skills/pentest-tools/src-hunter/references/industry/00-index.md +66 -0
  139. package/bundled-skills/pentest-tools/src-hunter/references/industry/banking-finance.md +338 -0
  140. package/bundled-skills/pentest-tools/src-hunter/references/industry/telecom-isp.md +315 -0
  141. package/bundled-skills/pentest-tools/src-hunter/references/methodology/00-index.md +68 -0
  142. package/bundled-skills/pentest-tools/src-hunter/references/methodology/01-attack-priority.md +143 -0
  143. package/bundled-skills/pentest-tools/src-hunter/references/methodology/02-bypass-toolkit.md +357 -0
  144. package/bundled-skills/pentest-tools/src-hunter/references/methodology/03-evidence-discipline.md +205 -0
  145. package/bundled-skills/pentest-tools/src-hunter/references/methodology/04-control-gap-hunting.md +238 -0
  146. package/bundled-skills/pentest-tools/src-hunter/references/methodology/05-srctimebox-priority.md +161 -0
  147. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet/adcs/346/224/273/345/207/273.md +254 -0
  148. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet/exchange/346/224/273/345/207/273.md +254 -0
  149. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet/sharepoint/346/224/273/345/207/273.md +113 -0
  150. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//344/277/241/346/201/257/346/224/266/351/233/206.md +947 -0
  151. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//345/205/215/346/235/200/344/270/216/350/247/204/351/201/277.md +780 -0
  152. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//345/207/255/350/257/201/347/252/203/345/217/226.md +1259 -0
  153. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//345/237/237/346/270/227/351/200/217/346/224/273/345/207/273.md +753 -0
  154. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//346/235/203/351/231/220/346/217/220/345/215/207.md +819 -0
  155. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//346/235/203/351/231/220/347/273/264/346/214/201.md +577 -0
  156. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//346/250/252/345/220/221/347/247/273/345/212/250.md +838 -0
  157. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//351/232/247/351/201/223/344/273/243/347/220/206.md +604 -0
  158. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/ai/345/256/211/345/205/250.md +698 -0
  159. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/api/345/256/211/345/205/250.md +1935 -0
  160. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/csrf/350/267/250/347/253/231/350/257/267/346/261/202/344/274/252/351/200/240.md +952 -0
  161. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/jwt/345/256/211/345/205/250.md +496 -0
  162. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/lfi-rfi/346/226/207/344/273/266/345/214/205/345/220/253.md +1365 -0
  163. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/rce/350/277/234/347/250/213/344/273/243/347/240/201/346/211/247/350/241/214.md +1329 -0
  164. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/sql-nosql/346/263/250/345/205/245.md +1924 -0
  165. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/ssrf/346/234/215/345/212/241/347/253/257/350/257/267/346/261/202/344/274/252/351/200/240.md +1256 -0
  166. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/ssti/346/250/241/346/235/277/346/263/250/345/205/245.md +1151 -0
  167. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/websocket/345/256/211/345/205/250.md +487 -0
  168. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/xss/350/267/250/347/253/231/350/204/232/346/234/254.md +1465 -0
  169. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/xxe/345/256/236/344/275/223/346/263/250/345/205/245.md +815 -0
  170. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//344/270/232/345/212/241/351/200/273/350/276/221/346/274/217/346/264/236.md +594 -0
  171. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//344/272/221/345/256/211/345/205/250/346/274/217/346/264/236.md +561 -0
  172. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//344/276/233/345/272/224/351/223/276/346/224/273/345/207/273.md +399 -0
  173. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//345/216/237/345/236/213/351/223/276/346/261/241/346/237/223.md +401 -0
  174. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//345/274/200/346/224/276/351/207/215/345/256/232/345/220/221.md +396 -0
  175. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//346/226/207/344/273/266/346/274/217/346/264/236.md +0 -0
  176. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//346/241/206/346/236/266/346/274/217/346/264/236.md +2304 -0
  177. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//347/202/271/345/207/273/345/212/253/346/214/201.md +339 -0
  178. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//347/274/223/345/255/230/344/270/216cdn/345/256/211/345/205/250.md +497 -0
  179. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//350/256/244/350/257/201/346/274/217/346/264/236.md +1778 -0
  180. package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//350/257/267/346/261/202/350/265/260/347/247/201.md +854 -0
  181. package/bundled-skills/pentest-tools/src-hunter/references/payloader/index.md +69 -0
  182. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools/web/346/270/227/351/200/217.md +662 -0
  183. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools/windows/346/270/227/351/200/217.md +100 -0
  184. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//344/277/241/346/201/257/346/224/266/351/233/206.md +852 -0
  185. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//345/206/205/347/275/221/346/270/227/351/200/217.md +873 -0
  186. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//345/207/255/350/257/201/347/252/203/345/217/226.md +186 -0
  187. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//345/237/237/346/270/227/351/200/217.md +50 -0
  188. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//345/257/206/347/240/201/346/224/273/345/207/273.md +462 -0
  189. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//346/235/203/351/231/220/346/217/220/345/215/207.md +168 -0
  190. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//346/274/217/346/264/236/345/210/251/347/224/250.md +445 -0
  191. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//347/263/273/347/273/237/345/221/275/344/273/244.md +410 -0
  192. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//347/272/242/351/230/237/345/267/245/345/205/267.md +64 -0
  193. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//347/274/226/347/240/201/350/247/243/347/240/201.md +226 -0
  194. package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//351/232/247/351/201/223/344/273/243/347/220/206.md +84 -0
  195. package/bundled-skills/pentest-tools/src-hunter/references/payloader/waf-bypass.md +6504 -0
  196. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/00-index.md +57 -0
  197. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/api-rest.md +2050 -0
  198. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/arbitrary-x-authz.md +481 -0
  199. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/dos.md +615 -0
  200. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/file-upload.md +1365 -0
  201. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/graphql.md +253 -0
  202. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/http-smuggling.md +924 -0
  203. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/info-disclosure.md +432 -0
  204. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/intranet-postexp.md +4845 -0
  205. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/llm-prompt-injection.md +1394 -0
  206. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/logic-flaws.md +1796 -0
  207. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/mobile.md +397 -0
  208. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/oauth-saml-jwt.md +2504 -0
  209. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/path-traversal.md +1297 -0
  210. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/race-conditions.md +207 -0
  211. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/rce.md +4829 -0
  212. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/sqli.md +1620 -0
  213. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/ssrf-cache-host.md +2098 -0
  214. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/unauth-access.md +330 -0
  215. package/bundled-skills/pentest-tools/src-hunter/references/playbooks/xss.md +1159 -0
  216. package/bundled-skills/pentest-tools/src-hunter/references/templates/report-submission.md +346 -0
  217. package/bundled-skills/pentest-tools/src-hunter/references/tools/mcp-jshook.md +174 -0
  218. package/bundled-skills/protocol-reverse/SKILL.md +108 -0
  219. package/bundled-skills/protocol-reverse/references/protocol-workflow.md +29 -0
  220. package/bundled-skills/pwn-chain/SKILL.md +209 -0
  221. package/bundled-skills/pwn-chain/references/heap-pwn.md +283 -0
  222. package/bundled-skills/pwn-chain/references/kernel-pwn.md +370 -0
  223. package/bundled-skills/pwn-chain/references/stack-pwn.md +312 -0
  224. package/bundled-skills/radare2/SKILL.md +460 -0
  225. package/bundled-skills/radare2/references/cheatsheet.md +129 -0
  226. package/bundled-skills/radio-sdr/SKILL.md +77 -0
  227. package/bundled-skills/radio-sdr/references/sdr-lab-rules.md +6 -0
  228. package/bundled-skills/reverse-browser-automation/SKILL.md +249 -0
  229. package/bundled-skills/reverse-browser-automation/references/playwright-cheatsheet.md +425 -0
  230. package/bundled-skills/reverse-engineering/SKILL.md +213 -0
  231. package/bundled-skills/reverse-engineering/dsl-vm-reverse/SKILL.md +388 -0
  232. package/bundled-skills/reverse-engineering/references/ai-assisted-re.md +149 -0
  233. package/bundled-skills/reverse-engineering/references/anti-analysis.md +836 -0
  234. package/bundled-skills/reverse-engineering/references/awesome-re-resources.md +135 -0
  235. package/bundled-skills/reverse-engineering/references/crypto-decode-tools.md +220 -0
  236. package/bundled-skills/reverse-engineering/references/elf-analysis.md +296 -0
  237. package/bundled-skills/reverse-engineering/references/field-notes.md +540 -0
  238. package/bundled-skills/reverse-engineering/references/go-reverse.md +240 -0
  239. package/bundled-skills/reverse-engineering/references/kernel-driver-reverse.md +298 -0
  240. package/bundled-skills/reverse-engineering/references/languages-compiled.md +587 -0
  241. package/bundled-skills/reverse-engineering/references/languages-platforms.md +486 -0
  242. package/bundled-skills/reverse-engineering/references/languages.md +499 -0
  243. package/bundled-skills/reverse-engineering/references/nonpe-format-cookbook.md +301 -0
  244. package/bundled-skills/reverse-engineering/references/ollvm-deobfuscation.md +501 -0
  245. package/bundled-skills/reverse-engineering/references/patterns-ctf-2.md +397 -0
  246. package/bundled-skills/reverse-engineering/references/patterns-ctf-3.md +719 -0
  247. package/bundled-skills/reverse-engineering/references/patterns-ctf.md +532 -0
  248. package/bundled-skills/reverse-engineering/references/patterns.md +801 -0
  249. package/bundled-skills/reverse-engineering/references/platforms-hardware.md +304 -0
  250. package/bundled-skills/reverse-engineering/references/platforms.md +442 -0
  251. package/bundled-skills/reverse-engineering/references/re-agent-workflow.md +240 -0
  252. package/bundled-skills/reverse-engineering/references/tools-advanced.md +822 -0
  253. package/bundled-skills/reverse-engineering/references/tools-dynamic.md +846 -0
  254. package/bundled-skills/reverse-engineering/references/tools.md +546 -0
  255. package/bundled-skills/supply-chain-security/SKILL.md +180 -0
  256. package/bundled-skills/supply-chain-security/references/cicd-pipeline-security.md +137 -0
  257. package/bundled-skills/supply-chain-security/references/sbom-sca-methodology.md +74 -0
  258. package/bundled-skills/thick-client/SKILL.md +104 -0
  259. package/bundled-skills/thick-client/references/thick-client-checklist.md +9 -0
  260. package/bundled-skills/threat-hunting/SKILL.md +94 -0
  261. package/bundled-skills/threat-hunting/references/hunting-loop.md +5 -0
  262. package/bundled-skills/threat-intelligence/SKILL.md +176 -0
  263. package/bundled-skills/threat-intelligence/references/x-public-intelligence.md +93 -0
  264. package/bundled-skills/tree-ring-memory/SKILL.md +29 -9
  265. package/bundled-skills/wifi-wireless/SKILL.md +80 -0
  266. package/bundled-skills/wifi-wireless/references/wireless-lab-rules.md +6 -0
  267. package/bundled-skills/windows-ad/SKILL.md +109 -0
  268. package/bundled-skills/windows-ad/references/ad-attack-paths.md +12 -0
  269. package/package.json +1 -1
  270. package/skills_index.json +1214 -2
@@ -0,0 +1,486 @@
1
+ # CTF Reverse - Platform & Framework-Specific Techniques
2
+
3
+ ## Table of Contents
4
+ - [Rust serde_json Schema Recovery](#rust-serde_json-schema-recovery)
5
+ - [Android JNI RegisterNatives Obfuscation (HTB WonderSMS)](#android-jni-registernatives-obfuscation-htb-wondersms)
6
+ - [Android DEX Runtime Bytecode Patching via /proc/self/maps (Google CTF 2017)](#android-dex-runtime-bytecode-patching-via-procselfmaps-google-ctf-2017)
7
+ - [Android Native .so Loading Bypass in New Project (Codegate CTF 2018)](#android-native-so-loading-bypass-in-new-project-codegate-ctf-2018)
8
+ - [Frida Firebase Cloud Functions Bypass (BSidesSF 2026)](#frida-firebase-cloud-functions-bypass-bsidessf-2026)
9
+ - [Verilog/Hardware Reverse Engineering (srdnlenCTF 2026)](#veriloghardware-reverse-engineering-srdnlenctf-2026)
10
+ - [Prefix-by-Prefix Hash Reversal (Nullcon 2026)](#prefix-by-prefix-hash-reversal-nullcon-2026)
11
+ - [Ruby/Perl Polyglot Constraint Satisfaction (BearCatCTF 2026)](#rubyperl-polyglot-constraint-satisfaction-bearcatctf-2026)
12
+ - [Electron App + Native Binary Reversing (RootAccess2026)](#electron-app--native-binary-reversing-rootaccess2026)
13
+ - [Node.js npm Package Runtime Introspection (RootAccess2026)](#nodejs-npm-package-runtime-introspection-rootaccess2026)
14
+ - [Frida Android Certificate Pinning Bypass (h1702ctf 2017)](#frida-android-certificate-pinning-bypass-h1702ctf-2017)
15
+ - [Android Anti-Debug: TracerPid, su Binary, System Properties (h1702ctf 2017)](#android-anti-debug-tracerpid-su-binary-system-properties-h1702ctf-2017)
16
+ - [Android Log-Based Key Extraction (HackIT 2017)](#android-log-based-key-extraction-hackit-2017)
17
+ - [Native JNI Key Extraction via Memory Dump and Smali Patching (HackIT 2017)](#native-jni-key-extraction-via-memory-dump-and-smali-patching-hackit-2017)
18
+ - [IBM AS/400 SAVF File EBCDIC Decoding (EKOPARTY 2017)](#ibm-as400-savf-file-ebcdic-decoding-ekoparty-2017)
19
+ - [Intel SGX Enclave Reverse Engineering (Pwn2Win 2017)](#intel-sgx-enclave-reverse-engineering-pwn2win-2017)
20
+
21
+ For core language reversing (Python, BF/esolangs, DOS, OPAL), see [languages.md](languages.md).
22
+ For Go and Rust binary reversing, see [languages-compiled.md](languages-compiled.md).
23
+
24
+ ---
25
+
26
+ ## Rust serde_json Schema Recovery
27
+
28
+ **Pattern (Curly Crab, PascalCTF 2026):** Rust binary reads JSON from stdin, deserializes via serde_json, prints success/failure emoji.
29
+
30
+ **Approach:**
31
+ 1. Disassemble serde-generated `Visitor` implementations
32
+ 2. Each visitor's `visit_map` / `visit_seq` reveals expected keys and types
33
+ 3. Look for string literals in deserializer code (field names like `"pascal"`, `"CTF"`)
34
+ 4. Reconstruct nested JSON schema from visitor call hierarchy
35
+ 5. Identify value types from visitor method names: `visit_str` = string, `visit_u64` = number, `visit_bool` = boolean, `visit_seq` = array
36
+
37
+ ```json
38
+ {"pascal":"CTF","CTF":2026,"crab":{"I_":true,"cr4bs":1337,"crabby":{"l0v3_":["rust"],"r3vv1ng_":42}}}
39
+ ```
40
+
41
+ **Key insight:** Flag is the concatenation of JSON keys in schema order. Reading field names in order reveals the flag.
42
+
43
+ ---
44
+
45
+ ## Android JNI RegisterNatives Obfuscation (HTB WonderSMS)
46
+
47
+ **Pattern:** Android app loads native library with `System.loadLibrary()`, but uses `RegisterNatives` in `JNI_OnLoad` instead of standard JNI naming convention (`Java_com_pkg_Class_method`). This hides which C++ function handles each Java native method.
48
+
49
+ **Identification:**
50
+ ```java
51
+ // In decompiled Java (jadx):
52
+ static { System.loadLibrary("audio"); }
53
+ private final native ProcessedMessage processMessage(SmsMessage msg);
54
+ ```
55
+ Standard JNI would have a symbol `Java_com_rloura_wondersms_SmsReceiver_processMessage`. If that symbol is missing from the `.so`, `RegisterNatives` is being used.
56
+
57
+ **Finding the real handler in Ghidra:**
58
+ 1. Locate `JNI_OnLoad` (exported symbol, always present)
59
+ 2. Trace to `RegisterNatives(env, clazz, methods, count)` call
60
+ 3. The `methods` array contains `{name, signature, fnPtr}` structs
61
+ 4. Follow `fnPtr` to find the actual native function
62
+
63
+ ```c
64
+ // JNI_OnLoad registers functions manually:
65
+ static JNINativeMethod methods[] = {
66
+ {"processMessage", "(Landroid/telephony/SmsMessage;)LProcessedMessage;", (void*)real_handler}
67
+ };
68
+ (*env)->RegisterNatives(env, clazz, methods, 1);
69
+ ```
70
+
71
+ **Architecture selection for analysis:**
72
+ ```bash
73
+ # x86_64 gives best Ghidra decompilation (most similar to desktop code)
74
+ # Extract from APK:
75
+ unzip WonderSMS.apk -d extracted/
76
+ ls extracted/lib/x86_64/ # Prefer this over arm64-v8a for static analysis
77
+ ```
78
+
79
+ **Key insight:** `RegisterNatives` is a deliberate obfuscation technique — it decouples Java method names from native symbol names, making it impossible to find handlers by string search alone. Always check `JNI_OnLoad` first when reversing Android native libraries with stripped symbols.
80
+
81
+ **Detection:** Native method declared in Java + no matching JNI symbol in `.so` + `JNI_OnLoad` present. The library is typically stripped (no debug symbols).
82
+
83
+ ---
84
+
85
+ ## Android DEX Runtime Bytecode Patching via /proc/self/maps (Google CTF 2017)
86
+
87
+ Native JNI library patches Dalvik bytecode in memory at runtime: reads `/proc/self/maps` to find loaded DEX, `mprotect`s it writable, then XOR-patches specific bytecode offsets.
88
+
89
+ ```python
90
+ # Reconstruct the patched DEX offline:
91
+ # 1. Extract the embedded DEX from the APK
92
+ # 2. Find the XOR key and patch offsets in the native .so (IDA/Ghidra)
93
+ # 3. Apply the same patches to the static DEX
94
+ import struct
95
+
96
+ with open('classes.dex', 'rb') as f:
97
+ dex = bytearray(f.read())
98
+
99
+ # Patch 144 bytes starting at offset found in .so
100
+ xor_key = 0x5A
101
+ for i in range(patch_offset, patch_offset + 144):
102
+ dex[i] ^= xor_key
103
+
104
+ # 4. Recompute DEX checksum and SHA-1 hash
105
+ # 5. Decompile with jadx or baksmali
106
+ ```
107
+
108
+ **Key insight:** Native libraries can modify DEX bytecode in memory via `/proc/self/maps` + `mprotect`, making static analysis of the APK alone insufficient. The XOR key and patch offsets must be extracted from the native `.so` to reconstruct the actual runtime DEX. Only works on Dalvik (API < 21), not ART.
109
+
110
+ ---
111
+
112
+ ### Android Native .so Loading Bypass in New Project (Codegate CTF 2018)
113
+
114
+ **Pattern:** Instead of reversing complex JNI validation logic, create a new Android Studio project with matching package name, class name, and native method signature. Load the original `.so` library and call the native function directly, completely bypassing all Java-level checks (random number validation, PIN entry, root detection, etc.).
115
+
116
+ ```java
117
+ // Create new project with same package: com.example.puing.a2018codegate
118
+ package com.example.puing.a2018codegate;
119
+ public class Main4Activity extends AppCompatActivity {
120
+ static { System.loadLibrary("hello-libs"); }
121
+ protected void onCreate(Bundle savedInstanceState) {
122
+ super.onCreate(savedInstanceState);
123
+ String flag = stringFromJNI(); // call native directly, skip all Java validation
124
+ Log.d("FLAG", flag);
125
+ }
126
+ public native String stringFromJNI();
127
+ }
128
+ ```
129
+
130
+ **Key insight:** JNI function names encode the package path and class name. Create a new Android project with matching package/class/method names, include the original `.so`, and call the native function directly. All Java-level validation (random checks, PIN entry, root detection) is bypassed entirely.
131
+
132
+ **Detection:** APK with native `.so` library where the flag or secret is computed inside the native code and returned to Java. The Java layer has multiple validation gates (EditText checks, random number comparisons, device checks) before calling the native method.
133
+
134
+ **References:** Codegate CTF 2018
135
+
136
+ ---
137
+
138
+ ## Frida Firebase Cloud Functions Bypass (BSidesSF 2026)
139
+
140
+ **Pattern (vinyl-drop, doremi):** Android app validates actions (QR codes, purchases) via Firebase Cloud Functions. The expected payload format includes the Firebase UID, a value, and a timestamp. Use Frida to hook the app post-login, construct a valid payload, and call the Cloud Function directly.
141
+
142
+ ```javascript
143
+ // Frida hook to bypass QR validation
144
+ Java.perform(function() {
145
+ var FirebaseFunctions = Java.use('com.google.firebase.functions.FirebaseFunctions');
146
+ var FirebaseAuth = Java.use('com.google.firebase.auth.FirebaseAuth');
147
+
148
+ // Get current user UID after login
149
+ var auth = FirebaseAuth.getInstance();
150
+ var uid = auth.getCurrentUser().getUid();
151
+
152
+ // Construct valid payload: uid + amount + timestamp
153
+ var unixMs = Java.use('java.lang.System').currentTimeMillis();
154
+ var payload = uid + "+100+" + unixMs;
155
+
156
+ // Call the Cloud Function directly
157
+ var functions = FirebaseFunctions.getInstance();
158
+ var data = Java.use('java.util.HashMap').$new();
159
+ data.put("payload", payload);
160
+ functions.getHttpsCallable("validateScanPayload").call(data);
161
+ });
162
+ ```
163
+
164
+ **Key insight:** Firebase AppCheck and Cloud Functions rely on the client to construct valid payloads. Post-authentication, Frida can hook the app to call any Cloud Function with arbitrary parameters, bypassing client-side validation (QR scanning, payment processing, etc.).
165
+
166
+ **When to recognize:** Android app with `google-services.json`, Firebase dependencies in `build.gradle`, Cloud Function calls in decompiled code.
167
+
168
+ **References:** BSidesSF 2026 "vinyl-drop"
169
+
170
+ ---
171
+
172
+ ## Verilog/Hardware Reverse Engineering (srdnlenCTF 2026)
173
+
174
+ **Pattern (Rev Juice):** Verilog HDL source for a vending machine with hidden product unlocked by specific coin insertion and selection sequence.
175
+
176
+ **Approach:**
177
+ 1. Analyze Verilog modules to understand state machine and history tracking
178
+ 2. Identify hidden conditions (e.g., product 8 enabled only when `COINS_HISTORY` array has specific values at specific taps)
179
+ 3. Build timing model for each action type (how many clock cycles each operation takes)
180
+ 4. Work backward from required history values to construct the correct input sequence
181
+
182
+ **Timing model construction:**
183
+ ```python
184
+ # Map each action to its cycle count (determined from Verilog state machines)
185
+ TIMING = {
186
+ "insert_coin": 3, # 3 cycles per coin insertion
187
+ "select_success": 7, # 7 cycles for successful product selection
188
+ "select_fail": 5, # 5 cycles for failed selection attempt
189
+ "cancel_with_coins": 4, # 4 cycles for cancel when coins > 0
190
+ "cancel_at_zero": 2, # 2 cycles for cancel when coins = 0
191
+ }
192
+
193
+ # COINS_HISTORY is a shift register updated each cycle
194
+ # History tap requirements (from Verilog conditions):
195
+ # H[0]=1, H[7]=4, H[28]=H[33]=H[38]=6
196
+ # H[63]=H[73]=2, H[80]=9
197
+ # (H[19]+H[21]+H[56]+H[69]) mod 32 = 0
198
+ ```
199
+
200
+ **Key insight:** Hardware challenges require understanding the exact timing model — each operation takes a specific number of clock cycles, and shift registers record history at fixed tap positions. Work backward from the required tap values to determine what action must have occurred at each cycle. The solution is often a specific sequence notation (e.g., `I9C_SP6_CNL_I2C_SP2_I6C_SP6_SP6_SP5_CNL_I4C_SP1`).
201
+
202
+ **Detection:** Look for `.v` or `.sv` (Verilog/SystemVerilog) files, `always @(posedge clk)` blocks, shift register patterns, and state machine `case` statements with hidden conditions gated on history values.
203
+
204
+ ---
205
+
206
+ ## Prefix-by-Prefix Hash Reversal (Nullcon 2026)
207
+
208
+ See [patterns-ctf-2.md](patterns-ctf-2.md#prefix-hash-brute-force-nullcon-2026) for the full technique. This section covers language-specific considerations.
209
+
210
+ **Language-specific notes:**
211
+ - Hash algorithm may be uncommon (MD2, custom) — don't need to identify it, just match outputs by running the binary
212
+ - Use `subprocess.run()` with `timeout=2` to handle binaries that hang on bad input
213
+ - For stripped binaries, check if `ltrace` reveals the hash function name (e.g., `MD2_Update`)
214
+
215
+ ---
216
+
217
+ ## Ruby/Perl Polyglot Constraint Satisfaction (BearCatCTF 2026)
218
+
219
+ **Pattern (Polly's Key):** A single file valid in both Ruby and Perl. Each language imposes different validation constraints on a 50-character key. Satisfy both simultaneously to decrypt the flag.
220
+
221
+ **Polyglot structure exploits:**
222
+ - Ruby: `=begin`...`=end` is a block comment
223
+ - Perl: `=begin`...`=cut` is POD (Plain Old Documentation), `=end` is ignored
224
+ - Different code runs in each language based on comment block boundaries
225
+
226
+ **Typical constraints:**
227
+ - **Ruby:** Character set must form a mathematical property (e.g., all 50 printable ASCII chars except `^` used exactly once, each satisfying `XOR(val, (val-16) % 257)` is a primitive root mod 257)
228
+ - **Perl:** Ordering constraint via insertion sort inversion count (hardcoded inversion table determines exact permutation)
229
+
230
+ **Solution approach:**
231
+ 1. Find the valid character set (mathematical constraint from one language)
232
+ 2. Use the ordering constraint (from other language) to determine exact arrangement
233
+ 3. Compute key hash (e.g., MD5) and decrypt
234
+
235
+ ```python
236
+ # Determine character ordering from inversion counts
237
+ def reconstruct_from_inversions(chars, inv_counts):
238
+ result = []
239
+ remaining = sorted(chars)
240
+ for i in range(len(chars) - 1, -1, -1):
241
+ # inv_counts[i] = number of elements to the left that are greater
242
+ idx = inv_counts[i]
243
+ result.insert(idx, remaining.pop(i))
244
+ return result
245
+ ```
246
+
247
+ **Key insight:** Polyglot files exploit language-specific comment/block syntax to run different code in each interpreter. The constraints from both languages intersect to uniquely determine the key. Identify which code runs in which language by testing the file with both interpreters and comparing behavior.
248
+
249
+ **Detection:** File that runs under multiple interpreters (`ruby file && perl file`). Challenge mentions "polyglot" or provides a file ending in `.rb` that also looks like Perl.
250
+
251
+ ---
252
+
253
+ ## Electron App + Native Binary Reversing (RootAccess2026)
254
+
255
+ **Pattern (Rootium Browser):** Electron desktop app bundles a native ELF/DLL binary for sensitive operations (vault, crypto, auth). The Electron layer is a wrapper; the real flag logic is in the native binary.
256
+
257
+ **Extraction workflow:**
258
+ 1. **Unpack Electron ASAR archive:**
259
+ ```bash
260
+ # Install ASAR tool
261
+ npm install -g @electron/asar
262
+
263
+ # Extract the app.asar archive
264
+ asar extract resources/app.asar app_extracted/
265
+ ls app_extracted/
266
+ ```
267
+
268
+ 2. **Locate native binary:** Search for ELF/DLL files called from JavaScript:
269
+ ```bash
270
+ # Find native binaries
271
+ find app_extracted/ -name "*.node" -o -name "*.so" -o -name "*vault*" -o -name "*auth*"
272
+
273
+ # Check JS for child_process.spawn or ffi-napi calls
274
+ grep -r "spawn\|execFile\|ffi\|require.*native" app_extracted/
275
+ ```
276
+
277
+ 3. **Reverse the native binary** (XOR + rotation cipher example):
278
+ ```python
279
+ def decrypt_password(encrypted_bytes, key):
280
+ """Common pattern: XOR with constant + bit rotation + key XOR."""
281
+ result = []
282
+ for i, byte in enumerate(encrypted_bytes):
283
+ decrypted = ((byte ^ 0x42) >> 3) ^ key[i % len(key)]
284
+ result.append(chr(decrypted))
285
+ return ''.join(result)
286
+
287
+ def decrypt_flag(encrypted_flag, password):
288
+ """Flag uses password as key with position-dependent rotation."""
289
+ result = []
290
+ for i, byte in enumerate(encrypted_flag):
291
+ key_byte = ord(password[i % len(password)])
292
+ decrypted = ((byte ^ 0x7E) >> (i % 8)) ^ key_byte
293
+ result.append(chr(decrypted))
294
+ return ''.join(result)
295
+ ```
296
+
297
+ **Key insight:** Electron apps are JavaScript wrapping native code. Extract with `asar`, then focus on the native binary. The JS layer often contains the password verification flow in plaintext, revealing what the native binary expects. Look for encrypted data in the `.data` or `.rodata` sections of the ELF.
298
+
299
+ **Detection:** `.asar` files in `resources/` directory, Electron framework files, `package.json` with electron dependency.
300
+
301
+ ---
302
+
303
+ ## Node.js npm Package Runtime Introspection (RootAccess2026)
304
+
305
+ **Pattern (RootAccess CLI):** Obfuscated npm package with RC4 encoding, control flow flattening, and flag split across multiple fragments. Static analysis is impractical — use runtime introspection instead.
306
+
307
+ **Dynamic analysis approach:**
308
+ ```javascript
309
+ #!/usr/bin/env node
310
+
311
+ // 1. Load obfuscated modules
312
+ const cryptoMod = require('target-package/dist/lib/crypto.js');
313
+ const vaultMod = require('target-package/dist/lib/vault.js');
314
+
315
+ // 2. Enumerate all exported properties
316
+ for (const mod of [cryptoMod, vaultMod]) {
317
+ for (const key of Object.keys(mod)) {
318
+ const obj = mod[key];
319
+ console.log(`Export: ${key}`);
320
+ // List all methods including hidden ones
321
+ const props = Object.getOwnPropertyNames(obj);
322
+ const proto = Object.getOwnPropertyNames(obj.prototype || {});
323
+ console.log(' Own:', props);
324
+ console.log(' Proto:', proto);
325
+ }
326
+ }
327
+
328
+ // 3. Extract flag fragments
329
+ const Engine = cryptoMod.CryptoEngine;
330
+ const total = Engine.getTotalFragments();
331
+ let flag = '';
332
+ for (let i = 1; i <= total; i++) {
333
+ flag += Engine.getFragment(i);
334
+ }
335
+ console.log('Flag:', flag);
336
+
337
+ // 4. Check for hidden methods (common: __getFullFlag__, _debug, _raw)
338
+ const hidden = Object.getOwnPropertyNames(Engine)
339
+ .filter(p => p.startsWith('__') || p.startsWith('_'));
340
+ console.log('Hidden methods:', hidden);
341
+ ```
342
+
343
+ **Key insight:** Heavily obfuscated JavaScript (control flow flattening, RC4 string encoding, dead code) makes static analysis prohibitively slow. Runtime introspection via `Object.getOwnPropertyNames()` reveals all methods including hidden ones. The module's own decryption runs automatically when loaded — just call the decoded functions directly.
344
+
345
+ **Detection:** npm package with minified/obfuscated `dist/` directory, challenge says "reverse engineer the CLI tool", `package.json` with custom commands.
346
+
347
+ ---
348
+
349
+ ## Frida Android Certificate Pinning Bypass (h1702ctf 2017)
350
+
351
+ APK uses OkHttp `CertificatePinner` for SSL pinning. Rather than setting up a MITM proxy or patching the APK, use Frida to directly invoke native JNI methods on loaded classes.
352
+
353
+ ```javascript
354
+ Java.perform(function() {
355
+ var Requestor = Java.use("com.h1702ctf.ctfone.Requestor");
356
+ console.log("hName: " + Requestor.hName());
357
+ console.log("hVal: " + Requestor.hVal());
358
+ });
359
+ ```
360
+
361
+ Calling `hName()` and `hVal()` returns the HTTP header name and value needed to bypass the server-side check — no cert pinning bypass required because the secret is in the class methods themselves.
362
+
363
+ **Key insight:** Frida can invoke native JNI methods directly on a loaded class — no need to bypass cert pinning at network layer or fully reverse the native binary.
364
+
365
+ **References:** h1702ctf 2017
366
+
367
+ ---
368
+
369
+ ## Android Anti-Debug: TracerPid, su Binary, System Properties (h1702ctf 2017)
370
+
371
+ Native ARM code implements three sequential anti-analysis checks:
372
+ 1. Read `/proc/self/status` and look for a non-zero `TracerPid` (debugger attached)
373
+ 2. Check for existence of the `su` binary (root detection)
374
+ 3. Read a custom system property via `__system_property_get`
375
+
376
+ The checks gate a required register value computation. Bypass via static analysis: use IDA's graph view to trace the control flow and identify the "happy path" through all three checks, then compute what register values must hold at each branch.
377
+
378
+ **Key insight:** Anti-debug checks in native Android code (TracerPid, su, system properties) can be bypassed by static graph analysis to find correct register values without running a debugger.
379
+
380
+ **References:** h1702ctf 2017
381
+
382
+ ---
383
+
384
+ ## Android Log-Based Key Extraction (HackIT 2017)
385
+
386
+ A secure messenger app logs cryptographic material via Android's `Log.d()`:
387
+ - Curve25519 base agreement value
388
+ - Ephemeral shared key per message
389
+ - Message IDs and shift counters
390
+
391
+ The AES-CBC IV derives from the logged ephemeral/shared value; the key derives from the logged base agreement and an accumulated shift counter. Collect all log entries with `adb logcat`, then reconstruct AES-CBC parameters to decrypt intercepted messages.
392
+
393
+ ```bash
394
+ adb logcat | grep -E "(agreement|ephemeral|shared|key)" > crypto_log.txt
395
+ # Parse log entries to reconstruct: key = f(base_agreement, shift_counter)
396
+ # iv = f(ephemeral_shared)
397
+ ```
398
+
399
+ **Key insight:** Overly verbose logging in security-sensitive apps leaks enough state to reconstruct encryption parameters without any private key access.
400
+
401
+ **References:** HackIT CTF 2017
402
+
403
+ ---
404
+
405
+ ## Native JNI Key Extraction via Memory Dump and Smali Patching (HackIT 2017)
406
+
407
+ A JNI native library handles request signing using an XOR-obfuscated key stored in the `.data` section. The key is deobfuscated at runtime just before use.
408
+
409
+ **Workflow:**
410
+ 1. Load the library in IDA with a GDB stub on a rooted device
411
+ 2. Set a breakpoint after the XOR decryption routine
412
+ 3. Dump the memory region containing the decrypted key
413
+ 4. Use `baksmali` to disassemble the APK's DEX, identify the smali file that constructs the signed POST request
414
+ 5. Patch the smali to change which parameter gets signed, then rebuild with `apktool` and reinstall
415
+
416
+ ```bash
417
+ # Decompile APK
418
+ apktool d target.apk -o target_decompiled/
419
+ # Edit smali: change signed parameter from original to desired value
420
+ # Rebuild
421
+ apktool b target_decompiled/ -o target_patched.apk
422
+ # Sign and install
423
+ ```
424
+
425
+ **Key insight:** For JNI signing: memory-dump the decrypted key region during execution, then patch smali to sign desired parameters — avoids fully reversing the native signing algorithm.
426
+
427
+ **References:** HackIT CTF 2017
428
+
429
+ ---
430
+
431
+ ## IBM AS/400 SAVF File EBCDIC Decoding (EKOPARTY 2017)
432
+
433
+ IBM AS/400 SAVF (Save File) binary files use EBCDIC encoding rather than ASCII. The flag is interleaved with dummy text using a take-2-skip-2 pattern.
434
+
435
+ ```python
436
+ import codecs
437
+
438
+ with open('savefile.savf', 'rb') as f:
439
+ data = f.read()
440
+
441
+ # Convert EBCDIC to ASCII
442
+ ascii_data = data.decode('cp500') # cp500 is IBM EBCDIC International
443
+
444
+ # Filter: keep uppercase letters and underscores (flag charset)
445
+ flag_chars = [c for c in ascii_data if c.isupper() or c == '_']
446
+ # Or apply take-2-skip-2 pattern after decoding
447
+ flag = ''.join(ascii_data[i] for i in range(0, len(ascii_data), 4)
448
+ if ascii_data[i].isupper() or ascii_data[i] == '_')
449
+ ```
450
+
451
+ **Key insight:** EBCDIC encoding is IBM mainframe-native. Examine character distribution after decoding to identify interleaving patterns. Filtering for uppercase letters and underscores is an effective shortcut for CTF flag formats.
452
+
453
+ **References:** EKOPARTY CTF 2017
454
+
455
+ ---
456
+
457
+ ## Intel SGX Enclave Reverse Engineering (Pwn2Win 2017)
458
+
459
+ Intel SGX enclave `.so` files expose an ECALL dispatch table. The enclave logic (including key derivation) is fully reversible with IDA since SGX code is standard x86-64.
460
+
461
+ **Workflow:**
462
+ 1. Locate the ECALL table in the `.so` — a function pointer array indexed by ECALL number
463
+ 2. Decompile ECALLs with IDA to identify the remote attestation protocol
464
+ 3. Implement the attestation protocol manually in Python using `sgx_crypto_wrapper`
465
+ 4. Key derivation: ECDH over P-256 followed by CMAC-AES-128 to derive the session key (SK)
466
+ 5. Decrypt the AES-128-GCM-encrypted flag blob using the derived SK
467
+
468
+ ```python
469
+ from cryptography.hazmat.primitives.asymmetric import ec
470
+ from cryptography.hazmat.primitives import cmac, ciphers
471
+
472
+ # ECDH: derive shared secret from server's P-256 public key
473
+ private_key = ec.generate_private_key(ec.SECP256R1())
474
+ shared_secret = private_key.exchange(ec.ECDH(), server_pub_key)
475
+
476
+ # CMAC-AES-128 key derivation (per SGX attestation spec)
477
+ c = cmac.CMAC(ciphers.algorithms.AES(b'\x00' * 16))
478
+ c.update(shared_secret[:16])
479
+ sk = c.finalize()
480
+
481
+ # Decrypt flag with AES-128-GCM using derived SK
482
+ ```
483
+
484
+ **Key insight:** SGX remote attestation key derivation is deterministic given the enclave measurement — reimplementing the protocol in Python recovers the same session key.
485
+
486
+ **References:** Pwn2Win CTF 2017