LogoLogo
  • Welcome to Cyphor
  • .NET Code Obfuscation
    • Getting Started
    • How to Obfuscate
    • Basic Code Obfuscation
      • Symbol Renaming
      • Body Mutation
      • Control Flow
      • Constant Encryption
      • Call Hiding
      • Debug Protection
      • Integrity Checks
      • Self Healing
    • Advanced Obfuscation
      • Attribute-Based Obfuscation
      • Guide to obfuscation
      • Code Inlining
      • What is RASP?
      • Protections that protect each other
      • Program not working after obfuscation
      • Keeping performance with obfuscation
      • Virtualization
  • Dashboard
    • Files
    • Billing
      • Pay as you go
      • Examples
    • Projects
      • Code Guard Tasks
      • Permissions
        • Roles
      • Files
      • SAML and SSO
  • Code Guard
    • Introduction
    • Implement with your licensing system
      • Setting up a gateway
      • Setting up the SDK
    • Secured values
      • Dynamic values
      • Code Encryption
        • Page 1
    • Preventing analysis
    • Enhanced visibility
      • Disabling tracing on production
      • Logging external methods
      • Optimizing Memory Usage
    • Edge connectivity
    • Preventing modifications
      • Preventing assembly load
      • Allowing partial tampering
      • Enterprise EDRs and XDRs
      • Dynamic Hook protection
      • Thread hijacking
      • Guard Checksums
      • DLL Injection
      • Handling complex RE attacks
        • Custom payload detection
    • Granular Integrity Checks
    • Virtualized Environments
    • Troubleshooting
    • Threat database
    • Real time alerts
      • Alert Insights
  • CLI Tool
    • Introduction
    • Global options
    • Profiles
    • Projects
    • Obfuscator
      • Obfuscation Schemes
      • Task templates
      • Protecting files
        • Global obfuscation flags
        • Using templates to obfuscate files
        • Quick obfuscation
      • Monitoring obfuscation jobs
    • Securing local storage
Powered by GitBook
On this page
  • Performance: Medium Potency: High Resilience: Medium
  • Understanding the protection
  • Exploring the different settings
  • Performance Mode
  • Intensity
  • Complex CFG
  • Enhanced Integrity
  • String Melting

Was this helpful?

  1. .NET Code Obfuscation
  2. Basic Code Obfuscation

Body Mutation

PreviousSymbol RenamingNextControl Flow

Last updated 2 years ago

Was this helpful?

Performance: Medium Potency: High Resilience: Medium

Understanding the protection

Body mutations are a set of techniques used in code obfuscation to protect intellectual property and make it more difficult for attackers to reverse engineer and understand the underlying code. These techniques include constant decomposition, code mangling, and function outlining, among others.

Constant decomposition is a technique that breaks down constant values into multiple smaller parts and stores them in different locations in the code. This makes it difficult for attackers to identify and extract these values, thus protecting the intellectual property embedded in them.

Code mangling is another technique that involves modifying variables, functions, and other code elements to make them less readable and recognizable. This makes it difficult for attackers to understand the code and its functionality, thus protecting the intellectual property contained in it.

Function outlining is a technique that involves extracting common code blocks and placing them in separate functions. This not only improves the code's readability and maintainability, but also makes it harder for attackers to understand the code's functionality and extract its intellectual property.

Overall, body mutations offer several advantages in terms of code obfuscation and IP protection.

Before Obfuscation:

        public static void Main(string[] args) {
          int i, sum = 0, n;
          Console.Write("Enter the Nth Number : ");
          n = int.Parse(Console.ReadLine());
          for (i = 0; i <= n; i++) {
            sum = sum + i;
          }
          Console.WriteLine("\nSum of N Numbers : " + sum);
          Console.ReadLine();
        }

After Obfuscation:

!(~(((((((*(int*)(obj.>)._}}_<_>{>( + 8) & 577869) ^ (*(int*)(obj.>)._}}_<_>{>( + 8) ^ 736216)) != 735706) ? -348746744 : -811) ^ *(int*)(obj.>)._}}_<_>{>( + 8)) + *(int*)(obj.>)._}}_<_>{>( + 4) - *(int*)(obj.>)._}}_<_>{>( + 4) | *(int*)(obj.>)._}}_<_>{>( + 4)) > ((((((*(int*)(obj.>)._}}_<_>{>( + 8) | 25303) ^ (*(int*)(obj.>)._}}_<_>{>( + 8) & 258408)) != 25303) ? -833691950 : 802) ^ *(int*)(obj.>)._}}_<_>{>( + 8)) + *(int*)(obj.>)._}}_<_>{>( + 4) & *(int*)(obj.>)._}}_<_>{>( + 4)) * ((((*(int*)(obj.>)._}}_<_>{>( + 8) + 911987 & (*(int*)(obj.>)._}}_<_>{>( + 8) ^ 188070)) != 52524) ? -1018579007 : 800) ^ *(int*)(obj.>)._}}_<_>{>( + 8))) & (10.681713f / (float)(*(int*)(obj.>)._}}_<_>{>( + 4)) & (float)(*(int*)(obj.>)._}}_<_>{>( + 4)) & (float)(((*(int*)(obj.>)._}}_<_>{>( + 8) + 115805 + (*(int*)(obj.>)._}}_<_>{>( + 8) + 754033) != 871396) ? -1195773132 : 778) ^ *(int*)(obj.>)._}}_<_>{>( + 8))) < (-7.0337505f * (float)(*(int*)(obj.>)._}}_<_>{>( + 4)) + (float)((((*(int*)(obj.>)._}}_<_>{>( + 8) & 375784 & *(int*)(obj.>)._}}_<_>{>( + 8) + 612283) != 512) ? 1057956446 : 840) ^ *(int*)(obj.>)._}}_<_>{>( + 8)) ^ (float)(*(int*)(obj.>)._}}_<_>{>( + 4))))

Exploring the different settings

Due to Body Mutation being a composition of features rather than a single feature, you are allowed to tune the obfuscation parameters.

Performance Mode

The performance mode will maintain potency levels high, however, resilience levels will drop significantly. Only use this setting on non-security critical regions of your code.

Intensity

Complex CFG

The Complex CFG Mode inserts a set of new techniques that will increase the resilience and potency levels.

Enhanced Integrity

The enhanced integrity setting will add extra self-integrity and defensive checks against unwanted tampering and analysis of the application.

String Melting

The String Melting option melts, mutates, and encrypts the strings stored in your application. The potency and resilience levels are increased.

The performance mode will remove the more techniques in an effort to keep the original performance of the method or application.

The intensity sets the complexity of the injected arithmetic and logical functions, this setting increases the of the protection.

Applying Complex CFG to a wide selection of methods can affect the performance considerably. Check out if you want to protect specific methods with this feature.

⏩
🔐
🧠
Attributed based obfuscation
resilient
potency