Control Flow
Protection ID: control_flow_advance
This protection modifies the flow of methods so that it cannot be interpreted.
This protection is available in the editions:
Startup Enterprise Admits © Smart Native Protection System
The methods will perform the functions and interpret the instructions exactly as they are in the original code, this protection divides the method into blocks so that the order of execution of each of the instructions cannot be deduced, in short it converts the code as if it were ' spaghetti'.
Parameters
- Intensity integer : This parameter is an integer value of
0 to 100
, indicates the size of each block of code divided. - Depth integer : This parameter defines the depth of the generated expression if the selected mode is expression or advanced.
- Invalid code boolean : This parameter is a Boolean value that indicates whether invalid code will be inserted.
- Operations string : This parameter indicates which operations must be generated to control the flow of the code. The available mutation protection options
- © Smart native protection system: It generates advanced operations with native methods that directly affect the flow of code. Enterprise With this parameter the difficulty to solve the original flow increases considerably.
Rules configuration
shield.config.json
{
"protections": {
"control_flow_advance": {
"intensity": 10,
//from 0 to 100, default 10.
"depth": 5,
//from 0 to 10, default 5.
"invalid code": false,
//default false
"operations": "arithmetic|logic|conversion"
//string with the selected operations separated by a vertical bar default null, you can use all the options available in constants_mutation protection
}
}
}
Modes
- Advanced: Generates dynamic matrices that can change in execution to determine the order of the blocks. This flow control is the most advanced on the market and cannot be correctly interpreted by any decompiler.
Exclusions
- Exclude with attribute
Include this attribute in your source code:
[Obfuscation(Exclude = false, Feature = "-control_flow_advance")]
- Exclude from the interface
You can exclude this protection from the methods or classes you want.
Compatibility
Framework | Compatibility | Comments |
---|---|---|
.NET Core | ✔ | |
.NET Framework | ✔ | |
.NET (up to 8 version) | ✔ | |
.NET Standard | ✔ | |
Xamarin IOS | ✔ | |
Xamarin Android | ✔ | |
Xamarin MacOs | ✔ | |
WPF | ✔ | |
Blazor | ✔ | |
.NET Maui | ✔ | |
Unity | ✔ | |
ASP | ✔ | |
Silverlight | ✔ | |
VBa (Visual Basic) or C# (CSharp) | ✔ | |
WinRT | ✔ |
Shield is compatible with all versions of .NET, it doesn't matter if you use .NET 2.0, .NET 4.7, .NET Core 2.1 or Xamarin.Forms 5.0, it will adapt automatically according to needs, you don't have to worry about this.