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,278 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: patch-diff-exploit
|
|
3
|
+
description: "Locate vulnerability fixes in vendor patches, diff binaries across versions, and build N-day PoCs. Attack-side complement to binary-diff for authorized research."
|
|
4
|
+
risk: offensive
|
|
5
|
+
source: "https://github.com/zhaoxuya520/reverse-skill"
|
|
6
|
+
source_repo: "zhaoxuya520/reverse-skill"
|
|
7
|
+
source_type: community
|
|
8
|
+
date_added: "2026-08-25"
|
|
9
|
+
license: "MIT"
|
|
10
|
+
license_source: "https://github.com/zhaoxuya520/reverse-skill/blob/main/LICENSE"
|
|
11
|
+
---
|
|
12
|
+
> **⚠️ AUTHORIZED USE ONLY**
|
|
13
|
+
> This skill is for educational purposes or authorized security assessments only.
|
|
14
|
+
> You must have explicit, written permission from the system owner before using this tool.
|
|
15
|
+
> Misuse of this tool is illegal and strictly prohibited.
|
|
16
|
+
|
|
17
|
+
> **Mandatory confirmation gate**
|
|
18
|
+
> Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:
|
|
19
|
+
> 1. Ask the user to state the exact target URL, IP, account, or resource.
|
|
20
|
+
> 2. Ask the user to confirm written authorization and the permitted scope.
|
|
21
|
+
> 3. Show the exact command(s) and explain their expected effect.
|
|
22
|
+
> 4. Wait for explicit confirmation in the current conversation.
|
|
23
|
+
>
|
|
24
|
+
> Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.
|
|
25
|
+
|
|
26
|
+
## When to Use
|
|
27
|
+
|
|
28
|
+
- Turning a vendor security advisory into a concrete vulnerable-function location.
|
|
29
|
+
- Building a proof-of-concept for a patched vulnerability in authorized research.
|
|
30
|
+
|
|
31
|
+
## 适用范围
|
|
32
|
+
|
|
33
|
+
当任务属于以下场景时使用本 skill:
|
|
34
|
+
|
|
35
|
+
1. **已知 CVE 但无公开 PoC** — 厂商公告写了"修复了 XX 组件的越界写"但没放 PoC,需要从补丁反推
|
|
36
|
+
2. **SRC / 红队打 N-day** — 目标资产未及时更新,需要把刚发布的补丁差成可用的 1-day 利用
|
|
37
|
+
3. **Patch Tuesday 跟进** — 每月第二个周二微软放补丁,需要快速锁定高价值漏洞(Kernel / Win32k / AFD / CLFS)
|
|
38
|
+
4. **Linux LTS 补丁分析** — 主线 fix 已合并,但旁支或某发行版 backport 不全,找未修补面
|
|
39
|
+
5. **驱动 / 服务的安全补丁还原** — 显卡驱动、AV 引擎、虚拟化组件等闭源软件的补丁分析
|
|
40
|
+
|
|
41
|
+
### 与其他 skill 的分工
|
|
42
|
+
|
|
43
|
+
| 场景 | 用什么 |
|
|
44
|
+
|------|--------|
|
|
45
|
+
| 有旧版符号,迁移到新版本帮助分析 | `binary-diff/` |
|
|
46
|
+
| **从补丁找漏洞、写 PoC 打补丁前版本** | **本 skill** |
|
|
47
|
+
| 写出完整利用链(堆喷、ROP、提权) | `pwn-chain/` |
|
|
48
|
+
| 把 1-day 武器化部署到目标网络 | `pentest-tools/network-attack-defense/` |
|
|
49
|
+
| 从零逆向一个二进制 | `ida-reverse/` / `radare2/` |
|
|
50
|
+
|
|
51
|
+
差别的关键:`binary-diff` 的目标是**让新版可分析**(把旧符号搬过来),本 skill 的目标是**找出补丁修了什么 bug 然后打补丁前的版本**。前者服务防御侧 / 研究侧分析,后者服务攻击侧武器化。
|
|
52
|
+
|
|
53
|
+
## 核心原理
|
|
54
|
+
|
|
55
|
+
```text
|
|
56
|
+
patched 二进制 (after) unpatched 二进制 (before)
|
|
57
|
+
↓ ↓
|
|
58
|
+
导入 IDA/Ghidra 导入 IDA/Ghidra
|
|
59
|
+
↓ ↓
|
|
60
|
+
└──────── BinDiff / ghidriff ──────┘
|
|
61
|
+
↓
|
|
62
|
+
函数级 diff(matched / unmatched / changed)
|
|
63
|
+
↓
|
|
64
|
+
聚焦 match score 中等的函数(0.5 - 0.9)
|
|
65
|
+
↓
|
|
66
|
+
看新增了什么:边界检查 / 锁 / 字段清零 / 整数溢出检查
|
|
67
|
+
↓
|
|
68
|
+
反推 bug class:OOB / Race / Info Leak / UAF / Integer Overflow
|
|
69
|
+
↓
|
|
70
|
+
在 unpatched 版本上写 PoC 触发
|
|
71
|
+
↓
|
|
72
|
+
验证:unpatched 崩 / patched 不崩 → 漏洞确认
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
补丁修复模式 → 漏洞类型反查:
|
|
76
|
+
|
|
77
|
+
| 新增内容 | 大概率的 bug class |
|
|
78
|
+
|---------|------------------|
|
|
79
|
+
| `if (a + b < a)` / `__builtin_add_overflow` | 整数溢出 |
|
|
80
|
+
| `KeAcquireSpinLock` / `mutex_lock` | 竞争条件 (TOCTOU / double-free) |
|
|
81
|
+
| `if (idx >= MAX)` / `if (len > buf_size)` | 越界读 / 越界写 |
|
|
82
|
+
| `RtlZeroMemory` / `memset(struct, 0, ...)` | 未初始化内存信息泄漏 |
|
|
83
|
+
| `InterlockedDecrement` + refcount 检查 | UAF / 引用计数错误 |
|
|
84
|
+
| `ProbeForRead` / `ProbeForWrite` | 用户态指针未校验 |
|
|
85
|
+
| `SeAccessCheck` / capability 校验 | 权限校验缺失 |
|
|
86
|
+
| 删除 / 收紧 `IOCTL` code | 暴露面收敛(看老接口怎么打) |
|
|
87
|
+
|
|
88
|
+
## 工作流
|
|
89
|
+
|
|
90
|
+
### 5 步完整流程
|
|
91
|
+
|
|
92
|
+
```text
|
|
93
|
+
Step 1: 拿 before / after 二进制
|
|
94
|
+
- Windows: Microsoft Update Catalog 下 MSU/MSP,用 expand.exe / dism 解包
|
|
95
|
+
- Linux: 从发行版 USN/RHSA 拉 .deb/.rpm,用 dpkg-deb / rpm2cpio 解包
|
|
96
|
+
- 第三方软件: 官网取 N-1 和 N 版本安装包
|
|
97
|
+
|
|
98
|
+
Step 2: 对齐符号
|
|
99
|
+
- 有 PDB 直接吃,没 PDB 时用 binary-diff skill 把 N-1 版本的符号搬到 N 版本
|
|
100
|
+
- Linux 内核取对应版本的 vmlinux + System.map / debuginfo
|
|
101
|
+
|
|
102
|
+
Step 3: 二进制 diff
|
|
103
|
+
- BinDiff: 直接给两个 IDB,看函数级匹配结果
|
|
104
|
+
- ghidriff: pip 一键安装,CLI 输出 markdown 报告
|
|
105
|
+
- Diaphora: IDA 内插件,老牌但需要 IDA Pro
|
|
106
|
+
|
|
107
|
+
Step 4: 定位变更
|
|
108
|
+
- 过滤 match score 0.5-0.95 的函数(完全相同的不看,完全不同的多半是新加 / 重命名)
|
|
109
|
+
- 重点看:新增的 if / 新增的循环边界 / 删除的代码块(删了什么也是线索)
|
|
110
|
+
- 用 LLM 看 before/after 伪代码反推 bug class(见 references/root-cause-and-poc.md)
|
|
111
|
+
|
|
112
|
+
Step 5: 写 PoC
|
|
113
|
+
- 整数溢出:构造边界值(INT_MAX-1、0xFFFFFFFF)
|
|
114
|
+
- 竞争:多线程 hammer,open/close + ioctl 高频并发
|
|
115
|
+
- UAF:spray → free → reuse pattern
|
|
116
|
+
- OOB:精确控制 len / index 越过边界
|
|
117
|
+
- 验证 patched 版本不再崩,unpatched 版本稳定崩 → bug 复现成功
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### 工具调用顺序
|
|
121
|
+
|
|
122
|
+
```text
|
|
123
|
+
下补丁 → 解包 → 加载到 IDA/Ghidra → BinDiff/ghidriff → 看 unmatched/low-match 函数
|
|
124
|
+
→ LLM 反推 bug class → 写 PoC → 在 unpatched 跑 → 崩 → 收工
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## 典型场景示例
|
|
128
|
+
|
|
129
|
+
### 场景 1:Windows Patch Tuesday — Kernel CVE 复现
|
|
130
|
+
|
|
131
|
+
```text
|
|
132
|
+
背景:2025 年 11 月 Patch Tuesday,MSRC 公告 CVE-2025-62215
|
|
133
|
+
Windows Kernel race condition 导致 double free,CVSS 7.0,本地提权
|
|
134
|
+
微软只放了补丁,没放细节,没有公开 PoC
|
|
135
|
+
|
|
136
|
+
目标:复现 PoC,验证未打补丁的 Windows 11 22H2 / 23H2 可提权
|
|
137
|
+
|
|
138
|
+
步骤:
|
|
139
|
+
1. Microsoft Update Catalog 搜 "2025-11" + KB 号,下两个版本:
|
|
140
|
+
- 22H2 build 22621.xxxx (unpatched)
|
|
141
|
+
- 22H2 build 22621.yyyy (patched 后)
|
|
142
|
+
命令:
|
|
143
|
+
expand.exe Windows-KB5052000-x64.msu -F:* C:\out\patched\
|
|
144
|
+
expand.exe C:\out\patched\Windows-KB5052000-x64.cab -F:* C:\out\patched\
|
|
145
|
+
提取 ntoskrnl.exe / win32k.sys / win32kfull.sys / afd.sys
|
|
146
|
+
|
|
147
|
+
2. 两个版本都吃 PDB (微软符号服务器):
|
|
148
|
+
symchk /v /r ntoskrnl.exe /s SRV*C:\sym*https://msdl.microsoft.com/download/symbols
|
|
149
|
+
|
|
150
|
+
3. 跑 BinDiff:
|
|
151
|
+
bindiff old.BinExport new.BinExport
|
|
152
|
+
或 ghidriff:
|
|
153
|
+
ghidriff ntoskrnl_old.exe ntoskrnl_new.exe -o diff_out/
|
|
154
|
+
|
|
155
|
+
4. 看报告,过滤 similarity 0.6-0.95 的函数。
|
|
156
|
+
假设定位到 NtXxxIoctl 类函数新增了一段:
|
|
157
|
+
KeAcquireSpinLockRaiseToDpc(&obj->Lock);
|
|
158
|
+
if (obj->RefCount == 0) { ... goto cleanup; }
|
|
159
|
+
→ 新增了锁 + 引用计数检查 → race + double free,符合公告描述
|
|
160
|
+
|
|
161
|
+
5. 写 PoC:用户态多线程同时调 NtClose + 触发同一对象的 IOCTL,
|
|
162
|
+
制造 close 释放与 IOCTL 还在用之间的竞争窗口
|
|
163
|
+
崩在 ntoskrnl 的 ObfDereferenceObject 后续 free 路径上
|
|
164
|
+
|
|
165
|
+
6. 验证:
|
|
166
|
+
- unpatched 22621.xxxx 上跑 PoC,~30 秒内 BSOD (BAD_POOL_HEADER 或 DOUBLE_FREE)
|
|
167
|
+
- patched 22621.yyyy 上跑同 PoC,无任何异常
|
|
168
|
+
→ 复现成功
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### 场景 2:Linux 内核 LTS 分支补丁找未修的旁支
|
|
172
|
+
|
|
173
|
+
```text
|
|
174
|
+
背景:主线 6.x 已修某 net subsystem 的 OOB 写
|
|
175
|
+
Ubuntu 22.04 (5.15 LTS) 的 USN 已发布更新
|
|
176
|
+
但某些 OEM kernel / Azure kernel 的 backport 节奏更慢
|
|
177
|
+
想确认未更新的旁支是否仍可打
|
|
178
|
+
|
|
179
|
+
目标:取 patched/unpatched 内核,差出 fix commit 对应的二进制变更,
|
|
180
|
+
在 unpatched 旁支上重写 PoC
|
|
181
|
+
|
|
182
|
+
步骤:
|
|
183
|
+
1. 拉 patched 与 unpatched 包:
|
|
184
|
+
apt download linux-image-5.15.0-101-generic # patched
|
|
185
|
+
apt download linux-image-5.15.0-100-generic # unpatched
|
|
186
|
+
dpkg-deb -x linux-image-5.15.0-101-generic_*.deb ./patched/
|
|
187
|
+
dpkg-deb -x linux-image-5.15.0-100-generic_*.deb ./unpatched/
|
|
188
|
+
提取 boot/vmlinuz → 用 extract-vmlinux 还原 ELF
|
|
189
|
+
|
|
190
|
+
2. 同步取 dbgsym:
|
|
191
|
+
apt download linux-image-unsigned-5.15.0-101-generic-dbgsym
|
|
192
|
+
|
|
193
|
+
3. 用 ghidriff (Linux 友好):
|
|
194
|
+
ghidriff vmlinux_5.15.0-100 vmlinux_5.15.0-101 \
|
|
195
|
+
-o /tmp/kdiff/ --max-section-funcs-analyze 8000
|
|
196
|
+
|
|
197
|
+
4. 报告里搜 net/ipv4/ net/ipv6/ net/sched/ 等子系统的 changed 函数
|
|
198
|
+
找到补丁前 skb_copy_bits 调用前缺少 skb->len 上限校验
|
|
199
|
+
→ OOB read,可能配合可触发的 sysctl 升级到 OOB write
|
|
200
|
+
|
|
201
|
+
5. 在 unpatched 旁支(例如 Azure 5.15.0-1080 backport 落后的版本)
|
|
202
|
+
交叉验证:同一函数 fix 是否已 backport
|
|
203
|
+
如果没 backport → 旁支仍可打 → 写 PoC 重放
|
|
204
|
+
|
|
205
|
+
6. 写 PoC:syzkaller harness 改造 / 直接 C PoC 触发对应 syscall
|
|
206
|
+
验证旁支 panic / KASAN 报 OOB
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
## 注意事项
|
|
210
|
+
|
|
211
|
+
- **法律边界** — 武器化 N-day 必须在授权范围内(SRC / Bug Bounty / 自有靶机 / CTF)。对生产环境直接打 1-day 等同入侵
|
|
212
|
+
- **补丁可能只是"减小爆炸半径"** — 看到 patch 不一定就是完整修复,有可能只是补一个利用路径,原始 bug 仍可从别的路径触发(一鱼多吃)
|
|
213
|
+
- **变量名/类型不要被欺骗** — Windows 补丁经常顺手做 cleanup / rename,看似变更很大但实际无关。要看控制流和数据流,不要看 token 级 diff
|
|
214
|
+
- **微软的补丁可能加了 mitigation 而不是 fix** — 看到 `_guard_xfg_dispatch_icall_fptr` 这种 CFG 强化不要当成 fix,那是 mitigation
|
|
215
|
+
- **匿名化** — writeup / PoC 公开时脱敏目标机器名、内网 IP、用户名(写 `{target_ip}` `{username}` 占位)
|
|
216
|
+
- **patched 版本上要能跑通无害化测试** — 别只在 unpatched 上跑,否则可能是环境因素导致的崩溃,不是漏洞
|
|
217
|
+
- **二进制 diff 不万能** — 编译器升级 / 优化等级变化也会让函数 layout 大变,先用 N 版本和 N-1 版本(同一编译器)对比,不要跨大版本
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## 按需自举(On-Demand Bootstrap)
|
|
222
|
+
|
|
223
|
+
### 工具依赖
|
|
224
|
+
|
|
225
|
+
| 工具 | 用途 | 可自动安装 |
|
|
226
|
+
|------|------|-----------|
|
|
227
|
+
| BinDiff (Google, 5.x+) | 函数级二进制 diff,IDA/Ghidra 插件 | ✓ (有官方 .deb / .msi) |
|
|
228
|
+
| Diaphora | IDA 老牌 diff 插件,需要 IDA Pro | ✓ (git clone) |
|
|
229
|
+
| ghidriff | Ghidra headless CLI diff,输出 markdown | ✓ (pip install ghidriff) |
|
|
230
|
+
| DeepDiff (商业) | 新一代 diff 工具,准确度更高 | ✗ (商业授权) |
|
|
231
|
+
| Ghidra | ghidriff 的运行底座 | ✓ |
|
|
232
|
+
| IDA Pro | BinDiff / Diaphora 的运行底座 | ✗ (商业) |
|
|
233
|
+
| Microsoft Update Catalog | 下 MSU/MSP 补丁包 | 在线服务 |
|
|
234
|
+
| wsuspect-proxy | 透明拦截 Windows Update 流量取补丁 | ✓ (git clone) |
|
|
235
|
+
| expand.exe / dism | 解 MSU / cab | ✓ (Windows 自带) |
|
|
236
|
+
| rpm2cpio / dpkg-deb | 解 Linux 发行版包 | ✓ |
|
|
237
|
+
| symchk | 从微软符号服务器拉 PDB | ✓ (Windows SDK) |
|
|
238
|
+
|
|
239
|
+
### 自举命令
|
|
240
|
+
|
|
241
|
+
```powershell
|
|
242
|
+
powershell -NoProfile -ExecutionPolicy Bypass -File "<SKILL_ROOT>\skills\scripts\bootstrap-reverse.ps1" -Capability @('bindiff','ghidriff','ghidra','wsuspect-proxy') -StartServices
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
详细工具对比与命令见 `references/diff-tools-comparison.md`。
|
|
246
|
+
详细 Patch Tuesday 工作流见 `references/patch-tuesday-workflow.md`。
|
|
247
|
+
根因反推与 PoC 模板见 `references/root-cause-and-poc.md`。
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
## 路由上下文
|
|
252
|
+
|
|
253
|
+
**上游入口**: `skills/SKILL.md`(总控)、`routing.md`
|
|
254
|
+
|
|
255
|
+
**上游 skill**:
|
|
256
|
+
- `reverse-engineering/` — 在做 diff 之前可能要先理解目标二进制的整体结构
|
|
257
|
+
- `binary-diff/` — 如果补丁后版本无符号、补丁前有符号,先用 binary-diff 搬符号过来
|
|
258
|
+
|
|
259
|
+
**下游 skill**:
|
|
260
|
+
- `pwn-chain/` — 反推出 bug class 后,需要写完整利用(堆喷、ROP、SMEP/SMAP 绕过、提权 payload)
|
|
261
|
+
- `pentest-tools/network-attack-defense/` — 把 N-day 武器化部署到目标网络(包装成可投递载荷、对接 C2)
|
|
262
|
+
- `attack-chain/` — 把这一个 N-day 串到完整攻击链里(初始访问 → 提权 → 横向)
|
|
263
|
+
|
|
264
|
+
**触发条件**: 任务包含"N-day"、"补丁"、"CVE 复现"、"找补丁修了什么"、"打未更新主机" 等意图
|
|
265
|
+
|
|
266
|
+
## 任务完成自检(声称完成前 MUST 通过)
|
|
267
|
+
|
|
268
|
+
- [ ] 我是否执行了工作流中的每一步(而不是只阅读)?
|
|
269
|
+
- [ ] 我是否基于 `tool-index` 使用了真实工具路径?
|
|
270
|
+
- [ ] 我是否产出了可复现证据(命令/脚本/截图/报告)?
|
|
271
|
+
- [ ] 我是否完成并回写了 RULES 要求的 Checklist 项?
|
|
272
|
+
|
|
273
|
+
## Limitations
|
|
274
|
+
|
|
275
|
+
- PoC development only for vulnerabilities you are authorized to research.
|
|
276
|
+
- Patch diffing fails when vendors rebuild extensively between releases.
|
|
277
|
+
|
|
278
|
+
> Adapted from [zhaoxuya520/reverse-skill](https://github.com/zhaoxuya520/reverse-skill) (MIT).
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
# 二进制差分工具对比
|
|
2
|
+
|
|
3
|
+
补丁差分的核心工具是二进制 diff 引擎。本文档对比当前主流工具的强项、安装、典型命令、输出解读,以及组合工作流。
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 工具总览
|
|
8
|
+
|
|
9
|
+
| 工具 | 作者/厂商 | 底座 | License | 强项 | 弱项 |
|
|
10
|
+
|------|---------|------|---------|------|------|
|
|
11
|
+
| **BinDiff** | Google (zynamics) | IDA Pro / Ghidra / Binary Ninja | 免费 | 业界标杆,函数级匹配最稳,GUI 视图清晰 | 需要 IDA 才能玩到极致 |
|
|
12
|
+
| **Diaphora** | Joxean Koret | IDA Pro | GPL | 老牌、活跃维护、SQLite 持久化、支持伪代码 diff | 重度依赖 IDA Pro,对超大二进制慢 |
|
|
13
|
+
| **ghidriff** | Clearbluejar | Ghidra headless | Apache 2.0 | 纯 CLI,CI 友好,输出 markdown,免费开源 | 准确度依赖 Ghidra 反编译 |
|
|
14
|
+
| **DeepDiff** (Karambit) | Karambit.AI | 自带 | 商业 | LLM 辅助、变量名重命名感知 | 商业授权 |
|
|
15
|
+
| **radiff2** | radare2 项目 | radare2 | LGPL | 全开源、嵌入 r2 工作流 | 函数匹配能力弱于 BinDiff |
|
|
16
|
+
| **patchdiff2** | tetrane | IDA | GPL | IDA 老插件,年代久 | 已基本被 BinDiff/Diaphora 取代 |
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## BinDiff
|
|
21
|
+
|
|
22
|
+
### 安装
|
|
23
|
+
|
|
24
|
+
Linux:
|
|
25
|
+
```bash
|
|
26
|
+
wget https://github.com/google/bindiff/releases/latest/download/bindiff_8-amd64.deb
|
|
27
|
+
sudo dpkg -i bindiff_8-amd64.deb
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Windows:
|
|
31
|
+
```powershell
|
|
32
|
+
# 从 https://github.com/google/bindiff/releases 下 .msi
|
|
33
|
+
msiexec /i bindiff_8.msi /quiet
|
|
34
|
+
# 自动注册到 IDA Pro 插件目录
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### IDA 内使用
|
|
38
|
+
|
|
39
|
+
1. 在 IDA 里加载 unpatched 二进制,分析完,`File → Produce file → BinExport` 导出 `old.BinExport`
|
|
40
|
+
2. 加载 patched 二进制,同样导出 `new.BinExport`
|
|
41
|
+
3. `Edit → Plugins → BinDiff` → 选 new.BinExport 对比 → 输出 .BinDiff 数据库
|
|
42
|
+
|
|
43
|
+
### CLI 用法
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# 直接两个二进制 diff(先用 binexport 提取)
|
|
47
|
+
bindiff old.exe new.exe
|
|
48
|
+
|
|
49
|
+
# 或显式给 BinExport
|
|
50
|
+
bindiff --primary=old.BinExport --secondary=new.BinExport \
|
|
51
|
+
--output_dir=./bindiff_out/
|
|
52
|
+
|
|
53
|
+
# 输出: ./bindiff_out/old_vs_new.BinDiff (SQLite)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 输出读法
|
|
57
|
+
|
|
58
|
+
打开 .BinDiff 文件后,关键列:
|
|
59
|
+
- `similarity` — 0.0 ~ 1.0,函数相似度
|
|
60
|
+
- `confidence` — 算法信心
|
|
61
|
+
- `algorithm` — 匹配算法 (name hash, function hash, MD index 等)
|
|
62
|
+
|
|
63
|
+
聚焦工作区:
|
|
64
|
+
- **similarity 1.0 + confidence 1.0** — 完全不变,跳过
|
|
65
|
+
- **similarity 0.0 (unmatched)** — 新增或重大重构,留意但通常是新功能
|
|
66
|
+
- **similarity 0.5 ~ 0.95** — 重点目标,多半是修了 bug
|
|
67
|
+
- **similarity 0.95 ~ 0.99** — 微调,可能是 mitigation 或 cleanup
|
|
68
|
+
|
|
69
|
+
GUI 内:双击函数 → 看 graph view 的 basic block 着色:
|
|
70
|
+
- 灰:完全相同
|
|
71
|
+
- 黄:相似但有指令差异
|
|
72
|
+
- 红:新增或删除
|
|
73
|
+
- 蓝:仅 patched 有的 block — **重点看这种**
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Diaphora
|
|
78
|
+
|
|
79
|
+
### 安装
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
cd ~/idapro/plugins/
|
|
83
|
+
git clone https://github.com/joxeankoret/diaphora.git
|
|
84
|
+
# 在 IDA 里 File → Script file → ~/idapro/plugins/diaphora/diaphora.py
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### 工作流
|
|
88
|
+
|
|
89
|
+
1. IDA 打开 unpatched → 跑 `diaphora.py` → 选 "Export current database" → 保存 `old.sqlite`
|
|
90
|
+
2. IDA 打开 patched → 跑 `diaphora.py` → 选 "Diff against another database" → 选 `old.sqlite` → 输出对比报告
|
|
91
|
+
|
|
92
|
+
### 输出读法
|
|
93
|
+
|
|
94
|
+
Diaphora 输出多个 tab:
|
|
95
|
+
- **Best matches** — 高置信度匹配,跳过
|
|
96
|
+
- **Partial matches** — 部分匹配,**重点看这里**
|
|
97
|
+
- **Unreliable matches** — 算法不确定,可能误报
|
|
98
|
+
- **Unmatched in primary / secondary** — 单边出现的函数
|
|
99
|
+
|
|
100
|
+
每个函数支持 side-by-side 伪代码 diff(IDA 反编译输出)。
|
|
101
|
+
|
|
102
|
+
### 关键 SQL 查询
|
|
103
|
+
|
|
104
|
+
Diaphora 用 SQLite 存数据,可写 SQL 找目标:
|
|
105
|
+
|
|
106
|
+
```sql
|
|
107
|
+
-- 找出 diff 比例在中等区间的函数
|
|
108
|
+
SELECT f1.name, f2.name, ratio
|
|
109
|
+
FROM results
|
|
110
|
+
WHERE ratio BETWEEN 0.5 AND 0.9
|
|
111
|
+
ORDER BY ratio DESC;
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## ghidriff
|
|
117
|
+
|
|
118
|
+
### 安装
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
pip install ghidriff
|
|
122
|
+
# ghidriff 会自动下载 Ghidra 到 ~/.ghidra/ (首次运行需要联网)
|
|
123
|
+
# 或指定 Ghidra 路径:
|
|
124
|
+
export GHIDRA_INSTALL_DIR=/opt/ghidra_11.0
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### 基础用法
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
# 最小命令
|
|
131
|
+
ghidriff old.so new.so
|
|
132
|
+
|
|
133
|
+
# 指定输出目录 + 引擎
|
|
134
|
+
ghidriff old.exe new.exe \
|
|
135
|
+
-o ./diff_out/ \
|
|
136
|
+
--engine VersionTrackingDiff \
|
|
137
|
+
--threaded \
|
|
138
|
+
--max-section-funcs-analyze 5000
|
|
139
|
+
|
|
140
|
+
# 看所有可用引擎
|
|
141
|
+
ghidriff --list-engines
|
|
142
|
+
# 常见: VersionTrackingDiff (默认), SimpleDiff, StructualGraphDiff
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### 输出格式
|
|
146
|
+
|
|
147
|
+
ghidriff 默认输出三种产物:
|
|
148
|
+
1. **Markdown 报告** — 人类可读,包含 added / deleted / modified 函数清单 + 伪代码 diff 块
|
|
149
|
+
2. **JSON 报告** — 程序化消费
|
|
150
|
+
3. **GhidraProject** — 可以打开继续手工分析
|
|
151
|
+
|
|
152
|
+
报告关键章节:
|
|
153
|
+
- `## Summary` — 总体统计 (匹配率)
|
|
154
|
+
- `## Strings Diff` — 字符串变化(信息泄漏类 CVE 经常字符串变了)
|
|
155
|
+
- `## Functions` → `### Modified` — 重点
|
|
156
|
+
- 每个函数下: `before` / `after` 伪代码 + unified diff
|
|
157
|
+
|
|
158
|
+
### 推荐参数
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
# Windows 内核大文件:限制单 section 分析数量,避免 OOM
|
|
162
|
+
ghidriff ntoskrnl_old.exe ntoskrnl_new.exe \
|
|
163
|
+
-o /tmp/nt_diff/ \
|
|
164
|
+
--max-section-funcs-analyze 8000 \
|
|
165
|
+
--max-section-funcs-full 800 \
|
|
166
|
+
--threaded
|
|
167
|
+
|
|
168
|
+
# 大量小函数(驱动):开启所有 diff
|
|
169
|
+
ghidriff afd_old.sys afd_new.sys -o /tmp/afd_diff/ --side-by-side
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### 配 LLM 自动总结
|
|
173
|
+
|
|
174
|
+
ghidriff 支持插件式输出,可以喂给 LLM 自动生成根因分析(见 root-cause-and-poc.md 的 LLM 章节)。
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
# 输出 JSON 给下游 LLM 脚本消费
|
|
178
|
+
ghidriff old new -o out/ --json-format
|
|
179
|
+
python my-llm-summarizer.py out/diff.json
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## radiff2
|
|
185
|
+
|
|
186
|
+
### 安装
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
# 通常随 radare2 安装
|
|
190
|
+
sudo apt install radare2
|
|
191
|
+
# 或源码
|
|
192
|
+
git clone https://github.com/radareorg/radare2 && radare2/sys/install.sh
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### 用法
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
# 字节级 diff
|
|
199
|
+
radiff2 old.bin new.bin
|
|
200
|
+
|
|
201
|
+
# 函数级 diff (需要先各自 r2 分析)
|
|
202
|
+
radiff2 -A -C old.bin new.bin # -A 分析, -C 函数级
|
|
203
|
+
|
|
204
|
+
# 输出 graph (Graphviz)
|
|
205
|
+
radiff2 -g main old new | dot -Tpng -o diff.png
|
|
206
|
+
|
|
207
|
+
# JSON 输出
|
|
208
|
+
radiff2 -j -A -C old new > diff.json
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
适合:与 radare2 工作流深度集成的场景,或者 BinDiff/Ghidra 跑不动的小文件。
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## DeepDiff (Karambit.AI, 商业)
|
|
216
|
+
|
|
217
|
+
特点:
|
|
218
|
+
- 不依赖 IDA / Ghidra
|
|
219
|
+
- 自带反编译器
|
|
220
|
+
- 用 ML 模型做函数匹配,对 inline / rename / 控制流变化更鲁棒
|
|
221
|
+
- 自动生成 root cause 假设
|
|
222
|
+
|
|
223
|
+
适合资金充足的团队批量处理 Patch Tuesday。本文档不展开,因需要商业授权。
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## 工具组合工作流
|
|
228
|
+
|
|
229
|
+
### 推荐组合(按场景)
|
|
230
|
+
|
|
231
|
+
```text
|
|
232
|
+
场景 A: 有 IDA Pro 授权,质量优先
|
|
233
|
+
BinDiff (主) + Diaphora (副验证) + LLM 辅助根因
|
|
234
|
+
|
|
235
|
+
场景 B: 无 IDA,纯开源
|
|
236
|
+
ghidriff (主) + LLM 辅助根因
|
|
237
|
+
|
|
238
|
+
场景 C: 批量 Patch Tuesday 流水线
|
|
239
|
+
ghidriff CLI + JSON → 脚本筛选 → 人工 review top N
|
|
240
|
+
|
|
241
|
+
场景 D: 小型驱动 / 嵌入式 firmware
|
|
242
|
+
radiff2 / ghidriff 都行
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### 粗筛 → 精看 流程
|
|
246
|
+
|
|
247
|
+
```text
|
|
248
|
+
Step 1 (粗筛): 跑 ghidriff,过滤
|
|
249
|
+
- 整体 matched 比例 < 90% → 警惕,多半对齐失败 (可能是不同编译器、不同混淆)
|
|
250
|
+
- matched 比例 > 99% → 补丁很微小,可能只动 1-2 个函数
|
|
251
|
+
- 列出 Modified 函数清单,按变更行数排序
|
|
252
|
+
|
|
253
|
+
Step 2 (优先级): 按以下加权
|
|
254
|
+
- 函数名含敏感词 (Ioctl / DispatchIoCtrl / Probe / Copy / Length) +5
|
|
255
|
+
- 出现在已知攻击面驱动 (afd/clfs/win32k) +5
|
|
256
|
+
- 变更涉及 if 边界 / lock / refcount +3
|
|
257
|
+
- 仅做字符串 / 日志变更 -3
|
|
258
|
+
|
|
259
|
+
Step 3 (精看): 把 top 10 函数喂给 BinDiff GUI 或 IDA 手工,
|
|
260
|
+
或贴 before/after 伪代码给 LLM 反推 bug class
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## 常见坑
|
|
266
|
+
|
|
267
|
+
- **对齐失败**:matched 比例 < 90% 时不要继续。先确认两个二进制是同一编译器版本、同一架构、同一优化等级。常见原因:跨大版本编译器、PGO/LTO 不同、ASLR rebase 没对齐
|
|
268
|
+
- **inline 函数把 diff 撑大**:编译器决定 inline 的函数变了会让父函数大范围变红,但根本没改逻辑。要看真实控制流分支
|
|
269
|
+
- **switch table 重排**:编译器可能重排 case,看着像新增 block,其实只是顺序变化
|
|
270
|
+
- **Profile-Guided Optimization (PGO) 抖动**:连续两个版本的二进制即使源码一字不改也可能 layout 不同
|
|
271
|
+
- **stripped Linux 内核**:没 debuginfo 时所有函数名都是 `FUN_xxxx`,必须先吃 BTF / kallsyms 或用 binary-diff 迁移符号
|