Go to file
Victor 389221374b Fix de4dot.code Debug build architecture 2020-03-09 17:00:14 +00:00
.github/workflows Replace CI with GitHub 2020-01-10 18:55:20 +02:00
AssemblyData Update copyright years 2015-10-29 22:45:26 +01:00
AssemblyServer Update copyright years 2015-10-29 22:45:26 +01:00
AssemblyServer-CLR20 Update copyright years 2015-10-29 22:45:26 +01:00
AssemblyServer-CLR20-x64 Update copyright years 2015-10-29 22:45:26 +01:00
AssemblyServer-CLR40 Update copyright years 2015-10-29 22:45:26 +01:00
AssemblyServer-CLR40-x64 Update copyright years 2015-10-29 22:45:26 +01:00
AssemblyServer-x64 Update copyright years 2015-10-29 22:45:26 +01:00
Test.Rename Update copyright years 2015-10-29 22:45:26 +01:00
Test.Rename.Dll Update copyright years 2015-10-29 22:45:26 +01:00
de4dot Update copyright years 2015-10-29 22:45:26 +01:00
de4dot-x64 Update copyright years 2015-10-29 22:45:26 +01:00
de4dot.blocks Add support for normal predicate control flow; 2017-09-26 01:54:42 +01:00
de4dot.code Fix de4dot.code Debug build architecture 2020-03-09 17:00:14 +00:00
de4dot.cui Ensure BeaEngine.dll is present and misc changes 2017-08-19 17:40:14 +03:00
de4dot.mdecrypt Fix compiler errors (on mono) (#123) 2017-01-05 13:46:04 +01:00
deobfuscator.Template added a template deobfuscator module (not included in main solution) 2015-05-17 13:35:19 +02:00
dnlib@832b0b2a0f Move class from dnlib to de4dot 2016-03-19 16:38:48 +01:00
.gitignore ConfuserEx deobfuscator code clean-up and refactor 2017-08-08 13:27:21 +03:00
.gitmodules Update dnlib URL and use latest commits 2015-07-01 17:11:22 +02:00
BeaEngine.dll Implemented ConfuserEx deobfuscator 2017-02-13 11:14:22 +02:00
COPYING Initial commit 2011-09-22 04:55:30 +02:00
LICENSE.ICSharpCode.SharpZipLib.txt Add the code from SharpZipLib that de4dot uses 2012-06-11 21:18:03 +02:00
LICENSE.QuickLZ.txt Add QuickLZ license file 2012-03-11 08:16:05 +01:00
LICENSE.de4dot.txt Update URLs 2014-04-14 21:56:17 +02:00
LICENSE.dnlib.txt Update URLs 2014-04-14 21:56:17 +02:00
LICENSE.lzma.txt Add lzma license (public domain) 2012-08-07 18:52:05 +02:00
LICENSE.lzmat.txt Add LZMAT license 2012-05-28 06:23:54 +02:00
LICENSE.randomc.txt Add randomc license file 2012-05-26 05:35:53 +02:00
LinqBridge.dll Implemented ConfuserEx deobfuscator 2017-02-13 11:14:22 +02:00
README-orig.md Update README.md 2018-03-24 17:17:58 +00:00
README.md Update README.md 2018-03-25 18:27:09 +01:00
de4dot.sln Rename blocks -> de4dot.blocks 2013-10-02 20:49:21 +02:00
de4dot.snk Add de4dot.snk 2014-05-11 14:50:36 +02:00

README.md

de4dot CEx

A de4dot fork with full support for vanilla ConfuserEx

Features

  • Supports x86 (native) mode
  • Supports normal mode
  • Decrypts and inlines constants
  • Decrypts resources
  • Fixes control flow
  • Fixes proxy calls
  • Deobfuscated assemblies are runnable

Notes

  • You have to unpack the obfuscated assembly before running this deobfuscator. The easiest way is to dump the module/s just after the methods have been decrypted.
  • This deobfuscator uses method invocation for constant decryption, therefore you always risk running malware if it's present in the obfuscated assembly. Be cautious and use a VM/Sandboxie!

Original README


Samples

Before (obfuscated symbols shortened):

ublic byte[] ShiftAddress(uint address)
{
	byte[] array = new byte[4];
	for (;;)
	{
		IL_07:
		int num = -2174478396;
		for (;;)
		{
			uint num2;
			switch ((num2 = (uint)<Module>.a(num)) % 7u)
			{
			case 0u:
				goto IL_07;
			case 1u:
			{
				int num3 = 0;
				num = (int)(num2 * 81144519u ^ 2359132411u);
				continue;
			}
			case 2u:
				num = (int)(num2 * 2975731004u ^ 34171348176);
				continue;
			case 3u:
			{
				int num3;
				num3++;
				num = (int)(num2 * 2174567110u ^ 244457623u);
				continue;
			}
			case 5u:
			{
				int num3;
				num = ((num3 >= 4) ? 631278122 : 1299552879);
				continue;
			}
			case 6u:
			{
				int num3;
				array[num3] = (byte)(address >> num3 * 8 & 255u);
				num = 556578930;
				continue;
			}
			}
			return array;
		}
	}
	return array;
}

After:

public byte[] ShiftAddress(uint address)
{
	byte[] array = new byte[4];
	for (int i = 0; i < 4; i++)
	{
		array[i] = (byte)(address >> i * 8 & 255u);
	}
	return array;
}

Before (obfuscated symbols shortened):

public bool WriteBytes(uint address, List<byte> buffer)
{
	byte[] array = buffer.ToArray();
	IntPtr intPtr;
	uint num = Memory.a(this.Handle, b((long)((ulong)address)), array, (uint)array.Length, out intPtr);
	for (;;)
	{
		IL_25:
		int num2 = 482469350;
		for (;;)
		{
			uint num3;
			switch ((num3 = (uint)<Module>.c(num2)) % 5u)
			{
			case 0u:
				this.d.Account.Log.WriteLine(<Module>.e<string>(3167610260u));
				num2 = (int)(num3 * 3588940066u ^ 1074051690u);
				continue;
			case 2u:
				return false;
			case 3u:
				goto IL_25;
			case 4u:
				num2 = (int)(((num != 0u) ? 4496537787u : 434512514u) ^ num3 * 589449693u);
				continue;
			}
			goto Block_1;
		}
	}
	Block_1:
	return true;
}

After:

public bool WriteBytes(uint address, List<byte> buffer)
{
	byte[] array = buffer.ToArray();
	IntPtr intPtr;
	if (Memory.WriteProcessMemory(this.Handle, (IntPtr)((long)((ulong)address)), array, (uint)array.Length, out intPtr) == 0u)
	{
		this.Owner.Console.Log.WriteLine("WriteBytes failed: WriteProcessMemory failed");
		return false;
	}
	return true;
}