This tool can decrypt encrypted CoreML models in apps.
This tool is not static, so it's required to run the app, but in exchange you don't need to use mremap_encrypted yourself, so you can run it on any MacOS version.
Note that decrypting depends on particular versions of Apple's frameworks. Current code is tested on iOS 15.8.3.
This tool can also decompile compiled CoreML models.
From .mlmodelc to .mlpackage or .mlmodel.
- Install frida on device: https://frida.re/docs/ios
- Install frida on pc:
pip install frida-tools - Run:
npm install - Run:
python3.12 -m venv .venv - Run:
source .venv/bin/activate - Run:
pip install -r requirements.txt - Run:
npm run watch - Rename
agent/dynamic.example.tstodynamic.tsand edit it - Run:
frida -U -f <app bundle id> -l _agent.js
- Run:
python -m src.main path/to/model.mlmodelc mlpackage|mlmodel