Virtualized .net framework exe cannot be run on Mono

Issues related to VMProtect
Post Reply
weloveayaka
Posts: 58
Joined: Wed Jul 05, 2023 6:21 am

Virtualized .net framework exe cannot be run on Mono

Post by weloveayaka »

Just a hello world program ( only one statement: Console.WriteLine("Hello World"); , compiled on windows, vs 2022, target .net framework 4.8.1)
VMProtect protected the program, selected three functions( ctor, Main, the string) and enable Virtualization level., VMProtect build 1754

Pack the output/Memory Protection/Import Protection/Resource Protection/Debugger Dectecion/Virtualize Tool Detection/Strip Debug information, all above was set to No.

failed to run on Mono 6.12.0 (MacOS)

Is this scenario not supported? (.net framework run on mono)
If so, only .net core app/.net 5+ app supported on Macos&Linux, am I right?

(mono xx.vmp.exe)

Code: Select all

Failed to run module constructor due to (null) assembly:/Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/4.5/mscorlib.dll type:TypeInitializationException member:(null)
Verbose Log (mono -v xx.vmp.exe)

Code: Select all

converting method (wrapper runtime-invoke) object <Module>:runtime_invoke_void__this___object (object,intptr,intptr,intptr)
Method (wrapper runtime-invoke) object <Module>:runtime_invoke_void__this___object (object,intptr,intptr,intptr) emitted at 0x109dc6bc0 to 0x109dc6d70 (code length 432) [h2.vmp.exe]
converting method (wrapper runtime-invoke) object object:runtime_invoke_void (object,intptr,intptr,intptr)
Method (wrapper runtime-invoke) object object:runtime_invoke_void (object,intptr,intptr,intptr) emitted at 0x109dc6d90 to 0x109dc6f08 (code length 376) [h2.vmp.exe]
converting method (wrapper alloc) object object:AllocSmall (intptr,intptr)
Method (wrapper alloc) object object:AllocSmall (intptr,intptr) emitted at 0x109dc6f30 to 0x109dc705b (code length 299) [h2.vmp.exe]
converting method void <Module>:.cctor ()
Method void <Module>:.cctor () emitted at 0x109dc7070 to 0x109dc70e8 (code length 120) [h2.vmp.exe]
converting method (wrapper runtime-invoke) object object:runtime_invoke_void (object,intptr,intptr,intptr)
Method (wrapper runtime-invoke) object object:runtime_invoke_void (object,intptr,intptr,intptr) emitted at 0x109dc7110 to 0x109dc7288 (code length 376) [h2.vmp.exe]
converting method void D5304C8A:.ctor ()
Method void D5304C8A:.ctor () emitted at 0x109e82000 to 0x109e91570 (code length 62832) [h2.vmp.exe]
converting method void D5304C8A:.cctor ()
Method void D5304C8A:.cctor () emitted at 0x109e915e0 to 0x109e916e2 (code length 258) [h2.vmp.exe]
converting method (wrapper runtime-invoke) object object:runtime_invoke_void (object,intptr,intptr,intptr)
Method (wrapper runtime-invoke) object object:runtime_invoke_void (object,intptr,intptr,intptr) emitted at 0x109e91730 to 0x109e918a8 (code length 376) [h2.vmp.exe]
converting method (wrapper alloc) object object:AllocVector (intptr,intptr)
Method (wrapper alloc) object object:AllocVector (intptr,intptr) emitted at 0x109e918d0 to 0x109e91aeb (code length 539) [h2.vmp.exe]
converting method (wrapper managed-to-native) System.Type System.Type:internal_from_handle (intptr)
Method (wrapper managed-to-native) System.Type System.Type:internal_from_handle (intptr) emitted at 0x109e91b40 to 0x109e91c3d (code length 253) [h2.vmp.exe]
converting method (wrapper managed-to-native) System.Reflection.RuntimeModule System.RuntimeTypeHandle:GetModule (System.RuntimeType)
Method (wrapper managed-to-native) System.Reflection.RuntimeModule System.RuntimeTypeHandle:GetModule (System.RuntimeType) emitted at 0x109e91c60 to 0x109e91d5d (code length 253) [h2.vmp.exe]
converting method void System.Collections.Generic.Dictionary`2<uint, object>:.ctor ()
Method void System.Collections.Generic.Dictionary`2<uint, object>:.ctor () emitted at 0x109e91d60 to 0x109e91da8 (code length 72) [h2.vmp.exe]
converting method void System.Collections.Generic.Dictionary`2<uint, object>:.ctor (int,System.Collections.Generic.IEqualityComparer`1<uint>)
Method void System.Collections.Generic.Dictionary`2<uint, object>:.ctor (int,System.Collections.Generic.IEqualityComparer`1<uint>) emitted at 0x109e91dc0 to 0x109e91ec8 (code length 264) [h2.vmp.exe]
converting method System.Collections.Generic.EqualityComparer`1<uint> System.Collections.Generic.EqualityComparer`1<uint>:CreateComparer ()
Method System.Collections.Generic.EqualityComparer`1<uint> System.Collections.Generic.EqualityComparer`1<uint>:CreateComparer () emitted at 0x109dc7630 to 0x109dc7b30 (code length 1280) [h2.vmp.exe]
converting method (wrapper managed-to-native) bool System.RuntimeTypeHandle:type_is_assignable_from (System.Type,System.Type)
Method (wrapper managed-to-native) bool System.RuntimeTypeHandle:type_is_assignable_from (System.Type,System.Type) emitted at 0x109dc7b30 to 0x109dc7c3d (code length 269) [h2.vmp.exe]
converting method (wrapper stelemref) void object:virt_stelemref_class_small_idepth (intptr,object)
Method (wrapper stelemref) void object:virt_stelemref_class_small_idepth (intptr,object) emitted at 0x109dc7c40 to 0x109dc7d58 (code length 280) [h2.vmp.exe]
converting method (wrapper managed-to-native) System.Type System.RuntimeType:MakeGenericType (System.Type,System.Type[])
Method (wrapper managed-to-native) System.Type System.RuntimeType:MakeGenericType (System.Type,System.Type[]) emitted at 0x109dc7d60 to 0x109dc7e6d (code length 269) [h2.vmp.exe]
converting method (wrapper stelemref) void object:virt_stelemref_sealed_class (intptr,object)
Method (wrapper stelemref) void object:virt_stelemref_sealed_class (intptr,object) emitted at 0x109dc7ea0 to 0x109dc7f90 (code length 240) [h2.vmp.exe]
converting method (wrapper managed-to-native) void object:__icall_wrapper_mono_generic_class_init (intptr)
Method (wrapper managed-to-native) void object:__icall_wrapper_mono_generic_class_init (intptr) emitted at 0x109dc7fa0 to 0x109dc8095 (code length 245) [h2.vmp.exe]
converting method (wrapper remoting-invoke-with-check) object object:MemberwiseClone ()
Method (wrapper remoting-invoke-with-check) object object:MemberwiseClone () emitted at 0x109dc8100 to 0x109dc81b1 (code length 177) [h2.vmp.exe]
converting method (wrapper managed-to-native) object object:MemberwiseClone (object)
Method (wrapper managed-to-native) object object:MemberwiseClone (object) emitted at 0x109dc81e0 to 0x109dc8313 (code length 307) [h2.vmp.exe]
converting method (wrapper managed-to-native) intptr System.RuntimeType:GetConstructors_native (System.RuntimeType,System.Reflection.BindingFlags)
Method (wrapper managed-to-native) intptr System.RuntimeType:GetConstructors_native (System.RuntimeType,System.Reflection.BindingFlags) emitted at 0x109dc8350 to 0x109dc848b (code length 315) [h2.vmp.exe]
converting method (wrapper managed-to-native) System.Reflection.MethodBase System.Reflection.RuntimeMethodInfo:GetMethodFromHandleInternalType_native (intptr,intptr,bool)
Method (wrapper managed-to-native) System.Reflection.MethodBase System.Reflection.RuntimeMethodInfo:GetMethodFromHandleInternalType_native (intptr,intptr,bool) emitted at 0x109dc84e0 to 0x109dc85ed (code length 269) [h2.vmp.exe]
converting method (wrapper managed-to-native) void Mono.RuntimeGPtrArrayHandle:GPtrArrayFree (Mono.RuntimeStructs/GPtrArray*)
Method (wrapper managed-to-native) void Mono.RuntimeGPtrArrayHandle:GPtrArrayFree (Mono.RuntimeStructs/GPtrArray*) emitted at 0x109dc8620 to 0x109dc8715 (code length 245) [h2.vmp.exe]
converting method (wrapper managed-to-native) System.Reflection.ParameterInfo[] System.Reflection.MonoMethodInfo:get_parameter_info (intptr,System.Reflection.MemberInfo)
Method (wrapper managed-to-native) System.Reflection.ParameterInfo[] System.Reflection.MonoMethodInfo:get_parameter_info (intptr,System.Reflection.MemberInfo) emitted at 0x109dc8780 to 0x109dc888d (code length 269) [h2.vmp.exe]
converting method (wrapper managed-to-native) object System.Reflection.RuntimeConstructorInfo:InternalInvoke (System.Reflection.RuntimeConstructorInfo,object,object[],System.Exception&)
Method (wrapper managed-to-native) object System.Reflection.RuntimeConstructorInfo:InternalInvoke (System.Reflection.RuntimeConstructorInfo,object,object[],System.Exception&) emitted at 0x109dc88b0 to 0x109dc8a50 (code length 416) [h2.vmp.exe]
converting method void System.Collections.Generic.GenericEqualityComparer`1<uint>:.ctor ()
Method void System.Collections.Generic.GenericEqualityComparer`1<uint>:.ctor () emitted at 0x109dc8a50 to 0x109dc8a59 (code length 9) [h2.vmp.exe]
converting method (wrapper runtime-invoke) object object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
Method (wrapper runtime-invoke) object object:runtime_invoke_void__this__ (object,intptr,intptr,intptr) emitted at 0x109dc8a60 to 0x109dc8be8 (code length 392) [h2.vmp.exe]
converting method (wrapper managed-to-native) bool System.RuntimeTypeHandle:HasInstantiation (System.RuntimeType)
Method (wrapper managed-to-native) bool System.RuntimeTypeHandle:HasInstantiation (System.RuntimeType) emitted at 0x109dc8c60 to 0x109dc8d65 (code length 261) [h2.vmp.exe]
converting method (wrapper managed-to-native) System.Reflection.TypeAttributes System.RuntimeTypeHandle:GetAttributes (System.RuntimeType)
Method (wrapper managed-to-native) System.Reflection.TypeAttributes System.RuntimeTypeHandle:GetAttributes (System.RuntimeType) emitted at 0x109dc8db0 to 0x109dc8ead (code length 253) [h2.vmp.exe]
converting method (wrapper managed-to-native) bool System.RuntimeTypeHandle:IsGenericVariable (System.RuntimeType)
Method (wrapper managed-to-native) bool System.RuntimeTypeHandle:IsGenericVariable (System.RuntimeType) emitted at 0x109dc8ec0 to 0x109dc8fc5 (code length 261) [h2.vmp.exe]
converting method (wrapper managed-to-native) System.RuntimeType System.RuntimeTypeHandle:GetBaseType (System.RuntimeType)
Method (wrapper managed-to-native) System.RuntimeType System.RuntimeTypeHandle:GetBaseType (System.RuntimeType) emitted at 0x109dc8fe0 to 0x109dc90dd (code length 253) [h2.vmp.exe]
converting method void System.Collections.Generic.Dictionary`2<uint, D5304C8A/CD100488>:.ctor ()
Method void System.Collections.Generic.Dictionary`2<uint, D5304C8A/CD100488>:.ctor () emitted at 0x109dc9100 to 0x109dc9148 (code length 72) [h2.vmp.exe]
converting method void System.Collections.Generic.Dictionary`2<uint, D5304C8A/CD100488>:.ctor (int,System.Collections.Generic.IEqualityComparer`1<uint>)
Method void System.Collections.Generic.Dictionary`2<uint, D5304C8A/CD100488>:.ctor (int,System.Collections.Generic.IEqualityComparer`1<uint>) emitted at 0x109dc9160 to 0x109dc9268 (code length 264) [h2.vmp.exe]
converting method void D5304C8A/2D9AFDA4:.ctor ()
Method void D5304C8A/2D9AFDA4:.ctor () emitted at 0x109dc9280 to 0x109dc9388 (code length 264) [h2.vmp.exe]
converting method void System.EmptyArray`1<int>:.cctor ()
Method void System.EmptyArray`1<int>:.cctor () emitted at 0x109dc93a0 to 0x109dc93d8 (code length 56) [h2.vmp.exe]
converting method void D5304C8A/A5BE08B0:.ctor ()
Method void D5304C8A/A5BE08B0:.ctor () emitted at 0x109dc93e0 to 0x109dc9452 (code length 114) [h2.vmp.exe]
converting method void D5304C8A/8AAC738B:.ctor ()
Method void D5304C8A/8AAC738B:.ctor () emitted at 0x109dc9460 to 0x109dc9568 (code length 264) [h2.vmp.exe]
converting method (wrapper runtime-invoke) object object:runtime_invoke_void (object,intptr,intptr,intptr)
Method (wrapper runtime-invoke) object object:runtime_invoke_void (object,intptr,intptr,intptr) emitted at 0x109dc95a0 to 0x109dc9718 (code length 376) [h2.vmp.exe]
converting method void D5304C8A/ED33FC8B:.ctor ()
Method void D5304C8A/ED33FC8B:.ctor () emitted at 0x109dc9720 to 0x109dc98e0 (code length 448) [h2.vmp.exe]
converting method void System.Collections.Generic.List`1<intptr>:.ctor ()
converting method void System.Collections.Generic.List`1<intptr>:.cctor ()
Method void System.Collections.Generic.List`1<intptr>:.cctor () emitted at 0x109dc9910 to 0x109dc9948 (code length 56) [h2.vmp.exe]
Method void System.Collections.Generic.List`1<intptr>:.ctor () emitted at 0x109dc9950 to 0x109dc99a8 (code length 88) [h2.vmp.exe]
converting method (wrapper managed-to-native) intptr object:__icall_wrapper_mono_ldftn (intptr)
Method (wrapper managed-to-native) intptr object:__icall_wrapper_mono_ldftn (intptr) emitted at 0x109dc99b0 to 0x109dc9aad (code length 253) [h2.vmp.exe]
converting method (wrapper managed-to-native) void object:__icall_wrapper_ves_icall_mono_delegate_ctor (object,object,intptr)
Method (wrapper managed-to-native) void object:__icall_wrapper_ves_icall_mono_delegate_ctor (object,object,intptr) emitted at 0x109dc9ac0 to 0x109dc9bc5 (code length 261) [h2.vmp.exe]
converting method void System.Collections.Generic.Dictionary`2<uint, D5304C8A/CD100488>:set_Item (uint,D5304C8A/CD100488)
Method void System.Collections.Generic.Dictionary`2<uint, D5304C8A/CD100488>:set_Item (uint,D5304C8A/CD100488) emitted at 0x109dc9be0 to 0x109dc9c38 (code length 88) [h2.vmp.exe]
converting method bool System.Collections.Generic.Dictionary`2<uint, D5304C8A/CD100488>:TryInsert (uint,D5304C8A/CD100488,System.Collections.Generic.InsertionBehavior)
Method bool System.Collections.Generic.Dictionary`2<uint, D5304C8A/CD100488>:TryInsert (uint,D5304C8A/CD100488,System.Collections.Generic.InsertionBehavior) emitted at 0x109dc9c50 to 0x109dca5b0 (code length 2400) [h2.vmp.exe]
converting method int System.Collections.Generic.Dictionary`2<uint, D5304C8A/CD100488>:Initialize (int)
Method int System.Collections.Generic.Dictionary`2<uint, D5304C8A/CD100488>:Initialize (int) emitted at 0x109dca600 to 0x109dca700 (code length 256) [h2.vmp.exe]
converting method (wrapper managed-to-native) void System.Buffer:InternalMemcpy (byte*,byte*,int)
Method (wrapper managed-to-native) void System.Buffer:InternalMemcpy (byte*,byte*,int) emitted at 0x109dca740 to 0x109dca845 (code length 261) [h2.vmp.exe]
converting method void System.Collections.Generic.Dictionary`2<uint, D5304C8A/CD100488>:Resize ()
Method void System.Collections.Generic.Dictionary`2<uint, D5304C8A/CD100488>:Resize () emitted at 0x109dca870 to 0x109dca8d4 (code length 100) [h2.vmp.exe]
converting method void System.Collections.Generic.Dictionary`2<uint, D5304C8A/CD100488>:Resize (int,bool)
Method void System.Collections.Generic.Dictionary`2<uint, D5304C8A/CD100488>:Resize (int,bool) emitted at 0x109dca900 to 0x109dcac40 (code length 832) [h2.vmp.exe]
converting method (wrapper managed-to-native) bool System.Array:FastCopy (System.Array,int,System.Array,int,int)
Method (wrapper managed-to-native) bool System.Array:FastCopy (System.Array,int,System.Array,int,int) emitted at 0x109dcac60 to 0x109dcad85 (code length 293) [h2.vmp.exe]
converting method (wrapper managed-to-native) object object:__icall_wrapper_mono_gc_alloc_obj (intptr,intptr)
Method (wrapper managed-to-native) object object:__icall_wrapper_mono_gc_alloc_obj (intptr,intptr) emitted at 0x109dcadc0 to 0x109dcaec5 (code length 261) [h2.vmp.exe]
converting method (wrapper managed-to-native) object object:__icall_wrapper_mono_gc_alloc_vector (intptr,intptr,intptr)
Method (wrapper managed-to-native) object object:__icall_wrapper_mono_gc_alloc_vector (intptr,intptr,intptr) emitted at 0x109dcaf30 to 0x109dcb03d (code length 269) [h2.vmp.exe]
converting method object D5304C8A:1CBC0209 (object[],int)
Method object D5304C8A:1CBC0209 (object[],int) emitted at 0x109dcb350 to 0x109dcbba0 (code length 2128) [h2.vmp.exe]
converting method void D5304C8A/2D9AFDA4:DDA7589A (int)
Method void D5304C8A/2D9AFDA4:DDA7589A (int) emitted at 0x109dcbc30 to 0x109dcbc69 (code length 57) [h2.vmp.exe]
converting method void D5304C8A/2DBE9C91:.ctor (object)
Method void D5304C8A/2DBE9C91:.ctor (object) emitted at 0x109dcbc70 to 0x109dcbd40 (code length 208) [h2.vmp.exe]
converting method void D5304C8A/8AAC738B:DA8C2E2B (D5304C8A/8A176CA6)
Method void D5304C8A/8AAC738B:DA8C2E2B (D5304C8A/8A176CA6) emitted at 0x109dcbd40 to 0x109dcbe13 (code length 211) [h2.vmp.exe]
converting method D5304C8A/8C3FE3A6 D5304C8A/8C3FE3A6:7A38E6A7 ()
Method D5304C8A/8C3FE3A6 D5304C8A/8C3FE3A6:7A38E6A7 () emitted at 0x109dcbe30 to 0x109dcbe40 (code length 16) [h2.vmp.exe]
converting method byte D5304C8A/2D9AFDA4:752C2032 ()
Method byte D5304C8A/2D9AFDA4:752C2032 () emitted at 0x109dcbe60 to 0x109dcc124 (code length 708) [h2.vmp.exe]
converting method intptr 79AAD40D:E68C9C87 (uint)
Method intptr 79AAD40D:E68C9C87 (uint) emitted at 0x109dcc140 to 0x109dcc72b (code length 1515) [h2.vmp.exe]
converting method void 79AAD40D:.cctor ()
Method void 79AAD40D:.cctor () emitted at 0x109dcc730 to 0x109dccc73 (code length 1347) [h2.vmp.exe]
converting method (wrapper managed-to-native) System.PlatformID System.Environment:get_Platform ()
Method (wrapper managed-to-native) System.PlatformID System.Environment:get_Platform () emitted at 0x109dcccc0 to 0x109dccdbd (code length 253) [h2.vmp.exe]
converting method (wrapper managed-to-native) intptr System.Reflection.RuntimeModule:GetHINSTANCE (intptr)
Method (wrapper managed-to-native) intptr System.Reflection.RuntimeModule:GetHINSTANCE (intptr) emitted at 0x109dcce00 to 0x109dccefd (code length 253) [h2.vmp.exe]
converting method (wrapper runtime-invoke) object object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
Method (wrapper runtime-invoke) object object:runtime_invoke_void__this__ (object,intptr,intptr,intptr) emitted at 0x109dccf00 to 0x109dcd088 (code length 392) [h2.vmp.exe]
converting method (wrapper runtime-invoke) object <Module>:runtime_invoke_void__this___object_object (object,intptr,intptr,intptr)
Method (wrapper runtime-invoke) object <Module>:runtime_invoke_void__this___object_object (object,intptr,intptr,intptr) emitted at 0x109dcd0a0 to 0x109dcd258 (code length 440) [h2.vmp.exe]
converting method (wrapper runtime-invoke) object object:runtime_invoke_void (object,intptr,intptr,intptr)
Method (wrapper runtime-invoke) object object:runtime_invoke_void (object,intptr,intptr,intptr) emitted at 0x109dcd290 to 0x109dcd408 (code length 376) [h2.vmp.exe]
converting method (wrapper alloc) string object:AllocString (intptr,int)
Method (wrapper alloc) string object:AllocString (intptr,int) emitted at 0x109dcd4d0 to 0x109dcd62b (code length 347) [h2.vmp.exe]
converting method void D5304C8A:AB390729 ()
Method void D5304C8A:AB390729 () emitted at 0x109dcd670 to 0x109dce070 (code length 2560) [h2.vmp.exe]
converting method void D5304C8A/8AAC738B:92847B24 ()
Method void D5304C8A/8AAC738B:92847B24 () emitted at 0x109dce120 to 0x109dce207 (code length 231) [h2.vmp.exe]
converting method void D5304C8A/2D9AFDA4:8C17A3A5 ()
Method void D5304C8A/2D9AFDA4:8C17A3A5 () emitted at 0x109dce220 to 0x109dce280 (code length 96) [h2.vmp.exe]
converting method void System.Collections.Generic.Stack`1<int>:Clear ()
Method void System.Collections.Generic.Stack`1<int>:Clear () emitted at 0x109dce290 to 0x109dce2d6 (code length 70) [h2.vmp.exe]
converting method int D5304C8A/ED33FC8B:D0999310 ()
Method int D5304C8A/ED33FC8B:D0999310 () emitted at 0x109dce2e0 to 0x109dce2ff (code length 31) [h2.vmp.exe]
converting method System.Collections.Generic.List`1/Enumerator<intptr> System.Collections.Generic.List`1<intptr>:GetEnumerator ()
Method System.Collections.Generic.List`1/Enumerator<intptr> System.Collections.Generic.List`1<intptr>:GetEnumerator () emitted at 0x109dce300 to 0x109dce3c8 (code length 200) [h2.vmp.exe]
converting method void System.Collections.Generic.List`1/Enumerator<intptr>:.ctor (System.Collections.Generic.List`1<intptr>)
Method void System.Collections.Generic.List`1/Enumerator<intptr>:.ctor (System.Collections.Generic.List`1<intptr>) emitted at 0x109dce3e0 to 0x109dce448 (code length 104) [h2.vmp.exe]
converting method bool System.Collections.Generic.List`1/Enumerator<intptr>:MoveNext ()
Method bool System.Collections.Generic.List`1/Enumerator<intptr>:MoveNext () emitted at 0x109dce450 to 0x109dce513 (code length 195) [h2.vmp.exe]
converting method bool System.Collections.Generic.List`1/Enumerator<intptr>:MoveNextRare ()
Method bool System.Collections.Generic.List`1/Enumerator<intptr>:MoveNextRare () emitted at 0x109dce530 to 0x109dce5a5 (code length 117) [h2.vmp.exe]
Failed to run module constructor due to (null) assembly:/Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/4.5/mscorlib.dll type:TypeInitializationException member:(null)
converting method (wrapper runtime-invoke) object object:runtime_invoke_virtual_void__this__ (object,intptr,intptr,intptr)
Method (wrapper runtime-invoke) object object:runtime_invoke_virtual_void__this__ (object,intptr,intptr,intptr) emitted at 0x109dce5d0 to 0x109dce758 (code length 392) [h2.vmp.exe]
converting method (wrapper managed-to-native) void System.Runtime.Remoting.Contexts.Context:ReleaseContext (System.Runtime.Remoting.Contexts.Context)
Method (wrapper managed-to-native) void System.Runtime.Remoting.Contexts.Context:ReleaseContext (System.Runtime.Remoting.Contexts.Context) emitted at 0x109dce7d0 to 0x109dce8c5 (code length 245) [h2.vmp.exe]
converting method (wrapper managed-to-native) void System.Threading.InternalThread:Thread_free_internal (System.Threading.InternalThread)
Method (wrapper managed-to-native) void System.Threading.InternalThread:Thread_free_internal (System.Threading.InternalThread) emitted at 0x109dce8f0 to 0x109dcea1b (code length 299) [h2.vmp.exe]
Admin
Site Admin
Posts: 2586
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: Virtualized .net framework exe cannot be run on Mono

