Cython DLLs and VMProtect

Issues related to VMProtect
Post Reply
svirac
Posts: 2
Joined: Mon Jun 23, 2014 11:46 am

Cython DLLs and VMProtect

Post by svirac »

Hello,

I was wondering how and if would vmprotecting cython dlls work.
Regular python files are translated to c and then compiled into regular PE DLLs.
As far as I can see from the demo version of VMProtect, this does work as expected.

There is one thing that I'm wondering though, and it would mean a lot to me.
Can I use licensing on those DLLs to? And if so, how do i test that with
the demo version?

What I got so far was to protect one procedure in the dll via virtualization
and make it require a serial key for licencing. The only problem is that I have
no idea how to actually enter the serial key. I understand that if it was a regular DLL
I could call VMProtectGetSerialNumberData() on the file and then check the serial
but in this case , where my DLL contains no VMProtect code (that is, it's just protected by
the standalone application, doesn't have any protections built in), when the dll is loaded, it
just says something along the lines of "valid serial key required" without any chance of actually
selecting the file. Is there any way around this, or thats the way it is?
Admin
Site Admin
Posts: 2566
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: Cython DLLs and VMProtect

Post by Admin »

We have never checked our product with Cython applications. Anyway you can check it yourself :))
Before your checking I recommend you to read help about the licensing system:
http://vmpsoft.com/vmprotect/user-manua ... ing-system
And try to implement it into your application:
http://vmpsoft.com/vmprotect/user-manua ... pplication
Also you can try examples from "%VMProtect%/Examples/Licensing" directory.
svirac
Posts: 2
Joined: Mon Jun 23, 2014 11:46 am

Re: Cython DLLs and VMProtect

Post by svirac »

Thanks for your reply.

I did go trough the examples, to get to know how
this all works.

But, since my application is developed in python
and I'd like, if possible, to avoid modifying the python code,
I wondered what happens when I just pack/protect the
already compiled DLL.

Here's how it goes. I have an example.pyx.
Using cython, this pyx file is translated into example.c (a plain C file).
Then example.c is compiled (via mingv gcc or whatever) into a example.pyd
file which is actually just a regular PE dll that can be imported as a python module

Now, I've downloaded a demo version of VMProtect.
I load my example.pyd DLL into it (it only has two exported procedures) and
chose to protect one of those. I select the compilation type to be virtualization
and set "Lock to serial number" to yes.

On the licenses tab I create the licence key and compile the project.

Everything seems to work so far. Now, if i try to load this compiled DLL
it will, as expected, fail saying that the serial key is needed.
Now, what I don't understand is how to actually enter the serial key?
Can it be done this way , or my application would have to explicitly
read the serial key from somewhere by itself ?

BTW, if i leave the "Lock to serial number" set to no, the procedure is protected
and still works in my case, to theres that, good job :)
Admin
Site Admin
Posts: 2566
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: Cython DLLs and VMProtect

Post by Admin »

Unfortunately setup "Lock to serial number" is not enough for licensing system usage. Before execution of a locked function you need to send a serial number into licensing system.
Post Reply