I want to obfuscate a C++ application using movfuscator, but movfuscator currently uses C as the source language and not C++.

I tried to do the followings (as they recommended, but with no success):

# Compile c++ to llvm bytecode
clang++ -S -emit-llvm -o bytecode.ll $1 

# Convert bytecode to C
llc -march=c -o code.c bytecode.ll

# 'fix' static inline. This is a workaround for a bug
# in one of the parsers, I think.
sed -i 's/static inline.*//' code.c

# hack
sed -i 's/extern unsigned char \*__dso_handle;/unsigned char \*__dso_handle=0;/' code.c

# Compile the resulting C as usual (but with the c++ stdlib)
movcc code.c -lstdc++

What is the "secure" way of obfuscating C++ with movfuscator?

  • 1
    What do you mean by "secure way"? And in what way did that technique not work? – forest Sep 11 '18 at 8:52
  • to ensure that movfuscator did its job and I know that there is no security in obfuscation (but will make some things harder) – Lucian Nitescu Sep 11 '18 at 8:57
  • I don't think movfuscator, as it is currently, is particularly good at obfuscation. It's likely possible to rather easily revert it back to regular assembly. It was made just for fun, not to be a serious obfuscation tool. – forest Sep 11 '18 at 8:58
  • @forest fun is what I am looking for :)) – Lucian Nitescu Sep 11 '18 at 9:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.