Post by Admin »

VMProtect doesn't support Mono/Linux/macOS for .NET applications.
weloveayaka
Posts: 58
Joined: Wed Jul 05, 2023 6:21 am

Re: Virtualized .net framework exe cannot be run on Mono

Post by weloveayaka »

Thank you for reply.

Could you please clarify whether .NET (Core) (6+) programs are supported on Linux and macOS?
Admin
Site Admin
Posts: 2586
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: Virtualized .net framework exe cannot be run on Mono

Post by Admin »

VMProtect doesn't support Mono/Linux/macOS for .NET applications.
DiklosGroupLtd
Posts: 12
Joined: Fri May 27, 2022 12:49 pm
Contact:

Re: Virtualized .net framework exe cannot be run on Mono

Post by DiklosGroupLtd »

For anyone who wants to use .NET on Linux/MacOS and be able to use VMProtect, I suggest you pay attention to AOT compilation, which is currently under active development, but is already available. :D
I want to say that in this case, VMProtect work very well with protection, I did not notice any problems.

Below I will leave a link to a guide to getting started with AOT compilation.

https://learn.microsoft.com/en-us/dotne ... ative-aot/

PS. Some tips:
1 - Use AOT only in .NET 8 or newer - it works best with this version. (The release version will be out at the end of this month, but even rc2 shows good work)
2 - If something breaks during AOT compilation, try minimizing code trimming (<TrimMode>partial</TrimMode>)

