A repository where I dump my iOS app hacking notes📚 - Recommended for beginners
- Jailbreak
- SSH Setup
- Frida Setup
- Objection Setup
- Installing Application from Untrusted Source
- Basic iOS Security Testing
- Traffic Analysis iOS
- Local Storage Analysis
- Dumping Secrets From Keychain
- Authorization Vulnerability
- Insecure Loggin
- Sensitive Data in Pasteboard
- Webview XSS
- Decrypting iOS app Downloaded from App Store
- Jailbreak Protection Bypass Using Objection
Jailbreak iphone Device - use checkra1n Check if you're able to open Cydia : if yes then congrats device is jailbroken.😉
Install below tweak packages from Cydia store:
- OpenSSH - System & Phone
- SSL Kill Switch 2 - Phone
- Flex 3 - Phone
- Darwin CC tools - Phone
- Filza file manager - Phone
- Frida - System & Phone
- Objection - System
Open ssh in sytem terminal enter your device ip like ssh root@wifiip >> Use default password : alpine
Install frida on to iphone and system both : add sourcer https://build.froda.re
Run frida-ps -Uai
: to list all the packages installed on device
objection --gadget “app_package_name_here” explore
: it’ll open hooked application
- Add apple account to Xcode
- create a sample project and generate provisioning profile.
- Install sample application
- Now the provisioning certificate is generated for sample project that tell that app can be installed in a particular device
- now to locate provisioning profile nevigate to project directory > Products > file.app > show in finder > embedded.mobileprovision
- Copy the same file and paste in folder where untrusted application is stored.
- Install applesign using >>
npm install -g applesign
command - List out available signing identities using
applesign -L
command you will get result like : 0349B1F2DB9E7E1437607230BDE43775BDB78403 - Run:
applesign -i 0349B1F2DB9E7E1437607230BDE43775BDB78403 app.ipa -m embedded.mobileprovision
to sign app. - You’ll get another signed build of the application
- Now again go to window and device simulator select new build to install in device.
Configure proxy with burp suite and install SSL kill switch 2
- perform all the actions available in app
- login through SSH in iOS
cd /var/mobile/Containers/Data/Application/
list all the UUIDs availablefind -type d -name cst.package
you’ll get the location of application directory- Explore local storage
- get files in local system using sftp >> sftp root@iphone_wifi >> alpine default password and then
get /filepath/hello.db
it will pull file in local - basic SQlite3 command
sqlite3 hello.db
>> .tables >>select * from tablename ;
- get Shell to device and create a dir
/tmp/keychain
- through sftp
put keychain_dumper /tmp/keychain
- run
./keychain_dumper > keychain.txt
and put password in device it will give text file - Put keychain.txt file to computer and see into vim.
- Stop the and reopen the app if its not closing session (it means session is stored locally somewhere)
- go to localstorage and pull the file search for tokens
- use
objection --gadget "cst.app" explore
- Try to attack token
- go to the xcode
- navigate to window > device and simulators > open console > then start activities to see logs
- Open objection
objection —-gadget com.package.name explore
- type objection terminal
ios pasteboard monitor
>> copy anything
- Capture the request and manipulate content related to HTML
Whenever we download iOS app from apple store that are by default encrypted (not everything) we can decrypt the classes and read the functions & logics etc.
- Download https://github.com/AloneMonkey/frida-ios-dump
- edit dump.py and add your iphone ssh credentials.
- Check the package name which you wanted to decrypt.
- Run command
python3 dump.py com.package_name
- You’ll get decrypted .ipa file.
objection --gadget "com.package.name" explore -s "ios jailbreak disable"
objection --gadget "com.package.name" explore
ios jailbreak disable