-
Notifications
You must be signed in to change notification settings - Fork 45
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
Non-existent labels added during reassembly #3
Comments
This is because you are using reassembler on binaries compiled with libc, and the public version of reassembler and compilerex does not have a good support of those. We will release quite a few updates of reassembler, patcherex and compilerex after next week, which essentially address many issues, including this one. PS: now every time I'm using the reassembler, I have to check out some old branches of angr, patcherex, and compilerex... |
As for now, a temporary workaround is to manually remove unnecessary functions like |
Thanks @ltfish! I tried your suggested workaround, invoking
If the updates you plan to push are functionally equivalent to your workaround, then it seems that the extra |
I believe |
Are any new releases ready? Even if they aren't perfect to fix this? |
Hello! Is there any potential update for this? I believe this is exactly the same issue that I am having. Upon doing some more debugging, I have narrowed down the problem potentially to the assemble.sh
incorrectly linking and loading the library, which is where all of those "undefined" references come from? It seems like compile.sh has both ELF and CGC compilation method as shown below
do we need to do a similar thing for assembling as well? Thank you for any update. |
This issue has been marked as |
This issue has been closed due to inactivity. |
Using the reassembler backend with 0 patches (i.e. try to just generate a new binary from the old one with no modifications), the temporary .s file that's generated by patcherex refers to labels that are not defined, usually "label_0". I've used the reassembler backend in the way described in the README example.
The test program is a simple 64-bit ELF binary, the result of a C program compiled with gcc on 64-bit Linux. I attached the C source, binary, and resulting temporary assembly* that patcherex generates. This is not limited to this binary, but missing labels are in every executable that I've tried (all 64-bit ELF).
The * is that the temporary .s file has one immediate value manually changed (at 0x400439, from 0xfffffff0 to 0xfffffffffffffff0), in order to have the assembler (clang, the one used by the assemble script in compilerex -- though the same behaviour is seen for other assemblers) not complain (related to #2).
I believe the label_XX labels are inserted by patcherex (or a submodule like compilerex), and shouldn't need to be linked from any library, but label_0 doesn't appear anywhere.
print.zip
The text was updated successfully, but these errors were encountered: