Skip to content
This repository has been archived by the owner on May 18, 2022. It is now read-only.

Predict branch taken given specific state and branch instruction? #31

Closed
Nixtron opened this issue Aug 2, 2016 · 2 comments
Closed

Comments

@Nixtron
Copy link

Nixtron commented Aug 2, 2016

If I have a x86-64 instruction and access to the actual cpu state[think debugger], can I use simuvex/angr to identify if the instruction changes the instruction pointer [i.e jump, ret, call etc], and what the next instruction will be?

Currently it seems like my main issue is to set all the necessary flags, for example the zero flag.

@rhelmot
Copy link
Member

rhelmot commented Aug 2, 2016

We're all very busy with the Cyber Grand Challenge right now, but if you
need to synchronize the simuvex state with a machine state with respect to
the processor flags, you can copy the value of EFLAGS to state.regs.cc_dep1
and copy simuvex.vex.ccall.data[self.state.arch.name]['OpTypes']['G_CC_OP_COPY']
to state.regs.cc_op.

On Mon, Aug 1, 2016 at 11:40 PM, Nixtron notifications@github.com wrote:

If I have a x86-64 instruction and access to the actual cpu state[think
debugger], can I use simuvex/angr to identify if the instruction changes
the instruction pointer [i.e jump, ret, call etc], and what the next
instruction will be?

Currently it seems like my main issue is to set all the necessary flags,
for example the zero flag.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#31, or mute the thread
https://github.com/notifications/unsubscribe-auth/ACYg9YM1bFfMBf2CSdJbdf475gXhLewnks5qbuZkgaJpZM4JaSjY
.

@Nixtron
Copy link
Author

Nixtron commented Aug 3, 2016

This works fine!
Thanks for the quick reply.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants