Skip to main content
Version: v4.x

Code Watermark

warning

Starting from v4.0.0, the code watermark pass is disabled. Enabling WaterMark in ObfuscationPasses has no effect. The reason is that inserting instructions at certain special positions (for example, between ldtoken and a RuntimeHelpers.InitializeArray call) causes il2cpp.exe to fail.

Obfuz injects special metadata and specific instruction sequences into obfuscated assembly metadata to form identifiable watermark features.

Goals of Code Watermarking​

  • Copyright identification: Prove that the code was generated or authorized for release by you.
  • Source tracing: Used to mark code generated by different users or different authorization parties, so the source can be traced if leaked.
  • Anti-obfuscation resistance: Even if the code undergoes re-obfuscation or partial restoration, the watermark can still be preserved to some extent.

Settings​

ObfuzSettings.WatermarkSettings contains related settings, detailed documentation can be found in Configuration.

Watermark Identification Categories​

Inject the following special watermark identifiers:

  • Inject watermark hash signatures into rva data
  • Generate types, functions, and fields with special rules
  • Inject specific instruction sequences into code bodies