xoreaxeaxeax / movfuscator

The single instruction C compiler
Other
9.53k stars 398 forks source link

Obfuscate an assembly program? #21

Closed ghost closed 6 years ago

ghost commented 6 years ago

I would like to obfuscate a x86 assembly program (preferably a fully-static ELF executable, but a x86 assembly file could maybe also work) by converting the full x86 instruction set into only mov instructions. Is this possible?

The reason why I want to do this is because I don't want to be limited to C. It is very easy to build fully-static Linux binaries in Rust (using the x86_64-unknown-linux-musl rustc compiler target for musl libc linking) and it would be great if I could apply the movfuscator on a program originally written in Rust.

If nothing like this is supported, how difficult would it possibly be to implement? I haven't looked at the movfuscator source code ...

xoreaxeaxeax commented 6 years ago

You might check https://github.com/xoreaxeaxeax/movfuscator/blob/master/README.md#other-source-languages for ideas on how to combine the tool with other languages. There is currently no support for translating from x86; with the complexity of the x86 instruction set, and the general challenges of binary translation, implementing such a translator would be an enormous task (without an intermediate language, an order of magnitude more work than the current M/o/Vfuscator).