PS2. Of course, AOT is not a perfect way to protect against hacking, but it provides some advantage over regular .NET protection
weloveayaka
Posts: 58
Joined: Wed Jul 05, 2023 6:21 am

Re: Virtualized .net framework exe cannot be run on Mono

Post by weloveayaka »

@DiklosGroupLtd Thank you for providing your practical advice, it has been very helpful!
DiklosGroupLtd
Posts: 12
Joined: Fri May 27, 2022 12:49 pm
Contact:

Re: Virtualized .net framework exe cannot be run on Mono

Post by DiklosGroupLtd »

Admin wrote: Tue Nov 21, 2023 7:49 am [deleted]
Извиняюсь, но у меня не заработало.
Что я делаю:
1 - Создал консольное приложение (Просто Hello World), .NET Framework 4.7.2
TestAppNF.zip
Сурсы
(2.6 KiB) Downloaded 149 times
2 - Скомпилировал приложение на линуксе:

Code: Select all

xbuild /p:Configuration=Release TestAppNF.csproj
(Файлы в архиве TestAppNF_Bins.zip, TestAppNF.exe и PDB-шка к нему)
3 - Взял exe, скормил его протектору, ничего не трогал, просто нажал компиляцию в протекте. Получил файл: TestAppNF.vmp.exe
4 - Запускаю TestAppNF.vmp.exe на линуксе, получаю следующее:

