Skip to main content
Version: 2024.1

📘 Eazfuscator.NET Documentation

Copyright © 2008–2024 Gapotchenko


Table of Contents

What Is Eazfuscator.NET?

1. Introduction

1.1. Definition of Obfuscation

1.2. Why .NET Applications Need Obfuscation

1.2.1. In Theory

1.2.2. In Practice

1.3. When to Use Obfuscation

1.4. Drawbacks of The Obfuscation

2. Quick Start

3. How Does Eazfuscator.NET Work?

3.1. Obfuscation Techniques

3.1.1. Symbol Renaming

3.1.2. String Encryption

3.1.3. Constant Literals Pruning

3.1.4. Overload Induction

3.1.5. Class Hierarchy Linerization

3.1.6. XML Documentation Filter

3.1.7. XAML Renaming

3.2. Optimization Techniques

3.2.1. Merging of String Literal Duplicates

3.2.2. Sealing of Terminal Classes

3.2.3. String Compression

3.2.4. Code Optimizations

4. Advanced Features

4.1. About Advanced Features

4.2. Declarative Obfuscation Using Custom Attributes

4.2.1. System.Reflection.ObfuscateAssemblyAttribute

4.2.2. System.Reflection.ObfuscationAttribute

4.2.3. .NET Compact Framework, Silverlight, Windows Store and .NET Core Projects

4.2.4. Indirect Declarative Obfuscation

4.2.5. Obfuscation Attribute Priorities

4.3. Conditional Obfuscation

4.3.1. Types

4.3.2. Type Members

4.3.3. Options are Combinable

4.3.4. Diagnostics

4.4. Symbol Encryption

4.5. Advanced Symbol Renaming Options

4.5.1. Symbol Renaming with Printable Characters

4.5.2. Type Renaming Patterns

4.6. Advanced String Encryption Options

4.7. Code Control Flow Obfuscation

4.8. Assemblies Merging

4.8.1. Introduction

4.8.2. Instructions

4.8.3. Tuning

4.8.4. Internalization

4.8.5. Distribution Considerations

4.8.6. Custom Parameters for Merging

4.9. Assemblies Embedding

4.9.1. Introduction

4.9.2. Embedding vs. Merging

4.9.3. Instructions

4.9.4. Tuning

4.9.5. Distribution Considerations

4.9.6. Ahead-of-Time Compilation Limitations

4.9.7. Troubleshooting

4.10. Resource Encryption

4.10.1. Introduction

4.10.2. Instructions

4.10.3. Compression

4.10.4. Selective Resource Encryption

4.10.5. Options are Combinable

4.11. Serialization Tuning

4.11.1. Overview

4.11.2. Binary Serialization and Obfuscation

4.11.3. Self-Interoperability

4.11.4. Non-stable Self-Interoperable Serialization

4.11.5. Stable Self-Interoperable Serialization

4.12. Debugging

4.12.1. Introduction to Debugging After Obfuscation

4.12.2. How It Works

4.12.3. Possible Security Risks

4.12.4. Tuning

4.12.5. Debug Renaming

4.13. PEVerify Integration

5. Sensei Features

5.1. About Sensei Features

5.2. Code Inlining

5.2.1. Introduction

5.2.2. Instructions

5.2.3. Method Flattening

5.3. Module Initializers

5.3.1. Introduction

5.3.2. Instructions

5.3.3. Execution Order

5.4. Private Protected Visibility

5.5. Custom Attributes Removal

5.6. Design-Time Usage Protection

5.6.1. Overview

5.6.2. How It Works

5.6.3. Default Behavior

5.6.4. Instructions

5.6.5. Tuning

5.7. Resource Sanitization

5.7.1. Introduction

5.7.2. Instructions

5.7.3. Minification

5.7.4. Selective Resource Sanitization

5.7.5. Options are Combinable

5.8. Method Parameters Obfuscation

5.8.1. Renaming

5.8.2. Optional Parameters Pruning

5.9. Deterministic Obfuscation

6. Virtualization

6.1. Introduction

6.2. How to Use Code Virtualization

6.3. How to Use Data Virtualization

6.4. Homomorphic Encryption

7. Concepts

7.1. Introduction

7.2. Probing Paths

7.2.1. How to Define Probing Paths?

7.3. Script Variables

7.4. Log

7.5. Glob Mask

7.5.1. Syntax

7.5.2. Behavior

7.5.3. Examples

7.6. Assembly Mask

7.6.1. Syntax

7.6.2. Behavior

7.6.3. Examples

7.7. Regex Mask

7.7.1. Syntax

7.7.2. Behavior

7.7.3. Examples

7.8. Warnings and Errors

7.8.1. Warning Suppression

7.8.2. Treat Warnings as Errors

7.9. Compatibility

7.9.1. Compatibility Version

7.9.2. Demanding the Specific Version of Eazfuscator.NET

8. Integration

8.1. Introduction

8.2. Microsoft Visual Studio Integration

8.2.1. Overview

8.2.2. How Does It Work?

8.2.3. Code Completion and Suggestions

8.2.4. Help System

8.3. JetBrains Rider Integration

8.3.1. Overview

8.3.2. How Does It Work?

8.4. MSBuild Integration

8.4.1. Overview

8.4.2. Post-build Event Integration

8.4.3. MSBuild-level Integration

8.5. Command-Line Interface

9. Deployment

9.1. About Eazfuscator.NET Deployment

9.2. Microsoft Installer (MSI)

9.3. NuGet Package Manager

10. Best Practices

10.1. Introduction

10.2. General Best Practices

10.3. Keeping the Balance

10.3.1. Human Factors

10.4. Keeping It Simple

10.4.1. The Paralysis of Simplicity

11. How-Tos

11.1. How to Exclude a Specific Assembly From Distribution

11.1.1. Overview

11.1.2. NuGet Package

11.1.3. Setup

12. Troubleshooting

12.1. My application is not working properly after obfuscation. Why does it happen?

12.2. Troubleshooting Features

12.2.1. Stack Trace Decoding

12.3. Inspection-Friendly Obfuscation

12.3.1. Preserving the Original Names

12.3.2. Disabling ILDASM Suppression

12.4. About InternalsVisibleToAttribute

12.4.1. Solution #1. Do not use InternalsVisibleToAttribute at all

12.4.2. Solution #2. Swap with EditorBrowsable attribute

12.4.3. Solution #3. Hide the warning

12.4.4. Solution #4. Ignore the attribute

12.5. "Option Strict Off" Compatibility for VB.NET

12.5.1. Introduction

12.5.2. Compatibility Mode

12.5.3. Instructions

12.6. Nonintrusive Debugging

12.6.1. Introduction

12.6.2. Sample Scenario

12.7. Common Errors

12.7.1. EF-1099: Unable to load input assembly, reflection load failed

12.7.2. EF-3035: Assembly or part of it is already obfuscated

Glossary

Bibliography