rizin icon indicating copy to clipboard operation
rizin copied to clipboard

Parse `__cstring` section in Mach-O files

Open Rot127 opened this issue 3 months ago • 0 comments

Is your feature request related to a problem? Please describe.

Mach-O files can encode String in UTF-8/ASCII and UTF-16 (host endianness). The strings are in the __cstring section as NSConstantString nodes.

Currently the strings are just guessed but could simply be parsed.

Describe the solution you'd like

Parse NSConstantString nodes in Mach-O files.

Describe alternatives you've considered

None

Additional context

https://stackoverflow.com/questions/4320458/what-encoding-do-strings-found-in-the-mach-o-data-segment-cfstring-section https://stackoverflow.com/questions/2888758/how-does-mach-o-loader-loads-different-nsstring-objects

Rot127 avatar Sep 25 '25 11:09 Rot127