這裏介紹使用dumpdecrypted砸殼。原理是用DYLD_INSERT_LIBRARIES這個環境變量加載脫殼的動態連接庫dumpdecrypted.dylibios
1.ssh鏈接上越獄的機器,輸入密碼alpineapp
ssh root@192.168.7.116ssh
2.打開要砸的app,ps aux | grep var找到它的目錄spa
yigewangde-iPhone:~ root# ps aux | grep varip
mobile 1118 0.0 1.0 1139072 9684 ?? Ss Wed10AM 5:30.70 /var/containers/Bundle/Application/BCC24500-0986-4343-A287-7BAF60B33E60/WeChat.app/WeChatrem
root 1913 0.0 0.1 537488 568 s000 S+ 9:50AM 0:00.02 grep varit
root 474 0.0 0.2 707792 1676 ?? Ss Tue04PM 0:00.47 /usr/libexec/pkd -d/var/db/PlugInKit-Annotationsio
mobile 1902 0.0 4.8 900736 47580 ?? Us 9:50AM 0:03.69 /var/containers/Bundle/Application/249A5309-8F1A-4C4A-93FD-E48EEAE00C95/DingTalk.app/DingTalktable
咱們拿DingTalk開刀。class
3.用scp把dumpdecrypted.dylib 拷貝到 /usr/lib目錄下
scp dumpdecrypted.dylib root@192.168.7.116:/usr/lib
4.切換到mobile用戶
su mobile
5.切換到/var/mobile/Documents這個目錄
cd /var/mobile/Documents
6.開始砸殼
DYLD_INSERT_LIBRARIES=/usr/lib/dumpdecrypted.dylib /var/containers/Bundle/Application/249A5309-8F1A-4C4A-93FD-E48EEAE00C95/DingTalk.app/DingTalk
mach-o decryption dumper
DISCLAIMER: This tool is only meant for security research purposes, not for application crackers.
[+] detected 64bit ARM binary in memory.
[+] offset to cryptid found: @0x100084cf8(from 0x100084000) = cf8
[+] Found encrypted data at address 00004000 of length 40534016 bytes - type 1.
[+] Opening /private/var/containers/Bundle/Application/249A5309-8F1A-4C4A-93FD-E48EEAE00C95/DingTalk.app/DingTalk for reading.
[+] Reading header
[+] Detecting header type
[+] Executable is a plain MACH-O image
[+] Opening DingTalk.decrypted for writing.
[+] Copying the not encrypted start of the file
[+] Dumping the decrypted data into the file
[+] Copying the not encrypted remainder of the file
[+] Setting the LC_ENCRYPTION_INFO->cryptid to 0 at offset cf8
[+] Closing original file
[+] Closing dump file
7.over了。在/var/mobile/Documents下就能夠看到了
而後來看一下怎麼從新簽名,這樣就能夠安裝到沒有越獄的手機 上了。
1.先到appstore下載到對應的ipa,我是用ituns下載到電腦上的。
2.解壓縮
3.找到payload裏的壓縮包,顯示包內容
4.把裏面的可執行文件替換爲咱們的解壓縮的內容
5.用ios app signer從新簽名,會生成 新的ipa