Code Monkey home page Code Monkey logo

saddam1999 / iphone-baseband-memory-decryptor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from letsunlockiphone/iphone-baseband-memory-decryptor

0.0 0.0 0.0 226 KB

When testing a network code key, the baseband firmware reads the encryptedSignature, calculates the deviceKey and the nckKey from the entered NCK, decrypts the encryptedSignature with the nckKey using TEA, decrypts it once more with the public RSA key and verifies the signature with the SHA1 hashes of the chipID / norID.

Home Page: http://dogber1.blogspot.com/2010/06/how-to-protect-better-apple-iphone.html

C 73.32% Python 26.68%

iphone-baseband-memory-decryptor's Introduction

iPhone Baseband Decryptor

When testing a network code key, the baseband firmware reads the encryptedSignature, calculates the deviceKey and the nckKey from the entered NCK, decrypts the encryptedSignature with the nckKey using TEA, decrypts it once more with the public RSA key and verifies the signature with the SHA1 hashes of the chipID / norID.

Two identification numbers unique to each device are generated from the NOR flash and baseband CPU serials: the norID and the chipID, 8 respectively 12 bytes in size. The device-specific deviceKey is generated from truncating a SHA1 hash of the concatenated and padded norID and chipID. A supposedly random NCK (Ônetwork control keyÕ) is SHA1-hashed. With the hashed NCK and the norID and chipID, the second key nckKey is generated. The hashing algorithm uses Tiny Encryption Algorithm (TEA). The nckKey is also device-specific since both the norID and chipIDare used. A device-specific RSA signature is generated: two SHA1 hashes are generated from the norID and chipID. The status that the lock has after the correct NCK has been entered is also embedded into this message. The PCKS 1.5 format is used to pad the hashes and the status from (2*160+32) bit to 2048 bit (256 byte). The asymmetric RSA algorithm is used for the encryption of the unlock signature. Keep in mind that the algorithm uses two different keys: a private key for encryption and a public key for decryption. With the private RSA key, the signature is encrypted and stored in protected memory. This signature is encrypted with TEA once again using the device-specific deviceKey in CBC mode.

This script will extract all tokens, required to have memory dumped into binary file.

Here is Dev-team NOR Dumper implementation/ http://www.letsunlockiphone.com/dump-iphone-baseband-nor-memory-nordumper/

Sample of using this script:

http://www.letsunlockiphone.com/dump-iphone-baseband-nor-memory-nordumper/

Big thanks to @Dogbert for awesome script. http://dogber1.blogspot.com

iphone-baseband-memory-decryptor's People

Contributors

letsunlockiphone avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.