How to obfuscate code with the SDK
How to build and use the SDK
The path to the SDK source code and msvc-project is as follows:
Configuring the SDK is very simple. You can export the VxLang API as follows.
extern "C"
void VxVirtualizationBegin() {
return;
}
extern "C"
void VxVirtualizationEnd() {
return;
}
//
extern "C"
void VxDualModeBegin() {
return;
}
extern "C"
void VxDualModeEnd() {
return;
}
//
extern "C"
void VxObfuscationBegin() {
return;
}
extern "C"
void VxObfuscationEnd() {
return;
}
//
extern "C"
void VxCodeFlatteningBegin() {
return;
}
extern "C"
void VxCodeFlatteningEnd() {
return;
}
These functions are defined by the following macros:
#define VL_OBFUSCATION_BEGIN VxObfuscationBegin()
#define VL_OBFUSCATION_END VxObfuscationEnd()
#define VL_CODE_FLATTENING_BEGIN VxCodeFlatteningBegin()
#define VL_CODE_FLATTENING_END VxCodeFlatteningEnd()
#define VL_VIRTUALIZATION_BEGIN VxVirtualizationBegin()
#define VL_VIRTUALIZATION_END VxVirtualizationEnd()
#define VL_DUAL_MODE_BEGIN VxDualModeBegin()
#define VL_DUAL_MODE_END VxDualModeEnd()
By applying this macro, you can protect your code like this:
void test() {
VL_OBFUSCATION_BEGIN;
printf("Hello Wolrd ! \n");
VL_OBFUSCATION_END;
return;
}
How to check for obfuscation
To check if your code is obfuscated, you can use --disable-core
.
TIP
vxlang.exe ${Your-Binary} –disable-core
When you issue this command, VxLang only performs obfuscation behavior, and does not perform VxLang core estimation and packing behavior.
The changed example is shown below: