|
#1
|
||||
|
||||
IDA can't properly deal with RUST strings
RUST strings are not zero-terminated, so there is no delimiter for two strings which are in a consecutive memory region.
RUST compiler/linker puts many constant strings in the ".rodata" segment. Currently IDA can't properly handle this. It needs to be updated, e.g. adding RUST compiler type(no stable ABI) and RUST string literal type. Or writing some plugins to do this.
__________________
AKA Solomon/blowfish. |
The Following User Says Thank You to WhoCares For This Useful Post: | ||
tonyweb (07-06-2021) |
#2
|
|||
|
|||
You can try with this Rust reversing helper
https://github.com/cha5126568/rust-reversing-helper |
The Following User Says Thank You to TQN For This Useful Post: | ||
tonyweb (07-07-2021) |
#3
|
||||
|
||||
thank u for the info.
This python script uses "idaapi.create_strlit(addr, len, get_inf_attr(INF_STRTYPE))" to create string literals. get_inf_attr(INF_STRTYPE) returns the current string literal type. But RUST string literal doesn't match any of the known string literal types of IDA. The string length is hard-coded in a MOV instruction, usually moved to a register like ESI.
__________________
AKA Solomon/blowfish. |
#4
|
|||
|
|||
Thanks WhoCares
IDA and create_strlit function can create a NON NULL Terminated string. The len parameter in create_strlit function specifies the length of the string, not necessary to include NULL char Best regards, |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Rust/WinRT Public Preview | WhoCares | General Discussion | 2 | 05-05-2020 03:22 |
Don't get Olly to work properly | squareD | General Discussion | 3 | 06-12-2006 01:31 |
IDA IDC-script: cannot shift right properly | amitophia | General Discussion | 2 | 03-28-2004 18:26 |
How to deal with threads ? | bcl25 | General Discussion | 4 | 03-29-2003 06:22 |