- name
SKILL.md
The skill file stays in the publisher's repository.
Paste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add index-login/MobileRE-Skill --skill frida-mobile-security -a cursor -yPaste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add index-login/MobileRE-Skill --skill frida-mobile-security -a claude-code -yPaste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add index-login/MobileRE-Skill --skill frida-mobile-security -a codex -yPaste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add index-login/MobileRE-Skill --skill frida-mobile-security -a grok -ySend the copied message in a Grok Bot chat. The Bot fetches this SKILL.md from GitHub and adds it to the skills all your Bots share.
Install this skill: https://github.com/index-login/MobileRE-Skill/tree/HEAD/.kilo/skill/frida-mobile-securityFrom the publisher
模块优先,决策树驱动。 本文件是总控:任务路由 + 决策树导航 + 模块目录。各技巧域的详细打法在项目根 references/ 分域文件(全量索引 references/_index.md),按需读取。
路径基准:
references/*相对项目根;scripts/*相对本文件所在目录(.kilo/skill/frida-mobile-security/)。给用户的 frida CLI 命令必须写全路径(如-l .kilo/skill/frida-mobile-security/scripts/core/utils.js),或让用户先cd .kilo/skill/frida-mobile-security;tools/frida_run.py -l scripts/...短路径自动解析(实测:短路径直接跑 frida CLI 会Errno 2)。
硬性规则:scripts/core/utils.js 必须作为第一个 -l 参数加载。
# 从项目根执行:先 cd .kilo/skill/frida-mobile-security,或把 scripts/ 展开为 .kilo/skill/frida-mobile-security/scripts/
# 例:frida -U -f com.app -l .kilo/skill/frida-mobile-security/scripts/core/utils.js -l .kilo/skill/frida-mobile-security/scripts/monitors/crypto_monitor.js
# 加解密自吐
frida -U -f com.app -l scripts/core/utils.js -l scripts/monitors/crypto_monitor.js
# 行为摸底
frida -U -f com.app -l scripts/core/utils.js -l scripts/monitors/file_monitor.js -l scripts/monitors/network_monitor.js -l scripts/monitors/thread_monitor.js
# 反检测 Phase 1 (保活 + 定位检测 so)
frida -U -f com.app -l scripts/core/utils.js -l scripts/bypass/exit_blocker.js -l scripts/bypass/so_loader_tracer.js
# HTTP 明文拦截
frida -U -f com.app -l scripts/core/utils.js -l scripts/monitors/ssl_plaintext.js
# SSL Pinning 通用绕过(Java 多栈;native/国密 TLS 另配 native_hooker)
frida -U -f com.app -l scripts/core/utils.js -l scripts/bypass/ssl_unpinning.js
# Native 函数发现
frida -U -f com.app -l scripts/core/utils.js -l scripts/monitors/native_hooker.js
# 跨组件 Intent 污点追踪
frida -U -f com.app -l scripts/core/utils.js -l scripts/monitors/intent_tracker.js
# 内存敏感数据扫描 + 密码输入监听
frida -U -f com.app -l scripts/core/utils.js -l scripts/monitors/memory_scanner.js
# Android Keystore 观测 + 密钥策略判定(K1-K9)
frida -U -f com.app -l scripts/core/utils.js -l scripts/monitors/keystore_monitor.js -l scripts/checklist/keystore_audit.js
# API 可达性统计(审 .so 前先定"哪些 JNI 真被调到")
frida -H 127.0.0.1:27042 -n Gadget -l scripts/core/utils.js -l scripts/monitors/api_reach.js \
-e 'var CONFIG_OVERRIDE={api_reach:{targets:["com.foo.Bar"],methodPrefix:"native"}}'
通道说明:
-U是 USB 直连;走端口转发时换成-H 127.0.0.1:8888(先adb forward tcp:8888 tcp:8888)。 Agent 无人值守运行用tools/frida_run.py(非交互:加载 → 观察 N 秒 → 存活报告 → detach);也可直接用原生frida -F -q -t N -o log(静默、定时退出、落盘)。frida CLI 是 REPL,stdin EOF 会自动退出,不能直接在后台跑。Windows 控制台打印非 UTF-8 payload 会崩输出线程:优先-o落盘或设PYTHONIOENCODING=utf-8。 设备操控用tools/device_ui.py:元素树elements、按文本/ID 点击tap --text/--id(现 dump 现定位,无 ref 失效问题)、等待wait-for、常亮stayon、清空clear。
运行时配置通过 -e 'var CONFIG_OVERRIDE={...}' 注入,见 §五。
adb devices -l # 1. 设备在线
adb shell su -c "ps -A | grep -i frida" # 2. server 是否在跑
adb forward tcp:8888 tcp:8888; frida-ps -H 127.0.0.1:8888 # 3. 通道验证(有进程列表即通)
启动 frida-server 用 nohup ... &(-D 会挂住 adb shell 不返回,容易误判未启动)。server 版本需与本地 frida CLI 一致:
adb shell "su -c 'nohup <设备上 frida-server 路径> -l 127.0.0.1:8888 > /dev/null 2>&1 &'"
匹配用户意图 → 加载对应 references 分域 → 按决策树执行。不要逐章浏览。
用户是否已能稳定挂载 Frida?
├─ [否] "挂上就闪退" → 加载 anti-detection.md
├─ [是] 已用 hluda/魔改 frida/已跑过 exit_blocker → 跳过反检测,直接匹配任务
└─ [不确定] → 快速探路:utils + exit_blocker + so_loader_tracer
├─ exit_blocker 有 BLOCKED → 存在检测但已被保活 → 可继续
└─ exit_blocker 无日志且进程正常 → 无检测 → 可继续
每种技巧在对应 references 有完整决策树,此处只给入口:
scripts/ 下全部模块,按用途分类。utils.js 始终首个加载。
按 python3 tools/<工具> ... 直接跑(工作目录 = 项目根)。检测项(注入/调试/Janus)见 §六。
tools/ghidra/*.java 是 Ghidra 脚本(class 脚本走 run_ghidra_script,inline body 走 run_script_inline);
tools/ida/*.py 在 IDA 内执行(py_exec_file)。逐个脚本的调用方式、cfg 键、默认值来源见 tools/ghidra/README.md(唯一索引)。
两者都只做"批量机械活",单函数分析走 MCP(ghidra_decompile_function 等)。
scripts/utils/)当上层 hook 失效时,按此递推下钻(完整方法见 native-analysis.md):
Java/ObjC → JNI/Runtime → Native .so → libc → syscall → SVC #0
常见下钻:crypto_monitor 无输出→native_hooker;file_monitor 无输出→syscall_tracer;network_monitor 无 connect→检查 recvfrom;dl_monitor 无输出→syscall_tracer(mmap+PROT_EXEC)。
所有模块接受 CONFIG_OVERRIDE,通过 -e 或 Python dict 注入:
var CONFIG_OVERRIDE = {
file_monitor: { filterPath: ["/data/data/com.target/"] },
network_monitor: { showPayload: true },
crypto_monitor: { showStack: true },
native_hooker: { targetLibs: ["libencrypt.so"] },
ssl_plaintext: { urlFilter: ["api.example.com"] },
exit_blocker: { showBacktrace: false },
init_hook: { onModuleInit: [{ moduleName: "libDetect.so" }], probeCallers: true, autoHideFrida: true },
thread_blocker: { blockCallers: ["libmsaoaidsec.so"] },
frida_feature_hider: { indirectHook: true },
};
各模块特有配置见对应 references 文件。
项目根 tools/ 下 bat 脚本,Agent 不能代跑,输出命令让用户自行执行(方便截图取证)。Python 工具可直接跑(python3 tools/janus_check.py ...、py -3 tools/debug-gdb.py ...,本机 python 可能是 Python 2)。
首次分析新 App:check-janus → debug-gdb → check-anti-inject → Frida Phase 1。所有工具前置条件:root + SELinux Permissive。注意 debug-gdb.py 附加成功后目标若被反调试杀死,属于检测到反调试(正结论),非工具失败。
GetAPKInfo.jar 解析失败(魔改 Manifest,报 0x000c0003)时,直接用 janus_check.py——经 apksigner 验证签名方案(V1+V2 通过 = Janus 安全),效果与 GetAPKInfo.jar 一致。
冒烟自检(可选,验证整套链路):L2/L3 回归与离线复算的预期结果见 references/smoke-test.md。
需要用户在 app 上手动操作时(点击按钮/切换页面触发行为):
配置 analysis.py(TIMEOUT=0 手动停止、LOG_TO_FILE=True 日志落盘)
→ 运行 → 用户操作 app → 停止 → 读日志 → 改 CUSTOM_HOOK_SCRIPT → 再运行
日志分析:读 .txt 日志,按时间戳锚定用户操作窗口,关联多模块信号。详见 references/behavior-analysis.md 交叉分析。
references/_index.md)用于 Android/iOS 移动应用安全逆向分析:Frida 动态插桩、绕过反调试/反注入/加固壳、脱壳、加密与 native SO 层 hook、运行时行为分析、jadx-mcp 静态攻击面分析、离线 SO 静态分析(ELF 侦察/字符串/交叉引用/反汇编/JNI 判型)。用户提到"绕过检测/闪退/脱壳/加密/抓包/行为摸底/内存扫描/分析 so/ELF 侦察/快速反汇编/JNI/检查证书"等
---name: frida-mobile-securitydescription: 用于 Android/iOS 移动应用安全逆向分析:Frida 动态插桩、绕过反调试/反注入/加固壳、脱壳、加密与 native SO 层 hook、运行时行为分析、jadx-mcp 静态攻击面分析、离线 SO…---# .kilo/skill/frida-mobile-security/SKILL.mdOverview
用于 Android/iOS 移动应用安全逆向分析:Frida 动态插桩、绕过反调试/反注入/加固壳、脱壳、加密与 native SO 层 hook、运行时行为分析、jadx-mcp 静态攻击面分析、离线 SO 静态分析(ELF 侦察/字符串/交叉引用/反汇编/JNI 判型)。用户提到"绕过检测/闪退/脱壳/加密/抓包/行为摸底/内存扫描/分析 so/ELF 侦察/快速反汇编/JNI/检查证书"等意图时使用。
FAQ
Download .kilo/skill/frida-mobile-security/SKILL.md from the publisher, or copy the path and open the repository. PlugMCP lists the skill and does not host the file.
The publisher keeps it at https://github.com/index-login/MobileRE-Skill.
Claude, Cursor, Codex, and Grok Build can read a SKILL.md you add from the publisher's repository. Grok Bot installs it when you send the skill's GitHub folder link in a chat.
references/troubleshooting.md| "写自定义 hook" "API 用法" "Stalker" "RegisterNatives" "内存搜索" | API 参考 | references/api-reference.md |
svc_tracer.js | SVC #0 指令追踪(Stalker) | native-analysis |
intent_tracker.js | 跨组件 Intent 污点追踪 | behavior-analysis |
--setup--ret-str--out-arg--no-init--no-syscalls| native-analysis |
emu_setup.py | emu_run 的通用 setup 助手库:std_string/std_vector/call_sret/read_std_string/install_stub/patch_data_import/ctype_table/cstr——复杂函数(C++ 对象入参/出参、覆盖 GOT 桩)少写样板 | native-analysis |
trace_recon.py | 仿真 trace 状态重建:观测日志 → 缓冲状态序列(COPY/PASS 自动分段) | native-analysis |
fsmon_run.py | 设备侧内核文件事件采集与分析(capture/diff/compare/summary;流式、读风暴自动降噪、写活动视图、敏感路径检测画像、落盘件 pull+分类)。不注入/跨进程/无内容(内容走 Frida);Frida 上不去时的兜底观察。需 root;设备侧 fsmon 二进制缺件自装(nowsecure/fsmon Release) | behavior-analysis |
cipher_lab.py | 密码结构判定器:layers 层写法双轨迹判定 / table 白盒表反推 / schedule 编排归因(出主密钥) | native-analysis |
so.py | SO 静态分析一站式:info(段/节/依赖/导出/导入/重定位/--v2o)/ strings / dump / disasm / strref(串→引用点)/ callers / svc(内联系统调用)/ jni(Java 参数判型) | native-analysis |
so_ledger.py | 函数台账 → 工作队列:三层筛选(代码分区/机器形状/证据分级)、形状去重、机械命名建议。配 tools/ghidra/so_inventory.java 用 | so-function-recovery |
ptr_table.py | 指针表枚举与分类:--scan 扫可写段的连续指针数组、--tbl 单表分析、--xref 反查槽位、--classify vm 标 handler/opcode 表候选 | so-function-recovery |
probe_layout.py | 动态结构体布局探测:--at/--hook 取结构、--auto 扫偏移、--multi-hook 一次抓多个 PC 的 x0..x5、--setup 挂样本环境 | so-function-recovery |
vmp.py | 字节码 VM / VMP 壳逆向(profile 驱动):disasm 反汇编 / verify 用 trace 校验解码模型 / trace 动态追踪执行路径 / model 查 handler 指令模型 / profile 管理编码模型。换壳只换 tools/vmp_profiles/*.json | so-function-recovery |
check_registry.py | 登记漂移自检:扫 tools/ scripts/ references/ 对照入口文档,列出未登记项,退出码 1 | 维护 |
emu_setup_template.py | --setup 脚本骨架:前 4 步通用(bss 清理/重定位/指针中和/JNI+syscall),第 5 步按 [!] unstubbed 日志补桩。emu_run/probe_layout/vmp trace 三处通用 | native-analysis |