mirror of
https://git-qiuchenly.yltfspace.com/QiuChenly/corepatch
synced 2025-11-25 05:40:27 +08:00
对SIP关闭的Mac增加了守护服务。
This commit is contained in:
Binary file not shown.
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.smartcard</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.server</key>
|
||||
<true/>
|
||||
<key>com.apple.security.hypervisor</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.client</key>
|
||||
<true/>
|
||||
<key>com.apple.security.device.usb</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
43
上帝之眼/com.qiuchenly.macos.god.plist
Normal file
43
上帝之眼/com.qiuchenly.macos.god.plist
Normal file
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Label</key>
|
||||
<string>com.qiuchenly.macos.god</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>/usr/local/bin/macOSGod</string>
|
||||
<string>/usr/local/lib/CoreInject.dylib</string>
|
||||
<string>Surge</string>
|
||||
<string>com.nssurge.surge-mac.ne</string>
|
||||
</array>
|
||||
<key>UnSupported</key>
|
||||
<array>
|
||||
<string>Navicat Premium</string>
|
||||
<string>Proxyman</string>
|
||||
<string>Infuse</string>
|
||||
<string>App Cleaner 8</string>
|
||||
<string>prl_client_app</string>
|
||||
<string>prl_vm_app</string>
|
||||
<string>prl_disp_service</string>
|
||||
</array>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
<key>KeepAlive</key>
|
||||
<true/>
|
||||
<key>StandardOutPath</key>
|
||||
<string>/var/log/macos_god.log</string>
|
||||
<key>StandardErrorPath</key>
|
||||
<string>/var/log/macos_god_error.log</string>
|
||||
<key>UserName</key>
|
||||
<string>root</string>
|
||||
<key>GroupName</key>
|
||||
<string>wheel</string>
|
||||
<key>WorkingDirectory</key>
|
||||
<string>/usr/local/bin</string>
|
||||
<key>ProcessType</key>
|
||||
<string>Background</string>
|
||||
<key>ThrottleInterval</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
</plist>
|
||||
115
上帝之眼/install_service.sh
Normal file
115
上帝之眼/install_service.sh
Normal file
@@ -0,0 +1,115 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")" || exit 1
|
||||
|
||||
# 颜色定义
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
BLUE='\033[0;34m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
# 日志函数
|
||||
log_info() {
|
||||
echo -e "${BLUE}[*] $1${NC}"
|
||||
}
|
||||
|
||||
log_success() {
|
||||
echo -e "${GREEN}[+] $1${NC}"
|
||||
}
|
||||
|
||||
log_warning() {
|
||||
echo -e "${YELLOW}[!] $1${NC}"
|
||||
}
|
||||
|
||||
log_error() {
|
||||
echo -e "${RED}[×] $1${NC}"
|
||||
}
|
||||
|
||||
# 检查是否以root权限运行
|
||||
check_root() {
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
log_error "必须以root权限运行"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
qiuchenly=../tool/CoreInject.dylib
|
||||
|
||||
# 安装文件
|
||||
install_files() {
|
||||
log_info "正在安装文件..."
|
||||
|
||||
xattr -cr ./macOSGod
|
||||
xattr -cr $qiuchenly
|
||||
codesign -fs - --all-architectures --deep $qiuchenly
|
||||
|
||||
# 复制可执行文件
|
||||
cp ./macOSGod /usr/local/bin/
|
||||
cp $qiuchenly /usr/local/lib/
|
||||
chmod +x /usr/local/bin/macOSGod
|
||||
|
||||
# 复制LaunchDaemon配置
|
||||
cp com.qiuchenly.macos.god.plist /Library/LaunchDaemons/
|
||||
chmod 644 /Library/LaunchDaemons/com.qiuchenly.macos.god.plist
|
||||
|
||||
# 创建日志文件
|
||||
touch /var/log/macos_god.log
|
||||
touch /var/log/macos_god_error.log
|
||||
chmod 644 /var/log/macos_god.log
|
||||
chmod 644 /var/log/macos_god_error.log
|
||||
|
||||
log_success "文件安装成功"
|
||||
}
|
||||
|
||||
# 启动服务
|
||||
start_service() {
|
||||
log_info "正在启动服务..."
|
||||
|
||||
# 加载LaunchDaemon
|
||||
launchctl load /Library/LaunchDaemons/com.qiuchenly.macos.god.plist
|
||||
|
||||
# 启动服务
|
||||
launchctl start com.qiuchenly.macos.god
|
||||
|
||||
log_success "服务启动成功"
|
||||
}
|
||||
|
||||
# 显示状态
|
||||
show_status() {
|
||||
log_info "服务状态:"
|
||||
|
||||
if launchctl list | grep -q com.qiuchenly.macos.god; then
|
||||
log_success "服务正在运行"
|
||||
else
|
||||
log_warning "服务未运行"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
log_info "查看日志:"
|
||||
echo " tail -f /var/log/macos_god*.log"
|
||||
|
||||
echo ""
|
||||
log_info "停止服务:"
|
||||
echo " sudo launchctl unload /Library/LaunchDaemons/com.qiuchenly.macos.god.plist"
|
||||
|
||||
echo ""
|
||||
log_info "重启服务:"
|
||||
echo " sudo launchctl unload /Library/LaunchDaemons/com.qiuchenly.macos.god.plist"
|
||||
echo " sudo launchctl load /Library/LaunchDaemons/com.qiuchenly.macos.god.plist"
|
||||
}
|
||||
|
||||
# 主函数
|
||||
main() {
|
||||
log_info "正在安装上帝之眼..."
|
||||
|
||||
check_root
|
||||
install_files
|
||||
start_service
|
||||
show_status
|
||||
|
||||
log_success "安装上帝之眼完成!"
|
||||
}
|
||||
|
||||
# 运行主函数
|
||||
main "$@"
|
||||
BIN
上帝之眼/macOSGod
Executable file
BIN
上帝之眼/macOSGod
Executable file
Binary file not shown.
258
上帝之眼/readme.md
Normal file
258
上帝之眼/readme.md
Normal file
@@ -0,0 +1,258 @@
|
||||
|
||||
<div align="center">
|
||||
|
||||
# 上帝之眼 (God's Eye)
|
||||
|
||||
> **一个强大的macOS系统级监控与注入工具**
|
||||
> 提供深度进程监控、动态库注入和应用程序劫持等功能
|
||||
|
||||
[](https://www.apple.com/macos/)
|
||||
[](https://developer.apple.com/silicon/)
|
||||
[](https://opensource.org/licenses/MIT)
|
||||
|
||||
**作者**: [QiuChenly](https://github.com/qiuchenly)
|
||||
**版本**: v1.0.0
|
||||
**更新日期**: 2025年8月
|
||||
|
||||
---
|
||||
|
||||
</div>
|
||||
|
||||
## <img src="https://img.shields.io/badge/-Core-FF6B6B?style=flat&logo=eye"> 核心功能
|
||||
|
||||
上帝之眼能够在系统级别实现应用程序的无感知劫持和激活。通过关闭SIP(系统完整性保护),实现对应用程序内存的深度访问和修改,让您无需手动修改应用程序文件即可获得完整的使用体验。
|
||||
|
||||
### 典型应用场景
|
||||
|
||||
- **Surge 6.x 自动激活**: 安装官方版本后,服务自动劫持并激活,重启后依然有效
|
||||
|
||||
### <img src="https://img.shields.io/badge/-Apps-4ECDC4?style=flat&logo=app-store"> 支持的应用程序
|
||||
|
||||
| 应用程序 | 版本 | 状态 | 功能描述 | 测试状态 |
|
||||
|---------|------|------|----------|----------|
|
||||
| **Surge** | 6.x | <img src="https://img.shields.io/badge/-Supported-00D4AA?style=flat"> | 网络代理工具自动激活 | 已适配 |
|
||||
| **App Cleaner & Uninstaller** | 8.6.x | <img src="https://img.shields.io/badge/-Supported-00D4AA?style=flat"> | App卸载清理工具 | 已适配 |
|
||||
|
||||
**状态说明**:
|
||||
- <img src="https://img.shields.io/badge/-Supported-00D4AA?style=flat"> **已支持**: 功能完整,可正常使用
|
||||
- <img src="https://img.shields.io/badge/-Developing-FFA500?style=flat"> **开发中**: 正在适配,即将支持
|
||||
- <img src="https://img.shields.io/badge/-Planned-9B59B6?style=flat"> **计划中**: 已列入开发计划
|
||||
- <img src="https://img.shields.io/badge/-Not_Supported-E74C3C?style=flat"> **不支持**: 暂不支持或无法支持
|
||||
|
||||
本项目将持续扩展以下功能:
|
||||
- 增强的安全监控能力
|
||||
- 更精细的进程控制
|
||||
- 自定义劫持规则配置
|
||||
- 图形化配置界面
|
||||
|
||||
## <img src="https://img.shields.io/badge/-Features-3498DB?style=flat&logo=star"> 特性
|
||||
|
||||
- **系统级监控**: 以root权限运行,提供深度系统监控能力
|
||||
- **动态库注入**: 支持CoreInject.dylib动态库注入
|
||||
- **后台服务**: 作为LaunchDaemon后台服务运行,开机自启动
|
||||
- **日志记录**: 完整的日志记录系统,便于调试和监控
|
||||
- **多架构支持**: 支持Intel (x86_64) 和 Apple Silicon (arm64) 架构
|
||||
- **自动化部署**: 提供一键安装和卸载脚本
|
||||
|
||||
## <img src="https://img.shields.io/badge/-System-E67E22?style=flat&logo=macos"> 系统要求
|
||||
|
||||
- **操作系统**: macOS 10.15 (Catalina) 或更高版本
|
||||
- **处理器**: 支持 Intel (x86_64) 和 Apple Silicon (arm64) 架构
|
||||
- **权限要求**: Root 权限(用于安装和运行)
|
||||
- **SIP状态**: 系统完整性保护必须关闭
|
||||
- **特殊要求**: 黑苹果用户需要安装amfi相关kext
|
||||
|
||||
## <img src="https://img.shields.io/badge/-Setup-2ECC71?style=flat&logo=terminal"> 安装说明
|
||||
|
||||
### 方法一:使用安装脚本(推荐)
|
||||
|
||||
1. **下载项目文件**
|
||||
```bash
|
||||
# 确保所有文件在同一目录下
|
||||
ls -la
|
||||
```
|
||||
|
||||
2. **运行安装脚本**
|
||||
```bash
|
||||
sudo ./install_service.sh
|
||||
```
|
||||
|
||||
3. **验证安装**
|
||||
```bash
|
||||
# 检查服务状态(需要sudo权限)
|
||||
sudo launchctl list | grep com.qiuchenly.macos.god
|
||||
|
||||
# 查看日志
|
||||
tail -f /var/log/macos_god.log
|
||||
```
|
||||
|
||||
### 方法二:手动安装
|
||||
|
||||
1. **复制文件到系统目录**
|
||||
```bash
|
||||
sudo cp ./macOSGod /usr/local/bin/
|
||||
sudo cp ../tool/CoreInject.dylib /usr/local/lib/
|
||||
sudo chmod +x /usr/local/bin/macOSGod
|
||||
```
|
||||
|
||||
2. **安装LaunchDaemon配置**
|
||||
```bash
|
||||
sudo cp com.qiuchenly.macos.god.plist /Library/LaunchDaemons/
|
||||
sudo chmod 644 /Library/LaunchDaemons/com.qiuchenly.macos.god.plist
|
||||
```
|
||||
|
||||
3. **启动服务**
|
||||
```bash
|
||||
sudo launchctl load /Library/LaunchDaemons/com.qiuchenly.macos.god.plist
|
||||
sudo launchctl start com.qiuchenly.macos.god
|
||||
```
|
||||
|
||||
## <img src="https://img.shields.io/badge/-Files-9B59B6?style=flat&logo=file-code"> 项目结构
|
||||
|
||||
```
|
||||
上帝之眼/
|
||||
├── macOSGod # 主程序(支持x86_64/arm64)
|
||||
├── com.qiuchenly.macos.god.plist # LaunchDaemon配置文件
|
||||
├── install_service.sh # 安装脚本
|
||||
├── uninstall_service.sh # 卸载脚本
|
||||
└── readme.md # 项目说明文档
|
||||
```
|
||||
|
||||
## <img src="https://img.shields.io/badge/-Service-34495E?style=flat&logo=server"> 服务管理
|
||||
|
||||
### 查看服务状态
|
||||
```bash
|
||||
# 使用sudo权限查看系统级服务
|
||||
sudo launchctl list | grep com.qiuchenly.macos.god
|
||||
|
||||
# 或者查看所有系统服务
|
||||
sudo launchctl list | grep qiuchenly
|
||||
```
|
||||
|
||||
### 启动服务
|
||||
```bash
|
||||
sudo launchctl load /Library/LaunchDaemons/com.qiuchenly.macos.god.plist
|
||||
sudo launchctl start com.qiuchenly.macos.god
|
||||
```
|
||||
|
||||
### 停止服务
|
||||
```bash
|
||||
sudo launchctl stop com.qiuchenly.macos.god
|
||||
sudo launchctl unload /Library/LaunchDaemons/com.qiuchenly.macos.god.plist
|
||||
```
|
||||
|
||||
### 重启服务
|
||||
```bash
|
||||
sudo launchctl unload /Library/LaunchDaemons/com.qiuchenly.macos.god.plist
|
||||
sudo launchctl load /Library/LaunchDaemons/com.qiuchenly.macos.god.plist
|
||||
```
|
||||
|
||||
## <img src="https://img.shields.io/badge/-Logs-1ABC9C?style=flat&logo=file-text"> 日志监控
|
||||
|
||||
### 查看运行日志
|
||||
```bash
|
||||
tail -f /var/log/macos_god*.log
|
||||
```
|
||||
|
||||
## <img src="https://img.shields.io/badge/-Remove-E74C3C?style=flat&logo=trash-2"> 卸载说明
|
||||
|
||||
### 使用卸载脚本(推荐)
|
||||
```bash
|
||||
sudo ./uninstall_service.sh
|
||||
```
|
||||
|
||||
### 手动卸载
|
||||
```bash
|
||||
# 停止服务
|
||||
sudo launchctl stop com.qiuchenly.macos.god
|
||||
sudo launchctl unload /Library/LaunchDaemons/com.qiuchenly.macos.god.plist
|
||||
|
||||
# 删除文件
|
||||
sudo rm -f /usr/local/bin/macOSGod
|
||||
sudo rm -f /usr/local/lib/CoreInject.dylib
|
||||
sudo rm -f /Library/LaunchDaemons/com.qiuchenly.macos.god.plist
|
||||
sudo rm -f /var/log/macos_god*.log
|
||||
```
|
||||
|
||||
## <img src="https://img.shields.io/badge/-Important-F39C12?style=flat&logo=alert-triangle"> 重要注意事项
|
||||
|
||||
### 系统要求
|
||||
1. **权限要求**: 安装和运行需要root权限
|
||||
2. **系统兼容性**: 支持macOS 10.15及以上版本
|
||||
3. **架构支持**: 同时支持Intel和Apple Silicon处理器
|
||||
|
||||
### SIP设置要求
|
||||
4. **关闭SIP**: 必须关闭系统完整性保护才能正常工作
|
||||
```bash
|
||||
# 检查SIP状态
|
||||
csrutil status
|
||||
# 应该显示: System Integrity Protection status: disabled.
|
||||
```
|
||||
|
||||
### 黑苹果用户特殊要求
|
||||
5. **OpenCore用户**: 如果使用OpenCore Legacy Patcher修改系统,需要:
|
||||
- 安装amfi相关kext到OpenCore中(如amfigetoutofmyway或amfibypass)
|
||||
- 确保SIP状态为disabled
|
||||
- 否则程序将无法正常工作
|
||||
|
||||
### 安全提醒
|
||||
6. **使用风险**: 本工具涉及系统级操作,请确保从可信来源获取
|
||||
7. **备份重要**: 使用前建议备份重要数据
|
||||
|
||||
## <img src="https://img.shields.io/badge/-Help-95A5A6?style=flat&logo=help-circle"> 故障排除
|
||||
|
||||
### 服务无法启动
|
||||
1. 检查文件权限
|
||||
```bash
|
||||
ls -la /usr/local/bin/macOSGod
|
||||
ls -la /usr/local/lib/CoreInject.dylib
|
||||
```
|
||||
|
||||
2. 检查LaunchDaemon配置
|
||||
```bash
|
||||
cat /Library/LaunchDaemons/com.qiuchenly.macos.god.plist
|
||||
```
|
||||
|
||||
3. 查看错误日志
|
||||
```bash
|
||||
tail -20 /var/log/macos_god_error.log
|
||||
```
|
||||
|
||||
4. 检查服务状态(需要sudo权限)
|
||||
```bash
|
||||
sudo launchctl list | grep com.qiuchenly.macos.god
|
||||
```
|
||||
|
||||
5. 如果服务加载失败,尝试重新加载
|
||||
```bash
|
||||
sudo launchctl unload /Library/LaunchDaemons/com.qiuchenly.macos.god.plist
|
||||
sudo launchctl load /Library/LaunchDaemons/com.qiuchenly.macos.god.plist
|
||||
```
|
||||
|
||||
### 权限问题
|
||||
```bash
|
||||
# 重置文件权限
|
||||
sudo chmod +x /usr/local/bin/macOSGod
|
||||
sudo chmod 644 /Library/LaunchDaemons/com.qiuchenly.macos.god.plist
|
||||
```
|
||||
|
||||
### 代码签名问题
|
||||
```bash
|
||||
# 移除代码签名限制
|
||||
sudo xattr -cr /usr/local/bin/macOSGod
|
||||
sudo xattr -cr /usr/local/lib/CoreInject.dylib
|
||||
```
|
||||
|
||||
## <img src="https://img.shields.io/badge/-Legal-7F8C8D?style=flat&logo=shield"> 许可证与声明
|
||||
|
||||
本项目仅供学习和研究使用,请遵守相关法律法规。使用者需自行承担使用风险。
|
||||
|
||||
### 免责声明
|
||||
|
||||
- 本工具仅用于合法的学习和研究目的
|
||||
- 使用者应确保在合法环境下使用
|
||||
- 开发者不承担因使用本工具而产生的任何责任
|
||||
|
||||
---
|
||||
|
||||
小知识: 秋城落叶是一个重生之人,大脑意外觉醒绑定了全球最强程序员系统,所以破解App不在话下,因为都是系统做的。 然后在梦中被慈溪托遗,让我夺回八国联军抢走本属于大清的一切,洗刷历史耻辱,所以破的大多都是外国软件,目前居住在华盛顿州 户籍是香港华裔。
|
||||
96
上帝之眼/uninstall_service.sh
Executable file
96
上帝之眼/uninstall_service.sh
Executable file
@@ -0,0 +1,96 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")" || exit 1
|
||||
|
||||
# 颜色定义
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
BLUE='\033[0;34m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
# 日志函数
|
||||
log_info() {
|
||||
echo -e "${BLUE}[*] $1${NC}"
|
||||
}
|
||||
|
||||
log_success() {
|
||||
echo -e "${GREEN}[+] $1${NC}"
|
||||
}
|
||||
|
||||
log_warning() {
|
||||
echo -e "${YELLOW}[!] $1${NC}"
|
||||
}
|
||||
|
||||
log_error() {
|
||||
echo -e "${RED}[×] $1${NC}"
|
||||
}
|
||||
|
||||
# 检查是否以root权限运行
|
||||
check_root() {
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
log_error "必须以root权限运行"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# 停止服务
|
||||
stop_service() {
|
||||
log_info "正在停止服务..."
|
||||
|
||||
# 停止并卸载LaunchDaemon
|
||||
if launchctl list | grep -q com.qiuchenly.macos.god; then
|
||||
launchctl stop com.qiuchenly.macos.god
|
||||
launchctl unload /Library/LaunchDaemons/com.qiuchenly.macos.god.plist
|
||||
log_success "服务已停止"
|
||||
else
|
||||
log_warning "服务未运行"
|
||||
fi
|
||||
}
|
||||
|
||||
# 删除文件
|
||||
remove_files() {
|
||||
log_info "正在删除文件..."
|
||||
|
||||
# 删除可执行文件
|
||||
if [[ -f /usr/local/bin/macOSGod ]]; then
|
||||
rm -f /usr/local/bin/macOSGod
|
||||
log_success "已删除 /usr/local/bin/macOSGod"
|
||||
fi
|
||||
|
||||
if [[ -f /usr/local/lib/CoreInject.dylib ]]; then
|
||||
rm -f /usr/local/lib/CoreInject.dylib
|
||||
log_success "已删除 /usr/local/lib/CoreInject.dylib"
|
||||
fi
|
||||
|
||||
# 删除LaunchDaemon配置
|
||||
if [[ -f /Library/LaunchDaemons/com.qiuchenly.macos.god.plist ]]; then
|
||||
rm -f /Library/LaunchDaemons/com.qiuchenly.macos.god.plist
|
||||
log_success "已删除 /Library/LaunchDaemons/com.qiuchenly.macos.god.plist"
|
||||
fi
|
||||
|
||||
# 删除日志文件
|
||||
if [[ -f /var/log/macos_god.log ]]; then
|
||||
rm -f /var/log/macos_god.log
|
||||
log_success "已删除 /var/log/macos_god.log"
|
||||
fi
|
||||
|
||||
if [[ -f /var/log/macos_god_error.log ]]; then
|
||||
rm -f /var/log/macos_god_error.log
|
||||
log_success "已删除 /var/log/macos_god_error.log"
|
||||
fi
|
||||
}
|
||||
|
||||
# 主函数
|
||||
main() {
|
||||
log_info "正在卸载上帝之眼..."
|
||||
|
||||
check_root
|
||||
stop_service
|
||||
remove_files
|
||||
|
||||
log_success "卸载上帝之眼完成!"
|
||||
}
|
||||
|
||||
# 运行主函数
|
||||
main "$@"
|
||||
Reference in New Issue
Block a user