opencode-skills-collection 4.0.43 → 4.0.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled-skills/.antigravity-install-manifest.json +47 -1
- package/bundled-skills/api-rate-limit-handler/SKILL.md +282 -0
- package/bundled-skills/api-security/SKILL.md +205 -0
- package/bundled-skills/api-security/references/jwt-oauth-testing.md +123 -0
- package/bundled-skills/api-security/references/rest-graphql-testing.md +137 -0
- package/bundled-skills/apk-reverse/SKILL.md +438 -0
- package/bundled-skills/apk-reverse/references/android-advanced.md +365 -0
- package/bundled-skills/apk-reverse/references/apk-security-checklist.md +230 -0
- package/bundled-skills/apk-reverse/references/frida-bypass-kit.md +70 -0
- package/bundled-skills/apk-reverse/references/frida-cookbook.md +472 -0
- package/bundled-skills/attack-chain/SKILL.md +185 -0
- package/bundled-skills/attack-chain/references/attack-playbooks.md +126 -0
- package/bundled-skills/attack-chain/references/evasion-cheatsheet.md +133 -0
- package/bundled-skills/attack-chain/references/lifecycle-checklist.md +37 -0
- package/bundled-skills/attack-chain/references/phases.md +490 -0
- package/bundled-skills/binary-diff/SKILL.md +320 -0
- package/bundled-skills/binary-diff/references/prompt-template.md +173 -0
- package/bundled-skills/browser-extension-reverse/SKILL.md +99 -0
- package/bundled-skills/browser-extension-reverse/references/extension-analysis.md +10 -0
- package/bundled-skills/case-review/SKILL.md +167 -0
- package/bundled-skills/cloud-k8s/SKILL.md +124 -0
- package/bundled-skills/cloud-k8s/references/k8s-cloud-checklist.md +16 -0
- package/bundled-skills/code-audit/SKILL.md +92 -0
- package/bundled-skills/code-audit/references/sast-review-checklist.md +10 -0
- package/bundled-skills/database-security/SKILL.md +81 -0
- package/bundled-skills/database-security/references/db-misconfig-checklist.md +9 -0
- package/bundled-skills/diagram-generator/SKILL.md +199 -0
- package/bundled-skills/diagram-generator/references/README.md +3 -0
- package/bundled-skills/diagram-generator/references/diagram-patterns.md +254 -0
- package/bundled-skills/digital-forensics/SKILL.md +93 -0
- package/bundled-skills/digital-forensics/references/forensics-triage.md +10 -0
- package/bundled-skills/docs/integrations/jetski-cortex.md +3 -3
- package/bundled-skills/docs/integrations/jetski-gemini-loader/README.md +1 -1
- package/bundled-skills/docs/maintainers/repo-growth-seo.md +1 -1
- package/bundled-skills/docs/maintainers/skills-update-guide.md +1 -1
- package/bundled-skills/docs/sources/sources.md +9 -0
- package/bundled-skills/docs/users/aas-core.md +1 -1
- package/bundled-skills/docs/users/bundles.md +1 -1
- package/bundled-skills/docs/users/claude-code-skills.md +1 -1
- package/bundled-skills/docs/users/gemini-cli-skills.md +1 -1
- package/bundled-skills/docs/users/kiro-integration.md +1 -1
- package/bundled-skills/docs/users/usage.md +3 -3
- package/bundled-skills/docs/users/visual-guide.md +4 -4
- package/bundled-skills/docs-generator/SKILL.md +197 -0
- package/bundled-skills/docs-generator/references/security-report-templates.md +348 -0
- package/bundled-skills/docs-generator/references/templates.md +102 -0
- package/bundled-skills/docs-generator/references/vendor-report-rules.md +263 -0
- package/bundled-skills/dotnet-reverse/SKILL.md +197 -0
- package/bundled-skills/dotnet-reverse/references/common-workflow.md +171 -0
- package/bundled-skills/dotnet-reverse/references/obfuscators.md +145 -0
- package/bundled-skills/dotnet-reverse/references/sharp-tools.md +164 -0
- package/bundled-skills/edr-bypass-re/SKILL.md +248 -0
- package/bundled-skills/edr-bypass-re/references/hook-survey.md +226 -0
- package/bundled-skills/edr-bypass-re/references/telemetry-blinding.md +346 -0
- package/bundled-skills/edr-bypass-re/references/unhook-techniques.md +338 -0
- package/bundled-skills/email-security/SKILL.md +81 -0
- package/bundled-skills/email-security/references/email-auth-checklist.md +8 -0
- package/bundled-skills/firmware-pentest/SKILL.md +381 -0
- package/bundled-skills/firmware-pentest/references/emba-automated-analysis.md +192 -0
- package/bundled-skills/firmware-pentest/references/emulation-and-fuzz.md +337 -0
- package/bundled-skills/firmware-pentest/references/extraction-methodology.md +285 -0
- package/bundled-skills/ghidra-reverse/SKILL.md +98 -0
- package/bundled-skills/ghidra-reverse/references/ghidra-cheatsheet.md +12 -0
- package/bundled-skills/go-rust-reverse/SKILL.md +82 -0
- package/bundled-skills/go-rust-reverse/references/go-rust-notes.md +5 -0
- package/bundled-skills/hardware-security/SKILL.md +80 -0
- package/bundled-skills/hardware-security/references/debug-interface-triage.md +7 -0
- package/bundled-skills/ida-reverse/SKILL.md +401 -0
- package/bundled-skills/ida-reverse/references/LOCAL-SETUP.md +66 -0
- package/bundled-skills/ida-reverse/references/ida-mcp-cheatsheet.md +515 -0
- package/bundled-skills/identity-federation/SKILL.md +81 -0
- package/bundled-skills/identity-federation/references/sso-flow-checklist.md +9 -0
- package/bundled-skills/instructree/SKILL.md +94 -0
- package/bundled-skills/js-reverse/SKILL.md +239 -0
- package/bundled-skills/js-reverse/references/ast-deobfuscation.md +3 -0
- package/bundled-skills/js-reverse/references/automation-entry.md +12 -0
- package/bundled-skills/js-reverse/references/env-patching.md +6 -0
- package/bundled-skills/js-reverse/references/fallbacks.md +8 -0
- package/bundled-skills/js-reverse/references/instrumentation.md +9 -0
- package/bundled-skills/js-reverse/references/local-rebuild.md +11 -0
- package/bundled-skills/js-reverse/references/mcp-task-template.md +30 -0
- package/bundled-skills/js-reverse/references/node-env-rebuild.md +9 -0
- package/bundled-skills/js-reverse/references/output-contract.md +9 -0
- package/bundled-skills/js-reverse/references/task-artifacts.md +11 -0
- package/bundled-skills/js-reverse/references/task-input-template.md +11 -0
- package/bundled-skills/js-reverse/references/tool-defaults.md +7 -0
- package/bundled-skills/llm-security/SKILL.md +160 -0
- package/bundled-skills/llm-security/references/agent-obedience-engineering.md +243 -0
- package/bundled-skills/llm-security/references/agent-security-testing.md +116 -0
- package/bundled-skills/llm-security/references/owasp-llm-top10.md +48 -0
- package/bundled-skills/llm-security/references/prompt-injection-methodology.md +107 -0
- package/bundled-skills/loki-mode/examples/todo-app-generated/backend/package-lock.json +4 -4
- package/bundled-skills/loki-mode/examples/todo-app-generated/backend/package.json +1 -1
- package/bundled-skills/macos-reverse/SKILL.md +85 -0
- package/bundled-skills/macos-reverse/references/macho-triage.md +10 -0
- package/bundled-skills/malware-analysis/SKILL.md +311 -0
- package/bundled-skills/malware-analysis/references/anti-analysis-techniques.md +205 -0
- package/bundled-skills/malware-analysis/references/sandbox-orchestration.md +204 -0
- package/bundled-skills/malware-analysis/references/yara-sigma-rules.md +232 -0
- package/bundled-skills/mobile-reverse/SKILL.md +222 -0
- package/bundled-skills/mobile-reverse/references/anti-detection-bypass.md +182 -0
- package/bundled-skills/mobile-reverse/references/frida-objection-deep.md +218 -0
- package/bundled-skills/mobile-reverse/references/ios-reverse-guide.md +177 -0
- package/bundled-skills/muapi-media/SKILL.md +311 -0
- package/bundled-skills/ot-ics/SKILL.md +117 -0
- package/bundled-skills/ot-ics/references/ot-safe-assessment.md +10 -0
- package/bundled-skills/patch-diff-exploit/SKILL.md +278 -0
- package/bundled-skills/patch-diff-exploit/references/diff-tools-comparison.md +271 -0
- package/bundled-skills/patch-diff-exploit/references/patch-tuesday-workflow.md +253 -0
- package/bundled-skills/patch-diff-exploit/references/root-cause-and-poc.md +198 -0
- package/bundled-skills/pentest-tools/SKILL.md +346 -0
- package/bundled-skills/pentest-tools/references/ai-pentest-agents.md +148 -0
- package/bundled-skills/pentest-tools/references/ai-pentesting-landscape-2026.md +73 -0
- package/bundled-skills/pentest-tools/references/automation-loop-pattern.md +153 -0
- package/bundled-skills/pentest-tools/references/awesome-pentest-digest.md +175 -0
- package/bundled-skills/pentest-tools/references/burpsuite-mcp-guide.md +769 -0
- package/bundled-skills/pentest-tools/references/client-side-lab-playbook.md +155 -0
- package/bundled-skills/pentest-tools/references/kali-mcp-ecosystem.md +119 -0
- package/bundled-skills/pentest-tools/references/msf-protocol.md +169 -0
- package/bundled-skills/pentest-tools/references/network-attack-defense.md +350 -0
- package/bundled-skills/pentest-tools/references/nuclei-guide-2026.md +157 -0
- package/bundled-skills/pentest-tools/references/payloads.md +32 -0
- package/bundled-skills/pentest-tools/references/pentest-ai-agents-matrix.md +117 -0
- package/bundled-skills/pentest-tools/references/pentest-loop.md +270 -0
- package/bundled-skills/pentest-tools/references/recon-pipeline.md +154 -0
- package/bundled-skills/pentest-tools/references/templates/findings.md +21 -0
- package/bundled-skills/pentest-tools/references/templates/progress.md +17 -0
- package/bundled-skills/pentest-tools/references/templates/rules.md +35 -0
- package/bundled-skills/pentest-tools/references/templates/scope.md +29 -0
- package/bundled-skills/pentest-tools/references/templates/task_plan.md +27 -0
- package/bundled-skills/pentest-tools/references/web-attack-cheatsheet.md +387 -0
- package/bundled-skills/pentest-tools/src-hunter/SKILL.md +243 -0
- package/bundled-skills/pentest-tools/src-hunter/references/README.en.md +115 -0
- package/bundled-skills/pentest-tools/src-hunter/references/README.md +148 -0
- package/bundled-skills/pentest-tools/src-hunter/references/dictionaries/00-index.md +44 -0
- package/bundled-skills/pentest-tools/src-hunter/references/dictionaries/chinese-srcfingerprints.md +515 -0
- package/bundled-skills/pentest-tools/src-hunter/references/dictionaries/default-credentials-cn.md +274 -0
- package/bundled-skills/pentest-tools/src-hunter/references/industry/00-index.md +66 -0
- package/bundled-skills/pentest-tools/src-hunter/references/industry/banking-finance.md +338 -0
- package/bundled-skills/pentest-tools/src-hunter/references/industry/telecom-isp.md +315 -0
- package/bundled-skills/pentest-tools/src-hunter/references/methodology/00-index.md +68 -0
- package/bundled-skills/pentest-tools/src-hunter/references/methodology/01-attack-priority.md +143 -0
- package/bundled-skills/pentest-tools/src-hunter/references/methodology/02-bypass-toolkit.md +357 -0
- package/bundled-skills/pentest-tools/src-hunter/references/methodology/03-evidence-discipline.md +205 -0
- package/bundled-skills/pentest-tools/src-hunter/references/methodology/04-control-gap-hunting.md +238 -0
- package/bundled-skills/pentest-tools/src-hunter/references/methodology/05-srctimebox-priority.md +161 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet/adcs/346/224/273/345/207/273.md +254 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet/exchange/346/224/273/345/207/273.md +254 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet/sharepoint/346/224/273/345/207/273.md +113 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//344/277/241/346/201/257/346/224/266/351/233/206.md +947 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//345/205/215/346/235/200/344/270/216/350/247/204/351/201/277.md +780 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//345/207/255/350/257/201/347/252/203/345/217/226.md +1259 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//345/237/237/346/270/227/351/200/217/346/224/273/345/207/273.md +753 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//346/235/203/351/231/220/346/217/220/345/215/207.md +819 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//346/235/203/351/231/220/347/273/264/346/214/201.md +577 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//346/250/252/345/220/221/347/247/273/345/212/250.md +838 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//351/232/247/351/201/223/344/273/243/347/220/206.md +604 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/ai/345/256/211/345/205/250.md +698 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/api/345/256/211/345/205/250.md +1935 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/csrf/350/267/250/347/253/231/350/257/267/346/261/202/344/274/252/351/200/240.md +952 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/jwt/345/256/211/345/205/250.md +496 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/lfi-rfi/346/226/207/344/273/266/345/214/205/345/220/253.md +1365 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/rce/350/277/234/347/250/213/344/273/243/347/240/201/346/211/247/350/241/214.md +1329 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/sql-nosql/346/263/250/345/205/245.md +1924 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/ssrf/346/234/215/345/212/241/347/253/257/350/257/267/346/261/202/344/274/252/351/200/240.md +1256 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/ssti/346/250/241/346/235/277/346/263/250/345/205/245.md +1151 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/websocket/345/256/211/345/205/250.md +487 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/xss/350/267/250/347/253/231/350/204/232/346/234/254.md +1465 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/xxe/345/256/236/344/275/223/346/263/250/345/205/245.md +815 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//344/270/232/345/212/241/351/200/273/350/276/221/346/274/217/346/264/236.md +594 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//344/272/221/345/256/211/345/205/250/346/274/217/346/264/236.md +561 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//344/276/233/345/272/224/351/223/276/346/224/273/345/207/273.md +399 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//345/216/237/345/236/213/351/223/276/346/261/241/346/237/223.md +401 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//345/274/200/346/224/276/351/207/215/345/256/232/345/220/221.md +396 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//346/226/207/344/273/266/346/274/217/346/264/236.md +0 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//346/241/206/346/236/266/346/274/217/346/264/236.md +2304 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//347/202/271/345/207/273/345/212/253/346/214/201.md +339 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//347/274/223/345/255/230/344/270/216cdn/345/256/211/345/205/250.md +497 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//350/256/244/350/257/201/346/274/217/346/264/236.md +1778 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//350/257/267/346/261/202/350/265/260/347/247/201.md +854 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/index.md +69 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools/web/346/270/227/351/200/217.md +662 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools/windows/346/270/227/351/200/217.md +100 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//344/277/241/346/201/257/346/224/266/351/233/206.md +852 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//345/206/205/347/275/221/346/270/227/351/200/217.md +873 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//345/207/255/350/257/201/347/252/203/345/217/226.md +186 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//345/237/237/346/270/227/351/200/217.md +50 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//345/257/206/347/240/201/346/224/273/345/207/273.md +462 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//346/235/203/351/231/220/346/217/220/345/215/207.md +168 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//346/274/217/346/264/236/345/210/251/347/224/250.md +445 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//347/263/273/347/273/237/345/221/275/344/273/244.md +410 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//347/272/242/351/230/237/345/267/245/345/205/267.md +64 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//347/274/226/347/240/201/350/247/243/347/240/201.md +226 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//351/232/247/351/201/223/344/273/243/347/220/206.md +84 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/waf-bypass.md +6504 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/00-index.md +57 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/api-rest.md +2050 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/arbitrary-x-authz.md +481 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/dos.md +615 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/file-upload.md +1365 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/graphql.md +253 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/http-smuggling.md +924 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/info-disclosure.md +432 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/intranet-postexp.md +4845 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/llm-prompt-injection.md +1394 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/logic-flaws.md +1796 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/mobile.md +397 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/oauth-saml-jwt.md +2504 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/path-traversal.md +1297 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/race-conditions.md +207 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/rce.md +4829 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/sqli.md +1620 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/ssrf-cache-host.md +2098 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/unauth-access.md +330 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/xss.md +1159 -0
- package/bundled-skills/pentest-tools/src-hunter/references/templates/report-submission.md +346 -0
- package/bundled-skills/pentest-tools/src-hunter/references/tools/mcp-jshook.md +174 -0
- package/bundled-skills/protocol-reverse/SKILL.md +108 -0
- package/bundled-skills/protocol-reverse/references/protocol-workflow.md +29 -0
- package/bundled-skills/pwn-chain/SKILL.md +209 -0
- package/bundled-skills/pwn-chain/references/heap-pwn.md +283 -0
- package/bundled-skills/pwn-chain/references/kernel-pwn.md +370 -0
- package/bundled-skills/pwn-chain/references/stack-pwn.md +312 -0
- package/bundled-skills/radare2/SKILL.md +460 -0
- package/bundled-skills/radare2/references/cheatsheet.md +129 -0
- package/bundled-skills/radio-sdr/SKILL.md +77 -0
- package/bundled-skills/radio-sdr/references/sdr-lab-rules.md +6 -0
- package/bundled-skills/reverse-browser-automation/SKILL.md +249 -0
- package/bundled-skills/reverse-browser-automation/references/playwright-cheatsheet.md +425 -0
- package/bundled-skills/reverse-engineering/SKILL.md +213 -0
- package/bundled-skills/reverse-engineering/dsl-vm-reverse/SKILL.md +388 -0
- package/bundled-skills/reverse-engineering/references/ai-assisted-re.md +149 -0
- package/bundled-skills/reverse-engineering/references/anti-analysis.md +836 -0
- package/bundled-skills/reverse-engineering/references/awesome-re-resources.md +135 -0
- package/bundled-skills/reverse-engineering/references/crypto-decode-tools.md +220 -0
- package/bundled-skills/reverse-engineering/references/elf-analysis.md +296 -0
- package/bundled-skills/reverse-engineering/references/field-notes.md +540 -0
- package/bundled-skills/reverse-engineering/references/go-reverse.md +240 -0
- package/bundled-skills/reverse-engineering/references/kernel-driver-reverse.md +298 -0
- package/bundled-skills/reverse-engineering/references/languages-compiled.md +587 -0
- package/bundled-skills/reverse-engineering/references/languages-platforms.md +486 -0
- package/bundled-skills/reverse-engineering/references/languages.md +499 -0
- package/bundled-skills/reverse-engineering/references/nonpe-format-cookbook.md +301 -0
- package/bundled-skills/reverse-engineering/references/ollvm-deobfuscation.md +501 -0
- package/bundled-skills/reverse-engineering/references/patterns-ctf-2.md +397 -0
- package/bundled-skills/reverse-engineering/references/patterns-ctf-3.md +719 -0
- package/bundled-skills/reverse-engineering/references/patterns-ctf.md +532 -0
- package/bundled-skills/reverse-engineering/references/patterns.md +801 -0
- package/bundled-skills/reverse-engineering/references/platforms-hardware.md +304 -0
- package/bundled-skills/reverse-engineering/references/platforms.md +442 -0
- package/bundled-skills/reverse-engineering/references/re-agent-workflow.md +240 -0
- package/bundled-skills/reverse-engineering/references/tools-advanced.md +822 -0
- package/bundled-skills/reverse-engineering/references/tools-dynamic.md +846 -0
- package/bundled-skills/reverse-engineering/references/tools.md +546 -0
- package/bundled-skills/supply-chain-security/SKILL.md +180 -0
- package/bundled-skills/supply-chain-security/references/cicd-pipeline-security.md +137 -0
- package/bundled-skills/supply-chain-security/references/sbom-sca-methodology.md +74 -0
- package/bundled-skills/thick-client/SKILL.md +104 -0
- package/bundled-skills/thick-client/references/thick-client-checklist.md +9 -0
- package/bundled-skills/threat-hunting/SKILL.md +94 -0
- package/bundled-skills/threat-hunting/references/hunting-loop.md +5 -0
- package/bundled-skills/threat-intelligence/SKILL.md +176 -0
- package/bundled-skills/threat-intelligence/references/x-public-intelligence.md +93 -0
- package/bundled-skills/tree-ring-memory/SKILL.md +29 -9
- package/bundled-skills/wifi-wireless/SKILL.md +80 -0
- package/bundled-skills/wifi-wireless/references/wireless-lab-rules.md +6 -0
- package/bundled-skills/windows-ad/SKILL.md +109 -0
- package/bundled-skills/windows-ad/references/ad-attack-paths.md +12 -0
- package/package.json +1 -1
- package/skills_index.json +1214 -2
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
# Go 二进制逆向指南
|
|
2
|
+
|
|
3
|
+
> Go 编译的二进制有独特的挑战:静态链接导致体积巨大、函数数量上万、字符串格式特殊、符号 strip 后恢复困难。
|
|
4
|
+
> 本文档覆盖工具链、恢复技巧和实战工作流。
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Go 二进制的特征识别
|
|
9
|
+
|
|
10
|
+
快速判断一个二进制是否是 Go 编译的:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
# 字符串特征
|
|
14
|
+
strings binary | grep -E "runtime\.|go\.buildid|GOROOT"
|
|
15
|
+
|
|
16
|
+
# rabin2 侦察
|
|
17
|
+
rabin2 -z binary | grep -i "runtime"
|
|
18
|
+
|
|
19
|
+
# 文件大小异常大(静态链接 runtime)
|
|
20
|
+
# 典型 Hello World: C ~20KB, Go ~2MB
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
常见特征:
|
|
24
|
+
- 包含 `runtime.` 前缀的大量函数
|
|
25
|
+
- 包含 `go.buildid` section
|
|
26
|
+
- 包含 `GOROOT`、`GOPATH` 路径字符串
|
|
27
|
+
- 函数数量 5000-50000+(包含整个 runtime 和标准库)
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 核心工具链
|
|
32
|
+
|
|
33
|
+
### 符号恢复
|
|
34
|
+
|
|
35
|
+
| 工具 | 用途 | 链接 |
|
|
36
|
+
|------|------|------|
|
|
37
|
+
| **GoReSym** | Mandiant 出品,解析 Go 符号信息(pclntab/moduledata) | https://github.com/mandiant/GoReSym |
|
|
38
|
+
| **GoResolver** | Volexity 出品,用 CFG 相似度自动去混淆 Garble 二进制 | https://github.com/volexity/GoResolver |
|
|
39
|
+
| **redress** | 分析 stripped Go 二进制,恢复类型/接口/包结构 | https://github.com/goretk/redress |
|
|
40
|
+
| **GoStringUngarbler** | Google 出品,专门恢复 Garble 混淆的字符串 | https://github.com/mandiant/GoStringUngarbler |
|
|
41
|
+
|
|
42
|
+
### IDA 插件
|
|
43
|
+
|
|
44
|
+
| 工具 | 用途 | 链接 |
|
|
45
|
+
|------|------|------|
|
|
46
|
+
| **go_parser** | IDA 插件,解析 moduledata/pclntab/类型信息 | https://github.com/0xjiayu/go_parser |
|
|
47
|
+
| **IDAGolangHelper** | IDA 脚本集,解析 Go 类型信息 | https://github.com/sibears/IDAGolangHelper |
|
|
48
|
+
| **AlphaGolang** | SentinelLabs 的 IDAPython 脚本集 | https://github.com/SentineLabs/AlphaGolang |
|
|
49
|
+
| **IDA 9.2+ 原生支持** | Hex-Rays 官方 Go 反编译改进 | https://hex-rays.com/blog/stop-guessing-and-start-going |
|
|
50
|
+
|
|
51
|
+
### Ghidra 插件
|
|
52
|
+
|
|
53
|
+
| 工具 | 用途 | 链接 |
|
|
54
|
+
|------|------|------|
|
|
55
|
+
| **Ghidra + GoReSym 输出** | 用 GoReSym 导出符号后导入 Ghidra | 配合使用 |
|
|
56
|
+
| **golang_loader_assist** | Ghidra Go 加载辅助 | 社区脚本 |
|
|
57
|
+
|
|
58
|
+
### 独立分析工具
|
|
59
|
+
|
|
60
|
+
| 工具 | 用途 | 链接 |
|
|
61
|
+
|------|------|------|
|
|
62
|
+
| **gore** | Go 逆向工程库(redress 的底层) | https://github.com/goretk/gore |
|
|
63
|
+
| **garble** | Go 混淆工具(了解它才能对抗它) | https://github.com/burrowers/garble |
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Go 二进制的关键结构
|
|
68
|
+
|
|
69
|
+
### pclntab (PC Line Table)
|
|
70
|
+
|
|
71
|
+
Go 二进制中最重要的结构,包含:
|
|
72
|
+
- 所有函数名和地址映射
|
|
73
|
+
- 源文件路径
|
|
74
|
+
- 行号信息
|
|
75
|
+
- 栈帧大小
|
|
76
|
+
|
|
77
|
+
即使 strip 了符号,pclntab 通常仍然存在(Go runtime 依赖它)。
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
定位方法:
|
|
81
|
+
1. 搜索 magic bytes: 0xFFFFFFF0 (Go 1.16+) 或 0xFFFFFFFB (Go 1.18+)
|
|
82
|
+
2. 用 GoReSym 自动定位
|
|
83
|
+
3. 用 go_parser IDA 插件自动解析
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### moduledata
|
|
87
|
+
|
|
88
|
+
包含:
|
|
89
|
+
- pclntab 指针
|
|
90
|
+
- 类型信息表
|
|
91
|
+
- itab(接口表)
|
|
92
|
+
- 全局变量信息
|
|
93
|
+
|
|
94
|
+
### 字符串格式
|
|
95
|
+
|
|
96
|
+
Go 字符串不是 C 风格的 null-terminated,而是 `(pointer, length)` 结构:
|
|
97
|
+
|
|
98
|
+
```text
|
|
99
|
+
C 字符串: "hello\0"
|
|
100
|
+
Go 字符串: struct { ptr *byte; len int } → ptr 指向 "hello"(无 \0)
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
这导致 IDA/Ghidra 默认的字符串识别会漏掉大量 Go 字符串。
|
|
104
|
+
|
|
105
|
+
**解决方案**:
|
|
106
|
+
- 用 `go_parser` 自动识别 Go 字符串
|
|
107
|
+
- 用 GoReSym 导出字符串列表
|
|
108
|
+
- 手动:找到 `runtime.stringtable` 或通过交叉引用定位
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 实战工作流
|
|
113
|
+
|
|
114
|
+
### 场景 1:未 strip 的 Go 二进制
|
|
115
|
+
|
|
116
|
+
```text
|
|
117
|
+
1. GoReSym -t -d -p binary > symbols.json
|
|
118
|
+
→ 导出所有函数名、类型、源文件路径
|
|
119
|
+
2. 加载到 IDA/Ghidra
|
|
120
|
+
3. 导入 GoReSym 的符号信息
|
|
121
|
+
4. 过滤掉 runtime.* 和标准库函数,聚焦用户代码
|
|
122
|
+
5. 从 main.main 开始分析
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### 场景 2:strip 后的 Go 二进制
|
|
126
|
+
|
|
127
|
+
```text
|
|
128
|
+
1. GoReSym -t -d -p binary > symbols.json
|
|
129
|
+
→ 即使 strip 了,pclntab 通常还在
|
|
130
|
+
2. 如果 GoReSym 失败 → 用 redress
|
|
131
|
+
redress -src binary # 恢复源文件路径
|
|
132
|
+
redress -pkg binary # 恢复包结构
|
|
133
|
+
redress -type binary # 恢复类型信息
|
|
134
|
+
3. 加载到 IDA + go_parser 插件
|
|
135
|
+
4. 运行 go_parser 自动恢复
|
|
136
|
+
5. 从恢复的 main.main 开始
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### 场景 3:Garble 混淆的 Go 二进制
|
|
140
|
+
|
|
141
|
+
```text
|
|
142
|
+
Garble 会:
|
|
143
|
+
- 随机化函数名(main.main → main.a3f2b1c)
|
|
144
|
+
- 加密字符串
|
|
145
|
+
- 移除文件路径信息
|
|
146
|
+
- 混淆包名
|
|
147
|
+
|
|
148
|
+
对抗方法:
|
|
149
|
+
1. GoResolver(CFG 签名匹配)
|
|
150
|
+
→ 通过控制流图相似度恢复标准库函数名
|
|
151
|
+
2. GoStringUngarbler(字符串解密)
|
|
152
|
+
→ 自动识别 Garble 的字符串加密模式并解密
|
|
153
|
+
3. 动态分析(Frida/dlv)
|
|
154
|
+
→ Hook runtime 函数观察实际行为
|
|
155
|
+
4. 对比分析
|
|
156
|
+
→ 编译同版本 Go 的 Hello World,用 binary-diff 对比 runtime 部分
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### 场景 4:CGo 混合编译
|
|
160
|
+
|
|
161
|
+
```text
|
|
162
|
+
1. 识别 CGo 边界(_cgo_* 函数)
|
|
163
|
+
2. Go 部分用 go_parser 恢复
|
|
164
|
+
3. C 部分用常规 IDA 分析
|
|
165
|
+
4. 关注 _cgo_topofstack、crosscall2 等桥接函数
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## 常用命令速查
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
# GoReSym:导出符号
|
|
174
|
+
GoReSym -t -d -p binary > symbols.json
|
|
175
|
+
GoReSym -t -d -p binary -o ida_script.py # 生成 IDA 脚本
|
|
176
|
+
|
|
177
|
+
# redress:分析 stripped 二进制
|
|
178
|
+
redress -src binary # 源文件路径
|
|
179
|
+
redress -pkg binary # 包结构
|
|
180
|
+
redress -type binary # 类型信息
|
|
181
|
+
redress -interface binary # 接口信息
|
|
182
|
+
redress -filepath binary # 完整文件路径
|
|
183
|
+
|
|
184
|
+
# GoResolver:去混淆 Garble
|
|
185
|
+
GoResolver -binary binary -output resolved.json
|
|
186
|
+
|
|
187
|
+
# GoStringUngarbler:解密 Garble 字符串
|
|
188
|
+
GoStringUngarbler -i binary -o deobfuscated_binary
|
|
189
|
+
|
|
190
|
+
# 快速判断 Go 版本
|
|
191
|
+
strings binary | grep "go1\."
|
|
192
|
+
GoReSym -p binary | grep "Version"
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## IDA 中的 Go 分析流程
|
|
198
|
+
|
|
199
|
+
```text
|
|
200
|
+
1. 加载二进制(选择正确的架构)
|
|
201
|
+
2. 等待自动分析完成
|
|
202
|
+
3. 运行 go_parser 插件:
|
|
203
|
+
- File → Script File → go_parser.py
|
|
204
|
+
- 或 Edit → Plugins → Go Parser
|
|
205
|
+
4. 插件会自动:
|
|
206
|
+
- 解析 pclntab
|
|
207
|
+
- 恢复函数名
|
|
208
|
+
- 标记 Go 字符串
|
|
209
|
+
- 解析类型信息
|
|
210
|
+
5. 过滤视图:
|
|
211
|
+
- 隐藏 runtime.* 函数
|
|
212
|
+
- 聚焦 main.* 和第三方包
|
|
213
|
+
6. 从 main.main 开始逆向
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## 常见陷阱
|
|
219
|
+
|
|
220
|
+
| 陷阱 | 说明 | 解决 |
|
|
221
|
+
|------|------|------|
|
|
222
|
+
| 函数太多看不过来 | Go 静态链接导致 5000-50000 函数 | 用包名过滤,只看 main.* 和业务包 |
|
|
223
|
+
| 字符串识别不全 | Go 字符串不是 null-terminated | 用 go_parser 或 GoReSym 恢复 |
|
|
224
|
+
| 反编译结果难读 | Go 的 defer/goroutine/interface 让伪代码复杂 | IDA 9.2+ 有改进,或用动态分析辅助 |
|
|
225
|
+
| Garble 混淆 | 函数名/字符串全部随机化 | GoResolver + GoStringUngarbler |
|
|
226
|
+
| 版本差异 | 不同 Go 版本的 pclntab 格式不同 | GoReSym 支持 Go 1.2-1.23+ |
|
|
227
|
+
| CGo 边界 | Go 和 C 代码混合 | 识别 _cgo_* 函数作为分界线 |
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## 与其他 skill 的配合
|
|
232
|
+
|
|
233
|
+
| 需求 | 用什么 |
|
|
234
|
+
|------|--------|
|
|
235
|
+
| IDA 深度分析 Go 二进制 | `ida-reverse/` + go_parser 插件 |
|
|
236
|
+
| Ghidra 分析(免费) | Ghidra + GoReSym 符号导入 |
|
|
237
|
+
| 快速侦察 | `radare2/` — `rabin2 -z` 看字符串 |
|
|
238
|
+
| 动态 Hook | Frida(Hook runtime 函数)或 dlv(Go 原生调试器) |
|
|
239
|
+
| 跨版本对比 | `binary-diff/` — 旧版有符号迁移到新版 |
|
|
240
|
+
| Garble 去混淆 | GoResolver + GoStringUngarbler |
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
# 内核驱动逆向参考
|
|
2
|
+
|
|
3
|
+
> 覆盖 Windows/Linux 内核驱动逆向、Rootkit 分析、C/C++ 二进制模式识别。
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Windows 驱动逆向
|
|
8
|
+
|
|
9
|
+
### 驱动类型
|
|
10
|
+
|
|
11
|
+
| 类型 | 特征 | 分析重点 |
|
|
12
|
+
|------|------|---------|
|
|
13
|
+
| WDM (Windows Driver Model) | 老式驱动,手动管理 IRP | DriverEntry → 设备创建 → Dispatch 例程 |
|
|
14
|
+
| KMDF (Kernel Mode Driver Framework) | 现代框架,事件驱动 | EvtDriverDeviceAdd → Queue → I/O 回调 |
|
|
15
|
+
| WDF (Windows Driver Foundation) | KMDF + UMDF 统称 | 看 WdfDriverCreate 调用 |
|
|
16
|
+
| Minifilter | 文件系统过滤驱动 | FltRegisterFilter → Pre/Post 回调 |
|
|
17
|
+
|
|
18
|
+
### WDM 驱动分析流程
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
1. 找 DriverEntry(入口点)
|
|
22
|
+
- IDA 自动识别,或搜索 IoCreateDevice / IoCreateSymbolicLink
|
|
23
|
+
|
|
24
|
+
2. 找设备名和符号链接
|
|
25
|
+
- IoCreateDevice → DeviceName(如 \Device\MyDriver)
|
|
26
|
+
- IoCreateSymbolicLink → SymLink(如 \DosDevices\MyDriver)
|
|
27
|
+
|
|
28
|
+
3. 找 Dispatch 例程
|
|
29
|
+
- DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = DispatchIoctl
|
|
30
|
+
- 这是用户态通过 DeviceIoControl 调用的入口
|
|
31
|
+
|
|
32
|
+
4. 分析 IOCTL 处理
|
|
33
|
+
- switch(IoControlCode) 分发不同功能
|
|
34
|
+
- IOCTL 编码:CTL_CODE(DeviceType, Function, Method, Access)
|
|
35
|
+
- Method: METHOD_BUFFERED / METHOD_IN_DIRECT / METHOD_OUT_DIRECT / METHOD_NEITHER
|
|
36
|
+
|
|
37
|
+
5. 找漏洞
|
|
38
|
+
- 用户可控缓冲区未验证长度 → 溢出
|
|
39
|
+
- METHOD_NEITHER 直接使用用户指针 → 任意读写
|
|
40
|
+
- 未检查 IOCTL 权限 → 非特权用户可调用
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### IOCTL 编码解析
|
|
44
|
+
|
|
45
|
+
```python
|
|
46
|
+
# 解析 IOCTL code
|
|
47
|
+
def decode_ioctl(code):
|
|
48
|
+
device_type = (code >> 16) & 0xFFFF
|
|
49
|
+
access = (code >> 14) & 0x3
|
|
50
|
+
function = (code >> 2) & 0xFFF
|
|
51
|
+
method = code & 0x3
|
|
52
|
+
|
|
53
|
+
methods = {0: "BUFFERED", 1: "IN_DIRECT", 2: "OUT_DIRECT", 3: "NEITHER"}
|
|
54
|
+
access_types = {0: "ANY", 1: "READ", 2: "WRITE", 3: "READ|WRITE"}
|
|
55
|
+
|
|
56
|
+
return f"DevType=0x{device_type:X} Func=0x{function:X} Method={methods[method]} Access={access_types[access]}"
|
|
57
|
+
|
|
58
|
+
# 示例
|
|
59
|
+
decode_ioctl(0x80002034)
|
|
60
|
+
# DevType=0x8000 Func=0x80D Method=BUFFERED Access=ANY
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### IDA 插件
|
|
64
|
+
|
|
65
|
+
| 插件 | 用途 | 链接 |
|
|
66
|
+
|------|------|------|
|
|
67
|
+
| **Driver Buddy Reloaded** | 自动识别 IOCTL、Dispatch、设备名 | https://github.com/VoidSec/DriverBuddyReloaded |
|
|
68
|
+
| **WinDbg + IDA** | 内核调试 + 静态分析配合 | 内置 |
|
|
69
|
+
| **FLIRT/Lumina** | 识别 WDK 库函数 | IDA 内置 |
|
|
70
|
+
|
|
71
|
+
### 参考文章
|
|
72
|
+
|
|
73
|
+
- [Windows Drivers RE Methodology (VoidSec)](https://voidsec.com/windows-drivers-reverse-engineering-methodology/) — 最完整的 WDM 驱动逆向方法论
|
|
74
|
+
- [Driver Reversing 101](https://eversinc33.com/posts/driver-reversing.html) — WDM vs KMDF 对比
|
|
75
|
+
- [Methodology of Reversing Vulnerable Killer Drivers](https://whiteknightlabs.com/2025/10/28/methodology-of-reversing-vulnerable-killer-drivers/) — 漏洞驱动分析
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Linux 内核模块逆向
|
|
80
|
+
|
|
81
|
+
### LKM (Loadable Kernel Module) 结构
|
|
82
|
+
|
|
83
|
+
```text
|
|
84
|
+
关键函数:
|
|
85
|
+
- init_module / module_init → 模块加载时执行
|
|
86
|
+
- cleanup_module / module_exit → 模块卸载时执行
|
|
87
|
+
|
|
88
|
+
关键结构:
|
|
89
|
+
- struct file_operations → 字符设备的 open/read/write/ioctl
|
|
90
|
+
- struct net_device_ops → 网络设备操作
|
|
91
|
+
- struct block_device_operations → 块设备操作
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### 分析流程
|
|
95
|
+
|
|
96
|
+
```text
|
|
97
|
+
1. 确认是内核模块
|
|
98
|
+
file module.ko → "ELF 64-bit ... relocatable"(注意是 relocatable 不是 executable)
|
|
99
|
+
|
|
100
|
+
2. 找 init/exit 函数
|
|
101
|
+
readelf -s module.ko | grep -E "init_module|cleanup_module"
|
|
102
|
+
或在 .modinfo section 找模块信息
|
|
103
|
+
|
|
104
|
+
3. 找 file_operations 结构
|
|
105
|
+
搜索 register_chrdev / cdev_add / misc_register
|
|
106
|
+
→ 找到 fops 结构体 → 定位 ioctl/read/write 处理函数
|
|
107
|
+
|
|
108
|
+
4. 分析 ioctl 处理
|
|
109
|
+
unlocked_ioctl / compat_ioctl 函数
|
|
110
|
+
→ switch(cmd) 分发
|
|
111
|
+
|
|
112
|
+
5. 找 Rootkit 行为
|
|
113
|
+
- 修改 sys_call_table → syscall hook
|
|
114
|
+
- 修改 /proc 文件系统 → 隐藏进程/文件
|
|
115
|
+
- 注册 netfilter hook → 隐藏网络连接
|
|
116
|
+
- 修改 VFS 层 → 隐藏文件
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Rootkit 常见技术
|
|
120
|
+
|
|
121
|
+
| 技术 | 特征 | 检测方法 |
|
|
122
|
+
|------|------|---------|
|
|
123
|
+
| syscall table hook | 修改 `sys_call_table` 条目 | 对比内存中的表与磁盘上的 vmlinux |
|
|
124
|
+
| VFS hook | 修改 `file_operations` 函数指针 | 检查 fops 指针是否指向内核代码段外 |
|
|
125
|
+
| Netfilter hook | `nf_register_net_hook` | 遍历 netfilter hook 链表 |
|
|
126
|
+
| kprobe/ftrace hook | 注册 kprobe 或 ftrace 回调 | 检查 ftrace 注册列表 |
|
|
127
|
+
| eBPF rootkit | 加载恶意 BPF 程序 | `bpftool prog list` |
|
|
128
|
+
| DKOM | 直接修改内核对象(进程链表) | 遍历 task_struct 链表对比 /proc |
|
|
129
|
+
|
|
130
|
+
### 工具
|
|
131
|
+
|
|
132
|
+
| 工具 | 用途 |
|
|
133
|
+
|------|------|
|
|
134
|
+
| `crash` | 内核 dump 分析 |
|
|
135
|
+
| `volatility3` | 内存取证(Linux profile) |
|
|
136
|
+
| `dmesg` / `journalctl` | 内核日志 |
|
|
137
|
+
| `lsmod` / `/proc/modules` | 已加载模块列表 |
|
|
138
|
+
| `modinfo` | 模块元信息 |
|
|
139
|
+
| `strace` | 系统调用跟踪(用户态视角) |
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## C/C++ 逆向模式识别
|
|
144
|
+
|
|
145
|
+
### C 语言常见模式
|
|
146
|
+
|
|
147
|
+
| 源码模式 | 反汇编特征 |
|
|
148
|
+
|---------|-----------|
|
|
149
|
+
| `if-else` | `cmp` + `jcc`(条件跳转) |
|
|
150
|
+
| `switch-case` | 跳转表(`jmp [rax*8 + table]`)或连续 `cmp` |
|
|
151
|
+
| `for` 循环 | `cmp` + `jl/jle` + 循环体 + `inc/add` + `jmp` 回跳 |
|
|
152
|
+
| `while` 循环 | 条件判断在循环顶部 |
|
|
153
|
+
| `do-while` | 条件判断在循环底部 |
|
|
154
|
+
| 函数指针调用 | `call rax` 或 `call [reg+offset]` |
|
|
155
|
+
| `struct` 访问 | `[reg+固定偏移]`(如 `[rdi+0x10]`) |
|
|
156
|
+
| `malloc` + 使用 | `call malloc` → 返回值存入寄存器 → 后续用该寄存器+偏移访问 |
|
|
157
|
+
| 字符串比较 | `call strcmp` 或 `repe cmpsb` |
|
|
158
|
+
|
|
159
|
+
### C++ 特有模式
|
|
160
|
+
|
|
161
|
+
| 源码模式 | 反汇编特征 |
|
|
162
|
+
|---------|-----------|
|
|
163
|
+
| **虚函数调用** | `mov rax, [rcx]`(取 vtable)→ `call [rax+offset]`(调用虚函数) |
|
|
164
|
+
| **构造函数** | 分配内存 → 写入 vtable 指针 → 初始化成员 |
|
|
165
|
+
| **析构函数** | 清理成员 → 可能调用 `operator delete` |
|
|
166
|
+
| **this 指针** | 第一个参数(rcx/rdi)是对象指针 |
|
|
167
|
+
| **继承** | vtable 中包含父类虚函数 + 子类覆盖 |
|
|
168
|
+
| **多重继承** | 对象内有多个 vtable 指针(偏移不同) |
|
|
169
|
+
| **RTTI** | vtable 前面有 `type_info` 指针 |
|
|
170
|
+
| **异常处理** | `__cxa_throw` / `_CxxThrowException` |
|
|
171
|
+
| **STL 容器** | `std::vector`: `{begin, end, capacity}` 三指针结构 |
|
|
172
|
+
| **std::string** | 小字符串优化(SSO):短串内联,长串堆分配 |
|
|
173
|
+
|
|
174
|
+
### vtable 逆向方法
|
|
175
|
+
|
|
176
|
+
```text
|
|
177
|
+
1. 找 vtable
|
|
178
|
+
- 搜索连续的函数指针数组(在 .rodata 或 .rdata 段)
|
|
179
|
+
- 构造函数中 `mov [rcx], offset vtable` 写入 vtable 指针
|
|
180
|
+
|
|
181
|
+
2. 确定类层次
|
|
182
|
+
- vtable 前 -8 偏移处通常是 RTTI 指针(如果未 strip)
|
|
183
|
+
- 多个 vtable 共享前几个条目 → 继承关系
|
|
184
|
+
|
|
185
|
+
3. 标注虚函数
|
|
186
|
+
- vtable[0] 通常是析构函数(或 deleting destructor)
|
|
187
|
+
- 后续按偏移标注:vtable[1] = func1, vtable[2] = func2...
|
|
188
|
+
|
|
189
|
+
4. IDA 中操作
|
|
190
|
+
- 在 vtable 地址创建 struct(每个字段是函数指针)
|
|
191
|
+
- 对 `call [rax+offset]` 添加注释标明调用的虚函数
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### 结构体恢复
|
|
195
|
+
|
|
196
|
+
```text
|
|
197
|
+
方法 1:从访问模式推断
|
|
198
|
+
mov eax, [rdi+0x00] → field_0: int/ptr (4/8 bytes)
|
|
199
|
+
mov ecx, [rdi+0x08] → field_8: int/ptr
|
|
200
|
+
movss xmm0, [rdi+0x10] → field_10: float
|
|
201
|
+
|
|
202
|
+
方法 2:从 sizeof 推断
|
|
203
|
+
call malloc(0x30) → 结构体大小 0x30 (48 bytes)
|
|
204
|
+
|
|
205
|
+
方法 3:从构造函数推断
|
|
206
|
+
构造函数会初始化所有字段 → 字段类型和偏移一目了然
|
|
207
|
+
|
|
208
|
+
方法 4:用 IDA 的 "Create struct" 功能
|
|
209
|
+
选中访问模式 → Edit → Struct → Create struct from selection
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## 常见编译器特征
|
|
215
|
+
|
|
216
|
+
| 编译器 | 识别特征 |
|
|
217
|
+
|--------|---------|
|
|
218
|
+
| MSVC | `_security_cookie` 检查、`__fastcall` 调用约定、Rich Header |
|
|
219
|
+
| GCC | `__stack_chk_fail`、`-fstack-protector`、`.note.GNU-stack` |
|
|
220
|
+
| Clang/LLVM | 类似 GCC 但优化模式不同、`__asan_*`(如果开了 sanitizer) |
|
|
221
|
+
| MinGW | GCC 特征 + Windows API 调用 |
|
|
222
|
+
| AOSP Clang | Android 特有的 `__android_log_print`、PGO 标记 |
|
|
223
|
+
|
|
224
|
+
### 优化级别识别
|
|
225
|
+
|
|
226
|
+
| 优化级别 | 特征 |
|
|
227
|
+
|---------|------|
|
|
228
|
+
| -O0 | 大量冗余 mov、每个变量都在栈上、函数不内联 |
|
|
229
|
+
| -O1 | 基本优化、部分变量在寄存器 |
|
|
230
|
+
| -O2 | 循环展开、函数内联、尾调用优化 |
|
|
231
|
+
| -O3 / -Os | 激进内联、向量化(SIMD)、代码难读 |
|
|
232
|
+
| PGO | 热路径优化、冷代码分离到 `.text.cold` |
|
|
233
|
+
| LTO | 跨模块内联、全局死代码消除 |
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## 内核调试环境
|
|
238
|
+
|
|
239
|
+
### Windows
|
|
240
|
+
|
|
241
|
+
```text
|
|
242
|
+
调试器:WinDbg Preview
|
|
243
|
+
连接方式:网络调试(推荐)或串口
|
|
244
|
+
|
|
245
|
+
被调试机设置:
|
|
246
|
+
bcdedit /debug on
|
|
247
|
+
bcdedit /dbgsettings net hostip:192.168.x.x port:50000
|
|
248
|
+
|
|
249
|
+
调试机连接:
|
|
250
|
+
WinDbg → File → Attach to Kernel → Net → Port:50000 Key:xxx
|
|
251
|
+
|
|
252
|
+
常用命令:
|
|
253
|
+
!analyze -v # 自动分析崩溃
|
|
254
|
+
lm # 列出已加载模块
|
|
255
|
+
!drvobj \Driver\xxx # 查看驱动对象
|
|
256
|
+
dt nt!_DRIVER_OBJECT # 显示结构体
|
|
257
|
+
bp module!function # 下断点
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
### Linux
|
|
261
|
+
|
|
262
|
+
```text
|
|
263
|
+
调试器:GDB + QEMU 或 kgdb
|
|
264
|
+
|
|
265
|
+
QEMU 内核调试:
|
|
266
|
+
qemu-system-x86_64 -kernel bzImage -s -S ...
|
|
267
|
+
gdb vmlinux -ex "target remote :1234"
|
|
268
|
+
|
|
269
|
+
常用命令:
|
|
270
|
+
info threads # 内核线程
|
|
271
|
+
lx-symbols # 加载内核符号(需要 scripts/gdb/)
|
|
272
|
+
p init_task # 查看 init 进程
|
|
273
|
+
lx-dmesg # 内核日志
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## Agent 动作锚点(Issue #65 U–AV)
|
|
279
|
+
|
|
280
|
+
与 `references/nonpe-format-cookbook.md` §5 对齐(短表,不替代上文流程):
|
|
281
|
+
|
|
282
|
+
| ID | 动作 | Evidence |
|
|
283
|
+
|----|------|----------|
|
|
284
|
+
| AG | `DriverEntry` 短 → 扫 `MajorFunction` 非空槽,优先 DEVICE_CONTROL/CREATE | `E-driver-irp-handlers` |
|
|
285
|
+
| AH | 建立 IOCTL 控制码 → handler 表与 METHOD_* | `E-driver-ioctl` |
|
|
286
|
+
| AI | 疑 BYOVD:对照公开脆弱驱动列表;记名/哈希/签名与调用意图;**不写 exploit 步骤** | `E-driver-byovd` |
|
|
287
|
+
|
|
288
|
+
## 参考资源
|
|
289
|
+
|
|
290
|
+
| 资源 | 说明 | 链接 |
|
|
291
|
+
|------|------|------|
|
|
292
|
+
| VoidSec 驱动逆向方法论 | Windows WDM 驱动完整分析流程 | https://voidsec.com/windows-drivers-reverse-engineering-methodology/ |
|
|
293
|
+
| Elastic Rootkit 系列 | Linux Rootkit 分类+检测 | https://security-labs.elastic.co/security-labs/linux-rootkits-1-hooked-on-linux |
|
|
294
|
+
| Driver Buddy Reloaded | IDA 驱动分析插件 | https://github.com/VoidSec/DriverBuddyReloaded |
|
|
295
|
+
| LOLDrivers | 已知漏洞驱动列表 | https://www.loldrivers.io/ |
|
|
296
|
+
| Windows Driver Samples | 微软官方驱动示例 | https://github.com/microsoft/Windows-driver-samples |
|
|
297
|
+
| Linux Kernel Module Programming | 内核模块开发教程 | https://sysprog21.github.io/lkmpg/ |
|
|
298
|
+
| Trail of Bits - Devirtualizing C++ | vtable 逆向方法 | https://blog.trailofbits.com/2017/02/13/devirtualizing-c-with-binary-ninja/ |
|