Serhatcck/mobile-security-mcp
GitHub: Serhatcck/mobile-security-mcp
基于 MCP 协议的移动应用安全分析服务器,让 AI 助手通过自然语言对话即可完成 Android APK 和 iOS IPA 的静态安全审计。
Stars: 0 | Forks: 0
功能 ·
安装 ·
工具 ·
使用方法 ·
贡献 ·
安全
**mobile-security-mcp** 是一个 [MCP (Model Context Protocol)](https://modelcontextprotocol.io) 服务器,它赋予 Claude 以及任何兼容
功能 ·
安装 ·
工具 ·
用法 ·
贡献 ·
安全
**mobile-security-mcp** 是一个 [MCP (Model Context Protocol)](https://modelcontextprotocol.io) 服务器,它赋予了 Claude —— 以及任何兼容 MCP 的 AI 客户端 —— 通过自然语言对话分析 Android APK 和 iOS IPA 文件安全问题的能力。
安全研究人员、移动端渗透测试人员和应用程序开发者现在可以通过简单地询问 Claude 来审计权限、提取 API 端点、检测硬编码的秘密、检查 Firebase 配置以及枚举第三方 SDK —— 无需编写任何脚本。
## 功能
### Android
| 工具 | 功能描述 |
|---|---|
| `apk_manifest_analyzer` | 解析 `AndroidManifest.xml` —— 标记 `debuggable`、`allowBackup`、导出的组件、intent 过滤器 |
| `apk_permissions_checker` | 将所有权限分类为 **dangerous**(危险)或普通,并附带风险说明 |
| `android_api_extractor` | 反编译 smali 字节码,以提取 Retrofit HTTP 端点和 OkHttp3 字段 |
| `android_google_services` | 从 `google-services.json` 和 `resources.arsc` 字符串值中提取 Firebase/GCP 配置 |
| `android_secrets_scanner` | 扫描 DEX 字节码 + `resources.arsc` + assets,以查找硬编码的 API 密钥和凭证 |
### iOS
| 工具 | 功能描述 |
|---|---|
| `ios_manifest_analyzer` | 解析 `Info.plist` —— 标记 ATS 配置错误、URL schemes、后台模式 |
| `ios_permissions_checker` | 将隐私权限声明按 **HIGH(高) / MEDIUM(中) / LOW(低)** 风险进行分类 |
| `ios_entitlements_checker` | 通过 `codesign` 提取授权信息 —— 标记 `get-task-allow`、沙盒绕过、iCloud 容器 |
| `ios_binary_strings` | 从 Mach-O 二进制文件中提取 URL、电子邮件、IP 和 API 密钥模式 |
| `ios_frameworks_detector` | 列出捆绑的框架,映射约 60 个已知 SDK(分析、广告、归因、崩溃报告) |
| `ios_google_services` | 解析 `GoogleService-Info.plist` 以获取完整的 Firebase 配置 |
| `ios_secrets_scanner` | 扫描应用程序二进制文件和资源文件,以查找硬编码的秘密和凭证 |
### 共享模式注册表
所有的秘密和 Google 服务检测模式都存在于一个单独的 `patterns.ts` 文件中 —— 易于扩展,由 Android 和 iOS 扫描器共同使用。
## 安装
```
npm install -g mobile-security-mcp
```
### 配置 Claude Desktop
添加到你的 `claude_desktop_config.json` 中:
```
{
"mcpServers": {
"mobile-security-mcp": {
"command": "npx",
"args": ["mobile-security-mcp"]
}
}
}
```
**配置文件位置:**
- macOS:`~/Library/Application Support/Claude/claude_desktop_config.json`
- Windows:`%APPDATA%\Claude\claude_desktop_config.json`
### 从源码运行
```
git clone https://github.com/Serhatcck/mobile-security-mcp.git
cd mobile-security-mcp
npm install && npm run build
```
```
{
"mcpServers": {
"mobile-security-mcp": {
"command": "node",
"args": ["/absolute/path/to/mobile-security-mcp/dist/index.js"]
}
}
}
```
## 用法
配置完成后,重启 Claude Desktop 并开始对话:
### 前置条件
**Android:**
- [`apktool`](https://apktool.org) —— `android_api_extractor` 必需 (`brew install apktool`)
- `aapt` (可选) —— 加速 manifest 解析,属于 Android SDK build tools 的一部分
**iOS (仅限 macOS):**
- `codesign`、`plutil`、`strings` —— 均为 macOS 内置,无需安装
## 工具
### `apk_manifest_analyzer`
```
Input: apk_path (string)
Output: Package info, security flags, components, intent filters, warnings
```
### `apk_permissions_checker`
```
Input: apk_path (string)
Output: Dangerous permissions (highlighted) + normal permissions + risk summary
```
### `android_api_extractor`
```
Input: apk_path OR smali_folder (string), output_format (txt|postman)
Output: Retrofit HTTP endpoints or Postman collection JSON
```
### `android_google_services`
```
Input: apk_path (string), smali_folder (optional)
Output: Firebase project ID, API keys, database URL, storage bucket, OAuth clients
```
### `android_secrets_scanner`
```
Input: apk_path (string), smali_folder (optional), min_length (default 8)
Output: Hardcoded credentials found in DEX + resources.arsc + assets
```
### `ios_manifest_analyzer`
```
Input: ipa_path (string)
Output: Bundle info, ATS settings, URL schemes, background modes, warnings
```
### `ios_permissions_checker`
```
Input: ipa_path (string)
Output: Privacy permissions grouped by HIGH/MEDIUM/LOW risk with usage descriptions
```
### `ios_entitlements_checker`
```
Input: ipa_path (string)
Output: Entitlements extracted from binary, high-risk flags, simulator detection
```
### `ios_binary_strings`
```
Input: ipa_path (string), filter (all|url|key|email|ip), min_length (default 6)
Output: Filtered strings from Mach-O binary
```
### `ios_frameworks_detector`
```
Input: ipa_path (string)
Output: Bundled frameworks grouped by category with privacy risk annotations
```
### `ios_google_services`
```
Input: ipa_path (string)
Output: Full GoogleService-Info.plist contents + pattern scan of resource files
```
### `ios_secrets_scanner`
```
Input: ipa_path (string), min_length (default 8)
Output: Secrets found in resource files and binary, split by layer with severity
```
## 演示

## 贡献
有关开发环境设置、如何添加新工具以及 PR 指南,请参见 [CONTRIBUTING.md](CONTRIBUTING.md)。
## 安全
有关如何私下报告漏洞,请参见 [SECURITY.md](SECURITY.md)。
## 更新日志
参见 [CHANGELOG.md](CHANGELOG.md)。
## 许可证
[MIT](LICENSE) © [Serhatcck](https://github.com/Serhatcck)
标签:AI安全, Android安全, API端点提取, APK分析, App安全, Chat Copilot, Claude, CVE检测, Firebase安全, iOS安全, IPA分析, LLM工具, MCP, MITM代理, Model Context Protocol, npm包, TypeScript, 云资产清单, 安全合规, 安全插件, 安全研究员, 暗色界面, 目录枚举, 硬编码密钥检测, 移动安全, 第三方SDK枚举, 网络代理, 网络安全, 自动化攻击, 逆向工程, 错误基检测, 隐私保护, 静态代码分析