opencode-skills-collection 4.0.42 → 4.0.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled-skills/.antigravity-install-manifest.json +49 -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/lore/SKILL.md +104 -298
- package/bundled-skills/lore/references/audit-template.md +21 -4
- package/bundled-skills/lore/references/compatibility.md +51 -121
- package/bundled-skills/lore/references/config.md +22 -23
- package/bundled-skills/lore/references/entry-format.md +33 -3
- package/bundled-skills/lore/references/history-command.md +98 -2
- package/bundled-skills/lore/references/platform-mirrors.md +45 -16
- package/bundled-skills/lore/references/stale-new-markers.md +10 -8
- package/bundled-skills/lore/references/summary-template.md +8 -1
- package/bundled-skills/lore/references/workflows.md +192 -0
- package/bundled-skills/lore/scripts/README.md +14 -13
- package/bundled-skills/lore/scripts/README.zh-CN.md +14 -13
- package/bundled-skills/lore/scripts/find_duplicates.py +14 -4
- package/bundled-skills/lore/scripts/find_stale.py +68 -16
- package/bundled-skills/lore/scripts/history.py +235 -23
- package/bundled-skills/lore/scripts/id_hash.py +7 -4
- package/bundled-skills/lore/scripts/list_entries.py +82 -13
- 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/poka-yoke/SKILL.md +172 -0
- package/bundled-skills/project-state-governor/SKILL.md +1 -1
- package/bundled-skills/project-state-governor/references/project-state-schema.md +1 -1
- 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/spec-driven-loop/SKILL.md +203 -0
- package/bundled-skills/spec-driven-loop/references/agent-and-judge-contracts.md +120 -0
- package/bundled-skills/spec-driven-loop/references/document-templates.md +184 -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 +1281 -3
- package/bundled-skills/lore/README.md +0 -386
- package/bundled-skills/lore/README.zh-CN.md +0 -386
- package/bundled-skills/lore/WORKFLOWS.md +0 -216
- package/bundled-skills/lore/WORKFLOWS.zh-CN.md +0 -216
|
@@ -0,0 +1,546 @@
|
|
|
1
|
+
# CTF Reverse - Tools Reference
|
|
2
|
+
|
|
3
|
+
## Table of Contents
|
|
4
|
+
- [GDB](#gdb)
|
|
5
|
+
- [Basic Commands](#basic-commands)
|
|
6
|
+
- [PIE Binary Debugging](#pie-binary-debugging)
|
|
7
|
+
- [One-liner Automation](#one-liner-automation)
|
|
8
|
+
- [Memory Examination](#memory-examination)
|
|
9
|
+
- [Radare2](#radare2)
|
|
10
|
+
- [Basic Session](#basic-session)
|
|
11
|
+
- [r2pipe Automation](#r2pipe-automation)
|
|
12
|
+
- [Ghidra](#ghidra)
|
|
13
|
+
- [Headless Analysis](#headless-analysis)
|
|
14
|
+
- [Emulator for Decryption](#emulator-for-decryption)
|
|
15
|
+
- [MCP Commands](#mcp-commands)
|
|
16
|
+
- [Unicorn Emulation](#unicorn-emulation)
|
|
17
|
+
- [Basic Setup](#basic-setup)
|
|
18
|
+
- [Mixed-Mode (64 to 32) Switch](#mixed-mode-64-to-32-switch)
|
|
19
|
+
- [Register Tracing Hook](#register-tracing-hook)
|
|
20
|
+
- [Track Register Changes](#track-register-changes)
|
|
21
|
+
- [Python Bytecode](#python-bytecode)
|
|
22
|
+
- [Disassembly](#disassembly)
|
|
23
|
+
- [Extract Constants](#extract-constants)
|
|
24
|
+
- [Pyarmor Static Unpack (1shot)](#pyarmor-static-unpack-1shot)
|
|
25
|
+
- [WASM Analysis](#wasm-analysis)
|
|
26
|
+
- [Decompile to C](#decompile-to-c)
|
|
27
|
+
- [Common Patterns](#common-patterns)
|
|
28
|
+
- [Android APK](#android-apk)
|
|
29
|
+
- [Extraction](#extraction)
|
|
30
|
+
- [Key Locations](#key-locations)
|
|
31
|
+
- [Search](#search)
|
|
32
|
+
- [Flutter APK (Blutter)](#flutter-apk-blutter)
|
|
33
|
+
- [HarmonyOS HAP/ABC (abc-decompiler)](#harmonyos-hapabc-abc-decompiler)
|
|
34
|
+
- [.NET Analysis](#net-analysis)
|
|
35
|
+
- [Tools](#tools)
|
|
36
|
+
- [Two-Stage XOR + AES-CBC Decode Pattern (Codegate 2013)](#two-stage-xor--aes-cbc-decode-pattern-codegate-2013)
|
|
37
|
+
- [NativeAOT](#nativeaot)
|
|
38
|
+
- [Packed Binaries](#packed-binaries)
|
|
39
|
+
- [UPX](#upx)
|
|
40
|
+
- [Custom Packers](#custom-packers)
|
|
41
|
+
- [PyInstaller](#pyinstaller)
|
|
42
|
+
- [LLVM IR](#llvm-ir)
|
|
43
|
+
- [Convert to Assembly](#convert-to-assembly)
|
|
44
|
+
- [RISC-V Binary Analysis (EHAX 2026)](#risc-v-binary-analysis-ehax-2026)
|
|
45
|
+
- [Binary Ninja](#binary-ninja)
|
|
46
|
+
- [Decompiler Comparison with dogbolt.org](#decompiler-comparison-with-dogboltorg)
|
|
47
|
+
- [Useful Commands](#useful-commands)
|
|
48
|
+
|
|
49
|
+
For dynamic instrumentation tools (Frida, angr, lldb, x64dbg), see [tools-dynamic.md](tools-dynamic.md).
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## GDB
|
|
54
|
+
|
|
55
|
+
### Basic Commands
|
|
56
|
+
```bash
|
|
57
|
+
gdb ./binary
|
|
58
|
+
run # Run program
|
|
59
|
+
start # Run to main
|
|
60
|
+
b *0x401234 # Breakpoint at address
|
|
61
|
+
b *main+0x100 # Relative breakpoint
|
|
62
|
+
c # Continue
|
|
63
|
+
si # Step instruction
|
|
64
|
+
ni # Next instruction (skip calls)
|
|
65
|
+
x/s $rsi # Examine string
|
|
66
|
+
x/20x $rsp # Examine stack
|
|
67
|
+
info registers # Show registers
|
|
68
|
+
set $eax=0 # Modify register
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### PIE Binary Debugging
|
|
72
|
+
```bash
|
|
73
|
+
gdb ./binary
|
|
74
|
+
start # Forces PIE base resolution
|
|
75
|
+
b *main+0xca # Relative to main
|
|
76
|
+
b *main+0x198
|
|
77
|
+
run
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### One-liner Automation
|
|
81
|
+
```bash
|
|
82
|
+
gdb -ex 'start' -ex 'b *main+0x198' -ex 'run' ./binary
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Memory Examination
|
|
86
|
+
```bash
|
|
87
|
+
x/s $rsi # String at RSI
|
|
88
|
+
x/38c $rsi # 38 characters
|
|
89
|
+
x/20x $rsp # 20 hex words from stack
|
|
90
|
+
x/10i $rip # 10 instructions from RIP
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Radare2
|
|
96
|
+
|
|
97
|
+
### Basic Session
|
|
98
|
+
```bash
|
|
99
|
+
r2 -d ./binary # Open in debug mode
|
|
100
|
+
aaa # Analyze all
|
|
101
|
+
afl # List functions
|
|
102
|
+
pdf @ main # Disassemble main
|
|
103
|
+
db 0x401234 # Set breakpoint
|
|
104
|
+
dc # Continue
|
|
105
|
+
ood # Restart debugging
|
|
106
|
+
dr # Show registers
|
|
107
|
+
dr eax=0 # Modify register
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### r2pipe Automation
|
|
111
|
+
```python
|
|
112
|
+
import r2pipe
|
|
113
|
+
r2 = r2pipe.open('./binary', flags=['-d'])
|
|
114
|
+
r2.cmd('aaa')
|
|
115
|
+
r2.cmd('db 0x401234')
|
|
116
|
+
|
|
117
|
+
for char in range(256):
|
|
118
|
+
r2.cmd('ood') # Restart
|
|
119
|
+
r2.cmd(f'dr eax={char}')
|
|
120
|
+
output = r2.cmd('dc')
|
|
121
|
+
if 'correct' in output:
|
|
122
|
+
print(f"Found: {chr(char)}")
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Ghidra
|
|
128
|
+
|
|
129
|
+
### Headless Analysis
|
|
130
|
+
```bash
|
|
131
|
+
analyzeHeadless /path/to/project tmp -import binary -postScript script.py
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Emulator for Decryption
|
|
135
|
+
```java
|
|
136
|
+
EmulatorHelper emu = new EmulatorHelper(currentProgram);
|
|
137
|
+
emu.writeRegister("RSP", 0x2fff0000);
|
|
138
|
+
emu.writeRegister("RBP", 0x2fff0000);
|
|
139
|
+
|
|
140
|
+
// Write encrypted data
|
|
141
|
+
emu.writeMemory(dataAddress, encryptedBytes);
|
|
142
|
+
|
|
143
|
+
// Set function arguments
|
|
144
|
+
emu.writeRegister("RDI", arg1);
|
|
145
|
+
|
|
146
|
+
// Run until return
|
|
147
|
+
emu.setBreakpoint(returnAddress);
|
|
148
|
+
emu.run(functionEntryAddress);
|
|
149
|
+
|
|
150
|
+
// Read result
|
|
151
|
+
byte[] decrypted = emu.readMemory(outputAddress, length);
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### MCP Commands
|
|
155
|
+
- Recon: `list_functions`, `list_imports`, `list_strings`
|
|
156
|
+
- Analysis: `decompile_function`, `get_xrefs_to`
|
|
157
|
+
- Annotation: `rename_function`, `rename_variable`
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Unicorn Emulation
|
|
162
|
+
|
|
163
|
+
### Basic Setup
|
|
164
|
+
```python
|
|
165
|
+
from unicorn import *
|
|
166
|
+
from unicorn.x86_const import *
|
|
167
|
+
|
|
168
|
+
mu = Uc(UC_ARCH_X86, UC_MODE_64)
|
|
169
|
+
|
|
170
|
+
# Map code segment
|
|
171
|
+
mu.mem_map(0x400000, 0x10000)
|
|
172
|
+
mu.mem_write(0x400000, code_bytes)
|
|
173
|
+
|
|
174
|
+
# Map stack
|
|
175
|
+
mu.mem_map(0x7fff0000, 0x10000)
|
|
176
|
+
mu.reg_write(UC_X86_REG_RSP, 0x7fff0000 + 0xff00)
|
|
177
|
+
|
|
178
|
+
# Run
|
|
179
|
+
mu.emu_start(start_addr, end_addr)
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Mixed-Mode (64 to 32) Switch
|
|
183
|
+
```python
|
|
184
|
+
# When a 64-bit stub jumps into 32-bit code via retf/retfq:
|
|
185
|
+
# - retf pops 4-byte EIP + 2-byte CS (6 bytes)
|
|
186
|
+
# - retfq pops 8-byte RIP + 8-byte CS (16 bytes)
|
|
187
|
+
|
|
188
|
+
uc32 = Uc(UC_ARCH_X86, UC_MODE_32)
|
|
189
|
+
# Copy memory regions, then GPRs
|
|
190
|
+
reg_map = {
|
|
191
|
+
UC_X86_REG_EAX: UC_X86_REG_RAX,
|
|
192
|
+
UC_X86_REG_EBX: UC_X86_REG_RBX,
|
|
193
|
+
UC_X86_REG_ECX: UC_X86_REG_RCX,
|
|
194
|
+
UC_X86_REG_EDX: UC_X86_REG_RDX,
|
|
195
|
+
UC_X86_REG_ESI: UC_X86_REG_RSI,
|
|
196
|
+
UC_X86_REG_EDI: UC_X86_REG_RDI,
|
|
197
|
+
UC_X86_REG_EBP: UC_X86_REG_RBP,
|
|
198
|
+
}
|
|
199
|
+
for e, r in reg_map.items():
|
|
200
|
+
uc32.reg_write(e, mu.reg_read(r) & 0xffffffff) # mu = 64-bit emulator from above
|
|
201
|
+
uc32.reg_write(UC_X86_REG_EFLAGS, mu.reg_read(UC_X86_REG_RFLAGS) & 0xffffffff)
|
|
202
|
+
|
|
203
|
+
# SSE-heavy blobs need XMM registers copied
|
|
204
|
+
for xr in [UC_X86_REG_XMM0, UC_X86_REG_XMM1, UC_X86_REG_XMM2, UC_X86_REG_XMM3,
|
|
205
|
+
UC_X86_REG_XMM4, UC_X86_REG_XMM5, UC_X86_REG_XMM6, UC_X86_REG_XMM7]:
|
|
206
|
+
uc32.reg_write(xr, mu.reg_read(xr))
|
|
207
|
+
|
|
208
|
+
# Run 32-bit, then copy regs/memory back to 64-bit
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
**Tip:** set `UC_IGNORE_REG_BREAK=1` to silence warnings on unimplemented regs.
|
|
212
|
+
|
|
213
|
+
### Register Tracing Hook
|
|
214
|
+
```python
|
|
215
|
+
def hook_code(uc, address, size, user_data):
|
|
216
|
+
if address == TARGET_ADDR:
|
|
217
|
+
rsi = uc.reg_read(UC_X86_REG_RSI)
|
|
218
|
+
print(f"0x{address:x}: rsi=0x{rsi:016x}")
|
|
219
|
+
|
|
220
|
+
mu.hook_add(UC_HOOK_CODE, hook_code)
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### Track Register Changes
|
|
224
|
+
```python
|
|
225
|
+
prev_rsi = [None]
|
|
226
|
+
def hook_rsi_changes(uc, address, size, user_data):
|
|
227
|
+
rsi = uc.reg_read(UC_X86_REG_RSI)
|
|
228
|
+
if rsi != prev_rsi[0]:
|
|
229
|
+
print(f"0x{address:x}: RSI changed to 0x{rsi:016x}")
|
|
230
|
+
prev_rsi[0] = rsi
|
|
231
|
+
|
|
232
|
+
mu.hook_add(UC_HOOK_CODE, hook_rsi_changes)
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## Python Bytecode
|
|
238
|
+
|
|
239
|
+
### Disassembly
|
|
240
|
+
```python
|
|
241
|
+
import marshal, dis
|
|
242
|
+
|
|
243
|
+
with open('file.pyc', 'rb') as f:
|
|
244
|
+
f.read(16) # Skip header (varies by Python version)
|
|
245
|
+
code = marshal.load(f)
|
|
246
|
+
dis.dis(code)
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### Extract Constants
|
|
250
|
+
```python
|
|
251
|
+
for ins in dis.get_instructions(code):
|
|
252
|
+
if ins.opname == 'LOAD_CONST':
|
|
253
|
+
print(ins.argval)
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Pyarmor Static Unpack (1shot)
|
|
257
|
+
|
|
258
|
+
Repository: `https://github.com/Lil-House/Pyarmor-Static-Unpack-1shot`
|
|
259
|
+
|
|
260
|
+
```bash
|
|
261
|
+
# Basic usage (recursive processing)
|
|
262
|
+
python /path/to/oneshot/shot.py /path/to/scripts
|
|
263
|
+
|
|
264
|
+
# Specify pyarmor runtime library explicitly
|
|
265
|
+
python /path/to/oneshot/shot.py /path/to/scripts -r /path/to/pyarmor_runtime.so
|
|
266
|
+
|
|
267
|
+
# Save outputs to another directory
|
|
268
|
+
python /path/to/oneshot/shot.py /path/to/scripts -o /path/to/output
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
Notes:
|
|
272
|
+
- `oneshot/pyarmor-1shot` must exist before running `shot.py`.
|
|
273
|
+
- Supported focus: Pyarmor 8.x-9.x (`PY` + six digits header style).
|
|
274
|
+
- Pyarmor 7 and earlier (`PYARMOR` header) are out of scope.
|
|
275
|
+
- Disassembly output is generally reliable; decompiled source is experimental.
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
## WASM Analysis
|
|
280
|
+
|
|
281
|
+
### Decompile to C
|
|
282
|
+
```bash
|
|
283
|
+
wasm2c checker.wasm -o checker.c
|
|
284
|
+
gcc -O3 checker.c wasm-rt-impl.c -o checker
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
### Common Patterns
|
|
288
|
+
- `w2c_memory` - Linear memory array
|
|
289
|
+
- `wasm_rt_trap(N)` - Runtime errors
|
|
290
|
+
- Function exports: `flagChecker`, `validate`
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## Android APK
|
|
295
|
+
|
|
296
|
+
### Extraction
|
|
297
|
+
```bash
|
|
298
|
+
apktool d app.apk -o decoded/ # Best - decodes XML
|
|
299
|
+
jadx app.apk # Decompile to Java
|
|
300
|
+
unzip app.apk -d extracted/ # Simple extraction
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
### Key Locations
|
|
304
|
+
- `res/values/strings.xml` - String resources
|
|
305
|
+
- `AndroidManifest.xml` - App metadata
|
|
306
|
+
- `classes.dex` - Dalvik bytecode
|
|
307
|
+
- `assets/`, `res/raw/` - Resources
|
|
308
|
+
|
|
309
|
+
### Search
|
|
310
|
+
```bash
|
|
311
|
+
grep -r "flag\|CTF" decoded/
|
|
312
|
+
strings decoded/classes*.dex | grep -i flag
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
### Flutter APK (Blutter)
|
|
316
|
+
|
|
317
|
+
```bash
|
|
318
|
+
# Run Blutter on arm64 build
|
|
319
|
+
python3 blutter.py path/to/app/lib/arm64-v8a out_dir
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
### HarmonyOS HAP/ABC (abc-decompiler)
|
|
323
|
+
|
|
324
|
+
Repository: `https://github.com/ohos-decompiler/abc-decompiler`
|
|
325
|
+
|
|
326
|
+
```bash
|
|
327
|
+
# Extract .hap first to obtain .abc files
|
|
328
|
+
unzip app.hap -d hap_extracted/
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
Critical startup mode:
|
|
332
|
+
```bash
|
|
333
|
+
# Use CLI entrypoint (avoid java -jar GUI mode)
|
|
334
|
+
java -cp "./jadx-dev-all.jar" jadx.cli.JadxCLI [options] <input>
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
```bash
|
|
338
|
+
# Basic decompile
|
|
339
|
+
java -cp "./jadx-dev-all.jar" jadx.cli.JadxCLI -d "out" ".abc"
|
|
340
|
+
|
|
341
|
+
# Recommended for .abc
|
|
342
|
+
java -cp "./jadx-dev-all.jar" jadx.cli.JadxCLI -m simple --log-level ERROR -d "out_abc_simple" ".abc"
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
Notes:
|
|
346
|
+
- Start with `-m simple --log-level ERROR`.
|
|
347
|
+
- If `auto` fails, retry with `-m simple` first.
|
|
348
|
+
- Errors do not always mean total failure; check `out_xxx/sources/`.
|
|
349
|
+
- Use a fresh output directory per run.
|
|
350
|
+
|
|
351
|
+
---
|
|
352
|
+
|
|
353
|
+
## .NET Analysis
|
|
354
|
+
|
|
355
|
+
### Tools
|
|
356
|
+
- **dnSpy** - Debugging + decompilation (best)
|
|
357
|
+
- **ILSpy** - Decompiler
|
|
358
|
+
- **dotPeek** - JetBrains decompiler
|
|
359
|
+
|
|
360
|
+
### NativeAOT
|
|
361
|
+
- Look for `System.Private.CoreLib` strings
|
|
362
|
+
- Type metadata present but restructured
|
|
363
|
+
- Search for length-prefixed UTF-16 patterns
|
|
364
|
+
|
|
365
|
+
### Two-Stage XOR + AES-CBC Decode Pattern (Codegate 2013)
|
|
366
|
+
|
|
367
|
+
**Pattern:** .NET binary stores an encrypted byte array that undergoes XOR decoding followed by AES-256-CBC decryption. The same key value serves as both the AES key and IV.
|
|
368
|
+
|
|
369
|
+
**Steps:**
|
|
370
|
+
1. Extract hardcoded byte array and key string from binary (dnSpy/ILSpy)
|
|
371
|
+
2. XOR each byte (may be multi-pass, e.g., `0x25` then `0x58`, equivalent to single `0x7D`)
|
|
372
|
+
3. Base64-decode the XOR result
|
|
373
|
+
4. AES-256-CBC decrypt with `RijndaelManaged` using the extracted key as both Key and IV
|
|
374
|
+
|
|
375
|
+
```python
|
|
376
|
+
from Crypto.Cipher import AES
|
|
377
|
+
from base64 import b64decode
|
|
378
|
+
|
|
379
|
+
# Step 1: XOR decode
|
|
380
|
+
data = bytearray(encrypted_bytes)
|
|
381
|
+
for i in range(len(data)):
|
|
382
|
+
data[i] ^= 0x7D # Combined XOR key (0x25 ^ 0x58)
|
|
383
|
+
|
|
384
|
+
# Step 2: Base64 decode
|
|
385
|
+
ct = b64decode(bytes(data))
|
|
386
|
+
|
|
387
|
+
# Step 3: AES-256-CBC decrypt (same value for key and IV)
|
|
388
|
+
key = b"9e2ea73295c7201c5ccd044477228527" # Padded to 32 bytes
|
|
389
|
+
cipher = AES.new(key, AES.MODE_CBC, iv=key)
|
|
390
|
+
plaintext = cipher.decrypt(ct)
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
**Key insight:** When `RijndaelManaged` appears in .NET decompilation, check if Key and IV are set to the same value — this is a common CTF pattern. The XOR stage often serves as a simple obfuscation layer before the real crypto.
|
|
394
|
+
|
|
395
|
+
---
|
|
396
|
+
|
|
397
|
+
## Packed Binaries
|
|
398
|
+
|
|
399
|
+
### UPX
|
|
400
|
+
```bash
|
|
401
|
+
upx -d packed -o unpacked
|
|
402
|
+
strings binary | grep UPX # Check for UPX signature
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
### Custom Packers
|
|
406
|
+
1. Set breakpoint after unpacking stub
|
|
407
|
+
2. Dump memory
|
|
408
|
+
3. Fix PE/ELF headers
|
|
409
|
+
|
|
410
|
+
### PyInstaller
|
|
411
|
+
```bash
|
|
412
|
+
python pyinstxtractor.py binary.exe
|
|
413
|
+
# Look in: binary.exe_extracted/
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
---
|
|
417
|
+
|
|
418
|
+
## LLVM IR
|
|
419
|
+
|
|
420
|
+
### Convert to Assembly
|
|
421
|
+
```bash
|
|
422
|
+
llc task.ll --x86-asm-syntax=intel
|
|
423
|
+
gcc -c task.s -o file.o
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
---
|
|
427
|
+
|
|
428
|
+
## RISC-V Binary Analysis (EHAX 2026)
|
|
429
|
+
|
|
430
|
+
**Pattern (iguessbro):** Statically linked, stripped RISC-V ELF binary. Can't run natively on x86.
|
|
431
|
+
|
|
432
|
+
**Disassembly with Capstone:**
|
|
433
|
+
```python
|
|
434
|
+
from capstone import *
|
|
435
|
+
|
|
436
|
+
with open('binary', 'rb') as f:
|
|
437
|
+
code = f.read()
|
|
438
|
+
|
|
439
|
+
# RISC-V 64-bit with compressed instruction support
|
|
440
|
+
md = Cs(CS_ARCH_RISCV, CS_MODE_RISCVC | CS_MODE_RISCV64)
|
|
441
|
+
md.detail = True
|
|
442
|
+
|
|
443
|
+
# Disassemble from entry point (check ELF header for e_entry)
|
|
444
|
+
TEXT_OFFSET = 0x10000 # typical for static RISC-V
|
|
445
|
+
for insn in md.disasm(code[TEXT_OFFSET:], TEXT_OFFSET):
|
|
446
|
+
print(f"0x{insn.address:x}:\t{insn.mnemonic}\t{insn.op_str}")
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
**Common RISC-V patterns:**
|
|
450
|
+
- `li a0, N` → load immediate (argument setup)
|
|
451
|
+
- `mv a0, s0` → register move
|
|
452
|
+
- `call offset` → function call (auipc + jalr pair)
|
|
453
|
+
- `beq/bne a0, zero, label` → conditional branch
|
|
454
|
+
- `sd/ld` → 64-bit store/load
|
|
455
|
+
- `addiw` → 32-bit add (W-suffix = word operations)
|
|
456
|
+
|
|
457
|
+
**Key differences from x86:**
|
|
458
|
+
- No flags register — comparisons are inline with branch instructions
|
|
459
|
+
- Arguments in a0-a7 (not rdi/rsi/rdx)
|
|
460
|
+
- Return value in a0
|
|
461
|
+
- Saved registers s0-s11 (callee-saved)
|
|
462
|
+
- Compressed instructions (2 bytes) mixed with standard (4 bytes) — use `CS_MODE_RISCVC`
|
|
463
|
+
|
|
464
|
+
**Anti-RE tricks in RISC-V:**
|
|
465
|
+
- Fake flags as string constants (check for `"n0t_th3_r34l"` patterns)
|
|
466
|
+
- Timing anti-brute-force (rdtime instruction)
|
|
467
|
+
- XOR decryption with incremental key: `decrypted[i] = enc[i] ^ (key & 0xFF) ^ 0xA5; key += 7`
|
|
468
|
+
|
|
469
|
+
**Emulation:** `qemu-riscv64 -L /usr/riscv64-linux-gnu/ ./binary` (needs cross-toolchain sysroot)
|
|
470
|
+
|
|
471
|
+
---
|
|
472
|
+
|
|
473
|
+
## Binary Ninja
|
|
474
|
+
|
|
475
|
+
Interactive disassembler/decompiler with rapid community growth.
|
|
476
|
+
|
|
477
|
+
**Decompilation outputs:** High-Level Intermediate Language (HLIL), pseudo-C, pseudo-Rust, pseudo-Python.
|
|
478
|
+
|
|
479
|
+
```bash
|
|
480
|
+
# Open binary
|
|
481
|
+
binaryninja binary
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
```python
|
|
485
|
+
# Headless analysis (Python API)
|
|
486
|
+
import binaryninja
|
|
487
|
+
bv = binaryninja.open_view("binary")
|
|
488
|
+
for func in bv.functions:
|
|
489
|
+
print(func.name, hex(func.start))
|
|
490
|
+
print(func.hlil) # High-Level IL
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
**Community plugins:** Available via Plugin Manager (Ctrl+Shift+P → "Plugin Manager").
|
|
494
|
+
|
|
495
|
+
**Free version:** https://binary.ninja/free/ (cloud-based, limited features).
|
|
496
|
+
|
|
497
|
+
**Advantages over Ghidra:** Faster startup, cleaner IL representations, better Python API for scripting.
|
|
498
|
+
|
|
499
|
+
---
|
|
500
|
+
|
|
501
|
+
## Decompiler Comparison with dogbolt.org
|
|
502
|
+
|
|
503
|
+
**dogbolt.org** runs multiple decompilers simultaneously on the same binary and shows results side-by-side.
|
|
504
|
+
|
|
505
|
+
**Supported decompilers:** Hex-Rays (IDA), Ghidra, Binary Ninja, angr, RetDec, Snowman, dewolf, Reko, Relyze.
|
|
506
|
+
|
|
507
|
+
**When to use:**
|
|
508
|
+
- Decompiler output is confusing — compare with alternatives for clarity
|
|
509
|
+
- One decompiler mishandles a construct — another may get it right
|
|
510
|
+
- Quick triage without installing every tool locally
|
|
511
|
+
- Validate decompiler correctness by cross-referencing outputs
|
|
512
|
+
|
|
513
|
+
```bash
|
|
514
|
+
# Upload via web interface: https://dogbolt.org/
|
|
515
|
+
# Or use the API:
|
|
516
|
+
curl -F "file=@binary" https://dogbolt.org/api/binaries/
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
**Key insight:** Different decompilers excel at different constructs. When one produces unreadable output, another often generates clearer pseudocode. Cross-referencing catches decompiler bugs.
|
|
520
|
+
|
|
521
|
+
---
|
|
522
|
+
|
|
523
|
+
## Useful Commands
|
|
524
|
+
|
|
525
|
+
```bash
|
|
526
|
+
# File info
|
|
527
|
+
file binary
|
|
528
|
+
checksec --file=binary
|
|
529
|
+
rabin2 -I binary
|
|
530
|
+
|
|
531
|
+
# String extraction
|
|
532
|
+
strings binary | grep -iE "flag|secret"
|
|
533
|
+
rabin2 -z binary
|
|
534
|
+
|
|
535
|
+
# Sections
|
|
536
|
+
readelf -S binary
|
|
537
|
+
objdump -h binary
|
|
538
|
+
|
|
539
|
+
# Symbols
|
|
540
|
+
nm binary
|
|
541
|
+
readelf -s binary
|
|
542
|
+
|
|
543
|
+
# Disassembly
|
|
544
|
+
objdump -d binary
|
|
545
|
+
objdump -M intel -d binary
|
|
546
|
+
```
|