binaryninja-api icon indicating copy to clipboard operation
binaryninja-api copied to clipboard

Detecting pointer to C strings in the data section

Open uniquadev opened this issue 9 months ago • 8 comments

What is the feature you'd like to have? Auto C string detection when pointer to string is found.

Imagine the following pseudo structure

static const Func[] libs_funcs = {
 {"print", &print_func},
 {"measure2", &measure_2}
};

By searching for measure2 in the strings view, you will notice that no cross-references to it are present, even if there is a pointer to it in the .rdata section. This results in having to manually create a C string to make the xref appear. Typically, we don't have the address of the structure, and if the xref was present, it would be much easier to look it up.

Are any alternative solutions acceptable? A simple plugin could solve this issue but I belive this must be a core feature. The solution would be to consider making a reference or directly make the C string during auto analysis.

Additional Information: binaryninja_NhS63nnRpC binaryninja_Rr3DFnn6XX Now reference appear binaryninja_s4FhsRdNbf Expected result through auto analysis image

uniquadev avatar May 17 '24 21:05 uniquadev