angr/simuvex

What's the best approach for analysing the VEX IR?

Closed this issue · 2 comments

Hi all,
my idea is to create a new plugin in order to perform an analysis on the VEX IR. Suppose I have already generated the path I need and now I "just" need to analyse the VEX IR code. Is create a new plugin the best approach or should I create a new analysis for that?

Thanks

If you have already generated the path, and you need only the IRSBs to analyze, the easiest thing would probably be to do the following:

def iterate_irsbs(path):
    for addr in path.addr_trace:
        if not path._project.is_hooked(addr):
            yield path._project.factory.block(addr)

You can use it like for irsb in iterate_irsbs(path): and it will iterate over each irsb the path has encountered. This will not worked if you've added zero-length hooks.

thanks @rhelmot I'll do in that way