RedGlitchX/AndroGlitch

GitHub: RedGlitchX/AndroGlitch

一条命令即可构建已 Root 并集成 Burp 证书与 Frida 的 Android 12 安全测试模拟器实验室。

Stars: 0 | Forks: 0

# AndroGlitch — 已 Root 的 Android 12 安全测试实验室 只需一条命令即可构建 **已 Root、支持 Burp 的 Android 12 模拟器**,用于 授权的移动应用安全测试。它将通常需要数小时繁琐手动操作的每一个步骤都脚本化了: - ✅ **Root** — 通过 rootAVD 安装 Magisk (`adb shell su -c id` → `uid=0`) - ✅ **系统信任的代理 CA** — 将你的 Burp CA 注入 Android 12 系统证书存储区,因此拦截 HTTPS 时**没有 TLS 警告** - ✅ **Google Play Store** — 作为特权系统应用安装,**在其自动更新后依然能正常工作**(每个人都会遇到的两个崩溃问题已被预先修复) - ✅ **Frida** — 与你的宿主机客户端版本匹配的 `frida-server`,在每次开机时以 root 权限自动启动(`frida-ps -U` 直接即可使用) - ✅ **自定义开机动画**(可选)+ 一个**无窗口的桌面启动器** ## 设置说明 (Windows) — 分步指南 整个实验室只需**一条命令**即可构建。只需先安装几个工具, 克隆仓库,然后运行设置脚本。总耗时 ≈ 15–30 分钟(主要是 自动下载的时间)。你**不需要**是 Android 专家。 ### 步骤 1 — 安装以下工具(仅需一次) | 工具 | 用途 | 获取地址 | |---|---|---| | **Android Studio** | 提供模拟器 + `adb`/`emulator`/`sdkmanager`(自动检测) | | | **SDK Command-line Tools** | 创建模拟器所需 | 在 Android Studio 中:**More Actions → SDK Manager → SDK Tools 标签页 → 勾选 "Android SDK Command-line Tools (latest)" → Apply** | | **Git for Windows** | 用于克隆的 `git` + 用于安装 Burp CA 的 `openssl` | | | **Python 3** | 构建 frida + 开机动画 | (勾选 *"Add to PATH"*) | 然后打开 **PowerShell** 并安装 Python 辅助工具: ``` pip install frida-tools pillow ``` ### 步骤 2 — 获取项目 ``` git clone https://github.com/Spidy1782/AndroGlitch.git cd AndroGlitch ``` ### 步骤 3(可选) — 放入你自己的文件 如果你只想运行模拟器,请跳过此步;你随时可以稍后添加。 - **想在 Burp 中拦截 HTTPS?** 导出你的 Burp CA 并将其保存为 `assets\burp.der`。 *(Burp → Proxy → Proxy settings → Import/export CA certificate → "Certificate in DER format".)* - **想要自定义开机 logo?** 将任意图片放在 `assets\boot.png`。 ### 步骤 4 — 构建整个实验室(一条命令) ``` powershell -ExecutionPolicy Bypass -File .\setup.ps1 ``` 坐下来放松一下 — 它会安装 Android 12 镜像,创建模拟器,对其进行 Root, 安装 Play Store 和 Frida,并在你的桌面上创建一个 **AndroGlitch** 快捷方式。完成后,**双击 AndroGlitch 桌面图标**即可 启动实验室。 大功告成。✅ ### 这一条命令实际做了什么 `setup.ps1` 会自动执行以下 8 个步骤(每一步都可以安全地重新运行): | # | 步骤 | 具体操作 | |---|---|---| | 1 | install-sdk-image | API-31 **google_apis** x86_64 镜像(可 Root;非 google_play) | | 2 | create-avd | 创建 `SecLab12` 模拟器 | | 3 | root-avd | rootAVD → Magisk;自动授予 adb-shell root 权限 | | 4 | install-burp-ca | 对 `assets\burp.der` 进行哈希处理并将其安装为**系统** CA | | 5 | install-playstore | 从 Google 镜像中提取 Play Store,以**特权**方式安装 + 应用崩溃修复补丁 | | 6 | boot-animation | 从 `assets\boot.png` 构建开机动画(如无则跳过) | | 7 | install-frida | 下载与你的客户端匹配的 `frida-server` 并将其推送到设备 | | 8 | desktop-shortcut | 创建隐藏的 **AndroGlitch** 桌面启动器 | 以后只需要重做其中一部分? ``` .\setup.ps1 -Only 5 # reinstall just the Play Store .\setup.ps1 -From 4 # resume from step 4 onward .\setup.ps1 -SkipRoot # skip rooting (already rooted) ``` ## 启动 双击 **AndroGlitch** 桌面快捷方式,或运行 `launch\start-seclab.bat`。 ## 验证 ``` . .\env.ps1 # loads the toolchain + pins ANDROID_SERIAL adb shell su -c id # -> uid=0(root) frida-ps -U # lists device processes # 打开 Play Store,登录,安装应用 ``` 通过 Burp 路由目标应用(监听 8080 端口,所有接口): ``` adb shell settings put global http_proxy 10.0.2.2:8080 # ON adb shell settings put global http_proxy :0 # OFF ``` ## 自定义 在运行 `setup.ps1` 之前通过环境变量覆盖默认值 (见 `config.ps1`):`SECLAB_AVD`, `SECLAB_IMAGE`, `SECLAB_DEVICE`, `SECLAB_PLAY_IMAGE`, `SECLAB_FRIDA_VERSION`。 ## 仓库布局 ``` setup.ps1 orchestrator env.ps1 session helper (dot-source) config.ps1 paths + autodetection launch/ start / restart scripts scripts/ numbered build steps scripts/device/ pushed .sh helpers assets/ your private inputs (git-ignored) docs/SETUP-NOTES.md full build log + every root-cause fix ``` ## 故障排除 - **frida "need Gadget to attach on jailed Android"** → `frida-server` 未以 root 权限运行。运行 `launch\restart-frida.bat`,然后执行 `frida-ps -U`。 - **Play Store 打开时崩溃** → 已被步骤 5 修复。如果在擦除数据后再次出现此问题, 请重新运行 `.\setup.ps1 -Only 5`。 - **Play Store "Try again" / Wi-Fi "!"** → Burp 代理已开启。执行 `adb shell settings put global http_proxy :0`。 - **通过 Android-Studio 启动后一切都消失了** → 使用 `launch\start-seclab.bat` 重新启动(需要 `-writable-system`)。覆盖层依然存在; 只是播放按钮没有挂载它。 - **登录循环 ("uncertified device")** → 在 注册设备的 GSF ID(使用 `python scripts\read-gsf-id.py ` 读取它),等待几分钟, 重试。 有关每个修复背后的详细诊断,请参阅 **`docs/SETUP-NOTES.md`**。 ## 贡献 欢迎提交 Issue 和 PR。此实验室仅用于**授权的**移动应用安全测试。
标签:AI合规, Android模拟器, Docker支持, Frida, Libemu, Magisk, 安全测试实验环境, 目录枚举, 移动安全, 自动化环境配置, 逆向工具