 的 iOS 越狱外工具箱实战指南)
移动开发原生移动【免费下载链接】CowabungaiOS 14.0-15.7.1 16.0-16.1.2 MacDirtyCow ToolBox项目地址https://gitcode.com/gh_mirrors/co/Cowabunga点击查看免费下载Cowabunga 是一款面向 iOS 14.0–15.7.1 与 16.0–16.1.2 的越狱外JailedSpringBoard 自定义工具箱核心依赖 Apple 已公开披露的CVE-2022-46689MacDirtyCow漏洞实现对系统只读文件的覆写。本文围绕官方 README 的功能清单、安装方式与自定义锁屏动画格式展开并结合仓库源码印证其底层调用链——包括MDC.overwriteFile覆写入口、后台保持运行的定位策略、锁屏 CAML 文件注入机制与 IPA 打包脚本帮助读者理解这款已归档EOL工具的完整技术架构。项目定位与版本边界README 明确给出 Cowabunga 的三个核心事实漏洞依赖基于 CVE-2022-46689即 MacDirtyCow。该漏洞影响 iPhone X 及之后机型在 iOS 14–16.1.2 区间可通过io_uring风格的vm_unaligned_copy系统调用触发内核未对齐拷贝竞态从而向受保护的只读文件SpringBoard 资源、.materialrecipe、.caml、.car等写入数据。支持范围iOS14.0–15.7.1与16.0–16.1.2。README 特别警告 Some changes are permanent on iOS 14.0–14.8.1因为该版本区间无法通过重放覆写完整还原所有修改。项目状态Cowabunga MDC has reached its end of life. There will be no more updates and has been archived.—— 项目已归档官方不再维护。仓库内的入口代码印证了版本检测逻辑。在 CowabungaApp.swift 中onAppear分支做了三件事iOS ≥ 16.2 且未开启ForceMDC直接弹出 This version of iOS is not supported. 拒绝运行尝试读取/var/mobile/Library/Caches目录若能成功则判定当前处于 TrollStore 环境TrollStore 应用拥有platform-application权限可读该目录调用StatusManager.sharedInstance().setIsMDCMode(false)走 TrollStore 直写路径否则走 MDC 路径iOS 15 调用 grant_full_disk_access 获取 full disk accessiOS 14 直接提示 Please install via TrollStore。这段分支逻辑解释了 README Installing 一节列出四种安装方式的原因——AltStore / Sideloadly / Xcode / TrollStore前三种安装后仍需在 iOS 15 上运行一次 MDC 提权因此 README 才强调 Enable Notifications and set Location Services to Always而 TrollStore 安装后可以直接绕过漏洞利用。仓库根目录的 entitlements.plist 完整罗列了 TrollStore 安装所需的特权 entitlement包括platform-application、com.apple.private.security.no-sandbox、com.apple.security.iokit-user-client-class含AGXDeviceUserClient、IOHDIXControllerUserClient、IOSurfaceRootUserClient这三者是 MacDirtyCow 触发vm_unaligned_copy的关键 IOKit 用户客户端、com.apple.security.exception.files.absolute-path.read-write指向/、以及com.apple.UIKit.status-bar-override-allow用于覆盖状态栏文本等。这些 entitlement 是 TrollStore 模式下应用能直接write()系统文件的前提。后台常驻机制为什么要求 Always 定位README 第一条注意事项是Enable Notifications and set Location Services toAlwaysto keep the app running in the background, keep the dock and folder background hidden, and prevent some sound effects from reverting.这句话的底层实现在 LocationManager.swift。该类从 Riley Testut 的 Clip 项目移植而来源文件头注释明确署名核心策略是利用 iOS 对kCLLocationAccuracyReducedallowsBackgroundLocationUpdates trueNSLocationAlwaysAndWhenInUseUsageDescription三要素齐备的应用提供的长期后台唤醒能力self.locationManager.distanceFilter CLLocationDistanceMax self.locationManager.pausesLocationUpdatesAutomatically false self.locationManager.allowsBackgroundLocationUpdates true // iOS 14 使用 reduced 精度iOS 14 以下退化为 ThreeKilometers self.locationManager.desiredAccuracy #available(iOS 14.0, *) ? kCLLocationAccuracyReduced : kCLLocationAccuracyThreeKilometersdistanceFilter CLLocationDistanceMax意味着只有当设备位置变化到无穷远实际不会发生时才上报从而让系统认为这是一个低功耗的定位任务但应用进程仍会因定位回调被周期性唤醒。start()在didChangeAuthorization收到.authorizedAlways后才真正调用startUpdatingLocation()否则抛出Error.requiresAlwaysAuthorization其recoverySuggestion文案正是 Please grant Cowabunga Always location permission in Settings so it can run in the background indefinitely. —— 与 README 的提示一一对应。后台唤醒后真正干活的是 BackgroundFileUpdaterController.swift。其setup()每time 120.0秒触发一次updateFiles()遍历 11 个BackgroundOptionDock、HomeBar、FolderBG、FolderBlur、PodBackground、NotifBackground、CCBG、CCModuleBackground、Lock、Audio、SettingsCustomizer逐一读取UserDefaults中xxx_BGApply标志位若开启则重新调用对应 Manager 覆写目标文件抵消 iOS 系统在 respring、内存压力或后台清理时对 SpringBoard 资源文件的回滚。这解释了 README 中 battery loss is negligible (~1% per day on frequent) 的测试结论——每 2 分钟一次的轻量覆写。[CowabungaAPI]等模块通过ApplicationMonitor.shared.start()在应用启动时拉起整个后台调度见 CowabungaApp.swift 的if UserDefaults.standard.bool(forKey: BackgroundApply) true { ApplicationMonitor.shared.start() }形成定位唤醒 → 定时器 → 文件覆写的完整回路。功能全景与源码映射README 的 Features 一节可拆分为七组。下文逐组说明其源码归属便于读者按图索骥。Springboard 主题隐藏 Dock / HomeBar / 文件夹背景 / 模糊 / 通知横幅 / CC 模块这组功能统一由 SpringboardColorManager.swift 驱动。该文件定义了一个SpringboardType枚举与两张查找表把 README 里每一项 UI 开关精确映射到系统内某个只读资源文件enum SpringboardType { case dock, folder, folderBG, libraryFolder, switcher, notif, notifShadow, module, moduleBG } private static let finalFiles: [SpringboardType: [String]] [ .folder: [folderDark, folderLight], .libraryFolder: [podBackgroundViewDark, podBackgroundViewLight], .dock: [dockDark, dockLight], .folderBG: [folderExpandedBackgroundHome, homeScreenOverlay, homeScreenOverlay-iPad], .switcher: [homeScreenBackdrop-application], .notif: [plattersDark, platters], .notifShadow: [platterVibrantShadowDark, platterVibrantShadowLight], .module: [modules], .moduleBG: [modulesBackground] ] private static let fileFolders: [SpringboardType: String] [ .folder: /System/Library/PrivateFrameworks/SpringBoardHome.framework/, .libraryFolder: /System/Library/PrivateFrameworks/SpringBoardHome.framework/, .dock: /System/Library/PrivateFrameworks/CoreMaterial.framework/, .folderBG: /System/Library/PrivateFrameworks/SpringBoardHome.framework/, .switcher: /System/Library/PrivateFrameworks/SpringBoard.framework/, .notif: /System/Library/PrivateFrameworks/CoreMaterial.framework/, .notifShadow: /System/Library/PrivateFrameworks/PlatterKit.framework/, .module: /System/Library/PrivateFrameworks/CoreMaterial.framework/, .moduleBG: /System/Library/PrivateFrameworks/CoreMaterial.framework/ ]仓库的 OverwriteFiles/SpringboardFiles 目录保存了上述目标文件的原始备份dockDark.materialrecipe、folderExpandedBackgroundHome.materialrecipe、plattersDark.materialrecipe、modules.materialrecipe等以及统一的replacement.materialrecipe模板。修改逻辑是把replacement.materialrecipe中的颜色/透明度字段改写为用户选择值再覆写回对应.materialrecipe或.visualstyleset文件从而把 Dock 背景、文件夹展开背景、App 库 pod 背景、通知横幅、控制中心模块背景统一改为指定纯色或透明。App Icon Themes导入图标主题文件夹拒绝 WebClipApp 图标主题由 ThemeManager.swift 与 CatalogThemeManager.swift 共同实现配合 FSPConverter.swift 将Assets.car资产目录转换为 FSP 格式以便编辑。README 强调 No WebClips! —— 因为 Web Clip 的图标不走 SpringBoard 资产目录而是通过com.apple.WebClips.read-writeentitlement 直接读写com.apple.WebClipStore数据库Cowabunga 选择只覆盖主应用图标路径避免 WebClip 干扰。[OverwriteFiles/Assets](https://link.gitcode.com/i/68674c70017e18e7f5e167e8a9f50bbc)目录中的AssetsDummy4.car~AssetsDummy27.car是预置的占位资产目录供AssetCatalogManager在覆写时作为源素材池。Audio自定义音效150 KB 上限README 明确 Max upload audio size of 150 kb, but will not apply for audio if too big!。该限制在 AudioConverter.swift 中以let fileLimit: Int 150 // in kB硬编码。IncludedAudio 目录预置了 15 个.m4a音效Coin.m4a、Crash.m4a、Discord.m4a、Engage.m4a、MagSafe.m4a、Mooh.m4a、Old_Charging.m4a、Old_Lock.m4a、Piano_Delete.m4a、Piano_Key.m4a、Samsung.m4a、Slip.m4a、Star_Wars_Blaster.m4a、Taco_Bell.m4a、Windows_XP.m4a、Version.m4a其名称索引在 IncludedAudio/AudioNames.json。[AudioManager]与 AudioConverter.swift 负责把上传的任意格式音频转码为 m4a 并写入/System/Library/Audio/Sounds/覆盖系统原生日志音、锁屏音、低电量提示音等。Passcode自定义锁屏密码键盘支持 .passthm 导入PasscodeKeyFaceManager.swift 定义了TelephonyDirType枚举覆盖passcode密码键盘、touchID、faceID、phone等多个 Telephony UI 目录。setFacesFromTheme(_ url: URL, _ dir: TelephonyDirType, colorScheme:colorScheme, keySize:customX:customY:)支持从 TrollTools 社区约定的.passthm压缩包导入整套密码键盘主题见 CowabungaApp.swift 的onOpenURL分支扩展名为passthm时自动解压并套用。exportFaceTheme反向把当前主题打包为exported_theme.passthm实现与 TrollTools 生态的双向兼容。Locks自定义锁屏动画核心章节见下见下文 自定义锁屏动画 一节这是 README 中最具操作价值的部分。Status Bar状态栏深度定制状态栏功能由 StatusBarVisibilityController.swift 与 StatusManager 下的 ObjC 实现StatusSetter14.m、StatusSetter15.m、StatusSetter16.m、StatusSetter16_1.m按 iOS 大版本分支共同完成。entitlements.plist中的com.apple.UIKit.status-bar-override-allow是状态栏文本覆写的关键——该 entitlement 允许非系统进程通过私有UIStatusBar接口替换运营商名、副运营商名、电量百分比文本、时间文本、面包屑breadcrumb文本以及把 WiFi/蜂窝信号从条形图标改为数值显示。README 列出的六项能力carrier name、secondary carrier name、battery display detail、time text、breadcrumb text、numeric WiFi/Cellular strength、hide many icons全部落在这组 ObjC setter 上按 iOS 14/15/16/16.1 分别实现是因为每个大版本的SpringBoard私有 API 签名不同。Other Tools / Misc / Extra ToolsCustom FontsFontManager.swift OverwriteFontImpl.swift 实现字体覆写参考 ginsudev 的 FontOverwrite 项目README Credits 节明确署名。Views/FontChangeView/RepackedFonts 预置了 10 个.woff2字体Chococooky、Comic Sans MS、DejaVuSansCondensed、DejaVuSansMono、DejaVuSerif、FiraSans-Regular、Go-Mono、Go-Regular、segoeui 等。Lock Screen FootnoteLSFootnoteChangerView.swift 覆盖锁屏底部注释文本。Notification Badges仅 iOS 14–15BadgeChanger.swift 通过com.apple.coreservices.canmaplsdatabaseentitlement 修改 LSApplicationWorkspace 数据库中的角标字段。Settings App CustomizerSettingsCustomizerManager.swift 修改Settings.bundle中的Root.plist字符串与图标。Calculator ErrorCalculatorErrorManager.swift 覆写Calculator.app内的错误提示字符串。CC ModifierCCModifierManager.swift 修改控制中心模块的透明度与模糊。Misc 中的 Supervise Device通过 Cowabunga-Bridging-Header.h 暴露的 MDM 私有接口让设备被 MDM 描述文件监管用于解锁更多系统行为。Enable iPhone X Gestures / Enable Dynamic Island (iOS 16)README 明确警告 Use the features below at your own risk!因为 Dynamic Island 功能会覆写SpringBoard的ProximitySensor与DynamicIsland资源可能影响面容 ID 与传感器行为。自定义锁屏动画trollformation帧序列与animations.json这是 README 中最具可操作性的章节值得完整展开。帧文件命名约定锁屏动画由一组连续 PNG 帧构成每帧必须命名为trollformation1.png trollformation2.png trollformation3.png ...LockManager.swift在 addImportedLock 中通过for i in 1 ... 120 { let imgName trollformation\(i).png ... }循环探测最多 120 帧。README 说明 You can use up to 120 frames, though I am not sure of the exact size limit, which is probably much less. —— 120 是硬编码上限但整体包体受.ca资产目录大小约束实际可用帧数受限于目标设备内存与 SpringBoard 解析开销。动画时长定义animations.jsonREADME 给出完整格式Create a json file namedanimations.jsonDefine the values. Format:Frame Number: Time Interval{ 1: 0, 2: 0.025, 10: 0.01, 15: 0.025 }关键语义第一帧必须定义1: 0表示第 1 帧从时间 0 开始未显式定义的帧沿用上一帧的时长If you did not set a time for the frame, Cowabunga will use the time from the last frame帧号必须是 JSON 字符串带引号因为 Swift 的JSONSerialization解析字典 key 时只产出String源码animData: [String: Double]?直接以String(i)查询Time Interval是该帧在屏幕上的停留时长秒而非动画总时长。源码中的解析与累计逻辑LockManager.addImportedLock 实现了一个累加器算法把每帧的停留时长转换为 CAML 关键帧动画需要的起始时间戳var animData: [String: Double]? nil var sumFrames: Double 0 var finalAnimData: [String: Double] [:] // ... if animData ! nil { if animData![String(i)] ! nil { lastAnimFrame i sumFrames animData![String(i)]! finalAnimData[String(i)] sumFrames } else if lastAnimFrame 0 || i 1 { if i 1 { lastAnimFrame i } if animData![String(lastAnimFrame)] ! nil { sumFrames animData![String(lastAnimFrame)]! finalAnimData[String(i)] sumFrames } } else { throw No starting frame found for animation! } }含义finalAnimData里存的是每帧开始的累计时间keyTimes而不是每帧时长。例如 README 示例{ 1:0, 2:0.025, 10:0.01, 15:0.025 }会被展开为帧 1 起始 0帧 2 起始 0帧 3 起始 0.025沿用帧 2 的 0.025帧 4 起始 0.05……帧 9 起始 0.2帧 10 起始 0.2显式 0.01帧 11 起始 0.21……帧 14 起始 0.25沿用 0.01帧 15 起始 0.26显式 0.025。最终写入animations.plistXML plist[String: Double]供applyLock读取。底层注入CAML 文件与.ca资产目录LockManager.applyLock 揭示了动画最终落地的完整路径let originPath: String /System/Library/PrivateFrameworks/SpringBoardUIServices.framework/lock getLockType() .caglobalLockPaths定义了 6 种分辨率变体3x-d73、3x-896h、3x-812h、2x-896h、2x-812h、2x-120fps~ipaddeviceLockPath字典把iPhone15,3等硬件标识映射到对应分辨率的.ca资产目录例如 iPhone 14 Pro 映射到3x-d73iPad Pro 12.9 5 代映射到2x-120fps~ipad。.ca是 Apple 资产目录格式内部以main.caml为入口。applyLock把camlFileContents模板一个完整的 Core Animation Lock 状态机 XML中的四个占位符替换占位符替换为INITIALcontents typeCGImage srcfile:///.../trollformation1.png/—— 锁屏静止时显示首帧IMAGE_PATHS逐帧CGImage srcfile:///.../trollformationN.png/拼接ANIMATION逐帧real value累计时间戳/拼接FINALvalue typeCGImage srcfile:///.../trollformationM.png/—— 解锁后停留的末帧未提供animations.json时回退到 defaultAnimation —— 一组 40 帧、每帧 0.01666666666 秒60 fps的均匀时间戳。替换完成后通过try MDC.overwriteFile(at: originPath /main.caml, with: newData!)写回系统目录。MDC.overwriteFile是 MacDirtyCowSwift/MacDirtyCowSwift.swift 暴露的公开 APIpublic static func overwriteFile(at path: String, with data: Data, unlockDataAtEnd: Bool false, multipleIterations: Bool false) throws底层实现在 MacDirtyCowSwift/Exploit/jit.m 与 vm_unaligned_copy_switch_race.c通过 IOKit 用户客户端AGXDeviceUserClient等触发内核vm_unaligned_copy的未对齐拷贝竞态把用户态缓冲区内容错位写入目标只读文件。isMDCSafe标志位会在收到didReceiveMemoryWarningNotification时置false后续所有覆写抛MDCOverwriteError.ram防止在内存压力下继续利用导致系统崩溃。toggleCatalogCorruption则专门用于修复.car资产目录树头损坏把tree魔数与CorruptThiL魔数互转是 README 未提及但仓库中可见的自恢复能力。导入流程与校验addImportedLock 的校验链非常严格必须存在trollformation1.png否则抛Not a valid lock theme folder!若存在animations.jsonJSONSerialization解析失败则删除已创建的目标文件夹并抛There was an error parsing animation data!帧 1 未提供时长且后续有显式帧 → 抛No starting frame found for animation!任一帧读取失败 → 删除目标文件夹并抛Could not save image data成功时返回firstImgtrollformation1.png的Data供 UI 即时预览。保存位置统一在沙箱内Documents/Saved_Locks/lockName/见 getLocksDirectoryanimations.plist与所有trollformationN.png一并落盘。applyLock(lockName:)在每次后台唤醒或用户手动触发时重新读取该文件夹并覆写系统.ca。构建与分发README Building 一节仅一句话Just build like a normal Xcode project. Sign using your own team and bundle identifier. You can also build the IPA file withipabuild.sh. 仓库根目录的 ipabuild.sh 是 TrollTools 生态标准的构建脚本完整流程xcodebuild -project $WORKING_LOCATION/Cowabunga.xcodeproj \ -scheme Cowabunga \ -configuration Release \ -derivedDataPath $WORKING_LOCATION/build/DerivedDataApp \ -destination generic/platformiOS \ clean build \ CODE_SIGN_IDENTITY CODE_SIGNING_REQUIREDNO \ CODE_SIGN_ENTITLEMENTS CODE_SIGNING_ALLOWEDNO关键点CODE_SIGNING_ALLOWEDNO让xcodebuild产出未签名的.app避免个人开发者证书限制cp -r到build/Cowabunga.app后用codesign --remove剥离残留签名并删除_CodeSignature与embedded.mobileprovision用仓库内预编译的bin/ldidldid 是 iOS 签名工具按 entitlements.plist 重新注入 entitlements$WORKING_LOCATION/bin/ldid -S$WORKING_LOCATION/entitlements.plist $TARGET_APP/$APPLICATION_NAME最后strip二进制、zip -vr Cowabunga.ipa Payload打包。产出的 IPA 是未签名状态必须借助 TrollStore、AltStore 或 Sideloadly 重新签名安装——这正是 README Installing 一节列出四种安装渠道的原因。TrollStore 安装后 entitlements 已包含platform-application可绕过 MDC 直接以root权限覆写AltStore/Sideloadly/Xcode 安装后则依赖 iOS 15 的grant_full_disk_accessMDC 路径。已知限制与风险README 与源码共同揭示的边界条件iOS 14.0–14.8.1 修改不可逆该版本区间 SpringBoard 资源回滚机制不同部分覆写无法完全还原。iOS 16.2 不受支持CowabungaApp入口直接拦截除非手动在UserDefaults开启ForceMDCBeta 用户用。iOS 14 必须 TrollStore 安装MDC 的grant_full_disk_access路径仅 iOS 15 可用iOS 14 用户只能走 TrollStore。内存压力会禁用 MDCMDCOverwriteError.ram提示用户 close some apps running in background, reopen Cowabunga and try again。.car资产目录损坏自恢复MDCOverwriteError.corruption提示 This will lead to a bootloop if the steps are not followed. FOLLOW CAREFULLY: Close all your background apps, then reopen Cowabunga for fixing.项目已 EOL官方不再维护安全漏洞与 iOS 系统升级均不再跟进。总结Cowabunga 是 MacDirtyCow 漏洞生态中功能最完整的越狱外 SpringBoard 自定义工具箱之一。它的技术架构可概括为三层权限层TrollStoreplatform-applicationno-sandbox或 MDCvm_unaligned_copy竞态 grant_full_disk_access由 entitlements.plist 与 MacDirtyCowSwift/Exploit 共同承载常驻层LocationManager 借 Always 定位长期唤醒 BackgroundFileUpdaterController 每 120 秒重放覆写对抗系统回滚功能层Springboard 主题、App 图标、音效、密码键盘、锁屏动画LockManager 的trollformation帧序列 animations.json CAML 注入、状态栏按 iOS 大版本分支的 ObjC setter、字体、角标、计算器错误、控制中心、Misc 等 30 项功能每项都映射到 Cowabunga/Controllers 下独立 Manager 与 Cowabunga/Views 下对应 SwiftUI 视图。由于项目已归档本文档的价值在于为研究者保留一份可追溯的 MacDirtyCow 应用层实现参考——尤其是 LockManager.swift 中 CAML 状态机模板、trollformation帧序列约定与animations.json累计时间戳算法是理解 iOS 锁屏动画资源格式的清晰样本。赞分享移动开发原生移动【免费下载链接】CowabungaiOS 14.0-15.7.1 16.0-16.1.2 MacDirtyCow ToolBox项目地址https://gitcode.com/gh_mirrors/co/Cowabunga点击查看免费下载相关推荐iOS越狱神器Cowabunga5分钟掌握MacDirtyCow工具箱终极指南iOS越狱神器Cowabunga5分钟掌握MacDirtyCow工具箱终极指南 想要在iOS设备上实现深度个性化定制吗Cowabunga就是你的终极解决方案移动开发原生移动Cowabunga iOS工具箱终极指南MacDirtyCow技术实战教程Cowabunga iOS工具箱终极指南MacDirtyCow技术实战教程 还在为iOS系统界面单调、功能受限而烦恼吗 今天为大家带来Cowabunga移动开发原生移动【亲测免费】 iOS MacDirtyCow 工具箱Cowabunga 项目指南iOS MacDirtyCow 工具箱Cowabunga 项目指南 1. 目录结构及介绍 开源项目 Cowabunga https://github.com/移动开发原生移动上一篇3个步骤打造GTA5终极防护盾YimMenu全方位安全指南下一篇115proxy-for-kodi让你的Kodi直接播放115云盘视频的终极解决方案创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考