holly-hacker / Confuser.Protections.HoLLy

Extra protection modules for ConfuserEx
GNU General Public License v3.0
66 stars 21 forks source link

Implement MemoryProtection #3

Closed holly-hacker closed 6 years ago

holly-hacker commented 6 years ago

The code is partially implemented in the MemoryProtection branch found here.

MemoryProtection would wrap the selected types in a generic class which obfuscates its value with a simple xor encryption. This would prevent from memory editing attacks.

holly-hacker commented 6 years ago

Right now, there is code that technically should work, however the generated calls to the implicit operator do not correctly set the generic parameters.

How it should be:

IL_xxxx: class ConfuserEx.Protections.HoLLy.AntiMemoryEditing.Types.ObfuscatedValue`1<!0> class ConfuserEx.Protections.HoLLy.AntiMemoryEditing.Types.ObfuscatedValue`1<int32>::op_Implicit(!0)

What it creates:

IL_xxxx: call class ConfuserEx.Protections.HoLLy.AntiMemoryEditing.Types.ObfuscatedValue`1<!0> ConfuserEx.Protections.HoLLy.AntiMemoryEditing.Types.ObfuscatedValue`1::op_Implicit(!0)