Code: Select all

Failed to run module constructor due to (null) assembly:/usr/lib/mono/4.5/mscorlib.dll type:TypeInitializationException member:(null)
Немного данных:

Code: Select all

Linux mytest-servak 5.10.0-23-amd64 #1 SMP Debian 5.10.179-2 (2023-07-14) x86_64 GNU/Linux
Debian 11
glibc: (Debian GLIBC 2.31-13+deb11u6) 2.31
Attachments
TestAppNF_Bins.zip
Бинари
(467.9 KiB) Downloaded 153 times
DiklosGroupLtd
Posts: 12
Joined: Fri May 27, 2022 12:49 pm
Contact:

Re: Virtualized .net framework exe cannot be run on Mono

Post by DiklosGroupLtd »

Admin wrote: Tue Nov 21, 2023 7:49 am [deleted]
И ещё: Раз вы реализовали поддержку Mono, я так понимаю внутри механизма протекта вы убрали зависимости от Windows библиотек? Если это так - а есть ли возможность в самом C# его убрать? А то при протекте .NET (раннее .NET Core) бинари не работают в линуксе, так как упираются в отсутствие Windows библиотек.
Всё таки mono можно считать чуть устаревшим продуктом, .NET 8 и в целом система .NET делает хорошие шаги в сторону кроссплатформы и более linux-friendly, нежели mono...
Admin
Site Admin
Posts: 2586
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: Virtualized .net framework exe cannot be run on Mono

Post by Admin »

И ещё: Раз вы реализовали поддержку Mono, я так понимаю внутри механизма протекта вы убрали зависимости от Windows библиотек?
Невозможно сделать полноценную поддержку того, что до сих пор имеет кучу нереализованных вещей в виде затычек с NotImplementedException.

P.S. Удалил пост про поддержку Mono.
DiklosGroupLtd
Posts: 12
Joined: Fri May 27, 2022 12:49 pm
Contact:

Re: Virtualized .net framework exe cannot be run on Mono

Post by DiklosGroupLtd »

Admin wrote: Fri Feb 02, 2024 5:25 am
И ещё: Раз вы реализовали поддержку Mono, я так понимаю внутри механизма протекта вы убрали зависимости от Windows библиотек?
Невозможно сделать полноценную поддержку того, что до сих пор имеет кучу нереализованных вещей в виде затычек с NotImplementedException.

P.S. Удалил пост про поддержку Mono.
Я так понимаю, вы использовали вызов IL инструкции в машине CLR для протекта, но произошёл облом плохой реализации её в mono. Но раз вы реализовывали раннее возможность протекта под linux+mono, я так понимаю вы сразу отвязывались от WinApi/Windows библиотек? Простите за настойчивость, но есть ли возможность реализовать протект linux+.net ? Ведь там по ReflectionEmit и прочим ништякам нет никаких проблем (AOT не в счёт).
Просто честно сказать расчитывали на linux, не хотелось бы прям обламываться если такое возможно.
Admin
Site Admin
Posts: 2586
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: Virtualized .net framework exe cannot be run on Mono

Post by Admin »

Простите за настойчивость, но есть ли возможность реализовать протект linux+.net ?
Такой возможности нет по причине кривости Mono.
DiklosGroupLtd
Posts: 12
Joined: Fri May 27, 2022 12:49 pm
Contact:

Re: Virtualized .net framework exe cannot be run on Mono

Post by DiklosGroupLtd »

Admin wrote: Mon Feb 05, 2024 6:41 am
Простите за настойчивость, но есть ли возможность реализовать протект linux+.net ?
Такой возможности нет по причине кривости Mono.
А в чём проблема использовать не Mono, а стандартный .NET?
Admin
Site Admin
Posts: 2586
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: Virtualized .net framework exe cannot be run on Mono

Post by Admin »

А в чём проблема использовать не Mono, а стандартный .NET?
На тему топика посмотрите.
Post Reply