Cloud Protection: AppFuscator 2.0

    And now, almost three months have passed since our first announcement, cloud protection for .NET applications . All this time we did not waste time in vain and actively worked to improve our product. In identifying priority areas and identifying the most acute problems, the habro-community, which was actively included in the trials of the first public version, helped us a lot. Thank you very much on behalf of our team!

    In the new version



    New WPF Obfuscation Core

    • Now the classes involved in WPF are not excluded, but are obfuscated along with all the others. WPF resources are being reassembled
    • Linking of assemblies containing WPF is supported (which cannot be done in ILMerge)
    • Smart automatic exclusions of classes and fields that are not allowed for renaming, including for complex expressions like PropertyPath
    • BAML resources are renamed


    image

    (click to enlarge)

    Unity 3D Support

    • All internal methods, fields, and classes are renamed.
    • All modes are supported, including String Encryption, External Method Call Hiding, Decomposition

    In order to protect the Unity 3D application, it is enough to send assemblies with user code from the Managed folder to obfuscate, and then replace them with protected versions.

    Full compatibility with .NET Framework 4.5

    • Now the obfuscator works equally well with .NET 2.0, 3.0, 3.5, 4.0, 4.5.
    • The code with async / await is correctly obfuscated
    • Migrated to the latest version of Mono Cecil




    Automatic Intelligent Obfuscation

    • New powerful mechanism for analyzing hierarchy trees and dependencies
    • Significantly improved code analyzer
    • Autodetect serializable classes by standard constructions in code
    • Automatically exclude from renaming types that are explicitly or indirectly related to serialization (for example, Enums used in serializable classes)
    • Projects are correctly processed using Microsoft Unity Container
    • An intelligent algorithm for choosing the appropriate method based on the search for the most complete match. An example of the case of resolving ambiguous overloads: Method (int arg) and Method(T arg), where T = int
    • Fixed decomposition algorithm compatibility issue with Expressions and LINQ
    • Constrained prefix support
    • Automatic type recognition for Activator.CreateInstance and ConstructorInfo.Invoke according to the conversion to the interface \ type.
    • Improved warnings, now they are less often issued on trifles


    Some examples of smart recognition

    Enums

    string name = "Second";
    var result = (Mode)Enum.Parse(typeof(Mode), name);
    

    The analyzer determines that for the enum Mode, the definition of the value by name is used, and marks it together with all members as forbidden to rename.

    Serializer

    var serializer = new XmlSerializer(typeof(RealySerializable));
    var writer = new StringWriter(new StringBuilder());
    serializer.Serialize(writer, new RealySerializable());
    string res = writer.ToString();
    public enum DataState
    {
        One,
        Two
    }
    public class RealySerializable
    {
        public int MyProperty { get; set; }
        public DataState State { get; set; }
    }
    

    As you can see, RealySerializable and DataState are not marked with the SerializableAttribute attribute, but upon detecting the initialization of the XmlSerializer with the RealySerializable type, the code analyzer excludes it from renaming. A similar approach works for other serializers (JSON, Binary, etc.). Finding that an enum DataState is involved in the serializable type, the analyzer will also mark it as serializable.

    CreateInstance by interface

    var instance = Activator.CreateInstance(anyUnresolvedName);
    var work = instance as IRef;
    

    Suppose a name is formed dynamically, accordingly, the analyzer cannot understand what anyUnresolvedName is, but it finds an explicit cast to the IRef interface, and prohibits renaming of all its descendants.

    Other cases work similarly, try it yourself: appfuscator.com

    To summarize


    In this version, we are even closer to our cherished goal - to make sure that you do not think about obfuscation at all, but simply get the finished result for any of your project.

    Very soon, we plan to launch a user account and a couple of pleasant and useful innovations. Follow the news.

    And of course, as always, we will be very happy for your wishes and good ideas.

    Also popular now: