-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some errors in cfg recovery #22
Comments
Hi, Thanks for the _helper bug, it is supposed to be fixed now by commit 599ff0d. The inherited _helper attribute from block was indeed missing in func init. I will check further when several calls to getcfg() give different results and include this in the test cases and examples to be released soon (2.4.2 awaiting). Regarding you question on memory rwx flags: yes MemoryMap.perm was planned as a way to map a range of addresses to a rwx permission info that could be used in MemoryMap.read, MemoryMap.write, and CoreExec.read_instruction methods. |
Awesome, thanks. CFG recovery is definitely hard, but for most of my purposes lsweep is great. The reason I ask about PLT entries is I'm interested in pulling xrefs out with amoco. My current plan was to augment the elf loader so that the various call locations would be able to figure out what they were calling by passing the info up from the imports to the PLT. Is there a better way to do this? And thanks! I'll definitely play around with adding perms to MemoryMap. I've noticed another issue with x64 semantics, and was wondering the best way to solve it. The top 32 bits aren't being cleared when 32 bit registers are used. For example:
Should be 'rbp <- { | [0:64]->0x0 | }'. I figured out how to modify the semantics of xor to make this correct, but was wondering if there was a better way to do this? It applies to any usage of the 32bit general purpose registers. Sorry about all the questions. Thanks again for the cool software! |
about x64 semantics: about PLT refs: |
The x64 semantics should be better now thanks to commit 6b3757b, let me know if its ok. |
Awesome, thanks for the PLT info. Will look into that too. x64 semantics stuff looks good in my small test cases. Will let you know if I find any other issues. Thanks for the fast reply, much appreciated! |
Hello,
First, amoco seems really cool. Thanks!
I have an issue, and a question
Issue:
cfg recovery seems to be a bit broken currently. I have a simple 'puts("hello world")' elf which I am using for testing. the
lsweep
method recovers most of the basic blocks, as expect however others don't seem to get past the first basic block:Furthermore, some methods error:
Although interestingly, running it again does not error, it still doesn't recovery the cfg:
(I've also noticed running other cfg recoveries twice gives different results the second time)
I think this these errors stem from certain function calls not getting resolved properly, but I'm not sure:
Im happy to provide the binaries, and/or any other info that would be helpful. I spent some time looking around trying to solve it, but am still wrapping my head around how everything is set up.
Question:
Im interested in tagging the memory sections with their flags (i.e read, write execute). I originally hacked it onto 'mo', before I noticed that MemoryMap has an unused 'perm' attribute. Is this the correct spot to store that info?
Alternatively, the info is stored in p.bin.Phdr. Would it be cleaner to just query that?
Thanks!
The text was updated successfully, but these errors were encountered: