Decrypts an xenocode-encrypted string

Source: Internet
Author: User
Many. net Program Obfuscators are used for protection during release. xenocode 2005 should be said to be one of the many.
Xenocode uses an inserted class to protect strings in the Assembly.
This article will combine reflector and reflection technology to decrypt the strings encrypted in the Assembly.

First, we use reflector to diser the original program and find the string we want to decrypt.Code.

For example:

This. response. serialnumber = string. Intern (response. _ response ("\ udbac \ ue2b7 \ ue9bb \ uf0af \ uf7b8 \ ufeb3 \ u05a8 \ u0c61", 0x555ddb55 ));

Find the string to be decrypted and write the reflection call code.

Class Program
{
Public static void main ()
{
// The installer set. test.exe is the name of the obfuscated Assembly file.
Assembly ASM = assembly. loadfrom (@ "test.exe ");

// Obtain the decryption type (including its namespace) inserted by the xenocode, which corresponds to the class name before the preceding string. the obfuscation results may be different each time.
Type type = ASM. GetType ("x293b01486f981425. x1110bdd110cdcea4 ");

// String and decryption Parameters
Object [] parameters = {"\ udbac \ ue2b7 \ ue9bb \ uf0af \ uf7b8 \ ufeb3 \ u05a8 \ u0c61", 0x555ddb55 };
Type [] paramtypes = new type [parameters. Length];
For (INT I = 0; I <parameters. length; I ++)
Paramtypes [I] = parameters [I]. GetType ();

// Call the decryption method
Bindingflags flags = bindingflags. Public | bindingflags. Static;
Methodinfo method = type. getmethod ("_ d574bb1a8f3e9cbc", flags, null, paramtypes, null );
Object result = method. Invoke (null, parameters );

// Display the decryption result
Console. writeline (result );

Console. writeline ("Press ENTER key to exit ...");
Console. Readline ();
}
}

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.