-
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
qemu-arm segment fault #6
Comments
Hi lometsj, A .bin file should be a plain memory dump and therefore not executable at all. Executable ELF files, that can be run with qemu-arm should have the memory extension .exe . If you work on your own, it is quite likely, that you will run into segfaults quite often in the beginning (e.g. due to a missing segment) therefore gdb and your favorite sre tools are your friends. Frankenstein can only assist reverse-engineering but it cannot replace it. We use unicorn in the web-UI as it can give you deep insights into the execution (code path, including memory access) however this is of course very slow in comparison to plain qemu-arm. This is just another option you have. if you have further questions feel free to ask. |
thanks for response,
i had learned a little about reverse and debug with gdb.
|
No worries :D Uhm that's odd.. I've tested the latest commit on freshly installed Ubuntu 20.04 and it seems to work. Can you give more details on your particular setup? E.g. what operating system you are using? The output of In your gdb output are x86 registers (rax, rbx, etc.), so it looks as if you are debugging the qemu process and not the application. This is only helpful if you expect a bug in qemu. You might want to debug the emulated application (e.g. ARM code) instead. This can be done by spawning a gdb server in qemu using :
Then you can attach gdb-multiarch to the server. Your plain gdb will most likely not work, as it usually only has support for your native architecture. This is where gdb-multiarch comes in handy as it has support for many architectures.
Could you provide a gdb output using those commands? |
thanks whatever, |
@lometsj @bolek42 Hi, I ran into the same issue and I don't know what went wrong. Could you guys help me?
With gdb command
I have the following output
The output of
Building environment
Highly appreciated!!! |
@RayCxggg Did you get to the bottom of this one. I have the same issue. |
@the-moog Yes, I figured it out. It is the qemu-arm version issue. The firmware doesn't work with the latest qemu. Try uninstall qemu and install older version with apt. |
Ahh interesting, thanks. Your issue was 2-3 years ago. Not sure what version to try. What version did you roll back to? Is there a bug open with qemu devs? |
@the-moog It is actually not a QEMU bug, but poor compatibility of frankenstein. I believe the working QEMU version should be the latest one when frankenstein was published, which is around 2018 (You should go check the paper). The latest QEMU version is 7.x.x, and the working one should be around 4.x.x. |
Thanks @RayCxggg Thanks for the hint, it may provide clues. I will go take a look at versions about that time. |
Hi, i just try to use qemu-arm to run excute.bin like:
and qemu terminated with segment fault
is it normal?
how can i emulate firmware after patch?
i notice that on webui it emulate by using unicorn.
im confused about it.
how can i run the emulation environment
The text was updated successfully, but these errors were encountered: