Obfuscar: Slightly Upgraded and 2.0 RC 2

Do you think that I have abandoned this project? No, no, that’s not the case. In a few minutes I am going to upload a new build to Obfuscar homepage, which contains many critical bug fixes. They address many typical obfuscation scenarios and important open source libraries. So make sure you visit the download page and check out the latest.

The following are the most significant changes made since RC 1,

Initial BAML Support

WPF applications embed BAML in the executable, so that at runtime the type names stored in BAML files are verified and converted to live objects. As a result, normal obfuscation on type names cause type resolution failures as the untouched type names cannot be resolved at runtime.

A complete fix should be able to update the names in BAML files, but I was not able to spare enough time on that subject. So a quick workaround is used that we simply ignore types who are referred in BAML. Once I have enough time, I will try to complete the BAML update algorithm.

Heavily Nested Types

When I tried to obfuscate DockPanel Suite I found that some exceptions occurred in the final applications. By tracking down to source code I can see that the original algorithm made an assumption that in the code only one level of nesting exists for nested classes. Of course this is a wrong assumption, especially for DPS, where many internal types are in fact heavily nested.

By slightly modifying the algorithm we easily get DPS obfuscated correctly.

Generic Instance Method

Another issue was found when obfuscating Microsoft Unity that some method references were not updated even though the method definition had already been modified.

After some debugging it is obvious that only generic instance methods trigger the bug, as whenever they appear they are both a declaration (instantiating the generic definition with a concrete type) and reference (referring to the original generic method definition). Knowing this, a fix can be easily found, by treating such methods differently during method reference scan and renaming.

So now Obfuscar fully supports more .NET assemblies including ANTLR 3, #SNMP Library, SharpSnmpPro.Mib, DockPanel Suite, and Microsoft Unity.

© Lex Li. All rights reserved. The code included is licensed under CC BY 4.0 unless otherwise noted.

© - Lex Li. All rights reserved.

Using the Chirpy theme for Jekyll.

Last updated on May 01, 2024