jankais3r/Frida-iOS-15-TLS-Keylogger

GitHub: jankais3r/Frida-iOS-15-TLS-Keylogger

一个基于 Frida 的脚本,通过 Hook iOS 15 系统库 libboringssl.dylib 来提取 TLS 密钥,实现对应用加密流量的无感解密。

Stars: 62 | Forks: 6

# Frida-iOS-15-TLS-Keylogger 通过 Hook libboringssl.dylib 提取 TLS 密钥,从而实现对 iOS 应用网络流量的解密。 ### 使用方法 `frida -U -l ios-tls-keylogger.js --no-pause -o keylogfile.txt -p 2845` 或者 `frida -U -l ios-tls-keylogger.js --no-pause -o keylogfile.txt -f com.apple.shortcuts` 也可通过 [Frida Codeshare](https://codeshare.frida.re/@jankais3r/ios-15-tls-keylogger/) 获取。 `frida -U --codeshare jankais3r/ios-15-tls-keylogger --no-pause -o keylogfile.txt -p 2845` 或者 `frida -U --codeshare jankais3r/ios-15-tls-keylogger --no-pause -o keylogfile.txt -f com.apple.shortcuts` ### 查找特定 iOS 版本偏移量的步骤: 1. 下载 IPSW 并解压。 2. 挂载最大的(约 5.5GB)DMG 镜像,复制出以下文件夹:`/System/Library/Caches/com.apple.dyld`。 3. 提取 dyld shared cache:`dsc_extractor com.apple.dyld/dyld_shared_cache_arm64 extracted`。 4. 使用 Binary Ninja 或类似工具反汇编 `/usr/lib/libboringssl.dylib`。 5. 找到 `ssl_log_secret` 函数。第二条 `ldr` 指令包含我们所需的偏移量。 ``` 0000000199381680 int64_t bssl::ssl_log_secret(void* arg1, int64_t arg2, char* arg3, int64_t arg4) 0000000199381680 sub sp, sp, #0x60 0000000199381684 stp x22, x21, [sp, #0x30] 0000000199381688 stp x20, x19, [sp, #0x40] 000000019938168c stp x29, x30, [sp, #0x50] 0000000199381690 add x29, sp, #0x50 0000000199381694 ldr x8, [x0, #0x78] 0000000199381698 ldr x8, [x8, #0x2f8] ; <--- This is our offset 000000019938169c cbz x8, 0x1993817a4 ``` |iOS 版本|MD5 (/usr/lib/libboringssl.dylib)|偏移量| |-----------|---------------------------------|------| |15.0 |331e2de619435e8a9eb1c61df6a1ad71 |0x2f8 | |15.0.1 |b5c9e2183fd9727111ebe354f235c366 |0x2f8 | |15.0.2 |c66960115dd2d8f76940e445a5b88e3b |0x2f8 | |15.1 |63eb7d8f4c1fa57751b6348531b61633 |0x2f8 | |15.2 |92bf3f6f87e7be25135b0ac7ec479bc4 |0x2f8 | |15.2.1 |57a6e4f13597e3052bfd5bb3a6991346 |0x2f8 | |15.3 |e2e01c1f89e2467d28b672937aac9a29 |0x2f8 | |15.3.1 |e2e01c1f89e2467d28b672937aac9a29 |0x2f8 | |15.4 |ee4132c6469e4c3fceb6ddce4ddd12ad |0x2f8 | |15.4.1 |b50ab797ad8ada3d8a2ed8d1faa02fc4 |0x2f8 | |15.5 |198d42ff836f4cb72dac2d200fc47a7e |0x2f8 | |15.6 |67d83be27f553d7959a94c90f90f060b |0x2f8 | |15.6.1 |67d83be27f553d7959a94c90f90f060b |0x2f8 | |15.7 |9b81ff819e641de2007a140054a24e59 |0x2f8 | |15.7.1 |28da87d0f8384149f3f0631193e02a78 |0x2f8 |
标签:BoringSSL, Docker支持, Frida, Frida脚本, Hook技术, iOS 15, iOS安全, Keylogger, libboringssl.dylib, SSLKEYLOG, TLS解密, 中间人攻击, 云资产清单, 动态二进制插桩, 协议分析, 数据可视化, 权限提升, 目录枚举, 移动安全, 网络安全, 网络抓包, 自定义脚本, 自定义脚本, 自定义脚本, 逆向工程, 防御绕过, 隐私保护