Fridare 是一个用于 iOS frida 插件、Android,linux,Windows 等平台 frida-server 的自动化魔改工具。它允许用户更改名称和端口,以增强安全性和灵活性。免除了很多越狱检测frida的情况。
Windows 下使用|Android 文档|iOS 文档|frida-tools 文档|安装指北|CHANGELOG
欢迎大家入QQ群讨论:QQ 555354813 ,如本项目对你有所帮助,记得给作者加星鼓励哦!
欢迎使用新的一键安装功能快速开始使用 Fridare!
curl -s https://raw.githubusercontent.com/suifei/fridare/main/fridare.sh | bash -s install
patch-frida.cmd
脚本,用于在 Windows 环境下修改 frida-serverpatch-frida-tools.cmd
脚本,用于在 Windows 环境下修改 frida-toolspatch-tools
命令,用于修补 frida-tools 模块render_markdown
函数,用于在终端中渲染简单的 Markdown 格式generate_random_name
函数,用于生成随机的 Frida 魔改名move_file
函数,用于处理文件移动时的 "are identical" 错误list_frida_versions
函数,现在能够渲染 Markdown 格式的版本说明build_frida
函数,支持使用本地 deb 文件进行构建patch_frida_tools
和 restore_frida_tools
函数的功能和错误处理modify_frida_tools
函数,提高修改 frida-tools 的可靠性download_frida_module
函数,增加对特定操作系统和架构的支持show_main_usage
和其他使用说明函数,以反映新增的功能parse_arguments
函数,支持新增的 patch-tools
命令FRIDA_NAME
的支持macOS
、iOS
、Android
、Linux
和 Windows
upgrade
命令:用于自动更新 Fridare 脚本upgrade
命令,用于自动更新 Fridare 脚本patch
命令,用于修补指定的 Frida 模块
安卓 frida-server
./fridare.sh p -m frida-server -latest -os android -arch arm64 -o ./patched
patch
命令的帮助信息build
、download
等命令的用法说明fridare.sh
脚本,整合所有功能,提供更完整的命令行界面build
, ls
, download
, lm
, setup
, config
, 和 help
命令frida:rpc
特征魔改
core.py
文件进行魔改,对 _frida.abi3.so
文件进行魔改autoinstall.sh
脚本,实现 Frida 插件的自动部署。Makefile
,简化项目的构建和部署流程。配置 issh 的 ssh 免密登陆
# 生成 keygen 密钥,如果已生成可以跳过 ssh-keygen -t rsa -b 4096 -C "<EMAIL>" # 配置手机IP,如果USB连接可以不配置 issh ip set <iPhone-IP> # 拷贝公钥到手机 /var/root ,需要 root 密码 alpine issh scp ~/.ssh/id_rsa.pub # 远程服务器添加公钥到 authorized_keys 文件 issh run "mkdir -p ~/.ssh && cat /var/root/id_rsa.pub >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys && chmod 700 ~/.ssh"
fridare.sh - Frida 魔改脚本
│
├── 主要功能
│ ├── 构建魔改版 Frida (build)
│ │ ├── 支持指定版本或最新版本
│ │ ├── 自动生成随机5字符名称
│ │ ├── 自定义端口设置
│ │ └── 支持 arm 和 arm64 架构
│ ├── 列出可用 Frida 版本 (ls, list)
│ │ └── 从 GitHub API 获取版本信息
│ ├── 下载特定版本 Frida (download)
│ │ ├── 支持下载单个或所有模块
│ │ └── 可选的自动解压功能
│ ├── 列出可用 Frida 模块 (lm, list-modules)
│ ├── 检查并安装系统依赖 (setup)
│ │ ├── 自动检测缺失依赖
│ │ └── 使用包管理器安装依赖
│ └── 配置选项设置 (config)
│ ├── 设置 HTTP 代理
│ ├── 设置 Frida 服务器端口
│ └── 设置 Frida 魔改名称
│
├── 脚本结构
│ ├── 初始化配置 (initialize_config)
│ │ └── 读取和创建配置文件
│ ├── 参数解析 (parse_arguments)
│ │ └── 支持多种命令行选项
│ ├── 命令处理
│ │ ├── build: 构建魔改版 Frida
│ │ ├── patch: 修补指定的 Frida 模块
│ │ ├── setup: 设置环境
│ │ ├── config: 管理配置
│ │ ├── list: 列出版本
│ │ ├── download: 下载模块
│ │ └── list-modules: 列出模块
│ └── 主函数 (main)
│ └── 整合所有功能的入口点
│
├── 构建过程 (build_frida)
│ ├── 版本检查
│ │ └── 支持最新版本自动检测
│ ├── 环境准备
│ │ ├── 检查 Python 环境 (包括 Conda)
│ │ └── 检查 Golang 环境
│ ├── 下载 Frida (download_frida)
│ ├── 解包 deb 文件
│ ├── 修改文件
│ │ ├── 修改启动守护程序 (modify_launch_daemon)
│ │ │ └── 更新 plist 文件
│ │ ├── 修改 Debian 文件 (modify_debian_files)
│ │ │ ├── 更新 control 文件
│ │ │ ├── 更新 extrainst_ 文件
│ │ │ └── 更新 prerm 文件
│ │ └── 修改二进制文件 (modify_binary)
│ │ ├── 修改 frida-server
│ │ ├── 修改 frida-agent.dylib
│ │ └── 使用 hexreplace 工具
│ ├── 重新打包 deb 文件 (repackage_deb)
│ └── 修改 frida-tools (modify_frida_tools)
│ ├── 修改 Python 库文件
│ └── 更新 core.py 中的字符串
│
├── 辅助功能
│ ├── 日志输出 (log_info, log_success, log_warning, log_error)
│ │ └── 支持彩色输出
│ ├── 用户确认 (confirm_execution)
│ │ └── 可选的自动确认模式
│ ├── 依赖检查 (check_dependencies)
│ ├── 依赖安装 (install_dependencies)
│ ├── 配置管理 (set_config, unset_config, list_config)
│ └── Frida 版本和模块列表 (list_frida_versions, list_frida_modules)
│
├── 下载功能 (download_frida_module)
│ ├── 版本选择 (最新版或指定版本)
│ ├── 模块选择 (单个模块或全部模块)
│ ├── 下载过程
│ │ └── 支持 HTTP 代理
│ └── 解压处理
│ └── 可选的自动解压功能
│
└── 安全和权限
├── sudo 权限保持 (sudo_keep_alive)
└── 清理过程 (cleanup)
克隆此仓库:
git clone https://github.com/suifei/fridare.git
cd fridare
运行设置命令
./fridare.sh setup
此命令将检查并安装所需的依赖项。
查看帮助
./fridare.sh help
Fridare 提供了多个命令来满足不同的需求:
build
: 重新打包 Fridals
或 list
: 列出可用的 Frida 版本download
: 下载特定版本的 Fridalm
或 list-modules
: 列出可用的 Frida 模块setup
: 检查并安装系统依赖config
: 设置配置选项help
: 显示帮助信息构建魔改版 Frida
./fridare.sh build -v 16.0.19 -p 8899 -y
这个命令会构建版本 16.0.19 的 Frida,设置端口为 8899,并自动确认所有提示。
列出可用的 Frida 版本
./fridare.sh ls
下载特定版本的 Frida
./fridare.sh download -v 16.0.19 -m frida-server ./output
这个命令会下载版本 16.0.19 的 frida-server 模块到 ./output 目录。
下载最新版本的所有 Frida 模块
./fridare.sh download -latest -all ./output
列出可用的 Frida 模块
./fridare.sh lm
设置环境
./fridare.sh setup
这个命令会检查并安装所需的系统依赖。
配置设置
./fridare.sh config set proxy http://127.0.0.1:7890
./fridare.sh config set port 9999
./fridare.sh config set frida-name abcde
这些命令分别设置代理、端口和 Frida 魔改名。
列出当前配置
./fridare.sh config ls
获取特定命令的帮助信息
./fridare.sh help build
这个命令会显示 build 命令的详细用法。
使用最新版本构建 Frida
./fridare.sh build -latest -p 9999 -y
这个命令会使用最新版本的 Frida 进行构建,设置端口为 9999,并自动确认所有提示。
下载但不解压 Frida 模块
./fridare.sh download -latest -m frida-gadget --no-extract ./output
这个命令会下载最新版本的 frida-gadget 模块到 ./output 目录,但不会自动解压。
安装 frida-tools
./fridare.sh config frida-tools
这个命令会安装或更新 frida-tools。
将生成的 .deb 包传输到您的 iOS 设备:
scp ./dist/frida_16.3.3_iphoneos-arm_tcp.deb root@<iPhone-IP>:/var/root/
SSH 进入您的 iOS 设备并安装修改后的包:
ssh root@<iPhone-IP>
dpkg -i /var/root/frida_16.3.3_iphoneos-arm_tcp.deb
这些示例涵盖了脚本的主要功能和常见使用场景。可帮助您快速上手使用。
为确保兼容性,请安装与修改后的服务器版本相匹配的 Frida 工具:
pip install frida-tools==12.4.3
对于 Node.js 用户:
npm install frida@16.3.3
如果您的设备通过 USB 访问,您可以使用以下命令连接到本地 frida-server:
frida -U -f <target-process>
如果不使用usb数据线时,可以使用以下命令连接到远程 frida-server :
frida -H <iPhone-IP>:8899 -U
frida-trace -H <iPhone-IP>:8899 ...
frida-ps -H <iPhone-IP>:8899
frida-inject -H <iPhone-IP>:8899 ...
Fridare 项目的核心原理:
Fridare 的核心思想是修改 frida-server ,使其更难被检测。这主要通过以下几个方面实现:
重命名服务器文件:
将 frida-server
重命名为随机生成的名称(如 abcde
),这样可以避免简单的名称检测。
修改启动配置: 更新 LaunchDaemons plist 文件,使其使用新的服务器名称和自定义端口。这样可以改变服务器的启动方式和监听端口。
二进制文件修改: 使用二进制替换技术,将服务器二进制文件中的 "frida" 相关字符串替换为自定义字符串。这可以避免通过扫描二进制文件来检测 Frida。
项目使用 dpkg-deb 工具解包和重新打包 deb 文件。这允许我们修改包的内容,包括:
fridare.sh 脚本自动化了整个过程:
脚本同时处理 arm 和 arm64 架构的包,确保在不同的 iOS 设备上的兼容性。
通过更改服务器名称、端口和内部字符串,这个项目使得通过常规方法检测 Frida 的存在变得更加困难。这对于在某些可能会主动检测和阻止 Frida 的应用中使用 Frida 非常有用。
通过允许用户指定 Frida 版本和端口,该工具提供了很大的灵活性,可以适应不同的需求和环境。
使用 hexreplace 来执行二进制替换,在不重新编译 Frida 的情况下修改二进制文件。这种方法虽然有效,但也有局限性,因为它只能替换固定长度的字符串。
欢迎提交问题和拉取请求。对于重大更改,请先开issue讨论您想要更改的内容。
Fridare is a modification tool designed for customizing Frida-server, specifically for jailbroken iOS devices. It allows users to change names and ports, enhancing security and flexibility. It eliminates many jailbreak detection scenarios for Frida. CHANGELOG
Here's the English version of the changelog:
patch-tools
command for modifying the frida-tools modulerender_markdown
function to display simple Markdown formatting in the terminalgenerate_random_name
function to create random Frida modification namesmove_file
function to handle "are identical" errors during file moveslist_frida_versions
function to render Markdown-formatted version descriptionsbuild_frida
function to support building from local deb filespatch_frida_tools
and restore_frida_tools
functionsmodify_frida_tools
function for more reliable frida-tools modificationsdownload_frida_module
function with support for specific OS and architectureshow_main_usage
and other usage instruction functions to reflect new featuresparse_arguments
function to accommodate the new patch-tools
commandFRIDA_NAME
fridare.sh
script, integrating all functionalities and providing a more complete command-line interfacebuild
, ls
, download
, lm
, setup
, config
, and help
commandsfrida:rpc
feature modification
core.py
file, and modifies the _frida.abi3.so
fileautoinstall.sh
script for automatic deployment of Frida plugins.Makefile
to simplify the project build and deployment process.Configure password-free SSH login for issh
# Generate keygen, skip if already generated ssh-keygen -t rsa -b 4096 -C "<EMAIL>" # Configure iPhone IP, can be skipped if using USB connection issh ip set <iPhone-IP> # Copy public key to /var/root on the phone, requires root password alpine issh scp ~/.ssh/id_rsa.pub # Add public key to authorized_keys file on remote server issh run "mkdir -p ~/.ssh && cat /var/root/id_rsa.pub >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys && chmod 700 ~/.ssh"
fridare.sh - Frida Modification Script
│
├── Main Functions
│ ├── Build Modified Frida (build)
│ │ ├── Support for specified version or latest version
│ │ ├── Auto-generate random 5-character name
│ │ ├── Custom port setting
│ │ └── Support for arm and arm64 architectures
│ ├── List Available Frida Versions (ls, list)
│ │ └── Fetch version info from GitHub API
│ ├── Download Specific Frida Version (download)
│ │ ├── Support for downloading single or all modules
│ │ └── Optional auto-extraction feature
│ ├── List Available Frida Modules (lm, list-modules)
│ ├── Check and Install System Dependencies (setup)
│ │ ├── Auto-detect missing dependencies
│ │ └── Install dependencies using package manager
│ └── Configure Options (config)
│ ├── Set HTTP proxy
│ ├── Set Frida server port
│ └── Set Frida modification name
│
├── Script Structure
│ ├── Initialize Configuration (initialize_config)
│ │ └── Read and create configuration file
│ ├── Parse Arguments (parse_arguments)
│ │ └── Support various command-line options
│ ├── Command Processing
│ │ ├── build: Build modified Frida
│ │ ├── setup: Set up environment
│ │ ├── config: Manage configuration
│ │ ├── list: List versions
│ │ ├── download: Download modules
│ │ └── list-modules: List modules
│ └── Main Function (main)
│ └── Entry point integrating all functionalities
│
├── Build Process (build_frida)
│ ├── Version Check
│ │ └── Support for latest version auto-detection
│ ├── Environment Preparation
│ │ ├── Check Python environment (including Conda)
│ │ └── Check Golang environment
│ ├── Download Frida (download_frida)
│ ├── Unpack deb File
│ ├── Modify Files
│ │ ├── Modify Launch Daemon (modify_launch_daemon)
│ │ │ └── Update plist file
│ │ ├── Modify Debian Files (modify_debian_files)
│ │ │ ├── Update control file
│ │ │ ├── Update extrainst_ file
│ │ │ └── Update prerm file
│ │ └── Modify Binary Files (modify_binary)
│ │ ├── Modify frida-server
│ │ ├── Modify frida-agent.dylib
│ │ └── Use hexreplace tool
│ ├── Repackage deb File (repackage_deb)
│ └── Modify frida-tools (modify_frida_tools)
│ ├── Modify Python library files
│ └── Update strings in core.py
│
├── Auxiliary Functions
│ ├── Log Output (log_info, log_success, log_warning, log_error)
│ │ └── Support for colored output
│ ├── User Confirmation (confirm_execution)
│ │ └── Optional auto-confirm mode
│ ├── Dependency Check (check_dependencies)
│ ├── Dependency Installation (install_dependencies)
│ ├── Configuration Management (set_config, unset_config, list_config)
│ └── Frida Version and Module Lists (list_frida_versions, list_frida_modules)
│
├── Download Functionality (download_frida_module)
│ ├── Version Selection (latest or specified version)
│ ├── Module Selection (single module or all modules)
│ ├── Download Process
│ │ └── Support for HTTP proxy
│ └── Extraction Processing
│ └── Optional auto-extraction feature
│
└── Security and Permissions
├── Maintain sudo Privileges (sudo_keep_alive)
└── Cleanup Process (cleanup)
Clone this repository:
git clone https://github.com/suifei/fridare.git
cd fridare
Run the setup command:
./fridare.sh setup
This command will check and install the required dependencies.
View the help information:
./fridare.sh help
Fridare provides multiple commands to meet different needs:
build
: Repackage Fridals
or list
: List available Frida versionsdownload
: Download a specific version of Fridalm
or list-modules
: List available Frida modulessetup
: Check and install system dependenciesconfig
: Set configuration optionshelp
: Display help informationBuild a modified version of Frida
./fridare.sh build -v 16.0.19 -p 8899 -y
This command will build Frida version 16.0.19, set the port to 8899, and automatically confirm all prompts.
List available Frida versions
./fridare.sh ls
Download a specific version of Frida
./fridare.sh download -v 16.0.19 -m frida-server ./output
This command will download the frida-server module of version 16.0.19 to the ./output directory.
Download all Frida modules of the latest version
./fridare.sh download -latest -all ./output
List available Frida modules
./fridare.sh lm
Set up the environment
./fridare.sh setup
This command will check and install the required system dependencies.
Configure settings
./fridare.sh config set proxy http://127.0.0.1:7890
./fridare.sh config set port 9999
./fridare.sh config set frida-name abcde
These commands set the proxy, port, and Frida modification name respectively.
List current configuration
./fridare.sh config ls
Get help information for a specific command
./fridare.sh help build
This command will display detailed usage for the build command.
Build Frida using the latest version
./fridare.sh build -latest -p 9999 -y
This command will build using the latest version of Frida, set the port to 9999, and automatically confirm all prompts.
Download but don't extract Frida module
./fridare.sh download -latest -m frida-gadget --no-extract ./output
This command will download the latest version of the frida-gadget module to the ./output directory but won't automatically extract it.
Install frida-tools
./fridare.sh config frida-tools
This command will install or update frida-tools.
Transfer the generated .deb package to your iOS device:
scp ./dist/frida_16.3.3_iphoneos-arm_tcp.deb root@<iPhone-IP>:/var/root/
SSH into your iOS device and install the modified package:
ssh root@<iPhone-IP>
dpkg -i /var/root/frida_16.3.3_iphoneos-arm_tcp.deb
These examples cover the main functionalities and common usage scenarios of the script. They can help you quickly get started with using it.
To ensure compatibility, please install Frida tools that match the modified server version:
pip install frida-tools==12.4.3
For Node.js users:
npm install frida@16.3.3
If your device is accessed via USB, you can use the following command to connect to the local frida-server:
frida -U -f <target-process>
If not using a USB data cable, you can use the following commands to connect to the remote frida-server:
frida -H <iPhone-IP>:8899 -U
frida-trace -H <iPhone-IP>:8899 ...
frida-ps -H <iPhone-IP>:8899
frida-inject -H <iPhone-IP>:8899 ...
Core principles of the Fridare project:
The core idea of Fridare is to modify frida-server to make it harder to detect. This is mainly achieved through the following aspects:
Renaming the server file:
Rename frida-server
to a randomly generated name (e.g., abcde
), which avoids simple name detection.
Modifying startup configuration: Update the LaunchDaemons plist file to use the new server name and custom port. This changes the way the server starts and the port it listens on.
Binary file modification: Use binary replacement techniques to replace "frida" related strings in the server binary file with custom strings. This can avoid detection of Frida by scanning the binary file.
The project uses the dpkg-deb tool to unpack and repack deb files. This allows us to modify the contents of the package, including:
The fridare.sh script automates the entire process:
The script handles packages for both arm and arm64 architectures, ensuring compatibility on different iOS devices.
By changing the server name, port, and internal strings, this project makes it more difficult to detect the presence of Frida through conventional methods. This is particularly useful for using Frida in applications that might actively detect and block Frida.
By allowing users to specify the Frida version and port, the tool provides great flexibility to adapt to different needs and environments.
Using hexreplace to perform binary replacements, modifying binary files without recompiling Frida. While effective, this method has limitations as it can only replace fixed-length strings.
Issues and pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.