Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symbols look broken on macOS arm64 13.2.1 (22D68) #54

Open
ViRb3 opened this issue Mar 10, 2023 · 3 comments
Open

Symbols look broken on macOS arm64 13.2.1 (22D68) #54

ViRb3 opened this issue Mar 10, 2023 · 3 comments

Comments

@ViRb3
Copy link

ViRb3 commented Mar 10, 2023

Describe the bug

The symbols for many functions seem wrong:

Screenshot 2023-03-10 at 00 55 50

To Reproduce

I don't know if this use case is supported, but on M1 (arm64) macOS 13.2.1, the shared cache is located under:

  • /System/Volumes/Preboot/Cryptexes/OS/System/Library/dyld/

Full list:

aot_shared_cache.0
aot_shared_cache.1
aot_shared_cache.2
aot_shared_cache.3
aot_shared_cache.4
dyld_shared_cache_arm64e
dyld_shared_cache_arm64e.01
dyld_shared_cache_arm64e.map
dyld_shared_cache_x86_64
dyld_shared_cache_x86_64.01
dyld_shared_cache_x86_64.02
dyld_shared_cache_x86_64.03
dyld_shared_cache_x86_64.04
dyld_shared_cache_x86_64.map

So, I tried to extract CloudKit using:

dyldex -e "cloudkit" /System/Volumes/Preboot/Cryptexes/OS/System/Library/dyld/dyld_shared_cache_arm64e

It gave me a symbols error:

[  ERROR  ] linkedit_optimizer.py:271 : Symbols Cache doesn't contain local symbols.

But I guess that's expected, since there is no .symbols file. The binary is extracted anyway. I then load it into IDA, and see the output above. Apart from the symbols, everything else looks good.

@arandomdev
Copy link
Owner

You are correct about the local symbols. They don't seem to be present in the image as well. As for the incorrect symbols, I'm kinda at a lost because the string with "See header comments", corresponds to a CFString used for logging. It might be an issue with IDA, but I'm not sure as I don't have a copy.

Lastly, while extraction succeeds for arm64e, it is heavily broken without better metadata support.

@torarnv
Copy link

torarnv commented Sep 25, 2023

I can reproduce the broken selectors with loading the extracted binaries into both Hopper and Binary Ninja, so I believe there's something broken on the DyldExtractor side.

This is extracting the 13.6 /System/Volumes/Preboot/Cryptexes/OS/System/Library/dyld/dyld_shared_cache_arm64e

@fabianfreyer
Copy link
Contributor

Can also confirm this with the 14.1.2 dyld_shared_cache_arm64e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants