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,253 @@
|
|
|
1
|
+
# Patch Tuesday 工作流
|
|
2
|
+
|
|
3
|
+
每月第二个周二 (Pacific Time) 微软发布安全更新,俗称 Patch Tuesday。这是 N-day 研究最稳定的输入源:补丁数量大、价值高、披露口径统一。本文档给出从订阅公告到拿到可对比二进制的完整流程。
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. 信息源订阅
|
|
8
|
+
|
|
9
|
+
| 来源 | 用途 | 备注 |
|
|
10
|
+
|------|------|------|
|
|
11
|
+
| MSRC Security Update Guide | 当月所有 CVE 列表 + CVSS + 受影响产品 | https://msrc.microsoft.com/update-guide/ 有 API |
|
|
12
|
+
| MSRC CVRF API | 程序化拉当月 CVE JSON | `https://api.msrc.microsoft.com/cvrf/v3.0/cvrf/{YEAR}-{Mon}` |
|
|
13
|
+
| Microsoft Update Catalog | 下 MSU/MSP 实物 | https://www.catalog.update.microsoft.com/ |
|
|
14
|
+
| Patch Tuesday Dashboard (Tenable / Trend / Rapid7) | 第三方汇总优先级 | 看哪些标了 "exploited in the wild" |
|
|
15
|
+
| ZDI advisories | ZDI 提交的 CVE 详细描述 | 经常有比 MSRC 更详细的 root cause hint |
|
|
16
|
+
| Project Zero 周期性 issue tracker | 半年后会公开细节 | 可作为历史对照 |
|
|
17
|
+
|
|
18
|
+
### 拉当月 CVE 列表 (PowerShell)
|
|
19
|
+
|
|
20
|
+
```powershell
|
|
21
|
+
$year = '2026'; $mon = 'May'
|
|
22
|
+
$url = "https://api.msrc.microsoft.com/cvrf/v3.0/cvrf/$year-$mon"
|
|
23
|
+
Invoke-RestMethod $url | ConvertTo-Json -Depth 10 | Out-File "C:\patches\msrc-$year-$mon.json" -Encoding utf8
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 2. 锁定高价值补丁
|
|
29
|
+
|
|
30
|
+
按以下顺序过滤当月公告:
|
|
31
|
+
|
|
32
|
+
1. **CVSS >= 7.0**
|
|
33
|
+
2. **Exploitation: Exploitation Detected / More Likely**
|
|
34
|
+
3. **组件白名单**(高价值攻击面):
|
|
35
|
+
- `Windows Kernel` (ntoskrnl.exe)
|
|
36
|
+
- `Win32k` (win32k.sys, win32kfull.sys, win32kbase.sys)
|
|
37
|
+
- `Ancillary Function Driver for WinSock` (afd.sys) — 历史 LPE 大户
|
|
38
|
+
- `Common Log File System` (clfs.sys) — 过去三年多次被野利用
|
|
39
|
+
- `Print Spooler` (spoolsv.exe, win32spl.dll)
|
|
40
|
+
- `Cloud Files Mini Filter Driver` (cldflt.sys)
|
|
41
|
+
- `NTFS` (ntfs.sys)
|
|
42
|
+
- `Hyper-V` (vmswitch.sys, hvix64.exe, hvax64.exe)
|
|
43
|
+
- `Cryptography Services` / `NTLM` / `Kerberos`
|
|
44
|
+
- `RDP` (rdpcorets.dll, rdpbase.dll)
|
|
45
|
+
4. **本地提权 (EoP) > RCE > Info Disclosure** — EoP 武器化门槛最低
|
|
46
|
+
5. **是否有 KB 直接对应** — 没有 KB 号的(例如纯 Defender 定义更新)跳过
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 3. 下载 patched / unpatched 二进制
|
|
51
|
+
|
|
52
|
+
### 3.1 Microsoft Update Catalog 手动下
|
|
53
|
+
|
|
54
|
+
```text
|
|
55
|
+
1. 访问 https://www.catalog.update.microsoft.com/Search.aspx?q=KB5052000
|
|
56
|
+
2. 按 Products 过滤 (Windows 11, Server 2022 等)
|
|
57
|
+
3. 选目标架构 (x64 / arm64),下载 .msu
|
|
58
|
+
4. 同时下 N-1 版本 (上个月的 KB 号) 作为 unpatched 基线
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### 3.2 程序化批量下
|
|
62
|
+
|
|
63
|
+
```powershell
|
|
64
|
+
# msdownload 第三方脚本
|
|
65
|
+
git clone https://github.com/JaschaUrbach/msu-downloader.git
|
|
66
|
+
python msu-downloader.py --kb KB5052000 --arch x64 --out C:\patches\
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### 3.3 wsuspect-proxy 拦截真实流量取最新补丁
|
|
70
|
+
|
|
71
|
+
适用于:MSRC 还没在 Catalog 上架,但已通过 WU 推送给客户端的早期窗口。
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
git clone https://github.com/ctxis/wsuspect-proxy.git
|
|
75
|
+
cd wsuspect-proxy
|
|
76
|
+
# 在被测机器上手工设 WSUS = http://attacker:8530,触发 wuauclt /detectnow
|
|
77
|
+
python wsuspect-proxy.py --listen 0.0.0.0:8530 --dump-cabs C:\patches\dump\
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### 3.4 Delta 包 vs Cumulative 包
|
|
81
|
+
|
|
82
|
+
- 微软现在主推 `.msu` cumulative update — 体积大但完整
|
|
83
|
+
- 也有 `.msu` Express / Delta 包 — 体积小但只含差异,对差分研究不友好
|
|
84
|
+
- 优先下 cumulative
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## 4. 解包 MSU / CAB / MSP
|
|
89
|
+
|
|
90
|
+
### 4.1 MSU 解包(Windows)
|
|
91
|
+
|
|
92
|
+
```powershell
|
|
93
|
+
# Step 1: MSU 是 cab 套娃,先解外层
|
|
94
|
+
expand.exe Windows-KB5052000-x64.msu -F:* C:\patches\out\
|
|
95
|
+
|
|
96
|
+
# Step 2: 解里面的 .cab
|
|
97
|
+
expand.exe C:\patches\out\Windows-KB5052000-x64.cab -F:* C:\patches\out\
|
|
98
|
+
|
|
99
|
+
# Step 3: 关键文件在 amd64_microsoft-windows-{component}_*\ 下
|
|
100
|
+
# 例如 ntoskrnl.exe 在:
|
|
101
|
+
# C:\patches\out\amd64_microsoft-windows-os-kernel_*\ntoskrnl.exe
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### 4.2 用 dism 装到离线镜像(拿干净的 patched 二进制)
|
|
105
|
+
|
|
106
|
+
```powershell
|
|
107
|
+
# 挂载离线 WIM
|
|
108
|
+
dism /mount-image /imagefile:install.wim /index:1 /mountdir:C:\mnt
|
|
109
|
+
|
|
110
|
+
# 应用补丁
|
|
111
|
+
dism /image:C:\mnt /add-package /packagepath:Windows-KB5052000-x64.msu
|
|
112
|
+
|
|
113
|
+
# 提取目标二进制
|
|
114
|
+
copy C:\mnt\Windows\System32\ntoskrnl.exe C:\patches\patched\
|
|
115
|
+
|
|
116
|
+
# 卸载
|
|
117
|
+
dism /unmount-image /mountdir:C:\mnt /commit
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### 4.3 MSP (Office 等) 解包
|
|
121
|
+
|
|
122
|
+
```powershell
|
|
123
|
+
# MSP 是 Windows Installer Patch
|
|
124
|
+
msiexec /a base.msi /p update.msp TARGETDIR=C:\patches\office_patched
|
|
125
|
+
|
|
126
|
+
# 或用 lessmsi (推荐, 不动注册表)
|
|
127
|
+
lessmsi x update.msp C:\patches\office_msp\
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### 4.4 用第三方工具一站式拆包
|
|
131
|
+
|
|
132
|
+
```powershell
|
|
133
|
+
# PatchExtract by Greg Linares - 一条命令解多层
|
|
134
|
+
.\PatchExtract.ps1 -PatchFile Windows-KB5052000-x64.msu -ExtractedFolder C:\patches\extracted\
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## 5. 取符号 (PDB)
|
|
140
|
+
|
|
141
|
+
```powershell
|
|
142
|
+
# Windows SDK 自带 symchk
|
|
143
|
+
symchk /v /r C:\patches\patched\ntoskrnl.exe /s SRV*C:\sym*https://msdl.microsoft.com/download/symbols
|
|
144
|
+
symchk /v /r C:\patches\unpatched\ntoskrnl.exe /s SRV*C:\sym*https://msdl.microsoft.com/download/symbols
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
注意:微软偶尔会延迟或下架某个版本 PDB。如果当前下不到 N-1 的 PDB,用 `binary-diff` skill 把 N-2 的 PDB 符号迁移到 N-1。
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## 6. Windows 高价值二进制路径速查
|
|
152
|
+
|
|
153
|
+
| 文件 | 路径 | 关注组件 |
|
|
154
|
+
|------|------|---------|
|
|
155
|
+
| ntoskrnl.exe | System32\ | 内核核心、对象管理、Ob*、Ps*、Mm*、Io* |
|
|
156
|
+
| win32k.sys | System32\ | GUI 子系统入口 |
|
|
157
|
+
| win32kfull.sys | System32\ | GUI 完整版(桌面会话) |
|
|
158
|
+
| win32kbase.sys | System32\ | GUI 基础库 |
|
|
159
|
+
| afd.sys | System32\drivers\ | WinSock AFD,LPE 高发 |
|
|
160
|
+
| clfs.sys | System32\drivers\ | CLFS,0-day 高发 |
|
|
161
|
+
| cldflt.sys | System32\drivers\ | Cloud Files mini filter |
|
|
162
|
+
| spoolsv.exe | System32\ | Print Spooler |
|
|
163
|
+
| dwm.exe | System32\ | Desktop Window Manager |
|
|
164
|
+
| lsass.exe | System32\ | LSA 认证 |
|
|
165
|
+
| ntdll.dll | System32\ | syscall stub、PE loader |
|
|
166
|
+
| ksecdd.sys | System32\drivers\ | Kernel security driver |
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## 7. Linux 等价流程
|
|
171
|
+
|
|
172
|
+
### 7.1 信息源
|
|
173
|
+
|
|
174
|
+
| 来源 | 适用 |
|
|
175
|
+
|------|------|
|
|
176
|
+
| Ubuntu USN | https://ubuntu.com/security/notices |
|
|
177
|
+
| Red Hat RHSA | https://access.redhat.com/security/security-updates/ |
|
|
178
|
+
| Debian DSA | https://www.debian.org/security/ |
|
|
179
|
+
| CentOS / Rocky / Alma announce list | 通常 mirror Red Hat |
|
|
180
|
+
| upstream kernel CVE list | https://cve.kernel.org/ |
|
|
181
|
+
|
|
182
|
+
### 7.2 拉补丁包
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
# Debian/Ubuntu
|
|
186
|
+
apt download linux-image-5.15.0-101-generic
|
|
187
|
+
apt download linux-image-5.15.0-100-generic
|
|
188
|
+
apt download linux-image-unsigned-5.15.0-101-generic-dbgsym
|
|
189
|
+
|
|
190
|
+
# CentOS/Rocky
|
|
191
|
+
dnf download --downloadonly --downloaddir=./patched kernel-5.14.0-362.18.1.el9_3
|
|
192
|
+
dnf download --downloadonly --downloaddir=./unpatched kernel-5.14.0-362.13.1.el9_3
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### 7.3 解包
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
# .deb
|
|
199
|
+
dpkg-deb -x linux-image-5.15.0-101-generic_*.deb ./patched/
|
|
200
|
+
|
|
201
|
+
# .rpm
|
|
202
|
+
rpm2cpio kernel-5.14.0-362.18.1.el9_3.x86_64.rpm | cpio -idmv -D ./patched/
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### 7.4 从 vmlinuz 还原 vmlinux
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
# 用内核自带 scripts/extract-vmlinux
|
|
209
|
+
wget https://raw.githubusercontent.com/torvalds/linux/master/scripts/extract-vmlinux
|
|
210
|
+
chmod +x extract-vmlinux
|
|
211
|
+
./extract-vmlinux ./patched/boot/vmlinuz-5.15.0-101-generic > vmlinux_5.15.0-101
|
|
212
|
+
./extract-vmlinux ./unpatched/boot/vmlinuz-5.15.0-100-generic > vmlinux_5.15.0-100
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### 7.5 关注子系统路径
|
|
216
|
+
|
|
217
|
+
| 子系统 | 历史 N-day 高发函数前缀 |
|
|
218
|
+
|--------|----------------------|
|
|
219
|
+
| net/ | `__skb_*`、`sk_*`、`tcp_*`、`udp_*`、`nf_*` |
|
|
220
|
+
| fs/ | `do_*`、`vfs_*`、`__lookup_*` |
|
|
221
|
+
| io_uring/ | 整个子系统(近三年漏洞王) |
|
|
222
|
+
| netfilter/ | `nft_*`、`nf_tables_*` |
|
|
223
|
+
| net/sched/ | tc 各 qdisc |
|
|
224
|
+
| drivers/net/ | 各 NIC 驱动 |
|
|
225
|
+
| bpf/ | verifier 类 |
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## 8. 真实公开 CVE 案例参考
|
|
230
|
+
|
|
231
|
+
| CVE | 组件 | 类型 | 用于练手原因 |
|
|
232
|
+
|------|------|------|------------|
|
|
233
|
+
| CVE-2025-62215 | Windows Kernel | race condition + double free | 2025-11 公开,公告说"race + double free",差分入门题 |
|
|
234
|
+
| CVE-2023-28252 | CLFS | OOB write → LPE | 野外利用,PoC 已公开,可对照学习方法 |
|
|
235
|
+
| CVE-2022-37969 | CLFS | type confusion → LPE | 同样有公开分析 |
|
|
236
|
+
| CVE-2021-40449 | Win32k | UAF → LPE | 公开报告完整 |
|
|
237
|
+
| CVE-2022-21882 | Win32k | type confusion,由 CVE-2021-1732 不完整修复变出 | 经典"一鱼多吃"案例 |
|
|
238
|
+
|
|
239
|
+
练习建议:拿一个已经有公开分析的 CVE,按本流程独立差出来一次,再对照公开 writeup 校准方法论。
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## 9. 速查清单
|
|
244
|
+
|
|
245
|
+
- [ ] MSRC 月度公告已读,筛出 CVSS≥7 且组件在白名单内的 CVE
|
|
246
|
+
- [ ] 从 Catalog 下到 unpatched (N-1) 和 patched (N) 的 MSU
|
|
247
|
+
- [ ] 用 expand / dism 取出目标 .exe / .sys / .dll
|
|
248
|
+
- [ ] symchk 把 PDB 都吃到(吃不到走 binary-diff 迁移)
|
|
249
|
+
- [ ] 用 BinaryNinja / IDA / Ghidra 各开两个工程
|
|
250
|
+
- [ ] 跑 BinDiff / ghidriff,导出 diff 报告
|
|
251
|
+
- [ ] 按相似度过滤函数,进 `references/root-cause-and-poc.md` 反推根因
|
|
252
|
+
- [ ] 写 PoC,验证 unpatched 崩、patched 不崩
|
|
253
|
+
- [ ] 回写 field-journal 记录复用经验
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# 根因反推与 PoC 编写
|
|
2
|
+
|
|
3
|
+
拿到 diff 报告只是第一步。真正的工作是看着 before/after 反推出 bug class,然后写出能稳定触发的 PoC。本文档给出反推模式表、LLM 辅助 prompt、PoC 编写模板、验证方法。
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. 补丁修复模式 → 漏洞类型反查
|
|
8
|
+
|
|
9
|
+
### 1.1 整数溢出 / 下溢
|
|
10
|
+
|
|
11
|
+
**新增模式**:
|
|
12
|
+
```c
|
|
13
|
+
// 加法溢出检查
|
|
14
|
+
if (a > UINT_MAX - b) goto error;
|
|
15
|
+
if (a + b < a) goto error;
|
|
16
|
+
__builtin_add_overflow(a, b, &sum);
|
|
17
|
+
|
|
18
|
+
// 乘法溢出检查
|
|
19
|
+
if (a != 0 && b > UINT_MAX / a) goto error;
|
|
20
|
+
__builtin_mul_overflow(a, b, &prod);
|
|
21
|
+
|
|
22
|
+
// 减法下溢检查
|
|
23
|
+
if (a < b) goto error;
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**反推**:
|
|
27
|
+
- 看 `a` 和 `b` 是否来自用户态可控输入
|
|
28
|
+
- 通常前后会有 `kmalloc(a+b)` / `RtlAllocateHeap(size)` 等分配,溢出后分配过小 → 后续 memcpy → 堆 OOB 写
|
|
29
|
+
|
|
30
|
+
**PoC 思路**:
|
|
31
|
+
- 让 `a + b` 实际溢出回小值,但拷贝长度还按未溢出的算
|
|
32
|
+
- 边界值: `a = 0xFFFFFFF0, b = 0x100` (32 位) / `a = 0xFFFFFFFFFFFFFFF0, b = 0x100` (64 位)
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
### 1.2 越界读 / 越界写
|
|
37
|
+
|
|
38
|
+
**新增模式**:
|
|
39
|
+
```c
|
|
40
|
+
if (idx >= ARRAY_SIZE(arr)) return -EINVAL;
|
|
41
|
+
if (offset + len > buf_size) return STATUS_INVALID_PARAMETER;
|
|
42
|
+
if (len > sizeof(local_buf)) return -E2BIG;
|
|
43
|
+
|
|
44
|
+
// Windows 内核典型
|
|
45
|
+
if (InputBufferLength < sizeof(MY_STRUCT)) return STATUS_BUFFER_TOO_SMALL;
|
|
46
|
+
if (req->Length > KERNEL_MAX) return STATUS_INVALID_PARAMETER;
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**反推**:
|
|
50
|
+
- 看新增 if 守护了哪个后续操作(memcpy / memmove / 数组下标)
|
|
51
|
+
- 没守护前的版本可以传超大 length / 超大 index
|
|
52
|
+
|
|
53
|
+
**PoC 思路**:
|
|
54
|
+
- 把 length 字段设成超过 buf 的值
|
|
55
|
+
- 把 index 字段设成 array_size + N
|
|
56
|
+
- 用 IOCTL InputBufferLength 调到刚好绕过旧检查但触发新检查
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
### 1.3 竞争条件 (Race / TOCTOU)
|
|
61
|
+
|
|
62
|
+
**新增模式**:
|
|
63
|
+
```c
|
|
64
|
+
// 加锁
|
|
65
|
+
KeAcquireSpinLockAtDpcLevel(&obj->Lock);
|
|
66
|
+
mutex_lock(&inode->i_mutex);
|
|
67
|
+
spin_lock(&list->lock);
|
|
68
|
+
|
|
69
|
+
// 引用计数原子化
|
|
70
|
+
InterlockedIncrement(&obj->RefCount);
|
|
71
|
+
ObReferenceObject(obj);
|
|
72
|
+
get_file(file);
|
|
73
|
+
|
|
74
|
+
// 检查 - 操作之间不再释放锁
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**反推**:
|
|
78
|
+
- 加锁说明此前同一对象在并发场景下被改了
|
|
79
|
+
- 引用计数加 ref 说明此前对象可能在用的时候被释放
|
|
80
|
+
- 找两个 syscall 路径,其中一个会修改 / 释放对象,另一个会用对象
|
|
81
|
+
|
|
82
|
+
**PoC 思路**:
|
|
83
|
+
```c
|
|
84
|
+
// 经典 hammer
|
|
85
|
+
DWORD WINAPI thread_close(LPVOID arg) {
|
|
86
|
+
while (running) CloseHandle((HANDLE)arg);
|
|
87
|
+
return 0;
|
|
88
|
+
}
|
|
89
|
+
DWORD WINAPI thread_use(LPVOID arg) {
|
|
90
|
+
while (running) DeviceIoControl((HANDLE)arg, IOCTL_X, ...);
|
|
91
|
+
return 0;
|
|
92
|
+
}
|
|
93
|
+
// CreateThread 各开几个,sleep 30s 等崩
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
- 多线程绑核 (SetThreadAffinityMask) 提高竞争概率
|
|
97
|
+
- 用 `_mm_pause()` / `sched_yield()` 控制窗口
|
|
98
|
+
- 配合 syscall pinning(同一对象的两个不同入口)
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
### 1.4 未初始化内存信息泄漏
|
|
103
|
+
|
|
104
|
+
**新增模式**:
|
|
105
|
+
```c
|
|
106
|
+
// 字段清零
|
|
107
|
+
RtlZeroMemory(&output, sizeof(output));
|
|
108
|
+
memset(buf, 0, sizeof(buf));
|
|
109
|
+
output.reserved = 0;
|
|
110
|
+
output.padding = 0;
|
|
111
|
+
output._pad1 = 0;
|
|
112
|
+
|
|
113
|
+
// 整个结构归零再赋值
|
|
114
|
+
KeStackAttachProcess; output = (MY_STRUCT){0};
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**反推**:
|
|
118
|
+
- 旧版从内核栈 / 内核堆拷数据到用户态时没清 padding / reserved 字段
|
|
119
|
+
- padding 内残留前一次函数调用的栈数据 → 内核地址泄漏 (绕 KASLR)
|
|
120
|
+
|
|
121
|
+
**PoC 思路**:
|
|
122
|
+
- 反复调 IOCTL 取 output buffer
|
|
123
|
+
- 把每个字节按 8 字节解析,找像内核地址的值(Windows: 0xFFFFxxxx / Linux: 0xFFFFFFFFxxxxxxxx)
|
|
124
|
+
- 找规律 → 推 kbase
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
### 1.5 UAF / 引用计数错误
|
|
129
|
+
|
|
130
|
+
**新增模式**:
|
|
131
|
+
```c
|
|
132
|
+
// Windows
|
|
133
|
+
if (InterlockedDecrement(&obj->RefCount) == 0) {
|
|
134
|
+
Free(obj);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// Linux
|
|
139
|
+
if (refcount_dec_and_test(&obj->ref)) {
|
|
140
|
+
kfree(obj);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// 或新增 ObReferenceObject 在某条路径上(之前漏加 ref)
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**反推**:
|
|
147
|
+
- 旧版某条出错路径 free 了对象但调用者还会用
|
|
148
|
+
- 或者多路径同时持有指针,其中一条 free 后其他没感知
|
|
149
|
+
|
|
150
|
+
**PoC 思路**:
|
|
151
|
+
```c
|
|
152
|
+
// spray → free → reuse
|
|
153
|
+
HANDLE objs[1000];
|
|
154
|
+
for (int i = 0; i < 1000; i++) objs[i] = CreateObject(...);
|
|
155
|
+
trigger_free(objs[500]); // 触发漏洞 free
|
|
156
|
+
spray_kernel_pool(0xDEADBEEFDEADBEEF, target_sz); // 占住被 free 的洞
|
|
157
|
+
use_after_free(objs[500]); // 触发用 -> 控数据
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
- Windows 内核常用 `NtAllocateReserveObject` / Pipe 属性 / Window Class 名称喷
|
|
161
|
+
- Linux 常用 `msgsnd` / `setxattr` / `userfaultfd`-stalled vma 喷
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
### 1.6 用户态指针未校验
|
|
166
|
+
|
|
167
|
+
**新增模式**:
|
|
168
|
+
```c
|
|
169
|
+
// Windows
|
|
170
|
+
ProbeForRead(UserBuffer, Length, sizeof(ULONG));
|
|
171
|
+
ProbeForWrite(UserBuffer, Length, sizeof(ULONG));
|
|
172
|
+
|
|
173
|
+
// __try/__except 包裹访问
|
|
174
|
+
__try {
|
|
175
|
+
Probe...
|
|
176
|
+
RtlCopyMemory(KernelBuf, UserBuffer, Length);
|
|
177
|
+
} __except(EXCEPTION_EXECUTE_HANDLER) { ... }
|
|
178
|
+
|
|
179
|
+
// Linux
|
|
180
|
+
if (!access_ok(VERIFY_WRITE, ptr, size)) return -EFAULT;
|
|
181
|
+
copy_from_user(kbuf, uptr, len);
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**反推**:
|
|
185
|
+
- 旧版直接 deref 用户态指针没 ProbeForRead/access_ok
|
|
186
|
+
- 用户态可以传内核地址 → 任意地址读 / 任意地址写
|
|
187
|
+
|
|
188
|
+
**PoC 思路**:
|
|
189
|
+
- 传一个内核空间指针(例如 ntoskrnl 某个全局变量地址)作为输入指针
|
|
190
|
+
- 内核执行 `*UserBuffer = X` 时实际写到内核地址 → 任意写
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
### 1.7 权限校验缺失
|
|
195
|
+
|
|
196
|
+
**新增模式**:
|
|
197
|
+
```c
|
|
198
|
+
if (!SeAccessCheck(...)) return STATUS_
|