diff --git a/resources/iBSS.n92ap.RELEASE.patch b/resources/iBSS.n92ap.RELEASE.patch new file mode 100644 index 0000000..7e56058 Binary files /dev/null and b/resources/iBSS.n92ap.RELEASE.patch differ diff --git a/resources/iBSS.n94.RELEASE.patch b/resources/iBSS.n94.RELEASE.patch new file mode 100644 index 0000000..bd4558a Binary files /dev/null and b/resources/iBSS.n94.RELEASE.patch differ diff --git a/resources/iBSS.p101.RELEASE.patch b/resources/iBSS.p101.RELEASE.patch new file mode 100644 index 0000000..f7af7de Binary files /dev/null and b/resources/iBSS.p101.RELEASE.patch differ diff --git a/resources/iBSS.p102.RELEASE.patch b/resources/iBSS.p102.RELEASE.patch new file mode 100644 index 0000000..5e59b0e Binary files /dev/null and b/resources/iBSS.p102.RELEASE.patch differ diff --git a/resources/iBSS.p103.RELEASE.patch b/resources/iBSS.p103.RELEASE.patch new file mode 100644 index 0000000..6a7420a Binary files /dev/null and b/resources/iBSS.p103.RELEASE.patch differ diff --git a/resources/iBSS.p105.RELEASE.patch b/resources/iBSS.p105.RELEASE.patch new file mode 100644 index 0000000..de97328 Binary files /dev/null and b/resources/iBSS.p105.RELEASE.patch differ diff --git a/resources/iBSS.p106.RELEASE.patch b/resources/iBSS.p106.RELEASE.patch new file mode 100644 index 0000000..ef93d1b Binary files /dev/null and b/resources/iBSS.p106.RELEASE.patch differ diff --git a/resources/iBSS.p107.RELEASE.patch b/resources/iBSS.p107.RELEASE.patch new file mode 100644 index 0000000..29506b8 Binary files /dev/null and b/resources/iBSS.p107.RELEASE.patch differ diff --git a/resources/patch/iBEC.j1ap.RELEASE.patch b/resources/patch/iBEC.j1ap.RELEASE.patch new file mode 100644 index 0000000..ba5fd13 Binary files /dev/null and b/resources/patch/iBEC.j1ap.RELEASE.patch differ diff --git a/resources/patch/iBEC.j2.RELEASE.patch b/resources/patch/iBEC.j2.RELEASE.patch new file mode 100644 index 0000000..dad18fe Binary files /dev/null and b/resources/patch/iBEC.j2.RELEASE.patch differ diff --git a/resources/patch/iBEC.j2aap.RELEASE.patch b/resources/patch/iBEC.j2aap.RELEASE.patch new file mode 100644 index 0000000..1b5463a Binary files /dev/null and b/resources/patch/iBEC.j2aap.RELEASE.patch differ diff --git a/resources/patch/iBEC.k93aap.RELEASE.patch b/resources/patch/iBEC.k93aap.RELEASE.patch new file mode 100644 index 0000000..8a81d39 Binary files /dev/null and b/resources/patch/iBEC.k93aap.RELEASE.patch differ diff --git a/resources/patch/iBEC.k93ap.RELEASE.patch b/resources/patch/iBEC.k93ap.RELEASE.patch new file mode 100644 index 0000000..0eba4eb Binary files /dev/null and b/resources/patch/iBEC.k93ap.RELEASE.patch differ diff --git a/resources/patch/iBEC.k94ap.RELEASE.patch b/resources/patch/iBEC.k94ap.RELEASE.patch new file mode 100644 index 0000000..f44cfe5 Binary files /dev/null and b/resources/patch/iBEC.k94ap.RELEASE.patch differ diff --git a/resources/patch/iBEC.k95.RELEASE.patch b/resources/patch/iBEC.k95.RELEASE.patch new file mode 100644 index 0000000..ea16d64 Binary files /dev/null and b/resources/patch/iBEC.k95.RELEASE.patch differ diff --git a/resources/patch/iBEC.n41ap.RELEASE.patch b/resources/patch/iBEC.n41ap.RELEASE.patch new file mode 100644 index 0000000..9c983e4 Binary files /dev/null and b/resources/patch/iBEC.n41ap.RELEASE.patch differ diff --git a/resources/patch/iBEC.n42ap.RELEASE.patch b/resources/patch/iBEC.n42ap.RELEASE.patch new file mode 100644 index 0000000..9c983e4 Binary files /dev/null and b/resources/patch/iBEC.n42ap.RELEASE.patch differ diff --git a/resources/patch/iBEC.n48ap.RELEASE.patch b/resources/patch/iBEC.n48ap.RELEASE.patch new file mode 100644 index 0000000..ade2ec0 Binary files /dev/null and b/resources/patch/iBEC.n48ap.RELEASE.patch differ diff --git a/resources/patch/iBEC.n49ap.RELEASE.patch b/resources/patch/iBEC.n49ap.RELEASE.patch new file mode 100644 index 0000000..ade2ec0 Binary files /dev/null and b/resources/patch/iBEC.n49ap.RELEASE.patch differ diff --git a/resources/patch/iBEC.n78ap.RELEASE.patch b/resources/patch/iBEC.n78ap.RELEASE.patch new file mode 100644 index 0000000..4ae9378 Binary files /dev/null and b/resources/patch/iBEC.n78ap.RELEASE.patch differ diff --git a/resources/patch/iBEC.n90ap.RELEASE.patch b/resources/patch/iBEC.n90ap.RELEASE.patch new file mode 100644 index 0000000..5bae5b6 Binary files /dev/null and b/resources/patch/iBEC.n90ap.RELEASE.patch differ diff --git a/resources/patch/iBEC.n90bap.RELEASE.patch b/resources/patch/iBEC.n90bap.RELEASE.patch new file mode 100644 index 0000000..c56face Binary files /dev/null and b/resources/patch/iBEC.n90bap.RELEASE.patch differ diff --git a/resources/patch/iBEC.n92ap.RELEASE.patch b/resources/patch/iBEC.n92ap.RELEASE.patch new file mode 100644 index 0000000..e83fd00 Binary files /dev/null and b/resources/patch/iBEC.n92ap.RELEASE.patch differ diff --git a/resources/patch/iBEC.n94ap.RELEASE.patch b/resources/patch/iBEC.n94ap.RELEASE.patch new file mode 100644 index 0000000..0179cb7 Binary files /dev/null and b/resources/patch/iBEC.n94ap.RELEASE.patch differ diff --git a/resources/patch/iBEC.p101ap.RELEASE.patch b/resources/patch/iBEC.p101ap.RELEASE.patch new file mode 100644 index 0000000..927cddd Binary files /dev/null and b/resources/patch/iBEC.p101ap.RELEASE.patch differ diff --git a/resources/patch/iBEC.p102.RELEASE.patch b/resources/patch/iBEC.p102.RELEASE.patch new file mode 100644 index 0000000..0725e12 Binary files /dev/null and b/resources/patch/iBEC.p102.RELEASE.patch differ diff --git a/resources/patch/iBEC.p103ap.RELEASE.patch b/resources/patch/iBEC.p103ap.RELEASE.patch new file mode 100644 index 0000000..927cddd Binary files /dev/null and b/resources/patch/iBEC.p103ap.RELEASE.patch differ diff --git a/resources/patch/iBEC.p105ap.RELEASE.patch b/resources/patch/iBEC.p105ap.RELEASE.patch new file mode 100644 index 0000000..c42b7f9 Binary files /dev/null and b/resources/patch/iBEC.p105ap.RELEASE.patch differ diff --git a/resources/patch/iBEC.p106.RELEASE.patch b/resources/patch/iBEC.p106.RELEASE.patch new file mode 100644 index 0000000..5925cbc Binary files /dev/null and b/resources/patch/iBEC.p106.RELEASE.patch differ diff --git a/resources/patch/iBEC.p107.RELEASE.patch b/resources/patch/iBEC.p107.RELEASE.patch new file mode 100644 index 0000000..5925cbc Binary files /dev/null and b/resources/patch/iBEC.p107.RELEASE.patch differ diff --git a/resources/patch/iBSS.j1ap.RELEASE.patch b/resources/patch/iBSS.j1ap.RELEASE.patch new file mode 100644 index 0000000..6124cba Binary files /dev/null and b/resources/patch/iBSS.j1ap.RELEASE.patch differ diff --git a/resources/patch/iBSS.j2.RELEASE.patch b/resources/patch/iBSS.j2.RELEASE.patch new file mode 100644 index 0000000..2ca5bbe Binary files /dev/null and b/resources/patch/iBSS.j2.RELEASE.patch differ diff --git a/resources/patch/iBSS.j2a.RELEASE.patch b/resources/patch/iBSS.j2a.RELEASE.patch new file mode 100644 index 0000000..8fe960c Binary files /dev/null and b/resources/patch/iBSS.j2a.RELEASE.patch differ diff --git a/resources/patch/iBSS.k93.RELEASE.patch b/resources/patch/iBSS.k93.RELEASE.patch new file mode 100644 index 0000000..9460aa4 Binary files /dev/null and b/resources/patch/iBSS.k93.RELEASE.patch differ diff --git a/resources/patch/iBSS.k93a.RELEASE.patch b/resources/patch/iBSS.k93a.RELEASE.patch new file mode 100644 index 0000000..cc43f29 Binary files /dev/null and b/resources/patch/iBSS.k93a.RELEASE.patch differ diff --git a/resources/patch/iBSS.k94.RELEASE.patch b/resources/patch/iBSS.k94.RELEASE.patch new file mode 100644 index 0000000..2cead10 Binary files /dev/null and b/resources/patch/iBSS.k94.RELEASE.patch differ diff --git a/resources/patch/iBSS.k95.RELEASE.patch b/resources/patch/iBSS.k95.RELEASE.patch new file mode 100644 index 0000000..dea2e9b Binary files /dev/null and b/resources/patch/iBSS.k95.RELEASE.patch differ diff --git a/resources/patch/iBSS.n41.RELEASE.patch b/resources/patch/iBSS.n41.RELEASE.patch new file mode 100644 index 0000000..3bbfcf8 Binary files /dev/null and b/resources/patch/iBSS.n41.RELEASE.patch differ diff --git a/resources/patch/iBSS.n42.RELEASE.patch b/resources/patch/iBSS.n42.RELEASE.patch new file mode 100644 index 0000000..b39c05a Binary files /dev/null and b/resources/patch/iBSS.n42.RELEASE.patch differ diff --git a/resources/patch/iBSS.n48.RELEASE.patch b/resources/patch/iBSS.n48.RELEASE.patch new file mode 100644 index 0000000..fcbc80f Binary files /dev/null and b/resources/patch/iBSS.n48.RELEASE.patch differ diff --git a/resources/patch/iBSS.n49.RELEASE.patch b/resources/patch/iBSS.n49.RELEASE.patch new file mode 100644 index 0000000..8db9773 Binary files /dev/null and b/resources/patch/iBSS.n49.RELEASE.patch differ diff --git a/resources/patch/iBSS.n78ap.RELEASE.patch b/resources/patch/iBSS.n78ap.RELEASE.patch new file mode 100644 index 0000000..d3784ab Binary files /dev/null and b/resources/patch/iBSS.n78ap.RELEASE.patch differ diff --git a/resources/patch/iBSS.n90ap.RELEASE.patch b/resources/patch/iBSS.n90ap.RELEASE.patch new file mode 100644 index 0000000..695e195 Binary files /dev/null and b/resources/patch/iBSS.n90ap.RELEASE.patch differ diff --git a/resources/patch/iBSS.n92ap.RELEASE.patch b/resources/patch/iBSS.n92ap.RELEASE.patch new file mode 100644 index 0000000..66ffb61 Binary files /dev/null and b/resources/patch/iBSS.n92ap.RELEASE.patch differ diff --git a/resources/patch/kernelcache.release.n72.patch b/resources/patch/kernelcache.release.n72.patch new file mode 100644 index 0000000..167e2bc Binary files /dev/null and b/resources/patch/kernelcache.release.n72.patch differ diff --git a/restore.sh b/restore.sh index 5e33755..c1292fc 100755 --- a/restore.sh +++ b/restore.sh @@ -1125,21 +1125,28 @@ patch_ibss() { local build_id case $device_type in iPad1,1 | iPod3,1 ) build_id="9B206";; - iPhone5,[34] ) build_id="11D257";; - * ) build_id="10B329";; + iPhone2,1 | iPod4,1 ) build_id="10B500";; + iPad3,1 | iPhone3,[123] ) build_id="11D257";; + iPod5,1 ) build_id="10B329";; + * ) build_id="12H321";; esac if [[ -n $device_ramdisk_build ]]; then build_id="$device_ramdisk_build" fi download_comp $build_id iBSS log "Patching iBSS..." - device_fw_key_check temp $build_id - local iv=$(echo $device_fw_key_temp | $jq -j '.keys[] | select(.image | startswith("iBSS")) | .iv') - local key=$(echo $device_fw_key_temp | $jq -j '.keys[] | select(.image | startswith("iBSS")) | .key') - "$dir/xpwntool" iBSS iBSS.dec -iv $iv -k $key -decrypt - "$dir/xpwntool" iBSS.dec iBSS.raw - "$dir/iBoot32Patcher" iBSS.raw iBSS.patched --rsa - "$dir/xpwntool" iBSS.patched pwnediBSS -t iBSS.dec + if [[ $build_id == "9B206" || $build_id == "10B500" || + $device_type == "iPhone3,2" || -n $device_ramdisk_build ]]; then + device_fw_key_check temp $build_id + local iv=$(echo $device_fw_key_temp | $jq -j '.keys[] | select(.image | startswith("iBSS")) | .iv') + local key=$(echo $device_fw_key_temp | $jq -j '.keys[] | select(.image | startswith("iBSS")) | .key') + "$dir/xpwntool" iBSS iBSS.dec -iv $iv -k $key -decrypt + "$dir/xpwntool" iBSS.dec iBSS.raw + "$dir/iBoot32Patcher" iBSS.raw iBSS.patched --rsa + "$dir/xpwntool" iBSS.patched pwnediBSS -t iBSS.dec + else + $bspatch iBSS pwnediBSS "../resources/patch/$download_targetfile.patch" + fi cp pwnediBSS ../saved/$device_type/ log "Pwned iBSS saved at: saved/$device_type/pwnediBSS" } @@ -1148,9 +1155,22 @@ patch_ibec() { # creates file pwnediBEC to be sent to device for blob dumping local build_id case $device_type in - iPad1,1 | iPod3,1 ) build_id="9B206";; - iPhone5,[34] ) build_id="11D257";; - * ) build_id="10B329";; + iPad1,1 | iPod3,1 ) + build_id="9B206";; + iPhone2,1 | iPod4,1 ) + build_id="10B500";; + iPad2,[145] | iPad3,[346] | iPhone4,1 | iPhone5,[12] | iPod5,1 ) + build_id="10B329";; + iPad2,2 | iPhone3,[123] ) + build_id="11D257";; + iPad2,[367] | iPad3,[25] ) + build_id="12H321";; + iPad3,1 ) + build_id="10B146";; + iPhone5,3 ) + build_id="11B511";; + iPhone5,4 ) + build_id="11B651";; esac if [[ -n $device_ramdisk_build ]]; then build_id="$device_ramdisk_build" @@ -1169,7 +1189,12 @@ patch_ibec() { "$dir/xpwntool" $name.orig $name.dec -iv $iv -k $key -decrypt "$dir/xpwntool" $name.dec $name.raw log "Patching iBEC..." - "$dir/iBoot32Patcher" $name.raw $name.patched --rsa --debug --ticket -b "rd=md0 -v amfi=0xff cs_enforcement_disable=1" -c "go" $address + if [[ $build_id == "9B206" || $build_id == "10B500" || + $device_type == "iPhone3,2" || -n $device_ramdisk_build ]]; then + "$dir/iBoot32Patcher" $name.raw $name.patched --rsa --debug --ticket -b "rd=md0 -v amfi=0xff cs_enforcement_disable=1" -c "go" $address + else + $bspatch $name.raw $name.patched "../resources/patch/$download_targetfile.patch" + fi "$dir/xpwntool" $name.patched pwnediBEC -t $name.dec rm $name.dec $name.orig $name.raw $name.patched cp pwnediBEC ../saved/$device_type/