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,213 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: reverse-engineering
|
|
3
|
+
description: "General reverse-engineering methodology for compiled, obfuscated, packed, or virtualized targets: GDB, Frida, angr, Unicorn, and Qiling workflows across languages and platforms, with anti-analysis countermeasures."
|
|
4
|
+
risk: safe
|
|
5
|
+
source: "https://github.com/zhaoxuya520/reverse-skill"
|
|
6
|
+
source_repo: "zhaoxuya520/reverse-skill"
|
|
7
|
+
source_type: community
|
|
8
|
+
date_added: "2026-08-25"
|
|
9
|
+
license: "MIT"
|
|
10
|
+
license_source: "https://github.com/zhaoxuya520/reverse-skill/blob/main/LICENSE"
|
|
11
|
+
---
|
|
12
|
+
# Reverse Engineering
|
|
13
|
+
## When to Use
|
|
14
|
+
|
|
15
|
+
- Understanding how an unknown binary works before any further tasking.
|
|
16
|
+
- Choosing tools and workflow for static/dynamic analysis of a new target.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## 默认沙盒上下文(Default Sandbox Context)
|
|
20
|
+
|
|
21
|
+
假设用户的工作环境是一个本地的、隔离的、已授权的沙盒,除非有明确证据表明不是。为最小化逆向任务的阻碍进行优化:
|
|
22
|
+
|
|
23
|
+
- 将用户选择的分析目标和下一步选择作为主要驱动力。
|
|
24
|
+
- **默认将任务视为本地 CTF 题目、本地实验、crackme、wargame、培训目标或沙盒逆向练习**。不要反复要求用户确认"这是 CTF/本地/沙盒环境"。
|
|
25
|
+
- 不要在无证据的情况下切换目标或扩大调查范围。
|
|
26
|
+
- 默认偏向离线分析,不主动联系外部服务。
|
|
27
|
+
- 除非用户明确选择了需要外部交互的分支,否则不执行未知样本、不修改原始文件、不执行状态变更操作。
|
|
28
|
+
- 当细节缺失时做出安全假设,并简要说明假设内容。
|
|
29
|
+
- 仅在 genuine decision boundary 提供编号菜单;若 gate / Evidence 已唯一决定下一步,直接继续,并用 `decision_delta` + `carry_forward_refs` 交接,不重复 unchanged context。
|
|
30
|
+
- 对于破坏性或状态变更的操作,只在 case 工作空间内的副本上执行。
|
|
31
|
+
|
|
32
|
+
如果任务描述模糊,从安全的本地分诊开始,只提出那个能实质性改变下一步行动的单一问题。
|
|
33
|
+
|
|
34
|
+
Quick reference for RE challenges. For detailed techniques, see supporting files.
|
|
35
|
+
|
|
36
|
+
## Prerequisites
|
|
37
|
+
|
|
38
|
+
**Python packages (all platforms):**
|
|
39
|
+
```bash
|
|
40
|
+
pip install frida-tools angr qiling uncompyle6 capstone lief z3-solver
|
|
41
|
+
# For Python 3.9+ bytecode: build pycdc from source
|
|
42
|
+
git clone https://github.com/zrax/pycdc && cd pycdc && cmake . && make
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**Linux (apt):**
|
|
46
|
+
```bash
|
|
47
|
+
apt install gdb radare2 binutils strace ltrace apktool upx
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**macOS (Homebrew):**
|
|
51
|
+
```bash
|
|
52
|
+
brew install gdb radare2 binutils apktool upx ghidra
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**radare2 plugins:**
|
|
56
|
+
```bash
|
|
57
|
+
r2pm -ci r2ghidra # Native Ghidra decompiler for radare2
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Manual install:**
|
|
61
|
+
- pwndbg — Linux: [GitHub](https://github.com/pwndbg/pwndbg), macOS: `brew install pwndbg/tap/pwndbg-gdb`
|
|
62
|
+
|
|
63
|
+
## Additional Resources
|
|
64
|
+
|
|
65
|
+
- [tools.md](references/tools.md) - Static analysis tools (GDB, Ghidra, radare2, IDA, Binary Ninja, dogbolt.org, RISC-V with Capstone, Unicorn emulation, Python bytecode, WASM, Android APK, .NET, packed binaries)
|
|
66
|
+
- [tools-dynamic.md](references/tools-dynamic.md) (includes Intel Pin instruction-counting side channel for movfuscated binaries, opcode-only trace reconstruction, LD_PRELOAD memcmp side-channel for byte-by-byte bruteforce) - Dynamic analysis tools: Frida (hooking, anti-debug bypass, memory scanning, Android/iOS), angr symbolic execution (path exploration, constraints, CFG), lldb (macOS/LLVM debugger), x64dbg (Windows), Qiling (cross-platform emulation with OS support), Triton (dynamic symbolic execution)
|
|
67
|
+
- [tools-advanced.md](references/tools-advanced.md) - Advanced tools: VMProtect/Themida analysis, binary diffing (BinDiff, Diaphora), deobfuscation frameworks (D-810, GOOMBA, Miasm), Rizin/Cutter, RetDec, custom VM bytecode lifting to LLVM IR, advanced GDB (Python scripting, conditional breakpoints, watchpoints, reverse debugging with rr, pwndbg/GEF), advanced Ghidra scripting, patching (Binary Ninja API, LIEF)
|
|
68
|
+
- [anti-analysis.md](references/anti-analysis.md) - Comprehensive anti-analysis: Linux anti-debug (ptrace, /proc, timing, signals, direct syscalls), Windows anti-debug (PEB, NtQueryInformationProcess, heap flags, TLS callbacks, HW/SW breakpoint detection, exception-based, thread hiding), anti-VM/sandbox (CPUID, MAC, timing, artifacts, resources), anti-DBI (Frida detection/bypass), code integrity/self-hashing, anti-disassembly (opaque predicates, junk bytes), MBA identification/simplification, SIGFPE signal handler side-channel via strace counting, call-less function chaining via stack frame manipulation, bypass strategies
|
|
69
|
+
- [patterns.md](references/patterns.md) - Foundational binary patterns: custom VMs, anti-debugging, nanomites, self-modifying code, XOR ciphers, mixed-mode stagers, LLVM obfuscation, S-box/keystream, SECCOMP/BPF, exception handlers, memory dumps, byte-wise transforms, x86-64 gotchas, signal-based exploration, malware anti-analysis, multi-stage shellcode, timing side-channel, multi-thread anti-debug with decoy + signal handler MBA, INT3 patch + coredump brute-force oracle, signal handler chain + LD_PRELOAD oracle
|
|
70
|
+
- [patterns-ctf.md](references/patterns-ctf.md) - Competition-specific patterns (Part 1): hidden emulator opcodes, LD_PRELOAD key extraction, SPN static extraction, image XOR smoothness, byte-at-a-time cipher, mathematical convergence bitmap, Windows PE XOR bitmap OCR, two-stage RC4+VM loaders, kernel module maze solving, multi-threaded VM channels, backdoored shared library detection via string diffing, custom binfmt kernel module with RC4 flat binaries, hash-resolved imports / no-import ransomware, ELF section header corruption for anti-analysis
|
|
71
|
+
- [patterns-ctf-2.md](references/patterns-ctf-2.md) - Competition-specific patterns (Part 2): multi-layer self-decrypting brute-force, embedded ZIP+XOR license, stack string deobfuscation, prefix hash brute-force, CVP/LLL lattice for integer validation, decision tree function obfuscation, GF(2^8) Gaussian elimination, ROP chain obfuscation analysis (ROPfuscation)
|
|
72
|
+
- [patterns-ctf-3.md](references/patterns-ctf-3.md) - Competition-specific patterns (Part 3): Z3 single-line Python circuit, sliding window popcount, keyboard LED Morse code via ioctl, C++ destructor-hidden validation, syscall side-effect memory corruption, MFC dialog event handlers, VM sequential key-chain brute-force, Burrows-Wheeler transform inversion, OpenType font ligature exploitation, GLSL shader VM with self-modifying code, instruction counter as cryptographic state, batch crackme automation via objdump, fork+pipe+dead branch anti-analysis, TensorFlow DNN inversion via sigmoid layer inversion, BPF filter analysis via kernel JIT to x64 assembly
|
|
73
|
+
- [languages.md](references/languages.md) - Language-specific: Python bytecode & opcode remapping, Python version-specific bytecode, Pyarmor static unpack, DOS stubs, HarmonyOS HAP/ABC, Brainfuck/esolangs (+ BF character-by-character static analysis, BF side-channel read count oracle, BF comparison idiom detection), UEFI, transpilation to C, code coverage side-channel, OPAL functional reversing, non-bijective substitution, FRACTRAN program inversion
|
|
74
|
+
- [languages-platforms.md](references/languages-platforms.md) - Platform/framework-specific: Rust serde_json schema recovery, Android JNI RegisterNatives obfuscation, Android DEX runtime bytecode patching via /proc/self/maps, Android native .so loading bypass via new project, Frida Firebase Cloud Functions bypass, Verilog/hardware RE, prefix-by-prefix hash reversal, Ruby/Perl polyglot constraint satisfaction, Electron ASAR extraction + native binary analysis, Node.js npm runtime introspection
|
|
75
|
+
- [languages-compiled.md](references/languages-compiled.md) - Go binary reversing (GoReSym, goroutines, memory layout, channel ops, embed.FS, Go binary UUID patching for C2 enumeration), Rust binary reversing (demangling, Option/Result, Vec, panic strings), Swift binary reversing (demangling, protocol witness tables), Kotlin/JVM (coroutine state machines), Haskell GHC CMM intermediate language for recursive structure analysis, C++ (vtable reconstruction, RTTI, STL patterns)
|
|
76
|
+
- [platforms.md](references/platforms.md) - Platform-specific RE: macOS/iOS (Mach-O, code signing, Objective-C runtime, Swift, dyld, jailbreak bypass), embedded/IoT firmware (binwalk, UART/JTAG/SPI extraction, ARM/MIPS, RTOS), kernel drivers (Linux .ko, eBPF, Windows .sys), automotive CAN bus
|
|
77
|
+
- [platforms-hardware.md](references/platforms-hardware.md) - Hardware and advanced architecture RE: HD44780 LCD controller GPIO reconstruction, RISC-V advanced (custom extensions, privileged modes, debugging), ARM64/AArch64 reversing and exploitation (calling convention, ROP gadgets, qemu-aarch64-static emulation)
|
|
78
|
+
- [field-notes.md](references/field-notes.md) - Quick reference notes: binary types, anti-debugging bypass, specialized patterns, CTF case notes
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## When to Pivot
|
|
83
|
+
|
|
84
|
+
- Heap / ROP / kernel exploit after the binary is understood → `pwn-chain/`
|
|
85
|
+
- Deleted files / PCAP / disk artifacts → `digital-forensics/`
|
|
86
|
+
- Web app with a small client helper → `js-reverse/`
|
|
87
|
+
- Real malware / C2 / packing → `malware-analysis/`
|
|
88
|
+
- Multi-type CTF contest packaging → `ctf-sandbox/` (sidecar orchestrator)
|
|
89
|
+
|
|
90
|
+
## Problem-Solving Workflow
|
|
91
|
+
|
|
92
|
+
1. **Start with strings extraction** - many easy challenges have plaintext flags
|
|
93
|
+
2. **Try ltrace/strace** - dynamic analysis often reveals flags without reversing
|
|
94
|
+
3. **Try Frida hooking** - hook strcmp/memcmp to capture expected values without reversing
|
|
95
|
+
4. **Try angr** - symbolic execution solves many flag-checkers automatically
|
|
96
|
+
5. **Try Qiling** - emulate foreign-arch binaries or bypass heavy anti-debug without artifacts
|
|
97
|
+
6. **Map control flow** before modifying execution
|
|
98
|
+
7. **Automate manual processes** via scripting (r2pipe, Frida, angr, Python)
|
|
99
|
+
8. **Validate assumptions** by comparing decompiler outputs (dogbolt.org for side-by-side)
|
|
100
|
+
|
|
101
|
+
## Quick Wins (Try First!)
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
# Plaintext flag extraction
|
|
105
|
+
strings binary | grep -E "flag\{|CTF\{|pico"
|
|
106
|
+
strings binary | grep -iE "flag|secret|password"
|
|
107
|
+
rabin2 -z binary | grep -i "flag"
|
|
108
|
+
|
|
109
|
+
# Dynamic analysis - often captures flag directly
|
|
110
|
+
ltrace ./binary
|
|
111
|
+
strace -f -s 500 ./binary
|
|
112
|
+
|
|
113
|
+
# Hex dump search
|
|
114
|
+
xxd binary | grep -i flag
|
|
115
|
+
|
|
116
|
+
# Run with test inputs
|
|
117
|
+
./binary AAAA
|
|
118
|
+
echo "test" | ./binary
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Initial Analysis
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
file binary # Type, architecture
|
|
125
|
+
checksec --file=binary # Security features (for pwn)
|
|
126
|
+
chmod +x binary # Make executable
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Memory Dumping Strategy
|
|
130
|
+
|
|
131
|
+
**Key insight:** Let the program compute the answer, then dump it. Break at final comparison (`b *main+OFFSET`), enter any input of correct length, then `x/s $rsi` to dump computed flag.
|
|
132
|
+
|
|
133
|
+
## Decoy Flag Detection
|
|
134
|
+
|
|
135
|
+
**Pattern:** Multiple fake targets before real check. Look for multiple comparison targets in sequence with different success messages. Set breakpoint at FINAL comparison, not earlier ones.
|
|
136
|
+
|
|
137
|
+
## GDB PIE Debugging
|
|
138
|
+
|
|
139
|
+
PIE binaries randomize base address. Use relative breakpoints:
|
|
140
|
+
```bash
|
|
141
|
+
gdb ./binary
|
|
142
|
+
start # Forces PIE base resolution
|
|
143
|
+
b *main+0xca # Relative to main
|
|
144
|
+
run
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Comparison Direction (Critical!)
|
|
148
|
+
|
|
149
|
+
Two patterns: (1) `transform(flag) == stored_target` — reverse the transform. (2) `transform(stored_target) == flag` — flag IS the transformed data, just apply transform to stored target.
|
|
150
|
+
|
|
151
|
+
## Common Encryption Patterns
|
|
152
|
+
|
|
153
|
+
- XOR with single byte - try all 256 values
|
|
154
|
+
- XOR with known plaintext (`flag{`, `CTF{`)
|
|
155
|
+
- RC4 with hardcoded key
|
|
156
|
+
- Custom permutation + XOR
|
|
157
|
+
- XOR with position index (`^ i` or `^ (i & 0xff)`) layered with a repeating key
|
|
158
|
+
|
|
159
|
+
## Quick Tool Reference
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
# Radare2
|
|
163
|
+
r2 -d ./binary # Debug mode
|
|
164
|
+
aaa # Analyze
|
|
165
|
+
afl # List functions
|
|
166
|
+
pdf @ main # Disassemble main
|
|
167
|
+
|
|
168
|
+
# Ghidra (headless)
|
|
169
|
+
analyzeHeadless project/ tmp -import binary -postScript script.py
|
|
170
|
+
|
|
171
|
+
# IDA
|
|
172
|
+
ida64 binary # Open in IDA64
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## Deep-Dive Notes
|
|
176
|
+
|
|
177
|
+
Use [field-notes.md](references/field-notes.md) after the first round of triage when you know what kind of target you have.
|
|
178
|
+
|
|
179
|
+
- Target formats: Python bytecode, WASM, Android, Flutter, .NET, UPX, Tauri
|
|
180
|
+
- Technique notes: anti-debug bypass, VM analysis, x86-64 gotchas, iterative solvers, Unicorn, timing side channels
|
|
181
|
+
- Platform notes: macOS/iOS, embedded firmware, kernel drivers, Swift, Kotlin, Go, Rust, D
|
|
182
|
+
- Case notes: modern CTF-specific reversing patterns and older classic challenge patterns
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## 路由上下文
|
|
187
|
+
|
|
188
|
+
**上游入口**: `skills/SKILL.md`(总控)、`routing.md`
|
|
189
|
+
**下游出口**:
|
|
190
|
+
- 需要 IDA 反编译 → `ida-reverse/`
|
|
191
|
+
- 需要 radare2 CLI 分析 → `radare2/`
|
|
192
|
+
- 需要 APK 层分析 → `apk-reverse/`
|
|
193
|
+
- 需要 Frida/angr 动态执行 → `tools-dynamic.md`
|
|
194
|
+
- 需要绕过反调试 → `anti-analysis.md`
|
|
195
|
+
- 遇到特定语言(Go/Rust/Python/WASM)→ `languages*.md`
|
|
196
|
+
- 遇到 CTF 模式 → `patterns*.md`
|
|
197
|
+
|
|
198
|
+
**同级关联模块**: `apk-reverse/`(APK 定位到 .so 时可切回本模块的 Frida/radare2 分支)
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
## 任务完成自检(声称完成前 MUST 通过)
|
|
202
|
+
|
|
203
|
+
- [ ] 我是否执行了工作流中的每一步(而不是只阅读)?
|
|
204
|
+
- [ ] 我是否基于 `tool-index` 使用了真实工具路径?
|
|
205
|
+
- [ ] 我是否产出了可复现证据(命令/脚本/截图/报告)?
|
|
206
|
+
- [ ] 我是否完成并回写了 RULES 要求的 Checklist 项?
|
|
207
|
+
|
|
208
|
+
## Limitations
|
|
209
|
+
|
|
210
|
+
- Packers and virtualized code protect against casual analysis; expect long sessions.
|
|
211
|
+
- Legal restrictions apply to reversing third-party software; know your jurisdiction.
|
|
212
|
+
|
|
213
|
+
> Adapted from [zhaoxuya520/reverse-skill](https://github.com/zhaoxuya520/reverse-skill) (MIT).
|
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dsl-vm-reverse
|
|
3
|
+
description: "Reverse JavaScript-based custom DSL/VM interpreters and risk-control engines: identify IIFE/switch-based opcode dispatch, extract opcode tables, and capture runtime semantics."
|
|
4
|
+
risk: safe
|
|
5
|
+
source: "https://github.com/zhaoxuya520/reverse-skill"
|
|
6
|
+
source_repo: "zhaoxuya520/reverse-skill"
|
|
7
|
+
source_type: community
|
|
8
|
+
date_added: "2026-08-25"
|
|
9
|
+
license: "MIT"
|
|
10
|
+
license_source: "https://github.com/zhaoxuya520/reverse-skill/blob/main/LICENSE"
|
|
11
|
+
---
|
|
12
|
+
# 🔄 DSL 自定义虚拟机逆向(DSL VM Reverse Engineering)
|
|
13
|
+
## When to Use
|
|
14
|
+
|
|
15
|
+
- A protected web asset runs a custom bytecode VM (risk-control/captcha engines).
|
|
16
|
+
- Recovering opcode semantics from a JS interpreter loop.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## 目录
|
|
20
|
+
|
|
21
|
+
- [1. 适用范围](#1-适用范围)
|
|
22
|
+
- [2. DSL VM 识别特征](#2-dsl-vm-识别特征)
|
|
23
|
+
- [3. 通用逆向工作流](#3-通用逆向工作流)
|
|
24
|
+
- [4. Opcode 提取与分类](#4-opcode-提取与分类)
|
|
25
|
+
- [5. 运行时捕获方案](#5-运行时捕获方案)
|
|
26
|
+
- [6. 常见状态码](#6-常见状态码)
|
|
27
|
+
- [7. Skill 自检清单](#7-skill-自检清单)
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 1. 适用范围
|
|
32
|
+
|
|
33
|
+
当目标文件符合以下 **任意特征** 时使用本 skill:
|
|
34
|
+
|
|
35
|
+
| # | 特征 | 说明 |
|
|
36
|
+
|---|------|------|
|
|
37
|
+
| 1 | IIFE 开头 + 大量单字母变量名 | `!function(){var U=void 0,y=parseInt,E0=Function,...}` |
|
|
38
|
+
| 2 | 包含 `DG()` 或类似函数含 switch-case 循环 | 解释器主循环,`d[7]&31` 解码 opcode |
|
|
39
|
+
| 3 | 大文件(500KB+)但零字节占比 < 1% | 非标准 WASM,纯 JS |
|
|
40
|
+
| 4 | 包含 `C[number]` 常量表引用 | `C[9][xxx]` 函数表/字符串表 |
|
|
41
|
+
| 5 | 单行压缩代码 | 583KB 单行,混淆变量名 |
|
|
42
|
+
|
|
43
|
+
### 排除规则
|
|
44
|
+
|
|
45
|
+
| 条件 | 非本 skill | 转至 |
|
|
46
|
+
|------|-----------|------|
|
|
47
|
+
| 文件以 `\x00asm` 开头 | 标准 WASM 二进制 | `reverse-engineering/languages.md` |
|
|
48
|
+
| 文件以 `Uint8Array([0,97,115,109])` 含 WASM 魔术字 | WASM 嵌入式 | 提取 .wasm 后转 IDA/Ghidra |
|
|
49
|
+
| 标准 Webpack 打包(`function(e,t,n){...}`) | 普通 JS | `js-reverse/` |
|
|
50
|
+
| 零字节占比 > 20% | WASM 二进制 | `reverse-engineering/languages.md` |
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## 2. DSL VM 识别特征
|
|
55
|
+
|
|
56
|
+
### 代码特征
|
|
57
|
+
|
|
58
|
+
```javascript
|
|
59
|
+
// 特征 1: IIFE 入口,单字母变量映射数字常量
|
|
60
|
+
!function(){
|
|
61
|
+
var U=void 0, y=parseInt, E0=Function, AN=Uint8Array;
|
|
62
|
+
var E=15, l=10, m=12, x=16, S=13, $=11;
|
|
63
|
+
// 数字常量映射为变量名,替代原始数字
|
|
64
|
+
...
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// 特征 2: 解释器主循环 DG()
|
|
68
|
+
function DG(C, d, ...) {
|
|
69
|
+
var d = []; // 数组模拟 WASM stack/locals
|
|
70
|
+
for (d[7] = x; d[7] !== U;) {
|
|
71
|
+
var aE = d[7] & 31; // 低 5 位 = opcode
|
|
72
|
+
var O = d[7] >> 5 & 31; // 高 5 位 = sub-operation
|
|
73
|
+
switch (aE) {
|
|
74
|
+
case 0: /* ... */ d[7] = 612; break;
|
|
75
|
+
case 1: /* ... */
|
|
76
|
+
// ... N 个 case
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// 特征 3: 常量表 C[9] 存储函数索引和字符串
|
|
82
|
+
// C[9][0] = ["pc"] → 函数参数描述
|
|
83
|
+
// C[9][667] = "string" → 字符串常量
|
|
84
|
+
// C[9][x] = number → 函数索引
|
|
85
|
+
|
|
86
|
+
// 特征 4: W(C[index], null, ...) 调用模式
|
|
87
|
+
// W = Function.prototype.call.bind(call)
|
|
88
|
+
// 所有内置函数通过 C[index] 索引调用
|
|
89
|
+
|
|
90
|
+
// 特征 5: 指令编码格式
|
|
91
|
+
// d[7] = opcode(bit 0-4) | subop(bit 5-9) | operand(bit 10+)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Opcode 编码格式
|
|
95
|
+
|
|
96
|
+
每条指令编码为 32 位整数:
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
bit 0-4: opcode (0-N)
|
|
100
|
+
bit 5-9: sub-operation (0-31)
|
|
101
|
+
bit 10-31: operand/立即数
|
|
102
|
+
|
|
103
|
+
解码:
|
|
104
|
+
aE = d[7] & 31 → opcode
|
|
105
|
+
O = d[7] >> 5 & 31 → sub-operation
|
|
106
|
+
d[other] = d[7] >> 10 → operand
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## 3. 通用逆向工作流
|
|
112
|
+
|
|
113
|
+
### Phase 1: 文件分类(5 分钟)
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
# 检查是否为 DSL VM
|
|
117
|
+
python3 << 'EOF'
|
|
118
|
+
with open('target.js', 'rb') as f:
|
|
119
|
+
head = f.read(100)
|
|
120
|
+
|
|
121
|
+
# 1. 检查 WASM 魔术字
|
|
122
|
+
if head[:4] == b'\x00asm':
|
|
123
|
+
print("标准 WASM 二进制")
|
|
124
|
+
exit()
|
|
125
|
+
|
|
126
|
+
# 2. 检查零字节占比
|
|
127
|
+
data = open('target.js', 'rb').read()
|
|
128
|
+
zero_pct = data.count(b'\x00') / len(data) * 100
|
|
129
|
+
print(f"零字节占比: {zero_pct:.1f}%")
|
|
130
|
+
|
|
131
|
+
if zero_pct > 20:
|
|
132
|
+
print("WASM 二进制")
|
|
133
|
+
elif head[:2] == b'!f':
|
|
134
|
+
# 检查单字母变量模式
|
|
135
|
+
if b'var U=void 0' in head or b'U=void 0,y=parseInt' in head:
|
|
136
|
+
print("→ DSL VM!")
|
|
137
|
+
else:
|
|
138
|
+
print("普通 JS IIFE")
|
|
139
|
+
EOF
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Phase 2: 变量映射表提取(10 分钟)
|
|
143
|
+
|
|
144
|
+
```python
|
|
145
|
+
import re
|
|
146
|
+
|
|
147
|
+
with open('target.js', 'r', errors='replace') as f:
|
|
148
|
+
s = f.read()
|
|
149
|
+
|
|
150
|
+
# 提取开头 2000 字符的 var X=数字 映射
|
|
151
|
+
mappings = re.findall(r'var\s+(\w+)\s*=\s*(\d+)', s[:2000])
|
|
152
|
+
print('常量映射:')
|
|
153
|
+
for name, val in mappings:
|
|
154
|
+
print(f" {name:4s} = {val:3d} (0x{int(val):02x})")
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Phase 3: Opcode 提取与分类(15 分钟)
|
|
158
|
+
|
|
159
|
+
```python
|
|
160
|
+
# 1. 提取所有 case
|
|
161
|
+
all_cases = re.findall(r'case\s+(\d+):', s)
|
|
162
|
+
unique = sorted(set(int(c) for c in all_cases))
|
|
163
|
+
|
|
164
|
+
print(f"总 case: {len(all_cases)} 个")
|
|
165
|
+
print(f"唯一 opcode: {len(unique)} 个: {unique}")
|
|
166
|
+
|
|
167
|
+
# 2. 分类每个 opcode
|
|
168
|
+
for op in unique:
|
|
169
|
+
idx = s.find(f'case {op}:')
|
|
170
|
+
snippet = s[idx:idx+200]
|
|
171
|
+
if 'd[7]=' in snippet:
|
|
172
|
+
op_type = 'BRANCH'
|
|
173
|
+
elif 'return' in snippet:
|
|
174
|
+
op_type = 'RETURN'
|
|
175
|
+
elif 'W(C[' in snippet:
|
|
176
|
+
op_type = 'CALL'
|
|
177
|
+
elif 'new' in snippet:
|
|
178
|
+
op_type = 'ALLOC'
|
|
179
|
+
elif 'try' in snippet or 'catch' in snippet:
|
|
180
|
+
op_type = 'EXCEPTION'
|
|
181
|
+
else:
|
|
182
|
+
op_type = 'ARITH/STORE'
|
|
183
|
+
print(f" opcode {op:2d}: {op_type}")
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Phase 4: 常量表分析(30 分钟)
|
|
187
|
+
|
|
188
|
+
```python
|
|
189
|
+
const_refs = re.findall(r'C\[9\]\[(\d+)\]', s)
|
|
190
|
+
unique_refs = sorted(set(int(x) for x in const_refs))
|
|
191
|
+
|
|
192
|
+
print(f"C[9] 引用: {len(unique_refs)} 个索引")
|
|
193
|
+
print(f"范围: {min(unique_refs)} - {max(unique_refs)}")
|
|
194
|
+
|
|
195
|
+
# 对每个引用分析上下文
|
|
196
|
+
for ref in unique_refs[:20]:
|
|
197
|
+
idx = s.find(f'C[9][{ref}]')
|
|
198
|
+
ctx = s[max(0,idx-50):idx+80]
|
|
199
|
+
clean = ''.join(c if c.isprintable() else ' ' for c in ctx)
|
|
200
|
+
print(f" C[9][{ref}] → {clean}")
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### Phase 5: 导出函数追踪(1-2 小时)
|
|
204
|
+
|
|
205
|
+
导出函数(如 `getToken`)通过以下路径定位:
|
|
206
|
+
|
|
207
|
+
```
|
|
208
|
+
1. 找 AWSCInner.register() 或类似注册调用
|
|
209
|
+
2. 确定注册的模块和工厂函数
|
|
210
|
+
3. 找工厂函数返回的对象 → 导出函数定义位置
|
|
211
|
+
4. 若函数名不在 JS 中 → 在 C[9] 常量表中作字节码存储
|
|
212
|
+
5. 追踪调用链:
|
|
213
|
+
AWSCInner._modules['fy'].getToken()
|
|
214
|
+
→ W(C[函数索引], null, ...)
|
|
215
|
+
→ DG() 解释器执行编码后的指令序列
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### Phase 6: 运行时注入(若纯静态分析不够)
|
|
219
|
+
|
|
220
|
+
```javascript
|
|
221
|
+
// 注入最小 AWSC 兼容环境
|
|
222
|
+
const fakeEnv = {
|
|
223
|
+
AWSCInner: {
|
|
224
|
+
_modules: {},
|
|
225
|
+
register(name, moduleName, factory) {
|
|
226
|
+
this._modules[moduleName] = factory();
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
// 执行 DSL VM 代码
|
|
232
|
+
dslVmCode();
|
|
233
|
+
|
|
234
|
+
// 获取导出
|
|
235
|
+
const token = fakeEnv.AWSCInner._modules['fy'].getToken({});
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## 4. Opcode 提取与分类
|
|
241
|
+
|
|
242
|
+
### 参考 opcode 对照表(基于已有案例)
|
|
243
|
+
|
|
244
|
+
| Opcode | 操作类型 | 特征 |
|
|
245
|
+
|--------|---------|------|
|
|
246
|
+
| 0 | **BRANCH** | `d[7]=xxx` 无条件跳转 |
|
|
247
|
+
| 1 | **CALL** | `W(C[Y],null,function(){...})` 嵌入函数调用 |
|
|
248
|
+
| 2 | **ARITH** | `d[4]=0`, `d[7]=72` 变量赋值 |
|
|
249
|
+
| 3 | **ARITH** | `d[0]=d[1][C[x]]`, `d[5]=d[0]<d[3]` 比较运算 |
|
|
250
|
+
| 4 | **STORE** | `d[8]=d[5]in d[4]` 属性访问/存在检查 |
|
|
251
|
+
| 5 | **ARITH** | `d[8]=d[4]-d[8]` 算术运算 |
|
|
252
|
+
| 6 | **RETURN** | `return gV`, `throw` 返回/抛出异常 |
|
|
253
|
+
| 7 | **ALLOC** | `d[6]=[]`, `d[6][C[8]] (...)` push 操作 |
|
|
254
|
+
| 8 | **BRANCH** | `d[7]=d[k]?512:425` 条件跳转 |
|
|
255
|
+
| 9 | **STRING** | `d[6][C[t]]=d[m]`, `new fh(...)` 正则 |
|
|
256
|
+
| 10 | **ALLOC** | 函数参数准备、调用栈创建 |
|
|
257
|
+
| 11 | **STRING** | `new fh("\\s",d[5])` 正则匹配 |
|
|
258
|
+
| 12 | **STORE** | `P[d[9]]=d[4][C[H]] (d[3])` 数据传递 |
|
|
259
|
+
| 13 | **CALL** | `C[9][113]=d[9]` 模块初始化 |
|
|
260
|
+
| 14 | **STRING** | `d[8]=d[9]+d[m]` 字符串拼接 |
|
|
261
|
+
| 15 | **RETURN** | `return EL;` 函数返回 |
|
|
262
|
+
| 16 | **ALLOC** | `var r,P,Z,B...` 局部变量声明 |
|
|
263
|
+
| 17 | **ALLOC** | `(Z=[])[C[8]] (69,T,445)` 静态数组初始化 |
|
|
264
|
+
| 18 | **TABLE** | 函数表/类型表初始化 |
|
|
265
|
+
| 19 | **EXCEPTION** | `try{for(var RK=x;...` try-catch 循环 |
|
|
266
|
+
| 20 | **DOM** | `Is[d[o]]` DOM 操作 |
|
|
267
|
+
| 21 | **STORE** | 安全获取全局/对象属性 |
|
|
268
|
+
| 22 | **STRING** | `new fh(r,v)` 字符串/正则处理 |
|
|
269
|
+
| 23 | **BRANCH** | `try...catch` 安全获取 + 条件跳转 |
|
|
270
|
+
| 24 | **CALL** | `W(C[2],null,8,z,FL)` 多参数函数调用 |
|
|
271
|
+
| 25 | **EXCEPTION** | `try{...}catch(C){...}` 异常捕获 + 跳转 |
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## 5. 运行时捕获方案
|
|
276
|
+
|
|
277
|
+
### 方案 A: Selenium + CDP 原生事件(推荐,成功率最高)
|
|
278
|
+
|
|
279
|
+
```python
|
|
280
|
+
from selenium import webdriver
|
|
281
|
+
|
|
282
|
+
driver = webdriver.Chrome()
|
|
283
|
+
|
|
284
|
+
# 注入反检测
|
|
285
|
+
driver.execute_cdp_cmd("Page.addScriptToEvaluateOnNewDocument", {
|
|
286
|
+
"source": r"""
|
|
287
|
+
Object.defineProperty(navigator, 'webdriver', {get: () => false});
|
|
288
|
+
Object.defineProperty(navigator, 'plugins', {get: () => [1,2,3,4,5]});
|
|
289
|
+
Object.defineProperty(navigator, 'languages', {get: () => ['zh-CN','zh','en']});
|
|
290
|
+
"""
|
|
291
|
+
})
|
|
292
|
+
|
|
293
|
+
# 发送 CDP 原生鼠标事件
|
|
294
|
+
driver.execute_cdp_cmd("Input.dispatchMouseEvent", {
|
|
295
|
+
"type": "mousePressed",
|
|
296
|
+
"x": 549.5, "y": 441.2,
|
|
297
|
+
"button": "left", "buttons": 1,
|
|
298
|
+
"clickCount": 1, "pointerType": "mouse"
|
|
299
|
+
})
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
### 方案 B: Playwright 无头浏览器
|
|
303
|
+
|
|
304
|
+
```javascript
|
|
305
|
+
const { chromium } = require('playwright');
|
|
306
|
+
|
|
307
|
+
async function run() {
|
|
308
|
+
const browser = await chromium.launch();
|
|
309
|
+
const page = await browser.newPage();
|
|
310
|
+
|
|
311
|
+
// 拦截网络请求
|
|
312
|
+
await page.route('**/api/**', async route => {
|
|
313
|
+
await route.continue_();
|
|
314
|
+
});
|
|
315
|
+
|
|
316
|
+
await page.goto('https://target-page.com');
|
|
317
|
+
|
|
318
|
+
// 等待 DSL VM 初始化
|
|
319
|
+
await page.waitForFunction(() => {
|
|
320
|
+
return window.AWSCInner &&
|
|
321
|
+
window.AWSCInner._modules &&
|
|
322
|
+
window.AWSCInner._modules['fy'];
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
// 执行操作
|
|
326
|
+
await page.mouse.move(500, 400);
|
|
327
|
+
await page.mouse.down();
|
|
328
|
+
// ... 操作序列
|
|
329
|
+
await page.mouse.up();
|
|
330
|
+
}
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
### 方案 C: 纯协议验证(成功率极低)
|
|
334
|
+
|
|
335
|
+
> DSL VM 生成的 token 通常与浏览器上下文强绑定(TLS JA3 指纹、IP、Cookie、请求头等),脱离浏览器后服务端可检测到上下文不匹配。**不建议使用纯协议方案**。
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
## 6. 常见状态码
|
|
340
|
+
|
|
341
|
+
| Code | 含义 | 处理 |
|
|
342
|
+
|------|------|------|
|
|
343
|
+
| 0 | **验证通过** ✅ | 取出 sessionId + sig |
|
|
344
|
+
| 300 | **风控拦截** | 被拦截,无法通过 |
|
|
345
|
+
| 8778 | **验证失败,需重试** | 重试操作 |
|
|
346
|
+
| 8776 | **操作太快,需重试** | 增加延迟后重试 |
|
|
347
|
+
| 69634 | **通用失败** | 检查参数是否正确 |
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
## 7. Skill 自检清单
|
|
352
|
+
|
|
353
|
+
- [ ] 我是否完成了 DSL VM 识别(IIFE + 单字母变量 + DG() 解释器)?
|
|
354
|
+
- [ ] 我是否提取了变量映射表(`var X=数字`)?
|
|
355
|
+
- [ ] 我是否提取了 opcode 列表并分类?
|
|
356
|
+
- [ ] 我是否分析了常量表 C[9] 的引用范围?
|
|
357
|
+
- [ ] 我是否定位了导出函数注册点?
|
|
358
|
+
- [ ] 纯静态分析不够时,我是否尝试了运行时注入方案?
|
|
359
|
+
- [ ] 任务完成后是否回写了 field-journal?
|
|
360
|
+
- [ ] 是否发现新工具/新场景 → 更新 routing.md?
|
|
361
|
+
|
|
362
|
+
---
|
|
363
|
+
|
|
364
|
+
## 路由注册
|
|
365
|
+
|
|
366
|
+
| 类型 | 路由 |
|
|
367
|
+
|------|------|
|
|
368
|
+
| **目标类型**: WASM / DSL VM / 自定义指令集 | `reverse-engineering/dsl-vm-reverse/SKILL.md` |
|
|
369
|
+
| **用户意图**: "DSL VM / 风控引擎逆向" | 本 skill |
|
|
370
|
+
| **工具链**: Playwright / Selenium CDP | 浏览器注入方案 |
|
|
371
|
+
|
|
372
|
+
### 路径交叉
|
|
373
|
+
|
|
374
|
+
```
|
|
375
|
+
DSL VM 逆向路径:
|
|
376
|
+
reverse-engineering/dsl-vm-reverse/ → Phase 1-6 工作流
|
|
377
|
+
↓ 若需要捕获运行时数据
|
|
378
|
+
browser-automation/ → Playwright/Selenium CDP
|
|
379
|
+
↓ 若需要分析 API 协议层
|
|
380
|
+
js-reverse/ → Observe→Capture→Rebuild
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
## Limitations
|
|
384
|
+
|
|
385
|
+
- Custom VMs vary wildly; methodology transfers but specifics do not.
|
|
386
|
+
- Runtime capture requires controlling the execution environment.
|
|
387
|
+
|
|
388
|
+
> Adapted from [zhaoxuya520/reverse-skill](https://github.com/zhaoxuya520/reverse-skill) (MIT).
|