加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

iOS IPA Re-packagin /重新签名AppStore应用程序

发布时间:2020-12-14 17:54:44 所属栏目:百科 来源:网络整理
导读:问题描述 我需要在iOS设备上控制任意应用程序,我的计划是向IPA注入可执行文件(实现远程控制逻辑),然后重新打包它. 由于应用程序应在受控环境(特定设备)中运行,因此我计划将我的配置文件与我的开发证书一起用于重新打包/签名. 首先,我试图重新打包第三方应用
问题描述

我需要在iOS设备上控制任意应用程序,我的计划是向IPA注入可执行文件(实现远程控制逻辑),然后重新打包它.

由于应用程序应在受控环境(特定设备)中运行,因此我计划将我的配置文件与我的开发证书一起用于重新打包/签名.

首先,我试图重新打包第三方应用程序没有注入任何代码,这是通过以下方式完成的:

1. Unzip the existing IPA
 2. Copy the provisioning profile to %APP_NAME%.app/embedded.mobileprovisioning
 3. export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate"
 4. signcode --force --deep -s "%Dev Cert Name%" "%Path/To/APP_NAME%.app"
 5. zip the re-signed code back together

Above对于我使用Xcode手动构建的应用程序非常有用,但是,当使用从AppStore下载的IPA时,这不适用于以下设备日志错误:

<Debug>: AppleFairplayTextCrypterSession::fairplayOpen() failed,error -42112

检查应用程序的’Mach-O’可执行文件,我已经验证相关体系结构的“代码签名”部分已完全更改(通过’signcode’工具).

问题

>为什么我不能重新打包我从AppStore下载的应用程序,而我手动创建w / Xcode的应用程序成功重新打包/签名?
>如何使用我的开发证书和&amp ;;重新打包/签署AppStore应用程序配置文件?
> FairPaly如何区分我手动制作的应用程序(使用Xcode)和从appstore下载的应用程序? appstore应用程序有哪些残差,手动制作的应用程序没有?

参考

> https://stackoverflow.com/questions/25737711/ios-undocumented-api-using-uiautomation-framework-on-ios7
> http://macsecurity.net/view/55/
> https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/codesign.1.html

解决方法

来自AppStore的应用程序不仅仅是签名,binary is also encrypted.

App Store binaries are signed by both their developer and Apple. This encrypts the binary so that decryption keys are needed in order to make the binary readable. When iOS executes the binary,the decryption keys are used to decrypt the binary into a readable state where it is then loaded into memory and executed. iOS can tell the encryption status of a binary via the cryptid struture member of LC_ENCRYPTION_INFO MachO load command. If cryptid is a non-zero value then the binary in encrypted.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读