Skip to content
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

Cannot run movcc compiled files #26

Closed
hrkrx opened this issue Jan 24, 2018 · 3 comments
Closed

Cannot run movcc compiled files #26

hrkrx opened this issue Jan 24, 2018 · 3 comments

Comments

@hrkrx
Copy link

hrkrx commented Jan 24, 2018

i managed to compile a simple HelloWorld program with movcc.

#include <stdio.h>

int main()
{
    printf("Hello World");
    return 0;
}

when i compile it with gcc it just works, but when using movcc i get the following error:

bash: ./program: cannot execute binary file: Exec format error

i checked the format of both files, which are indeed different:

gcc produces an elf64-x86-64 binary

movcc produces an elf32-i386 binary

i tried to pass "-m elf_x86_64" with -Wl but then i get another error:

/usr/bin/ld: Incompatible /mnt/d/TMP/C/git/movfuscator/build//gcc/32/libgcc.a skipped search of -lgcc

What am i doing wrong?

@Alexeyan
Copy link

movcc only compiles to 32 bit elfs. You seem to have a 64 bit host.
In order to run the produced file you need to fix some things. Look here for further information.

https://askubuntu.com/questions/454253/how-to-run-32-bit-app-in-ubuntu-64-bit

@fionafibration
Copy link

This does not fix the issue for me, could it be that MOVfuscator is attempting to link to 64-bit shared libraries? @xoreaxeaxeax should take a look at this.

@fionafibration
Copy link

fionafibration commented Apr 16, 2019

Ah, I have discovered the cause of my issue. Windows Subsystem for Linux only allows emulation of 64-bit ELFs for the kernel, not 32-bits. Apparently 32-bit support is not planned. After patching the fixes in #31 and moving to a Kali Linux computer, movcc compiles C files properly.

@hrkrx hrkrx closed this as completed Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants