Giter Site home page Giter Site logo

aeota's Introduction

aeota

AEA OTA/IPSW decryption

Grabbing keys with get_key.py

Gets a key from an AEA (non OTA; for OTAs, use the key that is provided with your response, as they generally do not have embedded auth data).

pip3 install -r requirements.txt
python3 get_key.py <path to AEA>

Note: it is highly recommended to use a virtual environment:

python3 -m venv .env  # only needed once
source .env/bin/activate
pip3 install -r requirements.txt  # only needed once
python3 get_key.py <path to AEA>

Decrypting an AEA

aea decrypt -i <path to AEA> -o <decrypted output file> -key-value 'base64:<key in base64>'

For IPSWs, you will get the unwrapped file (ie. 090-34187-052.dmg.aea will decrypt to 090-34187-052.dmg).

For assets, you will get specially crafted AppleArchives (see next section).

Extracting assets

Assets (including OTA updates) are constructed specially and cannot be extracted with standard (aa) tooling. They can be decrypted normally, which will result in an AppleArchive that is not extractable with aa (we will call these "asset archives"). aastuff must be used to extract them.

# Decrypt if necessary
aea decrypt -i <path to AEA> -o <decrypted asset archive> -key-value 'base64:<key in base64>'
./aastuff -i <decrypted asset archive> -o <output folder>

aastuff can also handle asset archives that are not already decrypted:

./aastuff -i <path to AEA> -o <output folder> -k <key in base64>

Run ./aastuff -h for full usage information.

Note

aastuff_standalone has more features, including file listings and selective extraction. Run ./aastuff_standalone -h for full usage information.

Notes

aastuff uses AAAssetExtractor, functions from libAppleArchive in order to extract asset archives. However, it is a pretty barren API and does not offer things like selective extraction.

aastuff_standalone uses (mostly) standard libAppleArchive functions to extract asset archives. It offers things such as file listings and selective extraction, but is not fully validated against all possible asset archives.

For now, both are built and used in the same way. Once aastuff_standalone is fully functional and validated, aastuff will be deprecated.

Related Projects

Credits

  • Siguza - auth data parsing strategy, AppleArchive extraction sample code
  • Nicolas - original HPKE code
  • Snoolie - auth data parsing strategy
  • Flagers - AppleArchive assistance

aeota's People

Contributors

dhinakg avatar

Stargazers

p2p avatar Praveen Nair avatar JOUET Romain avatar Timothy Sutton avatar  avatar YanalAlAmer avatar Amachi avatar 4vil4ric avatar Jack Salzman avatar Mosaab_ avatar Ninja blevins avatar reza.duty avatar Adam McNight avatar Lixiangyin avatar HaeImAlan avatar Patrice Blin avatar Hades avatar  avatar Daniel avatar Code.m avatar  avatar  avatar Itay R avatar Bill Sun avatar Toffee avatar  avatar jingfu ran avatar Emilio P Egido avatar PMheart avatar QuanTrieuPCYT avatar 扶摇skyrocketing avatar  avatar Adrian avatar Leo Wu avatar Jérôme Morissard avatar Phil avatar  avatar Jacob Clayden avatar Nicola avatar Emma avatar Lucas Nascimento avatar  avatar ellie is not coding in the slightest avatar Tao Wei avatar  avatar antx avatar  avatar Xingwei Lin avatar Nick avatar Fahmi Fisal avatar Hanqing Zhao avatar Alexey Terentev avatar TTMedia Services Inc. avatar L0RDX33 avatar George Christian Cotea avatar Larson T. avatar Darshil Patel avatar  avatar sudo pacman -Syu avatar alu avatar J.Pagano avatar Blue DeviL avatar Jack Black avatar BawAppie avatar  avatar cranci avatar Computahwiz avatar Lukas MAUFFRÉ avatar HackSmith avatar und3fined avatar Gunseung Jin avatar Foster Snowhill avatar Denis avatar Felipe Kellermann avatar Mickey Jin avatar  avatar Yoshihiro avatar mex avatar boy1337 avatar Thatchapon Unprasert avatar  avatar Zhazha_JiaYiZhen avatar Matt Robinson avatar Orochi avatar  avatar Proteas avatar みぞれ゚ avatar John Davis avatar  avatar Néstor avatar Heroman Zhang avatar  avatar Jevin Sweval avatar ghh-jb avatar  avatar zx avatar Ramadhan Amizudin avatar Kevin avatar Vojtěch Jungmann avatar Andrew McElroy avatar

Watchers

Lucian avatar Jevin Sweval avatar Beau avatar  avatar boy1337 avatar  avatar  avatar  avatar

aeota's Issues

Getting error

I am getting this error when using this tool,
Error parsing key
Error loading credentials

Am i doing something wrong?

Screenshot 2024-06-11 at 10 49 29 AM

Releases

Need to check when AAAssetExtractor* was added

invalid syntax

python get_key.py /Users/wesker/Downloads/iPhone16,1_18.0_22A5282m_Restore/090-29322-049.dmg.aea
File "get_key.py", line 30
print(f"Expected 12 bytes, got {len(header)}")
^

getting this error
please fix that
Screenshot 2024-06-12 at 15 08 43

Cant build

?@MacBook-Pro-? aeota % sudo make
Password:
clang++ -framework Foundation -fmodules -fobjc-arc -L. -lAppleArchive -g aastuff.m -o aastuff
2024-06-12 17:07:17.416 xcodebuild[4913:131848] [MT] DVTSDK: Skipped SDK /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk; its version (9.3) is below required minimum (15.2) for the iphoneos platform.
aastuff.m:46:84: warning: incompatible pointer types sending 'bool *' to parameter of type 'BOOL * _Nullable' (aka 'signed char *') [-Wincompatible-pointer-types]
        if (![[NSFileManager defaultManager] fileExistsAtPath:out_path isDirectory:&is_directory]) {
                                                                                   ^~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSFileManager.h:242:72: note: passing argument to parameter 'isDirectory' here
- (BOOL)fileExistsAtPath:(NSString *)path isDirectory:(nullable BOOL *)isDirectory;
                                                                       ^
1 warning generated.
Undefined symbols for architecture x86_64:
  "_AAAssetExtractorCreate", referenced from:
      _main in aastuff-d9de4d.o
  "_AAAssetExtractorDestroy", referenced from:
      _main in aastuff-d9de4d.o
  "_AAAssetExtractorWrite", referenced from:
      _main in aastuff-d9de4d.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [aastuff] Error 1
?@MacBook-Pro-? aeota % sudo make -v
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0

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.