[HELP] How to apply VM Markers in C++ [DLL]

Post here messages if you have any problems with working of Enigma Protector
Post Reply
richardyusan
Posts: 3
Joined: Sun Mar 20, 2011 1:38 am

[HELP] How to apply VM Markers in C++ [DLL]

Post by richardyusan »

hey, i am very happy using Enigma Protector :D
but i have a few question :

1. How to apply VM Markes in C++ ? i want to protect my DLL

Code: Select all

void Test();
{
(VM MARKER BEGIN)
MessageBox(0,"Hello Word !","Test", MB_OK);
(VM MARKER END)
}
2. If i apply VM Marker to specific location, the string in that location will be obfucated ?

Create sample code with C + + is a lot for users who use C + + also can use the enigma with the optimal :shock:
Enigma
Site Admin
Posts: 2946
Joined: Wed Aug 20, 2008 2:24 pm

Re: [HELP] How to apply VM Markers in C++ [DLL]

Post by Enigma »

Hi richardyusan,

Surely, it is possible to use any kind of markers in C++ (both x86 and x64)!

There is no example of exactly VM marker, but there are many examples of other markers. Look at the folder:
\The Enigma Protector\Examples\MarkersRegCrypt\Simple\Vc\
there is example of RegCrypt marker, so VM marker you can use the same way.

You may use the markers in DLL files, there is no any problem or limitation.

It is a very good idea to use VM Marker to protect the code of your application. I recommend to use as many VM Markers as possible. Be only sure that large amount of these markers do not slow down working of the protected file.

Regarding string obfuscating - no, there is virtualizing only the code between marker. To protect the string I recommend to use EP_ProtectedString Enigma API!
richardyusan
Posts: 3
Joined: Sun Mar 20, 2011 1:38 am

Re: [HELP] How to apply VM Markers in C++ [DLL]

Post by richardyusan »

ok, now i can place vm marker in my dll, but the string still viewable, in olldbg string is not viewable ^^, i try scan with cheat engine and the string is viewable >.<.....
now,, my question, help me to protect the string

Code: Select all

void Password()
{
if(Input = "blablabla")
{
   MessageBox(0,"Correct Password !","Info",0);
}
else
{
   MessageBox(0,"Wrong Password !","Info",0);
}
}
in this case, i want to protect string named "blablabla"...
please help :mrgreen:
Enigma
Site Admin
Posts: 2946
Joined: Wed Aug 20, 2008 2:24 pm

Re: [HELP] How to apply VM Markers in C++ [DLL]

Post by Enigma »

To protect string, simply add this string in PROTECTION FEATURES - Protected String, and then, in the code of your dll, extract this string by means Enigma API - EP_ProtectedStringByID or EP_ProtectedStringByKey, that will hide your strings.

Let me know if you have any problems!
richardyusan
Posts: 3
Joined: Sun Mar 20, 2011 1:38 am

Re: [HELP] How to apply VM Markers in C++ [DLL]

Post by richardyusan »

i dont know to start begin coding , because no example for c++........
scorillo7
Posts: 90
Joined: Mon May 11, 2009 11:16 am

Re: [HELP] How to apply VM Markers in C++ [DLL]

Post by scorillo7 »

richardyusan wrote:i dont know to start begin coding , because no example for c++........
Hi richardyusan,
is not so hard,i understand that you are a novice programmer,let's ask Vladimir to show an example about C++,so in the meantime (even i donot know the c++)
i try to explain the logic about string protection.

Code: Select all

void Password()
{
if(Input = "[b]blablabla[/b]")
{
   MessageBox(0,"Correct Password !","Info",0);
}
else
{
   MessageBox(0,"Wrong Password !","Info",0);
}
}
open Enigma->PROTECTION FEATURES->Protected Strings
If you want to protect the "blablabla"
Click ADD and fill the field String Data with blablabla click Ok
Your string can be pulled now from ID or the key (note that Id and key are filled in Enigma with some data)

EP_ProtectedStringByID function returns protected strings. See also Protection Features - Protected Strings.

Parameters
ID - ID of protected string - integer value.
Buffer - pointer to the buffer for protected string. If this parameter is NULL function returns necessary size of buffer.
Len - size of the Buffer for protected string.
Return Value
The function returns size of buffer for protected string or 0 if function fails.

Remark
The function fails in the following cases:

there is no protected string with required ID;
application is not protected.
Definition

by id extern "C" __declspec( dllimport ) __stdcall int EP_ProtectedStringByID( int Total, char* Left, int Len);

Parameters
Key - pointer to the null terminated string that contain a key of protected string.
Buffer - pointer to the buffer for protected string. If this parameter is NULL function returns necessary size of buffer.
Len - size of the Buffer for protected string.
Return Value
The function returns size of buffer for protected string or 0 if function fails.

Remark
The function fails in the following cases:

there is no protected string with required Key;
application is not protected.


by key extern "C" __declspec( dllimport ) __stdcall int EP_ProtectedStringByKey( char* Key, char* Left, int Len);



inside aplication you must call the ID or Key
Enigma
Site Admin
Posts: 2946
Joined: Wed Aug 20, 2008 2:24 pm

Re: [HELP] How to apply VM Markers in C++ [DLL]

Post by Enigma »

thanks scorillo7, you are right!

Just to append your idea, there is approximate code of how to get protected string:

Code: Select all

#include "../../../EnigmaSDK/VC/enigma_ide.h"
#pragma comment (lib,"../../../EnigmaSDK/VC/enigma_ide.lib")

void test() 
{
	char str[255];
	if (EP_ProtectedStringByID(1, &str, sizeof(str) > 0)
	{
		MessageBox(0, &str, 'Test', 0);
	}
}
Post Reply