C/C++ Obfuscator - Introduction and key concepts

Table of contents

Key facts about C/C++ Obfuscator

  • It never overwrites input files.
  • It has both GUI and command line interfaces. GUI uses command line interface under the hood, but GUI adds some handy tools, so GUI interface is more powerfull and feature-rich and is more recommended to use.

    It's really greatly recommended to use GUI interface to set up the project. Later you can export scripts (or .bat files for Windows) that allow you to build/rebuild/clean your project from command line - they are called buildscripts.

    And if you insist on never using GUI interface (it's very bad idea!) you can still generate command line using GUI on your computer (go to Tools ⇒ Command line builder) or online command line builder available on our site.

  • Trial version can perform only one kind of transformation for symbol names - by prepending string ReplacementFor_ to them. This does not limit your ability to evaluate C/C++ Obfuscator in any way! The trial version does allow you to fully evaluate C/C++ Obfuscator and prepare your project for obfuscation using only trial edition.

    Just imagine that instead of ReplacmentFor_someFunction you'll get z78a4b2e. Those symbols that got prefix with trial version will become something unreadable when protected by non-trial. It's easier to prepare project for obfuscation using this kind of replacement (when some prefix is prepended), so it's called a debug mode. Using debug mode is recommended when using non-trial version of the product too! - as it allows to understand what's going on much easier (you'll get errors looking like "unknown symbol ReplacementFor_someFunction" instead of "unknown symbol z72a63be9f" - the former is much more readable when debugging!).

    Once you created a project, prepared it for protection using trial, you can purchase non-trial, just open that project in non-trial edition, click Build ⇒ Rebuild all and you'll get your project fully protected. So you won't loose any time spent evaluating trial edition.

  • Default settings and values of parameters are safe and reasonable.
  • Obfuscation of the project is not as quick as zipping the folder with source code - you have to confiure your project (by listing names that should not be modified, called exceptions) . So be ready to spend from hours to days before you get protected version of your code that works correctly after obfuscation.

Key concept: exceptions - names of symbols that should not be modified

The purpose of C/C++ Obfuscator is to replace symbols with meaningless names. Apparently, not all symbols can be changed without introducing errors. For example, names of macros that you pass via compiler's command line can not be changed. Names of such symbols should be added to the list of exceptions - so obfuscator does not change them adding symbols to exceptions .

Symbols defined in 3rd-party libraries

If your code calls some functions from 3rd-party libraries available to you only in binary form , you have to list all symbols that you use from those libraries as exceptions adding symbols to exceptions .

C/C++ Obfuscator ships with a lot of tools that help generating exceptions for 3rd-party libraries extacting list of symbols .

Exporting symbols to 3rd parties

If your code is in fact a library that you sell or distribute, then you have to list as exceptions all symbols defining its API adding symbols to exceptions . Use tools shipped with C/C++ Obfuscator to generate exceptions for API of your library extacting list of symbols

Steps for obfuscating the project with C/C++ Obfuscator

Step 1: collect set of exceptions for your code

A lot of tools for this are shipped with C/C++ Obfuscator extacting list of symbols

Step 2: process your code using lite protection and test it

With lite protection, names of symbols that are to be made unreadable, will just get ReplacementFor_ prefix. This will result in error messages looking like "Undefined function ReplacementFor_SomeFunctionName" when you'll try to compile or run your code - it will clearly indicate that symbol SomeFunctionName should be added to the list of exceptions (see more on what exceptions are here).

Proceed to next step only if your protected code works fine.

Step 3: process your code using non-lite protection and test it

After switching protection mode to non-lite, your code should work exactly as when protected by lite protection. Note that trial version of C/C++ Obfuscator can perform only one kind of transformation for symbol names - by prepending prefix ReplacementFor_ to them. This does not limit your ability to evaluate C/C++ Obfuscator in any way as mangling integers and strings in non-lite mode is the same for both trial and non-trial, so once you tested your code protected with trial in non-lite mode, you will need only minimal testing of code once upgrading trial into non-trial of C/C++ Obfuscator.