Page 1 of 1

Using VMProtect in C# DllExport

Posted: Sat Jun 04, 2022 10:18 am
by MaxCDN
I'm currently using https://github.com/3F/DllExport to compile C# into a DLL and export functions for use by other applications.

When I try to protect the compiled DLL with VMProtect, other programs cannot use this VMProtect protected DLL normally (eg. C# System.AccessViolationException)

I don't know how to fix this, I need help

Re: Using VMProtect in C# DllExport

Posted: Sun Jun 05, 2022 7:21 pm
by Admin
You have to switch off the packing feature.

Re: Using VMProtect in C# DllExport

Posted: Tue Jun 07, 2022 1:43 pm
by MaxCDN
it looks like the source code can be viewed directly by dnSpy as long as I turn off the Packing feature.

Re: Using VMProtect in C# DllExport

Posted: Tue Jun 07, 2022 2:45 pm
by Admin
It seems you don't know how to use our software properly. The packing feature doesn't protect anything!

Re: Using VMProtect in C# DllExport

Posted: Tue Jun 07, 2022 5:01 pm
by MaxCDN
Oh, shit. I manually added the VMProtect.BeginUltra flag to the function to be protected and it worked, although dnSpy can still view the source code directly, but it's very hard to read (I can't read it)

It seems my previous usage has been wrong, I didn't use VMProtect SDK to mark functions before, I simply used VMProtect to package the output file

Sorry for the delay, our problem has been solved

Re: Using VMProtect in C# DllExport

Posted: Tue Jun 07, 2022 5:48 pm
by Admin
We recommend to use [Obfuscation(Feature = "ultra", Exclude = false)] instead of VMProtect.BeginUltra.

Re: Using VMProtect in C# DllExport

Posted: Sat Jun 11, 2022 5:07 am
by MaxCDN
Thanks for the tip !

However, we have chosen to use VMProtect.BeginUltra

Our obfuscator removes the System.Reflection.Obfuscation flag

Re: Using VMProtect in C# DllExport

Posted: Sat Jun 11, 2022 5:39 am
by Admin
Don't use other obfusactor/protector before VMProtect.