I use Enigma Protector since some years, mostly to use the VirtualBox + basic Encryption through the GUI.
Now i have some important code in my software, which I need to protect in a stronger way.
I saw that Enigma has markers for execution inside of the VM and SDK (ex. EP_ProtectedStringByKey)
I have got some questions about this stuff:
First of all:
Do I need to use the #include stuff or can I simply create a define like the following, without any security issues (it works, but could there be any problems):
Code: Select all
#define ENIGMA_VM_START \
__asm _emit 0xEB \
__asm _emit 0x08 \
__asm _emit 0x56 \
__asm _emit 0x4D \
__asm _emit 0x42 \
__asm _emit 0x45 \
__asm _emit 0x47 \
__asm _emit 0x49 \
__asm _emit 0x4E \
__asm _emit 0x31
#define ENIGMA_VM_END \
__asm _emit 0xEB \
__asm _emit 0x08 \
__asm _emit 0x56 \
__asm _emit 0x4D \
__asm _emit 0x45 \
__asm _emit 0x4E \
__asm _emit 0x44 \
__asm _emit 0x31 \
__asm _emit 0x00 \
__asm _emit 0x00
Code: Select all
char ret[255];
ENIGMA_VM_START; // #include "EnigmaSDK/vm_risc_begin.inc"
EP_ProtectedStringByKey("KEY", &ret[0], sizeof(ret));
ENIGMA_VM_END; // #include "EnigmaSDK/vm_risc_end.inc"
std::string IDKJustSomething(ret);
Is it ok/right to call a method which also runs in the VM through a method that runs in the VM (it works, but could there be any problems)?
Code: Select all
void BLA::Test2(std::string * ret)
{
ENIGMA_VM_START; // #include "EnigmaSDK/vm_risc_begin.inc"
char test[299];
EP_ProtectedStringByKey("KEY", &test[0], sizeof(test));
ret->append(test);
ENIGMA_VM_END; // #include "EnigmaSDK/vm_risc_end.inc"
}
void BLA::Test(std::string * ret)
{
ENIGMA_VM_START; // #include "EnigmaSDK/vm_risc_begin.inc"
char test[299];
EP_ProtectedStringByKey("KEY", &test[0], sizeof(test));
Test2(ret); // runs in the VM too
ENIGMA_VM_END; // #include "EnigmaSDK/vm_risc_end.inc"
}