yck1509 / ConfuserEx

An open-source, free protector for .NET applications
http://yck1509.github.io/ConfuserEx/
Other
3.57k stars 1.63k forks source link

ConfuserEx protection in mono #408

Open wzoet opened 8 years ago

wzoet commented 8 years ago

Hi,

I wrote a .net application which I am protecting. When I use maximum protection, this works nice in windows, but not in mono. In fact, the only protections i can add (based on template None) for it to keep working are as follows:

Unfortunately, the code is still readable in ILSpy and still looks quite a lot like the code I programmed. By adding rename, the assembly loads without errors, but the calling party gets errors: Could not load type NA \,xSG?l]]\G-C !)4S/=`6( while decoding custom attribute.

By adding invalid metadata, mono crashes on stratup: Unknown heap type: #Schema

By ading Anti tamper, the following error occurs: Invalid IL code in ..:.ctor (): IL_0001: bne.un.s IL_ffffff87

By ading anti dump, the following error occurs: The type initializer for '' threw an exception.

I am using confuserEx version 0.6.0

Thanks in advance!

Fabi commented 8 years ago

I guess there are some win32 api calls used. You could try to replace them with calls for the specific system (requires a Binary for Every os).

Idk.. Just read about the w32 stuff in another issue

wzoet commented 8 years ago

The unconfused library works fine on mono for windows, the confused one isn't. Also MoMa does not indicate any problems with the libraries.

Have to check the unconfused library on mono for linux/mac though. Will post back on that.

yck1509 commented 8 years ago

Hi, Mono is much more sensitive to metadata modification than .NET Framework, therefore anti tamper, invalid metadata and anti dump would not work in Mono. As for rename, you may want to try using another mode of renaming, such as letters.