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.
- package/bundled-skills/.antigravity-install-manifest.json +47 -1
- package/bundled-skills/api-rate-limit-handler/SKILL.md +282 -0
- package/bundled-skills/api-security/SKILL.md +205 -0
- package/bundled-skills/api-security/references/jwt-oauth-testing.md +123 -0
- package/bundled-skills/api-security/references/rest-graphql-testing.md +137 -0
- package/bundled-skills/apk-reverse/SKILL.md +438 -0
- package/bundled-skills/apk-reverse/references/android-advanced.md +365 -0
- package/bundled-skills/apk-reverse/references/apk-security-checklist.md +230 -0
- package/bundled-skills/apk-reverse/references/frida-bypass-kit.md +70 -0
- package/bundled-skills/apk-reverse/references/frida-cookbook.md +472 -0
- package/bundled-skills/attack-chain/SKILL.md +185 -0
- package/bundled-skills/attack-chain/references/attack-playbooks.md +126 -0
- package/bundled-skills/attack-chain/references/evasion-cheatsheet.md +133 -0
- package/bundled-skills/attack-chain/references/lifecycle-checklist.md +37 -0
- package/bundled-skills/attack-chain/references/phases.md +490 -0
- package/bundled-skills/binary-diff/SKILL.md +320 -0
- package/bundled-skills/binary-diff/references/prompt-template.md +173 -0
- package/bundled-skills/browser-extension-reverse/SKILL.md +99 -0
- package/bundled-skills/browser-extension-reverse/references/extension-analysis.md +10 -0
- package/bundled-skills/case-review/SKILL.md +167 -0
- package/bundled-skills/cloud-k8s/SKILL.md +124 -0
- package/bundled-skills/cloud-k8s/references/k8s-cloud-checklist.md +16 -0
- package/bundled-skills/code-audit/SKILL.md +92 -0
- package/bundled-skills/code-audit/references/sast-review-checklist.md +10 -0
- package/bundled-skills/database-security/SKILL.md +81 -0
- package/bundled-skills/database-security/references/db-misconfig-checklist.md +9 -0
- package/bundled-skills/diagram-generator/SKILL.md +199 -0
- package/bundled-skills/diagram-generator/references/README.md +3 -0
- package/bundled-skills/diagram-generator/references/diagram-patterns.md +254 -0
- package/bundled-skills/digital-forensics/SKILL.md +93 -0
- package/bundled-skills/digital-forensics/references/forensics-triage.md +10 -0
- package/bundled-skills/docs/integrations/jetski-cortex.md +3 -3
- package/bundled-skills/docs/integrations/jetski-gemini-loader/README.md +1 -1
- package/bundled-skills/docs/maintainers/repo-growth-seo.md +1 -1
- package/bundled-skills/docs/maintainers/skills-update-guide.md +1 -1
- package/bundled-skills/docs/sources/sources.md +9 -0
- package/bundled-skills/docs/users/aas-core.md +1 -1
- package/bundled-skills/docs/users/bundles.md +1 -1
- package/bundled-skills/docs/users/claude-code-skills.md +1 -1
- package/bundled-skills/docs/users/gemini-cli-skills.md +1 -1
- package/bundled-skills/docs/users/kiro-integration.md +1 -1
- package/bundled-skills/docs/users/usage.md +3 -3
- package/bundled-skills/docs/users/visual-guide.md +4 -4
- package/bundled-skills/docs-generator/SKILL.md +197 -0
- package/bundled-skills/docs-generator/references/security-report-templates.md +348 -0
- package/bundled-skills/docs-generator/references/templates.md +102 -0
- package/bundled-skills/docs-generator/references/vendor-report-rules.md +263 -0
- package/bundled-skills/dotnet-reverse/SKILL.md +197 -0
- package/bundled-skills/dotnet-reverse/references/common-workflow.md +171 -0
- package/bundled-skills/dotnet-reverse/references/obfuscators.md +145 -0
- package/bundled-skills/dotnet-reverse/references/sharp-tools.md +164 -0
- package/bundled-skills/edr-bypass-re/SKILL.md +248 -0
- package/bundled-skills/edr-bypass-re/references/hook-survey.md +226 -0
- package/bundled-skills/edr-bypass-re/references/telemetry-blinding.md +346 -0
- package/bundled-skills/edr-bypass-re/references/unhook-techniques.md +338 -0
- package/bundled-skills/email-security/SKILL.md +81 -0
- package/bundled-skills/email-security/references/email-auth-checklist.md +8 -0
- package/bundled-skills/firmware-pentest/SKILL.md +381 -0
- package/bundled-skills/firmware-pentest/references/emba-automated-analysis.md +192 -0
- package/bundled-skills/firmware-pentest/references/emulation-and-fuzz.md +337 -0
- package/bundled-skills/firmware-pentest/references/extraction-methodology.md +285 -0
- package/bundled-skills/ghidra-reverse/SKILL.md +98 -0
- package/bundled-skills/ghidra-reverse/references/ghidra-cheatsheet.md +12 -0
- package/bundled-skills/go-rust-reverse/SKILL.md +82 -0
- package/bundled-skills/go-rust-reverse/references/go-rust-notes.md +5 -0
- package/bundled-skills/hardware-security/SKILL.md +80 -0
- package/bundled-skills/hardware-security/references/debug-interface-triage.md +7 -0
- package/bundled-skills/ida-reverse/SKILL.md +401 -0
- package/bundled-skills/ida-reverse/references/LOCAL-SETUP.md +66 -0
- package/bundled-skills/ida-reverse/references/ida-mcp-cheatsheet.md +515 -0
- package/bundled-skills/identity-federation/SKILL.md +81 -0
- package/bundled-skills/identity-federation/references/sso-flow-checklist.md +9 -0
- package/bundled-skills/instructree/SKILL.md +94 -0
- package/bundled-skills/js-reverse/SKILL.md +239 -0
- package/bundled-skills/js-reverse/references/ast-deobfuscation.md +3 -0
- package/bundled-skills/js-reverse/references/automation-entry.md +12 -0
- package/bundled-skills/js-reverse/references/env-patching.md +6 -0
- package/bundled-skills/js-reverse/references/fallbacks.md +8 -0
- package/bundled-skills/js-reverse/references/instrumentation.md +9 -0
- package/bundled-skills/js-reverse/references/local-rebuild.md +11 -0
- package/bundled-skills/js-reverse/references/mcp-task-template.md +30 -0
- package/bundled-skills/js-reverse/references/node-env-rebuild.md +9 -0
- package/bundled-skills/js-reverse/references/output-contract.md +9 -0
- package/bundled-skills/js-reverse/references/task-artifacts.md +11 -0
- package/bundled-skills/js-reverse/references/task-input-template.md +11 -0
- package/bundled-skills/js-reverse/references/tool-defaults.md +7 -0
- package/bundled-skills/llm-security/SKILL.md +160 -0
- package/bundled-skills/llm-security/references/agent-obedience-engineering.md +243 -0
- package/bundled-skills/llm-security/references/agent-security-testing.md +116 -0
- package/bundled-skills/llm-security/references/owasp-llm-top10.md +48 -0
- package/bundled-skills/llm-security/references/prompt-injection-methodology.md +107 -0
- package/bundled-skills/loki-mode/examples/todo-app-generated/backend/package-lock.json +4 -4
- package/bundled-skills/loki-mode/examples/todo-app-generated/backend/package.json +1 -1
- package/bundled-skills/macos-reverse/SKILL.md +85 -0
- package/bundled-skills/macos-reverse/references/macho-triage.md +10 -0
- package/bundled-skills/malware-analysis/SKILL.md +311 -0
- package/bundled-skills/malware-analysis/references/anti-analysis-techniques.md +205 -0
- package/bundled-skills/malware-analysis/references/sandbox-orchestration.md +204 -0
- package/bundled-skills/malware-analysis/references/yara-sigma-rules.md +232 -0
- package/bundled-skills/mobile-reverse/SKILL.md +222 -0
- package/bundled-skills/mobile-reverse/references/anti-detection-bypass.md +182 -0
- package/bundled-skills/mobile-reverse/references/frida-objection-deep.md +218 -0
- package/bundled-skills/mobile-reverse/references/ios-reverse-guide.md +177 -0
- package/bundled-skills/muapi-media/SKILL.md +311 -0
- package/bundled-skills/ot-ics/SKILL.md +117 -0
- package/bundled-skills/ot-ics/references/ot-safe-assessment.md +10 -0
- package/bundled-skills/patch-diff-exploit/SKILL.md +278 -0
- package/bundled-skills/patch-diff-exploit/references/diff-tools-comparison.md +271 -0
- package/bundled-skills/patch-diff-exploit/references/patch-tuesday-workflow.md +253 -0
- package/bundled-skills/patch-diff-exploit/references/root-cause-and-poc.md +198 -0
- package/bundled-skills/pentest-tools/SKILL.md +346 -0
- package/bundled-skills/pentest-tools/references/ai-pentest-agents.md +148 -0
- package/bundled-skills/pentest-tools/references/ai-pentesting-landscape-2026.md +73 -0
- package/bundled-skills/pentest-tools/references/automation-loop-pattern.md +153 -0
- package/bundled-skills/pentest-tools/references/awesome-pentest-digest.md +175 -0
- package/bundled-skills/pentest-tools/references/burpsuite-mcp-guide.md +769 -0
- package/bundled-skills/pentest-tools/references/client-side-lab-playbook.md +155 -0
- package/bundled-skills/pentest-tools/references/kali-mcp-ecosystem.md +119 -0
- package/bundled-skills/pentest-tools/references/msf-protocol.md +169 -0
- package/bundled-skills/pentest-tools/references/network-attack-defense.md +350 -0
- package/bundled-skills/pentest-tools/references/nuclei-guide-2026.md +157 -0
- package/bundled-skills/pentest-tools/references/payloads.md +32 -0
- package/bundled-skills/pentest-tools/references/pentest-ai-agents-matrix.md +117 -0
- package/bundled-skills/pentest-tools/references/pentest-loop.md +270 -0
- package/bundled-skills/pentest-tools/references/recon-pipeline.md +154 -0
- package/bundled-skills/pentest-tools/references/templates/findings.md +21 -0
- package/bundled-skills/pentest-tools/references/templates/progress.md +17 -0
- package/bundled-skills/pentest-tools/references/templates/rules.md +35 -0
- package/bundled-skills/pentest-tools/references/templates/scope.md +29 -0
- package/bundled-skills/pentest-tools/references/templates/task_plan.md +27 -0
- package/bundled-skills/pentest-tools/references/web-attack-cheatsheet.md +387 -0
- package/bundled-skills/pentest-tools/src-hunter/SKILL.md +243 -0
- package/bundled-skills/pentest-tools/src-hunter/references/README.en.md +115 -0
- package/bundled-skills/pentest-tools/src-hunter/references/README.md +148 -0
- package/bundled-skills/pentest-tools/src-hunter/references/dictionaries/00-index.md +44 -0
- package/bundled-skills/pentest-tools/src-hunter/references/dictionaries/chinese-srcfingerprints.md +515 -0
- package/bundled-skills/pentest-tools/src-hunter/references/dictionaries/default-credentials-cn.md +274 -0
- package/bundled-skills/pentest-tools/src-hunter/references/industry/00-index.md +66 -0
- package/bundled-skills/pentest-tools/src-hunter/references/industry/banking-finance.md +338 -0
- package/bundled-skills/pentest-tools/src-hunter/references/industry/telecom-isp.md +315 -0
- package/bundled-skills/pentest-tools/src-hunter/references/methodology/00-index.md +68 -0
- package/bundled-skills/pentest-tools/src-hunter/references/methodology/01-attack-priority.md +143 -0
- package/bundled-skills/pentest-tools/src-hunter/references/methodology/02-bypass-toolkit.md +357 -0
- package/bundled-skills/pentest-tools/src-hunter/references/methodology/03-evidence-discipline.md +205 -0
- package/bundled-skills/pentest-tools/src-hunter/references/methodology/04-control-gap-hunting.md +238 -0
- package/bundled-skills/pentest-tools/src-hunter/references/methodology/05-srctimebox-priority.md +161 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet/adcs/346/224/273/345/207/273.md +254 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet/exchange/346/224/273/345/207/273.md +254 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet/sharepoint/346/224/273/345/207/273.md +113 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/ai/345/256/211/345/205/250.md +698 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/api/345/256/211/345/205/250.md +1935 -0
- 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
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/jwt/345/256/211/345/205/250.md +496 -0
- 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
- 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
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/sql-nosql/346/263/250/345/205/245.md +1924 -0
- 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
- 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
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/websocket/345/256/211/345/205/250.md +487 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/index.md +69 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools/web/346/270/227/351/200/217.md +662 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools/windows/346/270/227/351/200/217.md +100 -0
- 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
- 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
- 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
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//345/237/237/346/270/227/351/200/217.md +50 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/waf-bypass.md +6504 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/00-index.md +57 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/api-rest.md +2050 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/arbitrary-x-authz.md +481 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/dos.md +615 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/file-upload.md +1365 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/graphql.md +253 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/http-smuggling.md +924 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/info-disclosure.md +432 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/intranet-postexp.md +4845 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/llm-prompt-injection.md +1394 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/logic-flaws.md +1796 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/mobile.md +397 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/oauth-saml-jwt.md +2504 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/path-traversal.md +1297 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/race-conditions.md +207 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/rce.md +4829 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/sqli.md +1620 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/ssrf-cache-host.md +2098 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/unauth-access.md +330 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/xss.md +1159 -0
- package/bundled-skills/pentest-tools/src-hunter/references/templates/report-submission.md +346 -0
- package/bundled-skills/pentest-tools/src-hunter/references/tools/mcp-jshook.md +174 -0
- package/bundled-skills/protocol-reverse/SKILL.md +108 -0
- package/bundled-skills/protocol-reverse/references/protocol-workflow.md +29 -0
- package/bundled-skills/pwn-chain/SKILL.md +209 -0
- package/bundled-skills/pwn-chain/references/heap-pwn.md +283 -0
- package/bundled-skills/pwn-chain/references/kernel-pwn.md +370 -0
- package/bundled-skills/pwn-chain/references/stack-pwn.md +312 -0
- package/bundled-skills/radare2/SKILL.md +460 -0
- package/bundled-skills/radare2/references/cheatsheet.md +129 -0
- package/bundled-skills/radio-sdr/SKILL.md +77 -0
- package/bundled-skills/radio-sdr/references/sdr-lab-rules.md +6 -0
- package/bundled-skills/reverse-browser-automation/SKILL.md +249 -0
- package/bundled-skills/reverse-browser-automation/references/playwright-cheatsheet.md +425 -0
- package/bundled-skills/reverse-engineering/SKILL.md +213 -0
- package/bundled-skills/reverse-engineering/dsl-vm-reverse/SKILL.md +388 -0
- package/bundled-skills/reverse-engineering/references/ai-assisted-re.md +149 -0
- package/bundled-skills/reverse-engineering/references/anti-analysis.md +836 -0
- package/bundled-skills/reverse-engineering/references/awesome-re-resources.md +135 -0
- package/bundled-skills/reverse-engineering/references/crypto-decode-tools.md +220 -0
- package/bundled-skills/reverse-engineering/references/elf-analysis.md +296 -0
- package/bundled-skills/reverse-engineering/references/field-notes.md +540 -0
- package/bundled-skills/reverse-engineering/references/go-reverse.md +240 -0
- package/bundled-skills/reverse-engineering/references/kernel-driver-reverse.md +298 -0
- package/bundled-skills/reverse-engineering/references/languages-compiled.md +587 -0
- package/bundled-skills/reverse-engineering/references/languages-platforms.md +486 -0
- package/bundled-skills/reverse-engineering/references/languages.md +499 -0
- package/bundled-skills/reverse-engineering/references/nonpe-format-cookbook.md +301 -0
- package/bundled-skills/reverse-engineering/references/ollvm-deobfuscation.md +501 -0
- package/bundled-skills/reverse-engineering/references/patterns-ctf-2.md +397 -0
- package/bundled-skills/reverse-engineering/references/patterns-ctf-3.md +719 -0
- package/bundled-skills/reverse-engineering/references/patterns-ctf.md +532 -0
- package/bundled-skills/reverse-engineering/references/patterns.md +801 -0
- package/bundled-skills/reverse-engineering/references/platforms-hardware.md +304 -0
- package/bundled-skills/reverse-engineering/references/platforms.md +442 -0
- package/bundled-skills/reverse-engineering/references/re-agent-workflow.md +240 -0
- package/bundled-skills/reverse-engineering/references/tools-advanced.md +822 -0
- package/bundled-skills/reverse-engineering/references/tools-dynamic.md +846 -0
- package/bundled-skills/reverse-engineering/references/tools.md +546 -0
- package/bundled-skills/supply-chain-security/SKILL.md +180 -0
- package/bundled-skills/supply-chain-security/references/cicd-pipeline-security.md +137 -0
- package/bundled-skills/supply-chain-security/references/sbom-sca-methodology.md +74 -0
- package/bundled-skills/thick-client/SKILL.md +104 -0
- package/bundled-skills/thick-client/references/thick-client-checklist.md +9 -0
- package/bundled-skills/threat-hunting/SKILL.md +94 -0
- package/bundled-skills/threat-hunting/references/hunting-loop.md +5 -0
- package/bundled-skills/threat-intelligence/SKILL.md +176 -0
- package/bundled-skills/threat-intelligence/references/x-public-intelligence.md +93 -0
- package/bundled-skills/tree-ring-memory/SKILL.md +29 -9
- package/bundled-skills/wifi-wireless/SKILL.md +80 -0
- package/bundled-skills/wifi-wireless/references/wireless-lab-rules.md +6 -0
- package/bundled-skills/windows-ad/SKILL.md +109 -0
- package/bundled-skills/windows-ad/references/ad-attack-paths.md +12 -0
- package/package.json +1 -1
- package/skills_index.json +1214 -2
|
@@ -0,0 +1,499 @@
|
|
|
1
|
+
# CTF Reverse - Language-Specific Techniques
|
|
2
|
+
|
|
3
|
+
## Table of Contents
|
|
4
|
+
- [Python Bytecode Reversing (dis.dis output)](#python-bytecode-reversing-disdis-output)
|
|
5
|
+
- [Common Pattern: XOR Validation with Split Indices](#common-pattern-xor-validation-with-split-indices)
|
|
6
|
+
- [Bytecode Analysis Tips](#bytecode-analysis-tips)
|
|
7
|
+
- [Python Opcode Remapping](#python-opcode-remapping)
|
|
8
|
+
- [Identification](#identification)
|
|
9
|
+
- [Recovery](#recovery)
|
|
10
|
+
- [Pyarmor 8/9 Static Unpack (1shot)](#pyarmor-89-static-unpack-1shot)
|
|
11
|
+
- [DOS Stub Analysis](#dos-stub-analysis)
|
|
12
|
+
- [HarmonyOS HAP/ABC Reverse (abc-decompiler)](#harmonyos-hapabc-reverse-abc-decompiler)
|
|
13
|
+
- [Brainfuck/Esolangs](#brainfuckesolangs)
|
|
14
|
+
- [Brainfuck Character-by-Character Static Analysis (BSidesSF 2026)](#brainfuck-character-by-character-static-analysis-bsidessf-2026)
|
|
15
|
+
- [Brainfuck Side-Channel via Read Count Oracle (BSidesSF 2026)](#brainfuck-side-channel-via-read-count-oracle-bsidessf-2026)
|
|
16
|
+
- [Brainfuck Comparison Idiom Detection (BSidesSF 2026)](#brainfuck-comparison-idiom-detection-bsidessf-2026)
|
|
17
|
+
- [UEFI Binary Analysis](#uefi-binary-analysis)
|
|
18
|
+
- [Transpilation to C](#transpilation-to-c)
|
|
19
|
+
- [Code Coverage Side-Channel Attack](#code-coverage-side-channel-attack)
|
|
20
|
+
- [Functional Language Reversing (OPAL)](#functional-language-reversing-opal)
|
|
21
|
+
- [Python Version-Specific Bytecode (VuwCTF 2025)](#python-version-specific-bytecode-vuwctf-2025)
|
|
22
|
+
- [Non-Bijective Substitution Cipher Reversing](#non-bijective-substitution-cipher-reversing)
|
|
23
|
+
- [FRACTRAN Program Inversion (Boston Key Party 2016)](#fractran-program-inversion-boston-key-party-2016)
|
|
24
|
+
|
|
25
|
+
For platform/framework-specific techniques (Android, Electron, Node.js, Verilog, Ruby/Perl polyglot, etc.), see [languages-platforms.md](languages-platforms.md).
|
|
26
|
+
For Go and Rust binary reversing, see [languages-compiled.md](languages-compiled.md).
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Python Bytecode Reversing (dis.dis output)
|
|
31
|
+
|
|
32
|
+
### Common Pattern: XOR Validation with Split Indices
|
|
33
|
+
|
|
34
|
+
Challenge gives raw CPython bytecode (dis.dis disassembly). Common pattern:
|
|
35
|
+
1. Check flag length
|
|
36
|
+
2. XOR chars at even indices with key1, compare to list p1
|
|
37
|
+
3. XOR chars at odd indices with key2, compare to list p2
|
|
38
|
+
|
|
39
|
+
**Reversing:**
|
|
40
|
+
```python
|
|
41
|
+
# Given: p1, p2 (expected values), key1, key2 (XOR keys)
|
|
42
|
+
flag = [''] * flag_length
|
|
43
|
+
for i in range(len(p1)):
|
|
44
|
+
flag[2*i] = chr(p1[i] ^ key1) # Even indices
|
|
45
|
+
flag[2*i+1] = chr(p2[i] ^ key2) # Odd indices
|
|
46
|
+
print(''.join(flag))
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Bytecode Analysis Tips
|
|
50
|
+
- `LOAD_CONST` followed by `COMPARE_OP` reveals expected values
|
|
51
|
+
- `BINARY_XOR` identifies the transformation
|
|
52
|
+
- `BUILD_TUPLE`/`BUILD_LIST` with constants = expected output array
|
|
53
|
+
- Loop structure: `FOR_ITER` + `BINARY_SUBSCR` = iterating over flag chars
|
|
54
|
+
- `CALL_FUNCTION` on `ord` = character-to-int conversion
|
|
55
|
+
|
|
56
|
+
**Key insight:** Python bytecode challenges give you the algorithm in explicit stack operations. Focus on `LOAD_CONST` values (expected outputs), `BINARY_XOR`/`BINARY_ADD` (the transform), and `BUILD_TUPLE` (the target array) to reconstruct the validation logic without running the bytecode.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Python Opcode Remapping
|
|
61
|
+
|
|
62
|
+
### Identification
|
|
63
|
+
Decompiler fails with opcode errors.
|
|
64
|
+
|
|
65
|
+
### Recovery
|
|
66
|
+
1. Find modified `opcode.pyc` in PyInstaller bundle
|
|
67
|
+
2. Compare with original Python opcodes
|
|
68
|
+
3. Build mapping: `{new_opcode: original_opcode}`
|
|
69
|
+
4. Patch target .pyc
|
|
70
|
+
5. Decompile normally
|
|
71
|
+
|
|
72
|
+
**Shortcut (Hack.lu CTF 2013):** If the challenge bundles its own modified Python interpreter (e.g., a custom `./py` binary), install `uncompyle2`/`uncompyle6` into that interpreter's environment and decompile using the challenge's own runtime. The modified interpreter understands its own opcode mapping, so standard decompilation tools work without manual opcode recovery.
|
|
73
|
+
|
|
74
|
+
**Tool selection by Python version:** `uncompyle6` supports Python 2.x–3.8. For Python 3.9+ bytecode, use [`pycdc`](https://github.com/zrax/pycdc) (compile from source: `git clone && cmake . && make`).
|
|
75
|
+
|
|
76
|
+
**Key insight:** Opcode remapping breaks all standard decompilers. The fastest fix is to find the modified `opcode.pyc` in the PyInstaller bundle, diff it against the stock Python opcodes, and patch the target `.pyc` back to standard opcodes before decompiling.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Pyarmor 8/9 Static Unpack (1shot)
|
|
81
|
+
|
|
82
|
+
- Tool: `Lil-House/Pyarmor-Static-Unpack-1shot`
|
|
83
|
+
- Use for Pyarmor 8.x/9.x armored scripts without executing sample code
|
|
84
|
+
- Quick signature check: payload typically starts with `PY` + six digits (Pyarmor 7 and earlier `PYARMOR` format is not supported)
|
|
85
|
+
|
|
86
|
+
Workflow:
|
|
87
|
+
1. Ensure target directory contains armored scripts and matching `pyarmor_runtime` library.
|
|
88
|
+
2. Run one-shot unpack to emit `.1shot.` outputs (disassembly + experimental decompile).
|
|
89
|
+
3. Treat disassembly as ground truth; verify decompiled source with bytecode when inconsistent.
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
python /path/to/oneshot/shot.py /path/to/scripts
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Optional flags:
|
|
96
|
+
```bash
|
|
97
|
+
# Specify runtime explicitly
|
|
98
|
+
python /path/to/oneshot/shot.py /path/to/scripts -r /path/to/pyarmor_runtime.so
|
|
99
|
+
|
|
100
|
+
# Write outputs to another directory
|
|
101
|
+
python /path/to/oneshot/shot.py /path/to/scripts -o /path/to/output
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Notes:
|
|
105
|
+
- `oneshot/pyarmor-1shot` executable must exist before running `shot.py`.
|
|
106
|
+
- PyInstaller bundles or archives should be unpacked first, then processed with 1shot.
|
|
107
|
+
|
|
108
|
+
**Key insight:** Pyarmor 8/9 wraps scripts with runtime decryption. The 1shot tool statically unpacks without execution by directly processing the armored bytecode and `pyarmor_runtime` library. Treat the disassembly output as ground truth when the experimental decompiled source looks inconsistent.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## DOS Stub Analysis
|
|
113
|
+
|
|
114
|
+
PE files can hide code in DOS stub:
|
|
115
|
+
1. Check for large DOS stub in Ghidra/IDA
|
|
116
|
+
2. Run in DOSBox
|
|
117
|
+
3. Load in IDA as 16-bit DOS
|
|
118
|
+
4. Look for `int 16h` (keyboard input)
|
|
119
|
+
|
|
120
|
+
**Key insight:** PE files can embed a fully functional 16-bit DOS program in the DOS stub (before the PE header). If the stub is unusually large, load it in IDA as 16-bit DOS or run it in DOSBox -- the challenge logic may live entirely in the stub.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## HarmonyOS HAP/ABC Reverse (abc-decompiler)
|
|
125
|
+
|
|
126
|
+
- Target files: `.hap` package and embedded `.abc` bytecode
|
|
127
|
+
- Tool: `https://github.com/ohos-decompiler/abc-decompiler`
|
|
128
|
+
- Download `jadx-dev-all.jar` from releases
|
|
129
|
+
|
|
130
|
+
Critical startup note:
|
|
131
|
+
- `java -jar` may enter GUI mode
|
|
132
|
+
- For CLI mode, always use:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
java -cp "./jadx-dev-all.jar" jadx.cli.JadxCLI [options] <input>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Most common commands:
|
|
139
|
+
```bash
|
|
140
|
+
# Basic decompile to directory
|
|
141
|
+
java -cp "./jadx-dev-all.jar" jadx.cli.JadxCLI -d "out" ".abc"
|
|
142
|
+
|
|
143
|
+
# Decompile .abc (recommended for this scenario)
|
|
144
|
+
java -cp "./jadx-dev-all.jar" jadx.cli.JadxCLI -m simple -d "out_hap" "modules.abc"
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Recommended parameters for this challenge:
|
|
148
|
+
- `-m simple`: reduce high-level reconstruction to avoid SSA/PHI-heavy failures
|
|
149
|
+
- `--log-level ERROR`: keep only critical errors
|
|
150
|
+
- Full recommended command:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
java -cp "./jadx-dev-all.jar" jadx.cli.JadxCLI -m simple --log-level ERROR -d "out_abc_simple" "modules.abc"
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Parameter quick reference:
|
|
157
|
+
- `-d` output directory
|
|
158
|
+
- `--help` help
|
|
159
|
+
|
|
160
|
+
Notes:
|
|
161
|
+
- `.hap` is a package: extract it first (zip), then locate and analyze `.abc`
|
|
162
|
+
- Quote paths containing spaces or non-ASCII characters
|
|
163
|
+
- Use a new output directory name per run to avoid stale results
|
|
164
|
+
- Errors do not always mean full failure; prioritize `out_xxx/sources/`
|
|
165
|
+
- If `auto` fails, switch to `-m simple` first
|
|
166
|
+
|
|
167
|
+
Standard workflow:
|
|
168
|
+
1. Run with `-m simple --log-level ERROR`
|
|
169
|
+
2. Inspect key business files in output (for example `pages/Index.java`)
|
|
170
|
+
3. If cleaner output is needed, retry with `-m auto` or `-m restructure`
|
|
171
|
+
4. If some methods still fail, keep the `simple` output and continue logic analysis via alternate paths
|
|
172
|
+
|
|
173
|
+
**Key insight:** HarmonyOS `.hap` packages are ZIP archives containing `.abc` bytecode. Use the abc-decompiler's CLI mode (`jadx.cli.JadxCLI`) with `-m simple` for the most reliable decompilation -- GUI mode may launch instead of processing files.
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Brainfuck/Esolangs
|
|
178
|
+
|
|
179
|
+
- Check if compiled with known tools (BF-it)
|
|
180
|
+
- Understand tape/memory model
|
|
181
|
+
- Static analysis of cell operations
|
|
182
|
+
|
|
183
|
+
### Brainfuck Character-by-Character Static Analysis (BSidesSF 2026)
|
|
184
|
+
|
|
185
|
+
**Pattern (i-love-my-bf-part1):** BF programs that validate input character-by-character follow a recognizable pattern: `,` (read char) followed by a sequence of `+` operations whose count equals the expected ASCII value of that character.
|
|
186
|
+
|
|
187
|
+
**Extraction technique:**
|
|
188
|
+
```python
|
|
189
|
+
import re
|
|
190
|
+
|
|
191
|
+
bf_code = open('challenge.bf', 'r').read()
|
|
192
|
+
|
|
193
|
+
# Split on comma (input read) — each segment handles one character
|
|
194
|
+
segments = bf_code.split(',')
|
|
195
|
+
expected = []
|
|
196
|
+
|
|
197
|
+
for seg in segments[1:]: # Skip preamble before first comma
|
|
198
|
+
# Count consecutive '+' operations before any branch/output
|
|
199
|
+
plus_count = 0
|
|
200
|
+
for ch in seg:
|
|
201
|
+
if ch == '+':
|
|
202
|
+
plus_count += 1
|
|
203
|
+
elif ch in '-.[]><':
|
|
204
|
+
break # Stop at first non-increment operation
|
|
205
|
+
if plus_count > 0:
|
|
206
|
+
expected.append(chr(plus_count % 256))
|
|
207
|
+
|
|
208
|
+
flag = ''.join(expected)
|
|
209
|
+
print(f"Flag: {flag}")
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
**Variations:**
|
|
213
|
+
- `-` operations: character value = `256 - minus_count`
|
|
214
|
+
- Mixed `+`/`-`: net increment determines value
|
|
215
|
+
- Cell reset (`[-]`) between characters: each segment is independent
|
|
216
|
+
- Loop-based multiplication: `[->>+++<<]` multiplies by 3 — count the inner operations
|
|
217
|
+
|
|
218
|
+
**Detection:** Large BF file with repeating pattern of `,` followed by many `+` or `-` characters, then a comparison structure (`[-]` or `[->+<]` patterns).
|
|
219
|
+
|
|
220
|
+
**Key insight:** BF programs that check input are structurally simple — each input byte is compared against a constant built by incrementing a cell. Extract the increment counts to recover the expected input without running the program.
|
|
221
|
+
|
|
222
|
+
**References:** BSidesSF 2026 "i-love-my-bf-part1"
|
|
223
|
+
|
|
224
|
+
### Brainfuck Side-Channel via Read Count Oracle (BSidesSF 2026)
|
|
225
|
+
|
|
226
|
+
**Pattern (i-love-my-bf-part2):** When a BF program validates input character-by-character, a correct character causes the program to consume MORE input bytes (advancing to check the next position). By counting how many `,` (read) operations execute for each candidate input, the character that triggers the most reads is correct.
|
|
227
|
+
|
|
228
|
+
```python
|
|
229
|
+
import itertools
|
|
230
|
+
|
|
231
|
+
def bytes_read_running_bf(bf_code, input_iter, braces):
|
|
232
|
+
"""Run BF and count how many input bytes were consumed."""
|
|
233
|
+
tape = [0] * 30000
|
|
234
|
+
ptr = ip = reads = 0
|
|
235
|
+
input_list = list(input_iter)
|
|
236
|
+
input_idx = 0
|
|
237
|
+
while ip < len(bf_code):
|
|
238
|
+
c = bf_code[ip]
|
|
239
|
+
if c == ',':
|
|
240
|
+
if input_idx < len(input_list):
|
|
241
|
+
tape[ptr] = input_list[input_idx]
|
|
242
|
+
input_idx += 1
|
|
243
|
+
reads += 1
|
|
244
|
+
else:
|
|
245
|
+
return reads
|
|
246
|
+
elif c == '.': pass
|
|
247
|
+
elif c == '+': tape[ptr] = (tape[ptr] + 1) % 256
|
|
248
|
+
elif c == '-': tape[ptr] = (tape[ptr] - 1) % 256
|
|
249
|
+
elif c == '>': ptr += 1
|
|
250
|
+
elif c == '<': ptr -= 1
|
|
251
|
+
elif c == '[' and tape[ptr] == 0: ip = braces[ip]
|
|
252
|
+
elif c == ']' and tape[ptr] != 0: ip = braces[ip]
|
|
253
|
+
ip += 1
|
|
254
|
+
return reads
|
|
255
|
+
|
|
256
|
+
# Recover flag character by character
|
|
257
|
+
PRINTABLE = list(range(32, 127))
|
|
258
|
+
flag = []
|
|
259
|
+
for pos in range(50): # max flag length
|
|
260
|
+
best_byte = None
|
|
261
|
+
max_reads = 0
|
|
262
|
+
baseline = bytes_read_running_bf(bf, flag + [PRINTABLE[0]], braces)
|
|
263
|
+
for b in PRINTABLE[1:]:
|
|
264
|
+
reads = bytes_read_running_bf(bf, flag + [b], braces)
|
|
265
|
+
if reads > baseline:
|
|
266
|
+
best_byte = b
|
|
267
|
+
break
|
|
268
|
+
if best_byte is None:
|
|
269
|
+
break
|
|
270
|
+
flag.append(best_byte)
|
|
271
|
+
print(bytes(flag).decode())
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
**Key insight:** BF input validation programs are sequential — they read one character, check it, and only read the next if it matches. The character causing more reads is correct because the program advances past the validation gate to check the next position.
|
|
275
|
+
|
|
276
|
+
**References:** BSidesSF 2026 "i-love-my-bf-part2"
|
|
277
|
+
|
|
278
|
+
### Brainfuck Comparison Idiom Detection (BSidesSF 2026)
|
|
279
|
+
|
|
280
|
+
**Pattern (i-love-my-bf-part3):** BF programs compiled from higher-level languages use recognizable comparison idioms. The equality check `<[-<->] +<[>-<[-]]>[-<+>]` compares two adjacent cells. By instrumenting a BF interpreter to detect this pattern during execution, you can extract the comparison operands (expected flag bytes) directly from the tape.
|
|
281
|
+
|
|
282
|
+
```python
|
|
283
|
+
EQ_PATTERN = "<[-<->] +<[>-<[-]]>[-<+>]"
|
|
284
|
+
|
|
285
|
+
def instrumented_bf_run(bf_code, dummy_input):
|
|
286
|
+
"""Run BF, detect equality comparisons, extract operands."""
|
|
287
|
+
tape = [0] * 30000
|
|
288
|
+
ptr = ip = 0
|
|
289
|
+
comparisons = []
|
|
290
|
+
|
|
291
|
+
while ip < len(bf_code):
|
|
292
|
+
# Check if current position starts the eq pattern
|
|
293
|
+
if bf_code[ip:ip+len(EQ_PATTERN)] == EQ_PATTERN:
|
|
294
|
+
# The two cells being compared are at ptr-2 and ptr-1
|
|
295
|
+
lhs = tape[ptr - 2] # User input byte
|
|
296
|
+
rhs = tape[ptr - 1] # Expected byte
|
|
297
|
+
comparisons.append((chr(lhs), chr(rhs)))
|
|
298
|
+
# ... normal BF execution ...
|
|
299
|
+
ip += 1
|
|
300
|
+
|
|
301
|
+
return comparisons
|
|
302
|
+
|
|
303
|
+
# Expected bytes from comparisons reveal the flag
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
**Key insight:** Compiled BF programs reuse fixed idioms for operations like equality comparison, conditional branching, and loops. Pattern-matching these idioms in the BF source or during execution lets you extract constants without fully understanding the program logic.
|
|
307
|
+
|
|
308
|
+
**Common BF idioms:**
|
|
309
|
+
- `[-]` — clear cell (set to 0)
|
|
310
|
+
- `[->+<]` — move cell right
|
|
311
|
+
- `<[-<->] +<[>-<[-]]>[-<+>]` — equality comparison of two cells
|
|
312
|
+
|
|
313
|
+
**References:** BSidesSF 2026 "i-love-my-bf-part3"
|
|
314
|
+
|
|
315
|
+
---
|
|
316
|
+
|
|
317
|
+
## UEFI Binary Analysis
|
|
318
|
+
|
|
319
|
+
```bash
|
|
320
|
+
7z x firmware.bin -oextracted/
|
|
321
|
+
file extracted/* | grep "PE32+"
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
- Bootkit replaces boot loader
|
|
325
|
+
- Custom VM protects decryption
|
|
326
|
+
- Lift VM bytecode to C
|
|
327
|
+
|
|
328
|
+
**Key insight:** UEFI binaries are PE32+ executables. Extract the firmware with `7z`, identify PE files with `file`, and load them in Ghidra/IDA. Bootkits replace the boot loader, so focus on DXE drivers and boot services protocols for the challenge logic.
|
|
329
|
+
|
|
330
|
+
---
|
|
331
|
+
|
|
332
|
+
## Transpilation to C
|
|
333
|
+
|
|
334
|
+
For heavily obfuscated code:
|
|
335
|
+
```python
|
|
336
|
+
for opcode, args in instructions:
|
|
337
|
+
if opcode == 'XOR':
|
|
338
|
+
print(f"r{args[0]} ^= r{args[1]};")
|
|
339
|
+
elif opcode == 'ADD':
|
|
340
|
+
print(f"r{args[0]} += r{args[1]};")
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
Compile with `-O3` for constant folding.
|
|
344
|
+
|
|
345
|
+
**Key insight:** Transpiling obfuscated VM bytecode to C and compiling with `-O3` lets the compiler's constant folding and dead code elimination simplify the algorithm automatically. This is faster than manual deobfuscation for complex instruction sets.
|
|
346
|
+
|
|
347
|
+
---
|
|
348
|
+
|
|
349
|
+
## Code Coverage Side-Channel Attack
|
|
350
|
+
|
|
351
|
+
**Pattern (Coverup, Nullcon 2026):** PHP challenge provides XDebug code coverage data alongside encrypted output.
|
|
352
|
+
|
|
353
|
+
**How it works:**
|
|
354
|
+
- PHP code uses `xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE | XDEBUG_CC_BRANCH_CHECK)`
|
|
355
|
+
- Encryption uses data-dependent branches: `if ($xored == chr(0)) ... if ($xored == chr(1)) ...`
|
|
356
|
+
- Coverage JSON reveals which branches were executed during encryption
|
|
357
|
+
- This leaks the set of XOR intermediate values that occurred
|
|
358
|
+
|
|
359
|
+
**Exploitation:**
|
|
360
|
+
```python
|
|
361
|
+
import json
|
|
362
|
+
|
|
363
|
+
# Load coverage data
|
|
364
|
+
with open('coverage.json') as f:
|
|
365
|
+
cov = json.load(f)
|
|
366
|
+
|
|
367
|
+
# Extract executed XOR values from branch coverage
|
|
368
|
+
executed_xored = set()
|
|
369
|
+
for line_no, hit_count in cov['encrypt.php']['lines'].items():
|
|
370
|
+
if hit_count > 0:
|
|
371
|
+
# Map line numbers to the chr(N) value in the if-statement
|
|
372
|
+
executed_xored.add(extract_value_from_line(line_no))
|
|
373
|
+
|
|
374
|
+
# For each position, filter candidates
|
|
375
|
+
for pos in range(len(ciphertext)):
|
|
376
|
+
candidates = []
|
|
377
|
+
for key_byte in range(256):
|
|
378
|
+
xored = plaintext_byte ^ key_byte # or reverse S-box lookup
|
|
379
|
+
if xored in executed_xored:
|
|
380
|
+
candidates.append(key_byte)
|
|
381
|
+
# Combined with known plaintext prefix, this uniquely determines key
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
**Key insight:** Code coverage is a powerful oracle — it tells you which conditional paths were taken. Any encryption with data-dependent branching leaks information through coverage.
|
|
385
|
+
|
|
386
|
+
**Mitigation detection:** Look for branchless/constant-time crypto implementations that defeat this attack.
|
|
387
|
+
|
|
388
|
+
---
|
|
389
|
+
|
|
390
|
+
## Functional Language Reversing (OPAL)
|
|
391
|
+
|
|
392
|
+
**Pattern (Opalist, Nullcon 2026):** Binary compiled from OPAL (Optimized Applicative Language), a purely functional language.
|
|
393
|
+
|
|
394
|
+
**Recognition markers:**
|
|
395
|
+
- `.impl` (implementation) and `.sign` (signature) source files
|
|
396
|
+
- `IMPLEMENTATION` / `SIGNATURE` keywords
|
|
397
|
+
- Nested `IF..THEN..ELSE..FI` structures
|
|
398
|
+
- Functions named `f1`, `f2`, ... `fN` (numeric naming)
|
|
399
|
+
- Heavy use of `seq[nat]`, `string`, `denotation` types
|
|
400
|
+
|
|
401
|
+
**Reversing approach:**
|
|
402
|
+
1. Pure functions are mathematically invertible — reverse each step in the pipeline
|
|
403
|
+
2. Identify the transformation chain: `f_final(f_n(...f_2(f_1(input))...))`
|
|
404
|
+
3. For each function, build the inverse
|
|
405
|
+
|
|
406
|
+
**Aggregate brute-force for scramble functions:**
|
|
407
|
+
When a transformation accumulates state that depends on original (unknown) values:
|
|
408
|
+
```python
|
|
409
|
+
# Example: f8 adds cumulative offset based on parity of original bytes
|
|
410
|
+
# offset contribution per element depends on whether pre-scramble value is even/odd
|
|
411
|
+
# Total offset S = sum of contributions, but S mod 256 has only 256 possibilities
|
|
412
|
+
|
|
413
|
+
decoded = base64_decode(target)
|
|
414
|
+
for total_offset_S in range(256):
|
|
415
|
+
candidate = [(b - total_offset_S) % 256 for b in decoded]
|
|
416
|
+
# Verify: recompute S from candidate values
|
|
417
|
+
recomputed_S = sum(contribution(i, candidate[i]) for i in range(len(candidate))) % 256
|
|
418
|
+
if recomputed_S == total_offset_S:
|
|
419
|
+
# Apply remaining inverse steps
|
|
420
|
+
result = apply_inverse_substitution(candidate)
|
|
421
|
+
if all(32 <= c < 127 for c in result):
|
|
422
|
+
print(bytes(result))
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
**Key lesson:** When a scramble function has a chicken-and-egg dependency (result depends on original, which is unknown), brute-force the aggregate effect (often mod 256 = 256 possibilities) rather than all possible states (exponential).
|
|
426
|
+
|
|
427
|
+
---
|
|
428
|
+
|
|
429
|
+
## Python Version-Specific Bytecode (VuwCTF 2025)
|
|
430
|
+
|
|
431
|
+
**Pattern (A New Machine):** Challenge targets specific Python version (e.g., 3.14.0 alpha).
|
|
432
|
+
|
|
433
|
+
**Key requirement:** Compile that exact Python version to disassemble bytecode — alpha/beta versions have different opcodes than stable releases.
|
|
434
|
+
|
|
435
|
+
```bash
|
|
436
|
+
# Build specific Python version
|
|
437
|
+
wget https://www.python.org/ftp/python/3.14.0/Python-3.14.0a4.tar.xz
|
|
438
|
+
tar xf Python-3.14.0a4.tar.xz
|
|
439
|
+
cd Python-3.14.0a4 && ./configure && make -j$(nproc)
|
|
440
|
+
./python -c "import dis, marshal; dis.dis(marshal.loads(open('challenge.pyc','rb').read()[16:]))"
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
**Common validation:** Flag compared against tuple of squared ASCII values:
|
|
444
|
+
```python
|
|
445
|
+
# Reverse: flag[i] = sqrt(expected_tuple[i])
|
|
446
|
+
import math
|
|
447
|
+
flag = ''.join(chr(int(math.isqrt(v))) for v in expected_values)
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
---
|
|
451
|
+
|
|
452
|
+
## Non-Bijective Substitution Cipher Reversing
|
|
453
|
+
|
|
454
|
+
**Pattern (Coverup, Nullcon 2026):** S-box/substitution table has collisions (multiple inputs map to same output).
|
|
455
|
+
|
|
456
|
+
**Detection:**
|
|
457
|
+
```python
|
|
458
|
+
sbox = [...] # substitution table
|
|
459
|
+
if len(set(sbox)) < len(sbox):
|
|
460
|
+
print("Non-bijective! Collisions exist.")
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
**Building reverse lookup:**
|
|
464
|
+
```python
|
|
465
|
+
from collections import defaultdict
|
|
466
|
+
rev_sub = defaultdict(list)
|
|
467
|
+
for i, v in enumerate(sbox):
|
|
468
|
+
rev_sub[v].append(i)
|
|
469
|
+
# rev_sub[output] = [list of possible inputs]
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
**Disambiguation strategies:**
|
|
473
|
+
1. Known plaintext format (e.g., `ENO{`, `flag{`) fixes key bytes at known positions
|
|
474
|
+
2. Side-channel data (code coverage, timing) eliminates impossible candidates
|
|
475
|
+
3. Printable ASCII constraint (32-126) reduces candidate space
|
|
476
|
+
4. Re-encrypt candidates and verify against known ciphertext
|
|
477
|
+
|
|
478
|
+
---
|
|
479
|
+
|
|
480
|
+
## FRACTRAN Program Inversion (Boston Key Party 2016)
|
|
481
|
+
|
|
482
|
+
FRACTRAN: an esoteric language where computation is iterated multiplication by a fraction table. Input is encoded as prime factorization (ASCII values as exponents of sequential primes). To invert: swap each fraction's numerator and denominator, run the "success" output backward through the inverted program.
|
|
483
|
+
|
|
484
|
+
```python
|
|
485
|
+
# Original: for each step, find first fraction where n*frac is integer
|
|
486
|
+
def fractran_step(n, fractions):
|
|
487
|
+
for num, den in fractions:
|
|
488
|
+
if (n * num) % den == 0:
|
|
489
|
+
return (n * num) // den
|
|
490
|
+
return None # Halt
|
|
491
|
+
|
|
492
|
+
# Inversion: swap num/denom in fraction table
|
|
493
|
+
inverted = [(d, n) for n, d in fraction_table]
|
|
494
|
+
# Run target output through inverted program to recover input
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
**Key insight:** FRACTRAN programs can be inverted by swapping numerators and denominators. The prime factorization encoding is the key to understanding I/O -- factor the result to extract exponents of sequential primes, map to ASCII.
|
|
498
|
+
|
|
499
|
+
**Detection:** Challenge mentions fractions, prime factorization, or provides a list of rational numbers.
|