question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unsupported flag action ROL

See original GitHub issue

I was testing the following assembly code compiled with fasm.

format PE

entry start

section '.text' code readable executable

start:
    mov ecx, 10

next:
    rol eax, 1
    loop next

check:
    cmp eax, 0xDEADC0DE
    jz success

failure:
    xor eax, eax
    ret

success:
    mov eax, 1
    ret

Basically, I want to find the initial value of eax such that after 10 rol eax, 1 operations its value would be 0xDEADC0DE. (The answer is 0x37B7AB70)

The disassembly of the code looks like this: bb

and the script is as follows.

#!/usr/bin/python

import angr

def main():
    proj = angr.Project('test.exe')

    initial_state = proj.factory.blank_state(addr=0x401000)
    r_eax = initial_state.se.BVS('eax', 32)
    initial_state.regs.eax = r_eax

    pg = proj.factory.path_group(initial_state, immutable=False)

    pg.explore(find=0x401013, avoid=0x401010)
    found_state = pg.found[0].state

    print found_state.se.any_int(r_eax)

if __name__ == '__main__':
    main()

However on running I am getting the following error

WARNING | 2016-03-22 20:38:46,984 | cle.pe | The PE module is not well-supported. Good luck!
ERROR   | 2016-03-22 20:38:47,076 | simuvex.vex.ccall | Unsupported flag action ROL

Is the rol instruction unsupported ?

(The binary is provided for reference: https://drive.google.com/open?id=0B4nawd5TCX1cakhaLTROMW5XdXM)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
ltfishcommented, Mar 22, 2016

The problem is that having a conditional jump following an ROL operation is not supported by angr right now. It shouldn’t be difficult to add the support, we just need someone to write the code (~10 lines) in simuvex/s_ccall.py. That’s why I @zardus before, since he has a much better idea of those code than me.

0reactions
extremecoders-recommented, Mar 29, 2016

Closing this issue as it has been fixed with simuvex commit e56ba15

Read more comments on GitHub >

github_iconTop Results From Across the Web

Suspension of Favorable Personnel Actions (Flag)
Personnel Actions (Flag)) for code W suspension of favorable personnel actions (Headquarters Department of the Army involuntary separation ...
Read more >
You are using an unsupported command-line flag
I keep getting the following message in a mustard coloured box under the URL when I open Chrome. 'You are using an unsupported...
Read more >
Preview mode has unexpected message in the information ...
Shows this message in a information bar: You are using an unsupported command-line flag: --enable-blink-features=DocumentTransition. Stability ...
Read more >
Troubleshooting IAM roles - AWS Documentation - Amazon.com
Diagnose and fix issues that you might encounter when working with IAM roles.
Read more >
Using ARIA: Roles, states, and properties - MDN Web Docs
Authors must assign an ARIA role and the appropriate states and properties to an element during its life-cycle, unless the element already has ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found