Skip to content

hgxszhj/https-github.com-zhaoxuya520-reverse-skill / skills

reverse-skill-router

Flagged

Routes reverse engineering, exploitation, penetration testing, malware, mobile, firmware, browser automation, documentation, and security tasks to the appropriate specialist skill. Use when a task spans modules or the correct reverse-skill entrypoint is unclear.

FileKindSize
CONTRIBUTING.mdmarkdown20.4 KB
INDEX.mdmarkdown11.2 KB
MASTER-ROUTING.mdmarkdown7.3 KB
SKILL.mdskill md12.9 KB
config/routing.jsonconfig14.7 KB
field-journal/2026-05-15-cellular-pro-mumu-ksad-fragment-fix.mdmarkdown1.3 KB
field-journal/2026-05-15_lumine-go-reverse.mdmarkdown2.2 KB
field-journal/2026-05-16_pentest-personalblog-fun-mass-assignment.mdmarkdown5.1 KB
field-journal/2026-05-17_pentest-vue-spa-actuator-leak.mdmarkdown3.0 KB
field-journal/2026-05-25_pentest-cf-access-sibling-subdomain-cookie-poisoning.mdmarkdown12.0 KB
field-journal/2026-05-26_pentest-newapi-rate-limit-bypass.mdmarkdown2.9 KB
field-journal/2026-06-29_burp-mcp-full-test-and-fix.mdmarkdown7.4 KB
field-journal/2026-07-05_dsl-vm-captcha-reverse.mdmarkdown3.5 KB
field-journal/2026-07-14_android-arm64-self-extract-source-recovery.mdmarkdown5.7 KB
field-journal/2026-07-18_gin-juice-client-friction.mdmarkdown1.6 KB
field-journal/2026-07-20_reverse-toolchain-windows-bootstrap.mdmarkdown3.9 KB
field-journal/2026-07-22_electron-bytenode-privileged-update-chain.mdmarkdown6.7 KB
field-journal/2026-08-01_nextjs-cdk-contract-faithful-local-reconstruction.mdmarkdown7.6 KB
field-journal/2026-08-01_pentest-encryption-oracle-public-template-sql-admin-takeover.mdmarkdown8.1 KB
field-journal/2026-08-06_cortex-m-msc-firmware-self-keyed-rotate-xor.mdmarkdown4.8 KB
field-journal/2026-08-08_client-neutral-structured-routing-pr-integration.mdmarkdown4.1 KB
field-journal/2026-08-08_pr-value-triage-and-safe-integration.mdmarkdown1.7 KB
field-journal/2026-08-14_windows-powershell-native-exit-code-pr-review.mdmarkdown5.5 KB
field-journal/2026-08-17_tool-index-r2-fallback-powershell-pwsh-host-fix.mdmarkdown12.1 KB
field-journal/2026-08-20_apk-flutter-banner-ad-removal.mdmarkdown6.0 KB
field-journal/2026-09-03_issue-pr-security-boundary-integration.mdmarkdown2.9 KB
field-journal/CONTRIBUTE-BACK.mdmarkdown5.3 KB
field-journal/_index.mdmarkdown6.1 KB
field-journal/_template.mdmarkdown4.4 KB
field-journal/anonymization.mdmarkdown6.6 KB
field-journal/precedent-auth.mdmarkdown1.7 KB
field-journal/precedent-pentest.mdmarkdown25.0 KB
field-journal/precedent-reverse.mdmarkdown13.2 KB
field-journal/seed-001_elf-packed-loader.mdmarkdown3.3 KB
field-journal/seed-002_go-malware-stripped.mdmarkdown3.4 KB
field-journal/seed-003_web-api-auth-bypass.mdmarkdown3.2 KB
field-journal/seed-004_js-sign-webpack.mdmarkdown3.6 KB
field-journal/seed-005_ad-certipy-esc1.mdmarkdown2.0 KB
field-journal/seed-006_ssrf-cloud-metadata.mdmarkdown2.7 KB
field-journal/seed-007_ntlm-relay-coercer.mdmarkdown2.9 KB
field-journal/seed-008_apk-okhttp-ssl-pin-bypass.mdmarkdown4.4 KB
field-journal/seed-009_ios-jailbreak-detect-bypass.mdmarkdown4.6 KB
field-journal/seed-010_ctf-pwn-rop-x64.mdmarkdown5.0 KB
field-journal/seed-011_pcap-protocol-reverse.mdmarkdown4.5 KB
field-journal/seed-012_log4shell-jndi-rce.mdmarkdown5.1 KB
field-journal/seed-013_kerberoasting-spn.mdmarkdown4.6 KB
field-journal/seed-014_unity-il2cpp-reverse.mdmarkdown5.3 KB
field-journal/seed-015_iot-firmware-uart.mdmarkdown6.0 KB
field-journal/seed-016_k8s-container-escape.mdmarkdown6.6 KB
field-journal/seed-017_xxe-oob-exfil.mdmarkdown5.3 KB
ops/IDENTITY.mdmarkdown2.7 KB
ops/README.mdmarkdown1.3 KB
ops/analysis-blindspot-cookbook.mdmarkdown4.1 KB
ops/analysis-decision-framework.mdmarkdown5.4 KB
ops/evidence-finding-path.mdmarkdown4.3 KB
ops/role-map.mdmarkdown3.1 KB
ops/sandbox-profile.mdmarkdown2.1 KB
ops/scope-contract.mdmarkdown3.9 KB
ops/skill-supply-chain.mdmarkdown3.6 KB
ops/timeline-workitem.mdmarkdown3.5 KB
references/community-security-skills.mdmarkdown7.5 KB
references/domain-coverage-map.mdmarkdown2.9 KB
routing.mdmarkdown27.1 KB
routing_zh.mdmarkdown29.5 KB
scripts/append-evidence.ps1script7.1 KB
scripts/bootstrap-manifest.jsonconfig12.5 KB
scripts/bootstrap-reverse.ps1script41.0 KB
scripts/bootstrap-reverse.shscript34.1 KB
scripts/case-guard.ps1script3.9 KB
scripts/case-guard.shexecutablescript3.5 KB
scripts/case-init.ps1script14.4 KB
scripts/case-init.shexecutablescript12.3 KB
scripts/consolidate-evidence.ps1script2.7 KB
scripts/consolidate_evidence.pyscript3.1 KB
scripts/extract-summaries.ps1script5.5 KB
scripts/lib/BootstrapSupplyChain.ps1script7.1 KB
scripts/lib/HostRuntime.ps1script1.9 KB
scripts/lib/RouteScope.ps1script718 B
scripts/lib/ToolDiscovery.ps1script44.6 KB
scripts/lib/WorkRoot.ps1script876 B
scripts/master-route.ps1script7.8 KB
scripts/master-route.shexecutablescript5.4 KB
scripts/refresh-tool-index.ps1script7.7 KB
scripts/refresh-tool-index.shscript17.2 KB
scripts/scan-leaks.ps1script2.9 KB
scripts/smoke.ps1script8.9 KB
scripts/test-bash-workflow.shexecutablescript2.7 KB
scripts/test-bootstrap-codex-encoding.ps1script5.0 KB
scripts/test-bootstrap-manifest.shscript12.5 KB
scripts/test-bootstrap-supply-chain.ps1script10.9 KB
scripts/test-client-neutral-bootstrap.ps1script3.5 KB
scripts/test-client-neutral-bootstrap.shscript9.5 KB
scripts/test-consolidate-evidence.ps1script3.1 KB
scripts/test-p0-friction.ps1script22.4 KB
scripts/test-parse-contracts.ps1script7.6 KB
scripts/test-routing.ps1script3.8 KB
scripts/test-routing.shscript4.8 KB
scripts/test-workflow-title-safety.ps1script1.8 KB
scripts/update-star-history.ps1script5.4 KB
scripts/verify-doc-facts.ps1script4.2 KB
scripts/verify-doc-links.pyscript3.6 KB
scripts/verify-repository-security.pyscript7.9 KB
scripts/verify-routing-coherence.ps1script33.7 KB
tests/routing-benchmark.jsonconfig17.3 KB
tool-index.md.templateother2.8 KB

