-
I would to preface with that I am still very much a novice in terms of using the BN API. So please forgive the misuse of terminology. It was the recommendation of @psifertex that I offer up my question to a Discussions thread. During the analysis of various binaries, I'm constantly finding myself hitting the dreaded MLIL operation MLIL_ADDRESS_OF. As an example, while tracing some variable it will enviably be passed by reference to a function. At which point my analysis technique breaks due to not being able to programmatically trace the variable being passed. Which is quite frustrating because I am not sure if my technique is flawed or if I don't understand the API well enough to overcome this issue. Doing a little bit of research, I see that @D0ntPanic says it was a design decision to have the (SSA) variables not included in uses/definitions ( #836 ) when a variable is being accessed by-reference. The explanation provided seems reasonable enough, but the problem still persist. To be clear, I am neither for or against the design decision. My intended purpose for this discussion is to understand the design decision and figure out how to solve this common issue. As stated above I am still a novice, so I apologize if there is already a solution implemented and I overlooked it. Somethings I have considered:
Hopefully I presented my question(s) clearly. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Just to clarify your use case: are you concerned with finding possible sites of the contents of the var being accessed, or are you interested in tracing where those references to the var spread? Once the address is taken, the 'version' of such a variable is tied to the active memory version. If you're just interesting in seeing where it could have been passed to you'd want to recursively follow the use chains for the results of the address taking expressions. |
Beta Was this translation helpful? Give feedback.
Just to clarify your use case: are you concerned with finding possible sites of the contents of the var being accessed, or are you interested in tracing where those references to the var spread?
Once the address is taken, the 'version' of such a variable is tied to the active memory version.
If you're just interesting in seeing where it could have been passed to you'd want to recursively follow the use chains for the results of the address taking expressions.