iOS越狱-脱壳

作者: 船长_ | 来源:发表于2018-10-22 00:37 被阅读75次

什么是加壳?

利用特殊的算法,对可执行文件的编码进行改变(比如压缩、加密),以达到保护程序代码的目的

什么是脱壳?

摘掉壳程序,将未加密的可执行文件还原出来(有些人也称为“砸壳”)

脱壳主要有2种方法:硬脱壳、动态脱壳
iOS中采取“硬脱壳”的方式

iOS中有很多好用的脱壳工具

Clutch:https://github.com/KJCracks/Clutch

dumpdecrypted:https://github.com/stefanesser/dumpdecrypted/

凡是App Store上的应用都有加壳

如何验证可执行文件是否已经脱壳?

1.使用MachOView软件

查看Load Commands -> LC_ENCRYPTION_INFO -> Crypt ID的值,0代表未加密


machOView2.jpeg

2.通过otool命令行也可以:

otool  -l  可执行文件路径  |  grep  crypt 

示例

otool -l MoneyAssistant | grep crypt

输出

 cryptoff 16384
 cryptsize 8404992
 cryptid 1
 cryptoff 16384
 cryptsize 9142272
 cryptid 1

说明PP助手是有加密的

一.Clutch安装

1.下载最新版本Clutch文件

https://github.com/KJCracks/Clutch/releases

2.建议去掉版本号,改名为Clutch
3.将Clutch文件拷贝到iPhone的/usr/bin目录

二.Clutch 使用

登录服务器
输入

Clutch

如果出现了

-sh: /usr/bin/Clutch: Permission denied

说明权限不够,赋予“可执行的权限

chmod +x /usr/bin/Clutch

再次输入Clutch指令

Usage: Clutch [OPTIONS]
-b --binary-dump <value> Only dump binary files from specified bundleID 
-d --dump <value> Dump specified bundleID into .ipa file 
-i --print-installed  Print installed applications
 --clean  Clean /var/tmp/clutch directory 
 --version  Display version and exit 
-? --help Display this help and exit 
-n --no-color Print with colors disabled 

列出已安装在手机,未脱壳的应用

Clutch -i

输出

Installed apps:
1:  爱思加强版 <com.pd.A4Player>
2:  微信 <com.tencent.xin>
3:  こつこつ家計簿-無料のカレンダー家計簿 <com.doubibi74.money76>
4:  今日头条 <com.ss.iphone.article.News>

输入APP序号或者Bundle Id进行脱壳操作:Clutch -d APP序号或BundleId

Clutch -d 3

输出

…
Zipping CodePush.framework
Zipping DOUAudioStreamer.framework
Zipping DoubleConversion.framework
Zipping FLAnimatedImage.framework
Zipping Masonry.framework
Zipping REFrostedViewController.framework
Zipping RNFS.framework
Zipping React.framework
Zipping SDWebImage.framework
Zipping SwiftyJSON.framework
Zipping ZFPlayer.framework
Zipping folly.framework
Zipping glog.framework
Zipping react_native_fetch_blob.framework
Zipping react_native_video.framework
Zipping react_native_wkwebview.framework
Zipping yoga.framework
DONE: /private/var/mobile/Documents/Dumped/com.pd.A4Player-iOS9.0-(Clutch-2.0.4).ipa

脱壳的地址:

/private/var/mobile/Documents/Dumped/com.pd.A4Player-iOS9.0-(Clutch-2.0.4).ipa

这个ipa包就是脱壳后的ipa包,解压拿到Mach-O文件后,可以使用MachOView进行验证是否已经脱壳

查看文件类型

比如PP助手可执行文件MoneyAssistant

file MoneyAssistant

输出

MoneyAssistant: Mach-O universal binary with 2 architectures: [arm_v7:Mach-O executable arm_v7] [arm64]
MoneyAssistant (for architecture armv7):  Mach-O executable arm_v7
MoneyAssistant (for architecture arm64):  Mach-O 64-bit executable arm64

相关文章

  • iOS越狱-脱壳

    什么是加壳? 利用特殊的算法,对可执行文件的编码进行改变(比如压缩、加密),以达到保护程序代码的目的 什么是脱壳?...

  • iOS逆向-相关

    iOS嵌码 越狱手机:直接把自己生成的dylib放到指定文件夹即可非越狱手机:脱壳,注入(先放入Framework...

  • 砸壳总结

    为什么要用完美越狱,因为有一些工具支持iOS9系统,有些不支持,而越狱也能进行脱壳 otool -l Course...

  • iOS逆向-Frida脱壳

    背景 之前用过越狱iPhone6 iOS12.4.1系统进行clutch进行脱壳时是成功的,但是后来发现同样的ap...

  • ipa重签(iReSign修改版)

    脱壳 1. 下载PP助手越狱版 2. 手动脱壳 otool -l WeChat | grep crypt暂无 安装...

  • iOS安装脱壳后的ipa

    安装手机必须是越狱后的苹果设备 1. 在越狱后的手机中断中执行查询App编码并脱壳 2. 找到对应的脱壳后的ipa...

  • iOS逆向工程之给App脱壳

    iOS逆向工程之给App脱壳 iOS逆向工程之给App脱壳

  • iPhone 越狱初试

    iPhone 越狱初试 越狱工具 太极越狱 适用于 iOS 8.1.3-8.4盘古越狱 for iOS 9.2 -...

  • iOS应用程序的脱壳实现原理浅析

    iOS应用程序的脱壳实现原理浅析 iOS应用程序的脱壳实现原理浅析

  • iOS14.2 手机越狱,App脱壳

    越狱 之前越狱用的是iPhone6s iOS13的系统,因为是不完美越狱所以每次重启App都要重新再次越狱,否则无...

网友评论

    本文标题:iOS越狱-脱壳

    本文链接:https://www.haomeiwen.com/subject/xeqwzftx.html