field-journal/seed-014_unity-il2cpp-reverse.md

View on GitHub
# [种子] Unity IL2CPP 游戏逆向 → 还原元数据 + 修改逻辑

## 场景分类
游戏安全 / 移动逆向

## 目标概述
一个 Unity 打包的 Android 游戏(IL2CPP 模式),游戏内购或核心算法在 C# 编写但已编译成 native。需要还原方法名、定位关键逻辑、改动 / hook 实现修改。

## 完整执行链路

1. 拆包 APK,确认是 IL2CPP
   ```bash
   unzip target.apk -d apk
   ls apk/lib/arm64-v8a/        # 看到 libil2cpp.so 即 IL2CPP
   ls apk/assets/bin/Data/Managed/Metadata/
   # 关键文件: global-metadata.dat
   ```
2. 用 **Il2CppDumper** 还原元数据
   ```bash
   Il2CppDumper libil2cpp.so global-metadata.dat output/
   # 产物:DummyDll/ + script.json + il2cpp.h + dump.cs
   ```
3. 把 IDA 的 IL2CPP 脚本(`ida_with_struct.py`)跑一遍
   - 加载 libil2cpp.so → File → Script File → 选 ida_with_struct.py → 选 script.json
   - IDA 现在能看到 C# 方法名、签名、字符串
4. 在 dump.cs 里按业务关键字搜(`AddCoin` / `OnPurchase` / `Verify` / `IsVip` / `CheckSign`)
5. 拿到关键方法的偏移 → IDA 跳过去看反汇编 / 反编译
6. 选择修改方式:
   - **静态 patch**:直接 IDA 把判断改成 `mov w0, #1; ret`
   - **动态 hook**:Frida 接 il2cpp 方法(用 Frida-Il2CppBridge)
7. 重打包验证 / 注入验证

