opencode-skills-collection 4.0.42 → 4.0.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled-skills/.antigravity-install-manifest.json +49 -1
- package/bundled-skills/api-rate-limit-handler/SKILL.md +282 -0
- package/bundled-skills/api-security/SKILL.md +205 -0
- package/bundled-skills/api-security/references/jwt-oauth-testing.md +123 -0
- package/bundled-skills/api-security/references/rest-graphql-testing.md +137 -0
- package/bundled-skills/apk-reverse/SKILL.md +438 -0
- package/bundled-skills/apk-reverse/references/android-advanced.md +365 -0
- package/bundled-skills/apk-reverse/references/apk-security-checklist.md +230 -0
- package/bundled-skills/apk-reverse/references/frida-bypass-kit.md +70 -0
- package/bundled-skills/apk-reverse/references/frida-cookbook.md +472 -0
- package/bundled-skills/attack-chain/SKILL.md +185 -0
- package/bundled-skills/attack-chain/references/attack-playbooks.md +126 -0
- package/bundled-skills/attack-chain/references/evasion-cheatsheet.md +133 -0
- package/bundled-skills/attack-chain/references/lifecycle-checklist.md +37 -0
- package/bundled-skills/attack-chain/references/phases.md +490 -0
- package/bundled-skills/binary-diff/SKILL.md +320 -0
- package/bundled-skills/binary-diff/references/prompt-template.md +173 -0
- package/bundled-skills/browser-extension-reverse/SKILL.md +99 -0
- package/bundled-skills/browser-extension-reverse/references/extension-analysis.md +10 -0
- package/bundled-skills/case-review/SKILL.md +167 -0
- package/bundled-skills/cloud-k8s/SKILL.md +124 -0
- package/bundled-skills/cloud-k8s/references/k8s-cloud-checklist.md +16 -0
- package/bundled-skills/code-audit/SKILL.md +92 -0
- package/bundled-skills/code-audit/references/sast-review-checklist.md +10 -0
- package/bundled-skills/database-security/SKILL.md +81 -0
- package/bundled-skills/database-security/references/db-misconfig-checklist.md +9 -0
- package/bundled-skills/diagram-generator/SKILL.md +199 -0
- package/bundled-skills/diagram-generator/references/README.md +3 -0
- package/bundled-skills/diagram-generator/references/diagram-patterns.md +254 -0
- package/bundled-skills/digital-forensics/SKILL.md +93 -0
- package/bundled-skills/digital-forensics/references/forensics-triage.md +10 -0
- package/bundled-skills/docs/integrations/jetski-cortex.md +3 -3
- package/bundled-skills/docs/integrations/jetski-gemini-loader/README.md +1 -1
- package/bundled-skills/docs/maintainers/repo-growth-seo.md +1 -1
- package/bundled-skills/docs/maintainers/skills-update-guide.md +1 -1
- package/bundled-skills/docs/sources/sources.md +9 -0
- package/bundled-skills/docs/users/aas-core.md +1 -1
- package/bundled-skills/docs/users/bundles.md +1 -1
- package/bundled-skills/docs/users/claude-code-skills.md +1 -1
- package/bundled-skills/docs/users/gemini-cli-skills.md +1 -1
- package/bundled-skills/docs/users/kiro-integration.md +1 -1
- package/bundled-skills/docs/users/usage.md +3 -3
- package/bundled-skills/docs/users/visual-guide.md +4 -4
- package/bundled-skills/docs-generator/SKILL.md +197 -0
- package/bundled-skills/docs-generator/references/security-report-templates.md +348 -0
- package/bundled-skills/docs-generator/references/templates.md +102 -0
- package/bundled-skills/docs-generator/references/vendor-report-rules.md +263 -0
- package/bundled-skills/dotnet-reverse/SKILL.md +197 -0
- package/bundled-skills/dotnet-reverse/references/common-workflow.md +171 -0
- package/bundled-skills/dotnet-reverse/references/obfuscators.md +145 -0
- package/bundled-skills/dotnet-reverse/references/sharp-tools.md +164 -0
- package/bundled-skills/edr-bypass-re/SKILL.md +248 -0
- package/bundled-skills/edr-bypass-re/references/hook-survey.md +226 -0
- package/bundled-skills/edr-bypass-re/references/telemetry-blinding.md +346 -0
- package/bundled-skills/edr-bypass-re/references/unhook-techniques.md +338 -0
- package/bundled-skills/email-security/SKILL.md +81 -0
- package/bundled-skills/email-security/references/email-auth-checklist.md +8 -0
- package/bundled-skills/firmware-pentest/SKILL.md +381 -0
- package/bundled-skills/firmware-pentest/references/emba-automated-analysis.md +192 -0
- package/bundled-skills/firmware-pentest/references/emulation-and-fuzz.md +337 -0
- package/bundled-skills/firmware-pentest/references/extraction-methodology.md +285 -0
- package/bundled-skills/ghidra-reverse/SKILL.md +98 -0
- package/bundled-skills/ghidra-reverse/references/ghidra-cheatsheet.md +12 -0
- package/bundled-skills/go-rust-reverse/SKILL.md +82 -0
- package/bundled-skills/go-rust-reverse/references/go-rust-notes.md +5 -0
- package/bundled-skills/hardware-security/SKILL.md +80 -0
- package/bundled-skills/hardware-security/references/debug-interface-triage.md +7 -0
- package/bundled-skills/ida-reverse/SKILL.md +401 -0
- package/bundled-skills/ida-reverse/references/LOCAL-SETUP.md +66 -0
- package/bundled-skills/ida-reverse/references/ida-mcp-cheatsheet.md +515 -0
- package/bundled-skills/identity-federation/SKILL.md +81 -0
- package/bundled-skills/identity-federation/references/sso-flow-checklist.md +9 -0
- package/bundled-skills/instructree/SKILL.md +94 -0
- package/bundled-skills/js-reverse/SKILL.md +239 -0
- package/bundled-skills/js-reverse/references/ast-deobfuscation.md +3 -0
- package/bundled-skills/js-reverse/references/automation-entry.md +12 -0
- package/bundled-skills/js-reverse/references/env-patching.md +6 -0
- package/bundled-skills/js-reverse/references/fallbacks.md +8 -0
- package/bundled-skills/js-reverse/references/instrumentation.md +9 -0
- package/bundled-skills/js-reverse/references/local-rebuild.md +11 -0
- package/bundled-skills/js-reverse/references/mcp-task-template.md +30 -0
- package/bundled-skills/js-reverse/references/node-env-rebuild.md +9 -0
- package/bundled-skills/js-reverse/references/output-contract.md +9 -0
- package/bundled-skills/js-reverse/references/task-artifacts.md +11 -0
- package/bundled-skills/js-reverse/references/task-input-template.md +11 -0
- package/bundled-skills/js-reverse/references/tool-defaults.md +7 -0
- package/bundled-skills/llm-security/SKILL.md +160 -0
- package/bundled-skills/llm-security/references/agent-obedience-engineering.md +243 -0
- package/bundled-skills/llm-security/references/agent-security-testing.md +116 -0
- package/bundled-skills/llm-security/references/owasp-llm-top10.md +48 -0
- package/bundled-skills/llm-security/references/prompt-injection-methodology.md +107 -0
- package/bundled-skills/loki-mode/examples/todo-app-generated/backend/package-lock.json +4 -4
- package/bundled-skills/loki-mode/examples/todo-app-generated/backend/package.json +1 -1
- package/bundled-skills/lore/SKILL.md +104 -298
- package/bundled-skills/lore/references/audit-template.md +21 -4
- package/bundled-skills/lore/references/compatibility.md +51 -121
- package/bundled-skills/lore/references/config.md +22 -23
- package/bundled-skills/lore/references/entry-format.md +33 -3
- package/bundled-skills/lore/references/history-command.md +98 -2
- package/bundled-skills/lore/references/platform-mirrors.md +45 -16
- package/bundled-skills/lore/references/stale-new-markers.md +10 -8
- package/bundled-skills/lore/references/summary-template.md +8 -1
- package/bundled-skills/lore/references/workflows.md +192 -0
- package/bundled-skills/lore/scripts/README.md +14 -13
- package/bundled-skills/lore/scripts/README.zh-CN.md +14 -13
- package/bundled-skills/lore/scripts/find_duplicates.py +14 -4
- package/bundled-skills/lore/scripts/find_stale.py +68 -16
- package/bundled-skills/lore/scripts/history.py +235 -23
- package/bundled-skills/lore/scripts/id_hash.py +7 -4
- package/bundled-skills/lore/scripts/list_entries.py +82 -13
- package/bundled-skills/macos-reverse/SKILL.md +85 -0
- package/bundled-skills/macos-reverse/references/macho-triage.md +10 -0
- package/bundled-skills/malware-analysis/SKILL.md +311 -0
- package/bundled-skills/malware-analysis/references/anti-analysis-techniques.md +205 -0
- package/bundled-skills/malware-analysis/references/sandbox-orchestration.md +204 -0
- package/bundled-skills/malware-analysis/references/yara-sigma-rules.md +232 -0
- package/bundled-skills/mobile-reverse/SKILL.md +222 -0
- package/bundled-skills/mobile-reverse/references/anti-detection-bypass.md +182 -0
- package/bundled-skills/mobile-reverse/references/frida-objection-deep.md +218 -0
- package/bundled-skills/mobile-reverse/references/ios-reverse-guide.md +177 -0
- package/bundled-skills/muapi-media/SKILL.md +311 -0
- package/bundled-skills/ot-ics/SKILL.md +117 -0
- package/bundled-skills/ot-ics/references/ot-safe-assessment.md +10 -0
- package/bundled-skills/patch-diff-exploit/SKILL.md +278 -0
- package/bundled-skills/patch-diff-exploit/references/diff-tools-comparison.md +271 -0
- package/bundled-skills/patch-diff-exploit/references/patch-tuesday-workflow.md +253 -0
- package/bundled-skills/patch-diff-exploit/references/root-cause-and-poc.md +198 -0
- package/bundled-skills/pentest-tools/SKILL.md +346 -0
- package/bundled-skills/pentest-tools/references/ai-pentest-agents.md +148 -0
- package/bundled-skills/pentest-tools/references/ai-pentesting-landscape-2026.md +73 -0
- package/bundled-skills/pentest-tools/references/automation-loop-pattern.md +153 -0
- package/bundled-skills/pentest-tools/references/awesome-pentest-digest.md +175 -0
- package/bundled-skills/pentest-tools/references/burpsuite-mcp-guide.md +769 -0
- package/bundled-skills/pentest-tools/references/client-side-lab-playbook.md +155 -0
- package/bundled-skills/pentest-tools/references/kali-mcp-ecosystem.md +119 -0
- package/bundled-skills/pentest-tools/references/msf-protocol.md +169 -0
- package/bundled-skills/pentest-tools/references/network-attack-defense.md +350 -0
- package/bundled-skills/pentest-tools/references/nuclei-guide-2026.md +157 -0
- package/bundled-skills/pentest-tools/references/payloads.md +32 -0
- package/bundled-skills/pentest-tools/references/pentest-ai-agents-matrix.md +117 -0
- package/bundled-skills/pentest-tools/references/pentest-loop.md +270 -0
- package/bundled-skills/pentest-tools/references/recon-pipeline.md +154 -0
- package/bundled-skills/pentest-tools/references/templates/findings.md +21 -0
- package/bundled-skills/pentest-tools/references/templates/progress.md +17 -0
- package/bundled-skills/pentest-tools/references/templates/rules.md +35 -0
- package/bundled-skills/pentest-tools/references/templates/scope.md +29 -0
- package/bundled-skills/pentest-tools/references/templates/task_plan.md +27 -0
- package/bundled-skills/pentest-tools/references/web-attack-cheatsheet.md +387 -0
- package/bundled-skills/pentest-tools/src-hunter/SKILL.md +243 -0
- package/bundled-skills/pentest-tools/src-hunter/references/README.en.md +115 -0
- package/bundled-skills/pentest-tools/src-hunter/references/README.md +148 -0
- package/bundled-skills/pentest-tools/src-hunter/references/dictionaries/00-index.md +44 -0
- package/bundled-skills/pentest-tools/src-hunter/references/dictionaries/chinese-srcfingerprints.md +515 -0
- package/bundled-skills/pentest-tools/src-hunter/references/dictionaries/default-credentials-cn.md +274 -0
- package/bundled-skills/pentest-tools/src-hunter/references/industry/00-index.md +66 -0
- package/bundled-skills/pentest-tools/src-hunter/references/industry/banking-finance.md +338 -0
- package/bundled-skills/pentest-tools/src-hunter/references/industry/telecom-isp.md +315 -0
- package/bundled-skills/pentest-tools/src-hunter/references/methodology/00-index.md +68 -0
- package/bundled-skills/pentest-tools/src-hunter/references/methodology/01-attack-priority.md +143 -0
- package/bundled-skills/pentest-tools/src-hunter/references/methodology/02-bypass-toolkit.md +357 -0
- package/bundled-skills/pentest-tools/src-hunter/references/methodology/03-evidence-discipline.md +205 -0
- package/bundled-skills/pentest-tools/src-hunter/references/methodology/04-control-gap-hunting.md +238 -0
- package/bundled-skills/pentest-tools/src-hunter/references/methodology/05-srctimebox-priority.md +161 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet/adcs/346/224/273/345/207/273.md +254 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet/exchange/346/224/273/345/207/273.md +254 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet/sharepoint/346/224/273/345/207/273.md +113 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//344/277/241/346/201/257/346/224/266/351/233/206.md +947 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//345/205/215/346/235/200/344/270/216/350/247/204/351/201/277.md +780 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//345/207/255/350/257/201/347/252/203/345/217/226.md +1259 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//345/237/237/346/270/227/351/200/217/346/224/273/345/207/273.md +753 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//346/235/203/351/231/220/346/217/220/345/215/207.md +819 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//346/235/203/351/231/220/347/273/264/346/214/201.md +577 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//346/250/252/345/220/221/347/247/273/345/212/250.md +838 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/intranet//351/232/247/351/201/223/344/273/243/347/220/206.md +604 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/ai/345/256/211/345/205/250.md +698 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/api/345/256/211/345/205/250.md +1935 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/csrf/350/267/250/347/253/231/350/257/267/346/261/202/344/274/252/351/200/240.md +952 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/jwt/345/256/211/345/205/250.md +496 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/lfi-rfi/346/226/207/344/273/266/345/214/205/345/220/253.md +1365 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/rce/350/277/234/347/250/213/344/273/243/347/240/201/346/211/247/350/241/214.md +1329 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/sql-nosql/346/263/250/345/205/245.md +1924 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/ssrf/346/234/215/345/212/241/347/253/257/350/257/267/346/261/202/344/274/252/351/200/240.md +1256 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/ssti/346/250/241/346/235/277/346/263/250/345/205/245.md +1151 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/websocket/345/256/211/345/205/250.md +487 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/xss/350/267/250/347/253/231/350/204/232/346/234/254.md +1465 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web/xxe/345/256/236/344/275/223/346/263/250/345/205/245.md +815 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//344/270/232/345/212/241/351/200/273/350/276/221/346/274/217/346/264/236.md +594 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//344/272/221/345/256/211/345/205/250/346/274/217/346/264/236.md +561 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//344/276/233/345/272/224/351/223/276/346/224/273/345/207/273.md +399 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//345/216/237/345/236/213/351/223/276/346/261/241/346/237/223.md +401 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//345/274/200/346/224/276/351/207/215/345/256/232/345/220/221.md +396 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//346/226/207/344/273/266/346/274/217/346/264/236.md +0 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//346/241/206/346/236/266/346/274/217/346/264/236.md +2304 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//347/202/271/345/207/273/345/212/253/346/214/201.md +339 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//347/274/223/345/255/230/344/270/216cdn/345/256/211/345/205/250.md +497 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//350/256/244/350/257/201/346/274/217/346/264/236.md +1778 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/by-category/web//350/257/267/346/261/202/350/265/260/347/247/201.md +854 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/index.md +69 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools/web/346/270/227/351/200/217.md +662 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools/windows/346/270/227/351/200/217.md +100 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//344/277/241/346/201/257/346/224/266/351/233/206.md +852 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//345/206/205/347/275/221/346/270/227/351/200/217.md +873 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//345/207/255/350/257/201/347/252/203/345/217/226.md +186 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//345/237/237/346/270/227/351/200/217.md +50 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//345/257/206/347/240/201/346/224/273/345/207/273.md +462 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//346/235/203/351/231/220/346/217/220/345/215/207.md +168 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//346/274/217/346/264/236/345/210/251/347/224/250.md +445 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//347/263/273/347/273/237/345/221/275/344/273/244.md +410 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//347/272/242/351/230/237/345/267/245/345/205/267.md +64 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//347/274/226/347/240/201/350/247/243/347/240/201.md +226 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/tools//351/232/247/351/201/223/344/273/243/347/220/206.md +84 -0
- package/bundled-skills/pentest-tools/src-hunter/references/payloader/waf-bypass.md +6504 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/00-index.md +57 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/api-rest.md +2050 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/arbitrary-x-authz.md +481 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/dos.md +615 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/file-upload.md +1365 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/graphql.md +253 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/http-smuggling.md +924 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/info-disclosure.md +432 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/intranet-postexp.md +4845 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/llm-prompt-injection.md +1394 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/logic-flaws.md +1796 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/mobile.md +397 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/oauth-saml-jwt.md +2504 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/path-traversal.md +1297 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/race-conditions.md +207 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/rce.md +4829 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/sqli.md +1620 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/ssrf-cache-host.md +2098 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/unauth-access.md +330 -0
- package/bundled-skills/pentest-tools/src-hunter/references/playbooks/xss.md +1159 -0
- package/bundled-skills/pentest-tools/src-hunter/references/templates/report-submission.md +346 -0
- package/bundled-skills/pentest-tools/src-hunter/references/tools/mcp-jshook.md +174 -0
- package/bundled-skills/poka-yoke/SKILL.md +172 -0
- package/bundled-skills/project-state-governor/SKILL.md +1 -1
- package/bundled-skills/project-state-governor/references/project-state-schema.md +1 -1
- package/bundled-skills/protocol-reverse/SKILL.md +108 -0
- package/bundled-skills/protocol-reverse/references/protocol-workflow.md +29 -0
- package/bundled-skills/pwn-chain/SKILL.md +209 -0
- package/bundled-skills/pwn-chain/references/heap-pwn.md +283 -0
- package/bundled-skills/pwn-chain/references/kernel-pwn.md +370 -0
- package/bundled-skills/pwn-chain/references/stack-pwn.md +312 -0
- package/bundled-skills/radare2/SKILL.md +460 -0
- package/bundled-skills/radare2/references/cheatsheet.md +129 -0
- package/bundled-skills/radio-sdr/SKILL.md +77 -0
- package/bundled-skills/radio-sdr/references/sdr-lab-rules.md +6 -0
- package/bundled-skills/reverse-browser-automation/SKILL.md +249 -0
- package/bundled-skills/reverse-browser-automation/references/playwright-cheatsheet.md +425 -0
- package/bundled-skills/reverse-engineering/SKILL.md +213 -0
- package/bundled-skills/reverse-engineering/dsl-vm-reverse/SKILL.md +388 -0
- package/bundled-skills/reverse-engineering/references/ai-assisted-re.md +149 -0
- package/bundled-skills/reverse-engineering/references/anti-analysis.md +836 -0
- package/bundled-skills/reverse-engineering/references/awesome-re-resources.md +135 -0
- package/bundled-skills/reverse-engineering/references/crypto-decode-tools.md +220 -0
- package/bundled-skills/reverse-engineering/references/elf-analysis.md +296 -0
- package/bundled-skills/reverse-engineering/references/field-notes.md +540 -0
- package/bundled-skills/reverse-engineering/references/go-reverse.md +240 -0
- package/bundled-skills/reverse-engineering/references/kernel-driver-reverse.md +298 -0
- package/bundled-skills/reverse-engineering/references/languages-compiled.md +587 -0
- package/bundled-skills/reverse-engineering/references/languages-platforms.md +486 -0
- package/bundled-skills/reverse-engineering/references/languages.md +499 -0
- package/bundled-skills/reverse-engineering/references/nonpe-format-cookbook.md +301 -0
- package/bundled-skills/reverse-engineering/references/ollvm-deobfuscation.md +501 -0
- package/bundled-skills/reverse-engineering/references/patterns-ctf-2.md +397 -0
- package/bundled-skills/reverse-engineering/references/patterns-ctf-3.md +719 -0
- package/bundled-skills/reverse-engineering/references/patterns-ctf.md +532 -0
- package/bundled-skills/reverse-engineering/references/patterns.md +801 -0
- package/bundled-skills/reverse-engineering/references/platforms-hardware.md +304 -0
- package/bundled-skills/reverse-engineering/references/platforms.md +442 -0
- package/bundled-skills/reverse-engineering/references/re-agent-workflow.md +240 -0
- package/bundled-skills/reverse-engineering/references/tools-advanced.md +822 -0
- package/bundled-skills/reverse-engineering/references/tools-dynamic.md +846 -0
- package/bundled-skills/reverse-engineering/references/tools.md +546 -0
- package/bundled-skills/spec-driven-loop/SKILL.md +203 -0
- package/bundled-skills/spec-driven-loop/references/agent-and-judge-contracts.md +120 -0
- package/bundled-skills/spec-driven-loop/references/document-templates.md +184 -0
- package/bundled-skills/supply-chain-security/SKILL.md +180 -0
- package/bundled-skills/supply-chain-security/references/cicd-pipeline-security.md +137 -0
- package/bundled-skills/supply-chain-security/references/sbom-sca-methodology.md +74 -0
- package/bundled-skills/thick-client/SKILL.md +104 -0
- package/bundled-skills/thick-client/references/thick-client-checklist.md +9 -0
- package/bundled-skills/threat-hunting/SKILL.md +94 -0
- package/bundled-skills/threat-hunting/references/hunting-loop.md +5 -0
- package/bundled-skills/threat-intelligence/SKILL.md +176 -0
- package/bundled-skills/threat-intelligence/references/x-public-intelligence.md +93 -0
- package/bundled-skills/tree-ring-memory/SKILL.md +29 -9
- package/bundled-skills/wifi-wireless/SKILL.md +80 -0
- package/bundled-skills/wifi-wireless/references/wireless-lab-rules.md +6 -0
- package/bundled-skills/windows-ad/SKILL.md +109 -0
- package/bundled-skills/windows-ad/references/ad-attack-paths.md +12 -0
- package/package.json +1 -1
- package/skills_index.json +1281 -3
- package/bundled-skills/lore/README.md +0 -386
- package/bundled-skills/lore/README.zh-CN.md +0 -386
- package/bundled-skills/lore/WORKFLOWS.md +0 -216
- package/bundled-skills/lore/WORKFLOWS.zh-CN.md +0 -216
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
# 反分析技术检测
|
|
2
|
+
|
|
3
|
+
> 94 种反分析技术,9 个类别,82 条已验证 YARA 规则
|
|
4
|
+
> Source: Anti-VM YARA Library (Journal of Cybersecurity and Privacy, April 2026)
|
|
5
|
+
|
|
6
|
+
## 九类反分析技术
|
|
7
|
+
|
|
8
|
+
### 1. 定时检测(12 种)
|
|
9
|
+
|
|
10
|
+
```text
|
|
11
|
+
技术原理: 恶意代码通过长时间睡眠等待,使沙箱超时退出。
|
|
12
|
+
|
|
13
|
+
常见实现:
|
|
14
|
+
□ Sleep(300000) // 5 分钟睡眠
|
|
15
|
+
□ NtDelayExecution(60000) // 直接 syscall
|
|
16
|
+
□ GetTickCount 循环等待
|
|
17
|
+
□ QueryPerformanceCounter 精确延时
|
|
18
|
+
□ SetTimer + 回调执行恶意代码
|
|
19
|
+
□ WaitForSingleObject 等待内核对象
|
|
20
|
+
|
|
21
|
+
YARA 检测难度: 低(时序行为需动态分析)
|
|
22
|
+
绕过方法: CAPE sleep_skip、加速时间流逝
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### 2. CPU 指纹检测(8 种)
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
□ CPUID 指令 → hypervisor 签名
|
|
29
|
+
- hv: "VMwareVMware", "VBoxVBoxVBox"
|
|
30
|
+
- leaf 0x40000000 → Hypervisor Vendor
|
|
31
|
+
|
|
32
|
+
□ 核心数检测: < 2 核心 → 可能是沙箱
|
|
33
|
+
□ AMD-V / Intel VT-x: 沙箱通常启用硬件虚拟化
|
|
34
|
+
|
|
35
|
+
YARA 检测: 中(CPUID 指令序列可被静态识别)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### 3. 固件/BIOS 检测(6 种)★ YARA 强项
|
|
39
|
+
|
|
40
|
+
```text
|
|
41
|
+
□ SMBIOS 字符串:
|
|
42
|
+
- Manufacturer: "VMware, Inc.", "innotek GmbH"
|
|
43
|
+
- Product: "VirtualBox", "KVM", "QEMU"
|
|
44
|
+
- Serial: "0"(默认序列号)
|
|
45
|
+
|
|
46
|
+
□ ACPI 表: WAET / VRTUAL / BOCHS 签名
|
|
47
|
+
|
|
48
|
+
YARA 检测: 高(87% 精度) — 字符串字面量存在于二进制中
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### 4. 硬件指纹(10 种)
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
□ MAC 地址 OUI:
|
|
55
|
+
- VMware: 00:0C:29, 00:50:56, 00:05:69
|
|
56
|
+
- VirtualBox: 08:00:27
|
|
57
|
+
- Hyper-V: 00:15:5D
|
|
58
|
+
|
|
59
|
+
□ 磁盘序列号: "VBOX HARDDISK", "VMware Virtual S"
|
|
60
|
+
□ 显卡名称: "VMware SVGA II", "VirtualBox Graphics Adapter"
|
|
61
|
+
|
|
62
|
+
GetAdapterInfo / NtQuerySystemInformation → 读取硬件信息
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 5. API Hook 枚举(5 种)
|
|
66
|
+
|
|
67
|
+
```text
|
|
68
|
+
□ 检测 EDR/AV 的 ntdll.dll hook
|
|
69
|
+
- 读取 ntdll.dll 的磁盘副本 → 对比内存中的版本
|
|
70
|
+
- 如果 syscall stub 被修改 → 有 hook
|
|
71
|
+
|
|
72
|
+
□ 检测 sandbox hook
|
|
73
|
+
- LoadLibrary → 对比函数序言
|
|
74
|
+
- WriteProcessMemory → 检测 inline hook
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### 6. 进程检测(15 种)★ YARA 强项
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
□ 安全工具进程名检查:
|
|
81
|
+
- "wireshark.exe", "procmon.exe", "processhacker.exe"
|
|
82
|
+
- "frida-server", "magiskd", "x64dbg.exe"
|
|
83
|
+
- "ida64.exe", "ollydbg.exe", "windbg.exe"
|
|
84
|
+
|
|
85
|
+
□ 沙箱 Agent 检测:
|
|
86
|
+
- "python.exe" (CAPE agent)
|
|
87
|
+
- "VBoxTray.exe", "VBoxService.exe"
|
|
88
|
+
|
|
89
|
+
CreateToolhelp32Snapshot → Process32First/Next 遍历
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### 7. 文件系统检测(12 种)★ YARA 强项
|
|
93
|
+
|
|
94
|
+
```text
|
|
95
|
+
□ 沙箱/VM 文件路径:
|
|
96
|
+
- C:\Program Files\VMware\
|
|
97
|
+
- C:\Program Files\Oracle\VirtualBox\
|
|
98
|
+
- C:\agent\agent.pyw (CAPE)
|
|
99
|
+
- /usr/bin/qemu-ga
|
|
100
|
+
|
|
101
|
+
□ 虚拟设备文件:
|
|
102
|
+
- \\.\VBoxMiniRdrDN
|
|
103
|
+
- \\.\HGFS (VMware Shared Folders)
|
|
104
|
+
- \\.\pipe\vbox*
|
|
105
|
+
|
|
106
|
+
YARA 检测: 高 — 路径字符串明确
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### 8. 注册表检测(8 种)★ YARA 强项
|
|
110
|
+
|
|
111
|
+
```text
|
|
112
|
+
□ VM 相关注册表键:
|
|
113
|
+
- HKLM\SOFTWARE\VMware, Inc.\
|
|
114
|
+
- HKLM\HARDWARE\ACPI\DSDT\VBOX__
|
|
115
|
+
- HKLM\SYSTEM\ControlSet001\Services\VBoxSF
|
|
116
|
+
|
|
117
|
+
□ 沙箱检测:
|
|
118
|
+
RegOpenKeyEx / RegQueryValueEx 组合检测
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### 9. 窗口检测(8 种)★ YARA 强项
|
|
122
|
+
|
|
123
|
+
```text
|
|
124
|
+
□ 调试器窗口:
|
|
125
|
+
- "x64dbg", "OllyDbg", "IDA", "WinDbg"
|
|
126
|
+
- "Wireshark", "Process Hacker"
|
|
127
|
+
|
|
128
|
+
□ 沙箱窗口:
|
|
129
|
+
FindWindow → 枚举顶级窗口 → 匹配已知安全工具窗口标题
|
|
130
|
+
|
|
131
|
+
YARA 检测: 高 — 窗口标题字符串存在于内存/二进制
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## 42 条高精度 YARA 规则(精度 ≥75%)
|
|
135
|
+
|
|
136
|
+
以下类别在 YARA 中检测效果最好:
|
|
137
|
+
|
|
138
|
+
| 类别 | 规则数 | 平均精度 | 典型 FP 来源 |
|
|
139
|
+
|------|:--:|:--:|------|
|
|
140
|
+
| 固件/BIOS | 5 | 87% | 虚拟机软件安装包 |
|
|
141
|
+
| 进程检测 | 12 | 82% | 安全工具本身 |
|
|
142
|
+
| 文件系统 | 8 | 79% | 虚拟机管理工具 |
|
|
143
|
+
| 注册表 | 6 | 78% | 无 |
|
|
144
|
+
| 窗口检测 | 4 | 76% | 安全/调试工具 |
|
|
145
|
+
| API Hook | 3 | 72% | 防病毒软件 |
|
|
146
|
+
| 硬件指纹 | 2 | 68% | 虚拟化软件 |
|
|
147
|
+
| 定时检测 | 1 | 45% | 游戏/多媒体软件 |
|
|
148
|
+
|
|
149
|
+
## 高级反分析技术
|
|
150
|
+
|
|
151
|
+
### 定时逃逸(Beyond Simple Sleep)
|
|
152
|
+
|
|
153
|
+
```c
|
|
154
|
+
// 检测时间加速
|
|
155
|
+
LARGE_INTEGER freq, start, end;
|
|
156
|
+
QueryPerformanceFrequency(&freq);
|
|
157
|
+
QueryPerformanceCounter(&start);
|
|
158
|
+
Sleep(1000);
|
|
159
|
+
QueryPerformanceCounter(&end);
|
|
160
|
+
double elapsed = (double)(end.QuadPart - start.QuadPart) / freq.QuadPart;
|
|
161
|
+
if (elapsed != 1.0) exit(); // 时间被加速 → 沙箱
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### 基于异常的检测
|
|
165
|
+
|
|
166
|
+
```c
|
|
167
|
+
// 触发除零异常 → 检查 SEH 是否被 Hook
|
|
168
|
+
__try {
|
|
169
|
+
volatile int x = 0;
|
|
170
|
+
volatile int y = 1 / x;
|
|
171
|
+
} __except(EXCEPTION_EXECUTE_HANDLER) {
|
|
172
|
+
// 正常: 异常被捕获
|
|
173
|
+
// 不正常: EDR 的 vectored exception handler 先处理了 → 说明有 hook
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Return Address 完整性检查
|
|
178
|
+
|
|
179
|
+
```asm
|
|
180
|
+
; 调用前保存返回地址预期值
|
|
181
|
+
call [ntdll.NtAllocateVirtualMemory]
|
|
182
|
+
; 返回后检查栈上返回地址是否被篡改
|
|
183
|
+
cmp [rsp], expected_return_address
|
|
184
|
+
jne edr_detected
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## 最佳实践
|
|
188
|
+
|
|
189
|
+
1. **分层检测**: 静态 YARA + 动态行为 + 签名 (不要只依赖一种)
|
|
190
|
+
2. **定期更新规则**: 新 VM/沙箱版本需要新检测规则
|
|
191
|
+
3. **FP 验证**: 每条规则必须在良性样本集上验证(推荐: Assemblage 92,508 样本)
|
|
192
|
+
4. **组合条件**: 单一检测可能误报,多条件组合提高精度
|
|
193
|
+
5. **关注字符串模式**: 固件/BIOS/文件/注册表/窗口检测在 YARA 中最有效
|
|
194
|
+
|
|
195
|
+
Source: "Automating the Detection of Evasive Windows Malware" (April 2026), CAPE docs, Joe Sandbox Analysis Reports
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## Agent 动作索引(Issue #65)
|
|
200
|
+
|
|
201
|
+
检测分类见上文九类;**触发后 agent 怎么做** 的 A–T 全表与 Evidence 标签见:
|
|
202
|
+
|
|
203
|
+
`skills/reverse-engineering/anti-analysis.md` → **Agent 响应菜谱 A–T**
|
|
204
|
+
|
|
205
|
+
主路径速查:`skills/reverse-engineering/references/re-agent-workflow.md` §3.3
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# 沙箱编排与自动化
|
|
2
|
+
|
|
3
|
+
## 沙箱选型
|
|
4
|
+
|
|
5
|
+
| 沙箱 | 类型 | 速度 | 逃逸检测 | 推荐场景 |
|
|
6
|
+
|------|:--:|------|:--:|------|
|
|
7
|
+
| CAPE v2 | 开源 | 中 | 强 | 深度分析 + YARA 集成 |
|
|
8
|
+
| ASD Azul | 开源 | 快 | 中 | 大规模批量分类 |
|
|
9
|
+
| Joe Sandbox | 商业 | 中 | 极强 | 高价值样本深度分析 |
|
|
10
|
+
| ANY.RUN | 商业云 | 快 | 中 | 交互式快速分诊 |
|
|
11
|
+
| Triage | 商业云 | 极快 | 弱 | 批量初筛 |
|
|
12
|
+
| Cuckoo v3 | 开源 | 慢 | 弱 | 学习/研究 |
|
|
13
|
+
|
|
14
|
+
## CAPE Sandbox 部署
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# Ubuntu 22.04+
|
|
18
|
+
git clone https://github.com/kevoreilly/CAPEv2
|
|
19
|
+
cd CAPEv2
|
|
20
|
+
sudo ./cape2.sh base # 安装依赖
|
|
21
|
+
sudo ./cape2.sh all # 完整安装
|
|
22
|
+
|
|
23
|
+
# Web 界面: http://localhost:8000
|
|
24
|
+
# API: http://localhost:8000/apiv2/
|
|
25
|
+
|
|
26
|
+
# 提交样本
|
|
27
|
+
curl -F "file=@sample.exe" http://localhost:8000/apiv2/tasks/create/file/
|
|
28
|
+
|
|
29
|
+
# 批量提交
|
|
30
|
+
for f in samples/*.exe; do
|
|
31
|
+
curl -F "file=@$f" http://localhost:8000/apiv2/tasks/create/file/
|
|
32
|
+
done
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## 自动化分析管道
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
# 多沙箱串联管道
|
|
39
|
+
import requests
|
|
40
|
+
import time
|
|
41
|
+
|
|
42
|
+
def analyze_sample(filepath):
|
|
43
|
+
"""提交样本到多个沙箱并汇总结果"""
|
|
44
|
+
results = {}
|
|
45
|
+
|
|
46
|
+
# 1. 快速分诊(Triage)
|
|
47
|
+
triage_result = submit_to_triage(filepath)
|
|
48
|
+
results['triage'] = triage_result
|
|
49
|
+
|
|
50
|
+
# 2. 如果 triage 判定可疑 → 深度分析
|
|
51
|
+
if triage_result['score'] >= 5:
|
|
52
|
+
cape_result = submit_to_cape(filepath)
|
|
53
|
+
results['cape'] = cape_result
|
|
54
|
+
|
|
55
|
+
# 3. YARA 规则扫描
|
|
56
|
+
yara_matches = run_yara(filepath, 'rules/')
|
|
57
|
+
results['yara'] = yara_matches
|
|
58
|
+
|
|
59
|
+
# 4. Sigma 规则生成
|
|
60
|
+
if cape_result.get('behaviors'):
|
|
61
|
+
sigma_rules = generate_sigma(cape_result['behaviors'])
|
|
62
|
+
results['sigma'] = sigma_rules
|
|
63
|
+
|
|
64
|
+
# 5. IOC 汇总
|
|
65
|
+
iocs = extract_iocs(results)
|
|
66
|
+
results['iocs'] = iocs
|
|
67
|
+
|
|
68
|
+
return results
|
|
69
|
+
|
|
70
|
+
def submit_to_cape(filepath):
|
|
71
|
+
resp = requests.post(
|
|
72
|
+
'http://cape:8000/apiv2/tasks/create/file/',
|
|
73
|
+
files={'file': open(filepath, 'rb')},
|
|
74
|
+
data={'timeout': 300, 'enforce_timeout': True}
|
|
75
|
+
)
|
|
76
|
+
task_id = resp.json()['task_id']
|
|
77
|
+
|
|
78
|
+
# 轮询等待完成
|
|
79
|
+
while True:
|
|
80
|
+
status = requests.get(
|
|
81
|
+
f'http://cape:8000/apiv2/tasks/view/{task_id}'
|
|
82
|
+
).json()['task']['status']
|
|
83
|
+
if status == 'reported':
|
|
84
|
+
break
|
|
85
|
+
time.sleep(5)
|
|
86
|
+
|
|
87
|
+
return requests.get(
|
|
88
|
+
f'http://cape:8000/apiv2/tasks/report/{task_id}/json/'
|
|
89
|
+
).json()
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## ASD Azul 集成
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# Azul — 2026 年 ASD 发布的免费大规模分析平台
|
|
96
|
+
git clone https://github.com/AustralianSignalsDirectorate/azul
|
|
97
|
+
cd azul
|
|
98
|
+
|
|
99
|
+
# 批量导入样本
|
|
100
|
+
azul import samples/ --tags "phishing_campaign_202605"
|
|
101
|
+
|
|
102
|
+
# 应用 YARA 规则
|
|
103
|
+
azul scan --yara rules/anti_vm_rules.yar
|
|
104
|
+
|
|
105
|
+
# Snort 规则检测
|
|
106
|
+
azul scan --snort rules/c2_detection.rules
|
|
107
|
+
|
|
108
|
+
# 自动提取 IOC
|
|
109
|
+
azul export --format stix2 --output iocs.json
|
|
110
|
+
|
|
111
|
+
# 自定义插件
|
|
112
|
+
azul plugin add custom_unpacker.py # 添加自定义解包逻辑
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## 反沙箱对抗
|
|
116
|
+
|
|
117
|
+
### 常见沙箱逃逸技术
|
|
118
|
+
|
|
119
|
+
```text
|
|
120
|
+
1. 定时延迟
|
|
121
|
+
→ Sleep(120000) // 2分钟,超出沙箱超时
|
|
122
|
+
→ 检测: Hook Sleep → 加速时间
|
|
123
|
+
|
|
124
|
+
2. 用户交互检测
|
|
125
|
+
→ GetTickCount() 检查鼠标移动
|
|
126
|
+
→ 检测: 模拟用户交互
|
|
127
|
+
|
|
128
|
+
3. 磁盘大小检测
|
|
129
|
+
→ GetDiskFreeSpaceEx < 60GB
|
|
130
|
+
→ 检测: 扩展虚拟磁盘
|
|
131
|
+
|
|
132
|
+
4. 特定文件/进程检测
|
|
133
|
+
→ C:\agent\agent.pyw (CAPE)
|
|
134
|
+
→ 检测: 重命名检测组件
|
|
135
|
+
|
|
136
|
+
5. WMI 虚拟机检测
|
|
137
|
+
→ Win32_ComputerSystem.Manufacturer = "VMware, Inc."
|
|
138
|
+
→ 检测: 修改 SMBIOS
|
|
139
|
+
|
|
140
|
+
6. MAC 地址检测
|
|
141
|
+
→ 00:0C:29 (VMware OUI), 08:00:27 (VirtualBox)
|
|
142
|
+
→ 检测: 随机 MAC
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### CAPE 反逃逸配置
|
|
146
|
+
|
|
147
|
+
```python
|
|
148
|
+
# CAPE 配置
|
|
149
|
+
[processing]
|
|
150
|
+
# 启用反反分析
|
|
151
|
+
antievasion = yes
|
|
152
|
+
|
|
153
|
+
# 模拟人机交互
|
|
154
|
+
human_interaction = yes
|
|
155
|
+
|
|
156
|
+
# 最小运行时间
|
|
157
|
+
timeout = 600
|
|
158
|
+
|
|
159
|
+
# 检测特定技术
|
|
160
|
+
detect_sleep_skip = yes
|
|
161
|
+
detect_debugger_check = yes
|
|
162
|
+
detect_vm_check = yes
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## IOC 自动化提取
|
|
166
|
+
|
|
167
|
+
```python
|
|
168
|
+
def extract_iocs(analysis_results):
|
|
169
|
+
iocs = {
|
|
170
|
+
'network': {'ip': [], 'domain': [], 'url': [], 'user_agent': []},
|
|
171
|
+
'host': {'files': [], 'registry': [], 'mutex': [], 'services': []},
|
|
172
|
+
'mitre': [],
|
|
173
|
+
'hashes': {}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
# CAPE → IOC 提取
|
|
177
|
+
if 'cape' in analysis_results:
|
|
178
|
+
cape = analysis_results['cape']
|
|
179
|
+
behavior = cape.get('behavior', {})
|
|
180
|
+
|
|
181
|
+
# 网络 IOC
|
|
182
|
+
for conn in behavior.get('network', {}).get('tcp', []):
|
|
183
|
+
iocs['network']['ip'].append(conn['dst'])
|
|
184
|
+
for dns in behavior.get('network', {}).get('dns', []):
|
|
185
|
+
iocs['network']['domain'].append(dns['request'])
|
|
186
|
+
|
|
187
|
+
# 文件 IOC
|
|
188
|
+
for dropped in behavior.get('dropped', []):
|
|
189
|
+
iocs['host']['files'].append(dropped['path'])
|
|
190
|
+
|
|
191
|
+
# Mutex
|
|
192
|
+
for mutex in behavior.get('summary', {}).get('mutex', []):
|
|
193
|
+
iocs['host']['mutex'].append(mutex)
|
|
194
|
+
|
|
195
|
+
# YARA → MITRE 映射
|
|
196
|
+
if 'yara' in analysis_results:
|
|
197
|
+
for match in analysis_results['yara']:
|
|
198
|
+
if 'mitre_id' in match.get('meta', {}):
|
|
199
|
+
iocs['mitre'].extend(match['meta']['mitre_id'].split(','))
|
|
200
|
+
|
|
201
|
+
return iocs
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Source: CAPE v2 docs, ASD Azul documentation, Joe Sandbox v44, Anti-VM YARA Library (2026)
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
# YARA + Sigma 规则编写方法论
|
|
2
|
+
|
|
3
|
+
## YARA 规则编写
|
|
4
|
+
|
|
5
|
+
### 基本语法
|
|
6
|
+
|
|
7
|
+
```yara
|
|
8
|
+
rule RuleName {
|
|
9
|
+
meta:
|
|
10
|
+
description = "规则描述"
|
|
11
|
+
author = "作者"
|
|
12
|
+
date = "2026-01"
|
|
13
|
+
severity = "low/medium/high/critical"
|
|
14
|
+
mitre_id = "T1234"
|
|
15
|
+
|
|
16
|
+
strings:
|
|
17
|
+
$ = "ASCII 字符串"
|
|
18
|
+
$ = { 48 65 6C 6C 6F } // 十六进制
|
|
19
|
+
$ = /regex[0-9]{4}/ // 正则
|
|
20
|
+
$ = "wide_string" wide // UTF-16
|
|
21
|
+
$ = "xor_encoded" xor // XOR 编码
|
|
22
|
+
$ = "case_insensitive" nocase // 忽略大小写
|
|
23
|
+
|
|
24
|
+
condition:
|
|
25
|
+
// 逻辑组合
|
|
26
|
+
uint16(0) == 0x5A4D and // MZ header
|
|
27
|
+
filesize < 500KB and
|
|
28
|
+
(2 of ($s*) or $hex1) and
|
|
29
|
+
not ($benign1 and $benign2)
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 性能优化
|
|
34
|
+
|
|
35
|
+
```yara
|
|
36
|
+
// ❌ 慢 — 全文件正则
|
|
37
|
+
condition: /https?:\/\/.*\.php/
|
|
38
|
+
|
|
39
|
+
// ✅ 快 — 先锚定字符串再限定位置
|
|
40
|
+
strings: $url = "http"
|
|
41
|
+
condition: $url and /https?:\/\/[a-z0-9.-]+\/[a-z]{3,8}\.php/ in (0..filesize)
|
|
42
|
+
|
|
43
|
+
// ❌ 慢 — 无锚点
|
|
44
|
+
condition: any of them
|
|
45
|
+
|
|
46
|
+
// ✅ 快 — 锚定在可用字符串上
|
|
47
|
+
condition: uint16(0) == 0x5A4D and any of them
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### 反分析技术检测规则
|
|
51
|
+
|
|
52
|
+
```yara
|
|
53
|
+
// 虚拟机检测
|
|
54
|
+
rule AntiVM_WMI_Detection {
|
|
55
|
+
meta:
|
|
56
|
+
description = "检测通过 WMI 查询虚拟机信息"
|
|
57
|
+
severity = "medium"
|
|
58
|
+
mitre_id = "T1497"
|
|
59
|
+
strings:
|
|
60
|
+
$wmi1 = "SELECT * FROM Win32_BIOS" nocase
|
|
61
|
+
$wmi2 = "SELECT * FROM Win32_VideoController" nocase
|
|
62
|
+
$wmi3 = "SELECT * FROM Win32_NetworkAdapter" nocase
|
|
63
|
+
$wmi4 = "SELECT * FROM Win32_ComputerSystem" nocase
|
|
64
|
+
$bios = "VMware" nocase
|
|
65
|
+
$bios2 = "VirtualBox" nocase
|
|
66
|
+
$bios3 = "QEMU" nocase
|
|
67
|
+
condition:
|
|
68
|
+
uint16(0) == 0x5A4D and
|
|
69
|
+
(2 of ($wmi*)) and
|
|
70
|
+
(1 of ($bios*))
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// 调试器检测
|
|
74
|
+
rule AntiDebug_PEB_Check {
|
|
75
|
+
meta:
|
|
76
|
+
description = "通过 PEB.BeingDebugged 检测调试器"
|
|
77
|
+
severity = "medium"
|
|
78
|
+
mitre_id = "T1622"
|
|
79
|
+
strings:
|
|
80
|
+
// x64: mov rax, gs:[0x60]; movzx eax, byte [rax+2]
|
|
81
|
+
$peb_x64 = { 65 48 8B 04 25 60 00 00 00 0F B6 40 02 }
|
|
82
|
+
// x86: mov eax, fs:[0x30]; movzx eax, byte [eax+2]
|
|
83
|
+
$peb_x86 = { 64 A1 30 00 00 00 0F B6 40 02 }
|
|
84
|
+
condition:
|
|
85
|
+
uint16(0) == 0x5A4D and
|
|
86
|
+
any of them
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### 94 种反分析技术分类
|
|
91
|
+
|
|
92
|
+
| 类别 | 技术数量 | YARA 可检测 | 示例 |
|
|
93
|
+
|------|:--:|:--:|------|
|
|
94
|
+
| 定时检测 | 12 | 低 | Sleep → GetTickCount 对比 |
|
|
95
|
+
| CPU 指纹 | 8 | 中 | CPUID 指令检测 hypervisor |
|
|
96
|
+
| 固件/BIOS 检测 | 6 | **高** | SMBIOS 字符串匹配 |
|
|
97
|
+
| 硬件指纹 | 10 | 中 | MAC 地址/硬盘序列号检测 |
|
|
98
|
+
| API Hook 枚举 | 5 | 中 | NtQueryInformationProcess |
|
|
99
|
+
| 进程检测 | 15 | **高** | 进程名字符串 (frida, wireshark) |
|
|
100
|
+
| 文件系统检测 | 12 | **高** | 路径字符串 (C:\Program Files\VMware) |
|
|
101
|
+
| 注册表检测 | 8 | **高** | 注册表路径字符串 |
|
|
102
|
+
| 窗口检测 | 8 | **高** | 窗口类名/标题 (x64dbg, OLLYDBG) |
|
|
103
|
+
|
|
104
|
+
> 42/82 条规则 ≥75% 精度 (Anti-VM YARA Library, April 2026)
|
|
105
|
+
|
|
106
|
+
## Sigma 规则编写
|
|
107
|
+
|
|
108
|
+
### 规则模板
|
|
109
|
+
|
|
110
|
+
```yaml
|
|
111
|
+
title: 标题 — 描述检测行为
|
|
112
|
+
id: UUID-v4(生成后不变)
|
|
113
|
+
status: stable/experimental/test/deprecated
|
|
114
|
+
description: 详细描述
|
|
115
|
+
author: 作者
|
|
116
|
+
date: YYYY/MM/DD
|
|
117
|
+
modified: YYYY/MM/DD
|
|
118
|
+
references:
|
|
119
|
+
- https://attack.mitre.org/techniques/TXXXX/
|
|
120
|
+
- 内部引用
|
|
121
|
+
|
|
122
|
+
logsource:
|
|
123
|
+
category: process_creation # Windows 事件 ID 4688
|
|
124
|
+
product: windows
|
|
125
|
+
# 或: service, product: linux, category: sysmon
|
|
126
|
+
|
|
127
|
+
detection:
|
|
128
|
+
# 选择条件
|
|
129
|
+
selection_base:
|
|
130
|
+
EventID: 4688
|
|
131
|
+
selection_malicious:
|
|
132
|
+
CommandLine|contains:
|
|
133
|
+
- 'suspicious_command'
|
|
134
|
+
- 'malware_pattern'
|
|
135
|
+
# 过滤条件
|
|
136
|
+
filter_legitimate:
|
|
137
|
+
ParentImage|endswith: '\explorer.exe'
|
|
138
|
+
|
|
139
|
+
# 最终条件
|
|
140
|
+
condition: selection_base and selection_malicious and not filter_legitimate
|
|
141
|
+
|
|
142
|
+
falsepositives:
|
|
143
|
+
- 合法管理工具
|
|
144
|
+
- 软件开发工具
|
|
145
|
+
level: low/medium/high/critical
|
|
146
|
+
tags:
|
|
147
|
+
- attack.tXXXX
|
|
148
|
+
- attack.tXXXX.XXX
|
|
149
|
+
- detection.malware
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### PowerShell 恶意行为检测
|
|
153
|
+
|
|
154
|
+
```yaml
|
|
155
|
+
title: Suspicious PowerShell Download and Execute
|
|
156
|
+
id: e3b0c442-98fc-4c78-a0e5-123456789abc
|
|
157
|
+
status: experimental
|
|
158
|
+
description: |
|
|
159
|
+
检测使用 PowerShell 下载并执行 Payload 的行为,
|
|
160
|
+
常见于无文件恶意软件和初始访问阶段。
|
|
161
|
+
logsource:
|
|
162
|
+
category: process_creation
|
|
163
|
+
product: windows
|
|
164
|
+
detection:
|
|
165
|
+
selection:
|
|
166
|
+
Image|endswith:
|
|
167
|
+
- '\powershell.exe'
|
|
168
|
+
- '\pwsh.exe'
|
|
169
|
+
CommandLine|contains|all:
|
|
170
|
+
- 'DownloadString'
|
|
171
|
+
- 'Invoke-Expression' # security-allowlist: SEC004
|
|
172
|
+
condition: selection
|
|
173
|
+
falsepositives:
|
|
174
|
+
- 系统管理员自动化脚本
|
|
175
|
+
- 软件部署工具
|
|
176
|
+
level: high
|
|
177
|
+
tags:
|
|
178
|
+
- attack.t1059.001 # PowerShell
|
|
179
|
+
- attack.t1105 # Ingress Tool Transfer
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### 勒索软件行为检测
|
|
183
|
+
|
|
184
|
+
```yaml
|
|
185
|
+
title: Potential Ransomware Activity — File Encryption + Shadow Copy Deletion
|
|
186
|
+
id: a1b2c3d4-5678-90ab-cdef-0123456789ab
|
|
187
|
+
status: stable
|
|
188
|
+
description: |
|
|
189
|
+
检测同时出现批量文件写入和卷影副本删除的勒索软件特征行为。
|
|
190
|
+
logsource:
|
|
191
|
+
category: process_creation
|
|
192
|
+
product: windows
|
|
193
|
+
detection:
|
|
194
|
+
sel_vss:
|
|
195
|
+
CommandLine|contains:
|
|
196
|
+
- 'vssadmin delete shadows'
|
|
197
|
+
- 'wmic shadowcopy delete'
|
|
198
|
+
- 'Get-WmiObject Win32_Shadowcopy | Remove-WmiObject'
|
|
199
|
+
sel_bcdedit:
|
|
200
|
+
CommandLine|contains:
|
|
201
|
+
- 'bcdedit /set {default} recoveryenabled No'
|
|
202
|
+
condition: sel_vss or sel_bcdedit
|
|
203
|
+
level: critical
|
|
204
|
+
tags:
|
|
205
|
+
- attack.t1490 # Inhibit System Recovery
|
|
206
|
+
- attack.t1486 # Data Encrypted for Impact
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
## 规则测试
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
# YARA 规则验证
|
|
213
|
+
yara -C rule.yara sample_dir/ # 编译规则并扫描
|
|
214
|
+
yara -s rule.yara sample.exe # 显示匹配字符串
|
|
215
|
+
yara --print-meta rule.yara # 打印元数据
|
|
216
|
+
|
|
217
|
+
# Sigma 规则转换
|
|
218
|
+
sigmac -t splunk rule.yml # → Splunk SPL
|
|
219
|
+
sigmac -t elastalert rule.yml # → Elastalert
|
|
220
|
+
sigmac -t es-qs rule.yml # → Elasticsearch Query
|
|
221
|
+
sigma convert -t splunk rule.yml # sigma-cli 新版
|
|
222
|
+
|
|
223
|
+
# 规则质量检查
|
|
224
|
+
# 1. 不会在正常系统触发
|
|
225
|
+
# 2. 不会在常见软件安装/运行中触发
|
|
226
|
+
# 3. 在已知恶意样本上 100% 触发
|
|
227
|
+
|
|
228
|
+
# False Positive 验证
|
|
229
|
+
# 在 Assemblage 良性样本集(92,508 样本)上测试
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Source: CCCS YARA Standard, SigmaHQ, Anti-VM YARA Library (2026), Joe Sandbox v44
|