ptoomey3 / Keychain-Dumper

A tool to check which keychain items are available to an attacker once an iOS device has been jailbroken
BSD 3-Clause "New" or "Revised" License
1.35k stars 299 forks source link

Hello, what's the cause of this error #53

Open BHW911 opened 4 years ago

BHW911 commented 4 years ago

dyld: Symbol not found: _objc_opt_new Referenced from: /bin/keychain_dumper (which was built for iOS 13.5) Expected in: dyld shared cache in /bin/keychain_dumper Abort trap: 6

ptoomey3 commented 4 years ago

Were you running this on a jailbroken device?

suryadina commented 4 years ago

Hi. I also experience the same issue, tried to run in on iOS 12.4.7 jailbroken iphone 6 plus using checkrain.

ptoomey3 commented 4 years ago

I no longer have any actual devices to test with, so am relying purely on folks to test for me after I rebuild as new PRs are merged. https://github.com/ptoomey3/Keychain-Dumper/issues/52 implies it is working on iOS 13, so maybe this is an incompatibility when building using current tooling. I doubt I'l be to support iOS releases that are incompatible with whatever is built by default using the current tooling. If you figure out how to make a build that is compatible with iOS 12 I'd be happy to incorporate that into the build process.

sweetMegan commented 4 years ago

I found this error cause by build on iPhoneOS13.5.sdk but when I try to change to iPhoneOS12.2.sdk,I found this error how can I fix it

ld: warning: object file (main.o) was built for newer iOS version (13.5) than being linked (12.2) Undefined symbols for architecture arm64: "_objc_opt_new", referenced from: _main in main.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Bi3g0 commented 4 years ago

I also encountered the same problem, my phone model is iphone 6 and systeme version is 12.4.3. Has anyone solved this problem? image

Greenwolf commented 4 years ago

Same issue on a 5s running 12.4.3 with CheckRa1n:

iPhone:~ root# ./keychain_dumper 
dyld: Symbol not found: _objc_opt_new
  Referenced from: /private/var/root/./keychain_dumper (which was built for iOS 13.5)
  Expected in: /usr/lib/libobjc.A.dylib
 in /private/var/root/./keychain_dumper
Abort trap: 6
madaoCN commented 4 years ago

I got the same error on iphone6 12.4.5 :

dyld: Symbol not found: _objc_opt_new
  Referenced from: /usr/bin/keychain_dumper (which was built for iOS 13.5)
  Expected in: /usr/lib/libobjc.A.dylib
 in /usr/bin/keychain_dumper
Abort trap: 6
ptoomey3 commented 4 years ago

It seems there is definitely an incompatibility for iOS 12. If anyone here can get it building and running on that release I can incorporate a separate build for those devices.

tarbaII commented 4 years ago

@ptoomey3 I found a fix for this. I downloaded Xcode 10.0 and recompiled it with the iOS 12.0 SDK. Works perfectly on my iOS 12.4.8 device. @sweetMegan The "built for newer iOS version (13.5) than being linked (12.2)" error was caused by previously compiling it with a newer SDK and then trying again with an older one. This can be fixed by simply deleting main.o. I have the binary compiled with the iOS 12.0 SDK hosted at this URL.

Greenwolf commented 4 years ago

@ptoomey3 it would be great if you could replicate and add to the main project, so we have a fully trusted one in the official repo. No offence to @alyxferrari intended, thank you so much for solving! 👍

ptoomey3 commented 4 years ago

I'll take a look at this next week. Thanks!

ptoomey3 commented 4 years ago

Can folks here try out the binary release in https://github.com/ptoomey3/Keychain-Dumper/releases/tag/1.0.0. I built that using Xcode 10.3 for the iOS 12.4 SDK.

tarbaII commented 4 years ago

Sure. I've got an iOS 12.4.8 device and an iOS 13.5.1 device that I'll test it on. I'll let you know how it goes by around 3:30 or 4 PM EST.

tarbaII commented 4 years ago

@ptoomey3 I've got the results for the iOS 13.5.1 device, but I'm still waiting for my iOS 12 device to charge. I got it to dump my internet keychain items, but my generic keychain items failed saying I should unlock my device. My device was unlocked throughout this whole process and I authenticated with Touch ID when prompted. Here's what I did:

$ scp keychain_dumper root@192.168.1.151:/private/var/mobile/keychain_dumper
$ scp updateEntitlements.sh root@192.168.1.151:/private/var/mobile/updateEntitlements.sh
$ scp setup_on_iOS.sh root@192.168.1.151:/private/var/mobile/setup_on_iOS.sh
$ ssh root@192.168.1.151
Alyxs-iPhone-7:~ root# cd /User
Alyxs-iPhone-7:/User root# chmod +x keychain_dumper
Alyxs-iPhone-7:/User root# chmod +x updateEntitlements.sh
Alyxs-iPhone-7:/User root# chmod +x setup_on_iOS.sh
Alyxs-iPhone-7:/User root# ./keychain_dumper -e > ent.xml
Alyxs-iPhone-7:/User root# cp ent.xml /usr/bin/ent.xml
Alyxs-iPhone-7:/User root# ./setup_on_iOS.sh
*successful output*
Alyxs-iPhone-7:/User root# ./updateEntitlements.sh
*successful output*
Alyxs-iPhone-7:/User root# ./keychain_dumper
[INFO] No Generic Password Keychain items found.
[HINT] You should unlock your device!
*This is not keychain_dumper output:* My Internet passcodes were dumped successfully, but I'm not including it in this log obviously haha.
Alyxs-iPhone-7:/User root# exit

If there's something I did wrong with the helper scripts, please let me know. If you think the issue isn't with me, please feel free to ask whatever information you need. I'll be more than happy to help you with anything pertaining to this, I've used keychain_dumper extensively for the past couple months, and I'd love to give whatever I can back to the project.

As I said above, I'll get back to you with the iOS 12 output, although I'm confident that that will work because I've gotten it to work with my own self-built Xcode 10.0 binary on iOS 12 before.

sohotz commented 4 years ago

这个错误就是编译代码的时候,工程配置里支持设备的版本太高了,Target Device改低点,就好了。project setting -> General -> Target Device 9.0

mailinglists35 commented 3 years ago

Can folks here try out the binary release in https://github.com/ptoomey3/Keychain-Dumper/releases/tag/1.0.0. I built that using Xcode 10.3 for the iOS 12.4 SDK.

works okay on phone se ios 12.4, but on iphone 8 ios 13.5.1 does not see the generic passwords

[INFO] No Generic Password Keychain items found.
[HINT] You should unlock your device!
raulsiles commented 2 years ago

See issue #68.