## 踩坑记录

| 问题 | 原因 | 解决方案 | 耗时 |
|------|------|---------|------|
| Il2CppDumper 报 metadata 版本不支持 | 新版 Unity 改了 metadata 格式 | 升级 Il2CppDumper 到最新 / 用 Il2CppInspectorRedux 替代 | 30min |
| global-metadata.dat 加密了 | 用了 AntiCheatToolkit / 自定义加密 | 找游戏初始化时的解密函数(通常在 il2cpp_init 周围)→ Frida 在 mmap 后 dump | 2h |
| dump.cs 看到方法名但 IDA 没匹配 | script.json 与 so 不一致 | 必须用同一次 dump 的产物;换 IDA 时清缓存 | 20min |
| Frida hook IL2CPP 方法报错 | IL2CPP 方法不是标准 Java/ObjC,要算 method offset | 用 frida-il2cpp-bridge 库,不要硬写 Interceptor.attach | 1h |
| Patch 后游戏闪退 | 校验文件 hash 或 anti-tamper | 找 hash 校验逻辑也 patch 掉,或用 hook 不改文件 | 2h |
| 重打包后启动崩溃 | apksigner v2 签名不能改字节后再签 | 删 META-INF + apktool b + apksigner sign 一气 | 30min |

## 工具链发现

- **Il2CppDumper** 老牌但仍是默认选择
- **Il2CppInspectorRedux** 更现代,支持新 Unity,能输出 IDA / Ghidra / Binary Ninja 多种插件脚本
- **frida-il2cpp-bridge** 是 IL2CPP 上 hook 的事实标准,比裸 Frida 强 N 倍
- **DnSpy** / **dnSpyEx** 用于看 DummyDll(dump 出来的伪 .NET assembly)
- **UnityCheat** 系列辅助工具(GameGuardian 系不展开)

## 关键代码/命令

frida-il2cpp-bridge hook 示例:

```typescript
// hook.ts
import "frida-il2cpp-bridge";

Il2Cpp.perform(() => {
    const Assembly = Il2Cpp.domain.assembly("Assembly-CSharp").image;

    // hook static method
    const PlayerData = Assembly.class("PlayerData");
    PlayerData.method("AddCoin").implementation = function (n: number) {
        console.log("[+] AddCoin called with:", n);
        return this.method("AddCoin").invoke(99999); // 改成 99999
    };

    // hook instance method
    const Purchase = Assembly.class("Purchase");
    Purchase.method("VerifyReceipt").implementation = function () {
        console.log("[+] VerifyReceipt → always true");
        return true;
    };
});
```

```bash
# 编译 + 注入
npm install frida-il2cpp-bridge
frida-compile hook.ts -o hook.js
frida -U -f com.target.game -l hook.js --no-pause
```

IDA 静态 patch:

```text
1. 打开 libil2cpp.so,跑 il2cpp_load_metadata.py
2. 跳到 dump.cs 中 IsPurchaseValid 对应的偏移
3. 函数开头改成 MOV W0, #1; RET(ARM64)
4. Apply Patches → Save → 替换回 APK → 重签名
```

## 对本包的改进建议

- `reverse-engineering/SKILL.md` 已覆盖 Unity,但缺 IL2CPP **完整工作链** 案例
- `reverse-engineering/references/il2cpp-cheatsheet.md` 单独成文:dump 工具对比、frida-bridge 模板、加密 metadata 处理
- bootstrap manifest 增加 frida-il2cpp-bridge

## 可复用的模式/脚本片段

**IL2CPP 标准流程**:

```text
1. 确认 IL2CPP(看 lib/abi 下有无 libil2cpp.so)
2. 找到 metadata(assets/bin/Data/Managed/Metadata/global-metadata.dat 或被加密)
3. Il2CppDumper / Inspector 还原
4. IDA + 脚本带回元信息
5. dump.cs 搜业务关键词
6. 选择 patch 还是 hook
7. 验证(启动 + 实际场景)
```

**加密 metadata 处理**:

```text
1. Frida 在 fopen/open 系调用上挂钩,看谁读 global-metadata.dat
2. 在 mmap/read 后 dump 内存里已解密的元数据
3. 把 dump 出来的内存当 metadata 喂给 Il2CppDumper
```

## 进化动作
- [ ] reverse-engineering/references 增加 il2cpp 完整章节
- [ ] bootstrap-manifest 加入 frida-il2cpp-bridge / Il2CppInspectorRedux
- [x] 路由矩阵已含 Unity / IL2CPP

## 环境信息
- Windows / macOS(运行 Il2CppDumper 用),目标设备 Android arm64
- IDA Pro 7.7+ 或 Ghidra 11+
- frida-tools 16.x, frida-il2cpp-bridge 0.9+
- Unity 版本: 2019.x - 2022.x(不同版本 metadata 格式略异)

## 脱敏要求
本条目为种子数据,基于公开技术模式编写,不涉及任何真实游戏。包名 `com.target.game` 为占位符。
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 469kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 469kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 469kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall