C # Method of encrypting code with Dotfuscator obfuscation

Source: Internet
Author: User
Tags printable characters

C # written code if not to some degree of confusion and encryption, it is very easy to decompile to crack, especially for some commercial use of C # software, because the stare of more people, is extremely easy to be breached. The use of VS Dotfuscator can be implemented to confuse code, variable name modification, string encryption and other functions.

I am using the Dotfuscator 4.2 PRO version, and there is a need to search online for downloads Dotfuscator Professional Edition 4.9 cracked versions. Install Dotfuscator good Open Interface, there are a few need to configure the place: Options, Input, Rename, String encryption, build, other defaults can be, the following one by one explained.

Options option This is the global configuration option:

Set the Disable string encryption to No, that is, enable string encryption, check Disable control flows, dsiable renaming also No, that is, ensure that the flow and obfuscation are turned on, and other defaults. The following figure:

Input options you need to confuse the encrypted DLL, EXE file, refer to the first picture;

Rename option to check "use enhanced overload induction" (using enhanced mode), note: Do not check the lower "do don't suppress on serializable types", that is, the serialized type of variable is not encrypted, otherwise the may be abnormal after translation; "Renaming Scheme" select "unprintable" (not printable characters, that is, garbled), you can also choose other such as lowercase letters, uppercase characters, numbers of ways. The following figure:

String encryption option include check the project file exe, DLL, etc. that require string encryption.

Build option to set the output target folder, click on the bottom of the "built" button to regenerate the new EXE, DLL file.

Okay, let's take a look at the effect of encryption obfuscation:

The original code:

String TT = "FM";
BOOL VIP = FALSE;

private void Form1_Load (object sender, EventArgs e)
{
richTextBox1.Text = "Start";
}

private void Button1_Click (object sender, EventArgs e)
{
richTextBox1.Text = "Button1 clicked";
VIP = true;
richTextBox1.Text + VIP. ToString ();
}

After Dotfuscator confusing encryption, we use the famous decompile software Reflector to view, we can find that the code in the function body has not been seen, prompt: "This item is obfuscated and can do not be translated."; The string also becomes garbled, the function name is also not visible, the effect chart is as follows:

"Use Dotfuscator to confuse several points of attention":

1, if you encrypt the DLL, EXE has public class, need to be external reference, then refer to this public related DLLs, EXE also to put together into the Dotfuscator Input, at the same time to confuse encryption, or external call error.

2, if there are public classes, but you do not want to follow the 1th way, you can check the Library mode (input in the expansion of the project, see the following figure), or do not select the Rename option, only with control flow confusion (this way you will see the class name, function name, But the function body is not visible.

3, if there are public classes, but you do not want to follow my 1th, 2nd method, you can exclude these public in the Rename option class name, method name, property name can be: Use rename exclude left to exclude items, or the right side of the exclusion method, see the following figure:

Here is an article written by other netizens with Dotfuscator confused ASP.net program practice experience, you can refer to reading.

Of course, the software world can not be cracked, but the use of Dotfuscator confused encryption at least to block a lot of beginners!

Related Article

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.