6

This is similar in nature to this question and this question; I'm interested in what compiler settings to enabled/disable to make a Visual C++ harder to reverse engineer.

Here's a few compiler flags I've already got which I believe should be set:
/Ox Full optimization. This appears to be the equivalent of gcc's -O3
/Oy Omit frame pointers. (x86 only)
/GR- Disable Run Time Type Information
/MT flag is used to static link the various libraries.

Visibility - I don't think the MSVC compiler has any options to turn off visibility like -fvisibility=hidden offered in gcc, but is this necessary for MSVC since the debugging symbols are stored in the PDB file?

Are there any other things I should include to ensure minimal information is distrubuted in the application?

(I might add that I am creating a standalone executable)

  • 2
    In MSVC the visibility is hidden by default - you have to explicitly export symbols you want to be accessible. – Igor Skochinsky Jun 16 '13 at 16:15
4

You should disable /DEBUG (linker option), which is enabled by default even for Release configurations.

Note that although certain compiler/linker options will make reverse engineering your software slightly more difficult, they won't have much of an effect regarding overall reversability.

3

Apart from the compiler, because they dont have remedy for RE security. You can use obfuscation and anti debugger tricks. If you want there are lots of good packer, use them

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.