Question

What I am trying to do seems simple comparing to complicated code static analysis work

  1. finding all the assign code, and insert a new code snippet based on the value used in the assign code to update certain memory
  2. finding all the basic control block, assign a unique id to each block, and insert a new code snippet based on the id to update certain memory

Currently I have the source code, so I don't need to deal with binary:)

But I am newly in this area and I am wondering if I need something like Perl script to analyse by hand..? Could any body give me some instructions about how to get this job done..?

Thanks a lot!

Was it helpful?

Solution

Maybe dynamic injection is easier in this case. Check pintool (http://software.intel.com/en-us/articles/pin-a-dynamic-binary-instrumentation-tool). As far as I remember it allows tracing of memory operations (assignment is just on of the cases) and likely allows identification of basic blocks, but I am not sure, I have not done this kind of task with pin.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top