VirtualGuard Docs Help

Configuration

Introduction

VirtualGuard uses an intuitive json configuration system. It contains a space for members, and then some more generic protector settings.

Configuration

{ "Members": [ { "Member": "VirtualGuard.Tests.Program:Main", "Virtualize": true, "Exclude": false }, { "Member": "VirtualGuard.Tests.Program:SplitVMTest", "Virtualize": false, "Exclude": false } ], "RenameDebugSymbols": false, "UseDataEncryption": true, "ProcessorCount": 4 }

Members

Adding a member in a VirtualGuard configuration is simple. The format is as follows:

Methods

Namespace.Type:MethodName

Classes

Namespace.Type

Selecting a protection

There are two main flags that can be attributed to a member:

Code Virtualization

You can apply code virtualization by changing the "Virtualize" flag to true. In some cases, it is possible the virtual machine has yet to implement some of the key features in the method you are attempting to virtualize. You will be shown an error when trying to virtualize a method like this. Please make a support ticket and we will happily help.

Exclusions

You can exclude a member from renaming by setting the "Exclude" property to true.

Configuration via attributes

You can use .NET's [ObfuscationAttribute] to mark members for protection individually. These will be automatically loaded into the configuration on compilation-time, and will not need to be added to the raw json. We will remove these attributes upon protecting your application.

Virtualization example

[ObfuscationAttribute(Feature = "virtualization")] public void MyMethod() { ... }

Excluding members via attribute

[ObfuscationAttribute(Feature = "exclude")] public void MyMethod() { ... }

Conclusion

You now know how to mark members for virtualization and exclude members from renaming using VirtualGuard's configuration system. If you have any questions or concerns, you can reach us via the contact section on our homepage or create a support ticket on our online user panel, which you can learn more about here.

Last modified: 03 January 2024