The use step of vs self-code obfuscation Dotfuscator

Source: Internet
Author: User
Tags mscorlib win32

Dotfuscator is a third party obfuscation recommended by Microsoft, which is in the Vs.net2003 tool, but only provides community Edition, and registration is required if more complete functionality is required. It is not clear what the difference is between the Community edition and the registered version.

1. Edition software is turned on in the "Vs.net Studio tool"-> "Dotfuscator Community Dotfuscator".

2. First meet the request to register the window, select "No, I do not register" on it

3. In the Select Project Type window that pops up, select Create New item and click OK

4. Let's look at how the Help file describes how to create a new project feature.

(1) SELECT Trigger assembly

(a) Select the Triggers tab

(b) Click the "Browse" button to select an assembly

(2) Specify target directory

(a) Select the Build tab

(b) Select the Browse button in the target directory and select a directory

(3) Save project configuration file

(4) Build project

Click on the "Build" button and the project starts to be generated.

Loading assembly ...

Running D:/program files/microsoft Visual Studio. NET 2003/sdk/v1.1//bin/ildasm.exe/out=d:/docume~1/sharea~1/locals~1/ Temp//k2systemframework.dll.il/text/nobar/raweh/quoteallnames/utf8 D:/k2systemframework.dll

Renaming ...

Writing assembly ...

Running d:/windows/microsoft.net/framework/v1.1.4322/ilasm.exe/output=d:/obfuscation directory/k2systemframework.dll/nologo/quiet/ Dll/resource=d:/docume~1/sharea~1/locals~1/temp//k2systemframework.dll.res d:/docume~1/sharea~1/locals~1/temp// K2SystemFramework.dll.il

The build is complete.

Now use reflector to see the confused DLL: found all the class names with a,a0 and other code instead.

The method names inside the class are also replaced with meaningless symbols.

Here is the code inside the method, and the variable is replaced.

Now take a look at ildasm.

Here is a specific piece of code to see that the variable has been replaced.

Look at the changes in the size of the assembly before and after the confusion, 80k before confusing, then 72k after confusion, which means the size changes. It seems that the obfuscation also has another function, is to reduce the size of the assembly.

5. Test whether the confused assembly can be used properly. Here is the error description.

Re-adding references in applications that use the assembly, references can be added normally, but when you compile the application, you are prompted not to find the assembly.

I think the reason for this should be an error that just started adding the assembly to the I obfuscation.

Detailed information:

For more information about invoking Just-in-time (JIT) debugging instead of this dialog box,

See the end of this message.

Exception text **************

System.Reflection.ReflectionTypeLoadException: One or more types in the assembly cannot be loaded.

At System.Reflection.Module.GetTypesInternal (stackcrawlmark& stackmark)

At System.Reflection.Module.GetTypes ()

At DH.A (TreeNode a_0, module[] a_1)

At DH.A (string a_0, String a_1)

At CK.C (String a_0)

At Ck.a8 (Object a_0, EventArgs a_1)

At System.Windows.Forms.Control.OnClick (EventArgs e)

At System.Windows.Forms.Button.OnClick (EventArgs e)

At System.Windows.Forms.Button.OnMouseUp (MouseEventArgs mevent)

At System.Windows.Forms.Control.WmMouseUp (message& m, mousebuttons button, Int32 clicks)

At System.Windows.Forms.Control.WndProc (message& m)

At System.Windows.Forms.ButtonBase.WndProc (message& m)

At System.Windows.Forms.Button.WndProc (message& m)

At System.Windows.Forms.ControlNativeWindow.OnMessage (message& m)

At System.Windows.Forms.ControlNativeWindow.WndProc (message& m)

At System.Windows.Forms.NativeWindow.Callback (IntPtr hWnd, Int32 msg, INTPTR wparam, INTPTR lparam)

Loaded Assemblies **************

mscorlib

Assembly version: 1.0.5000.0

Win32 version: 1.1.4322.573

Basic code: File:///d:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll

----------------------------------------

Dotfuscator

Assembly version: 1.1.1019.14028

Win32 version: 1.1.1019.14028

Basic code: file:///D:/Program%20Files/Microsoft%20Visual%20Studio%20.NET%202003/PreEmptive%20Solutions/Dotfuscator% 20community%20edition/dotfuscator.exe

----------------------------------------

Dfengine

Assembly version: 1.1.1019.14017

Win32 version: 1.1.1019.14017

Basic code: file:///D:/Program%20Files/Microsoft%20Visual%20Studio%20.NET%202003/PreEmptive%20Solutions/Dotfuscator% 20community%20edition/dfengine. Dll

----------------------------------------

Dfgui

Assembly version: 1.1.1019.14026

Win32 version: 1.1.1019.14026

Basic code: file:///D:/Program%20Files/Microsoft%20Visual%20Studio%20.NET%202003/PreEmptive%20Solutions/Dotfuscator% 20community%20edition/dfgui. Dll

----------------------------------------

System.Windows.Forms

Assembly version: 1.0.5000.0

Win32 version: 1.1.4322.573

Basic code: File:///d:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll

----------------------------------------

System

Assembly version: 1.0.5000.0

Win32 version: 1.1.4322.573

Basic code: File:///d:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll

----------------------------------------

Dfengine.resources

Assembly version: 1.1.1018.26530

Win32 version: 1.1.1018.26530

Basic code: file:///D:/Program%20Files/Microsoft%20Visual%20Studio%20.NET%202003/PreEmptive%20Solutions/Dotfuscator% 20community%20edition/zh-chs/dfengine.resources.dll

----------------------------------------

System.Drawing

Assembly version: 1.0.5000.0

Win32 version: 1.1.4322.573

Basic code: File:///d:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll

----------------------------------------

Dfgui.resources

Assembly version: 1.1.1018.26851

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.