• Stars
    star
    387
  • Rank 107,117 (Top 3 %)
  • Language
    C#
  • License
    GNU General Publi...
  • Created about 6 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

📦 de4dot deobfuscator with full support for vanilla ConfuserEx

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;
}

More Repositories

1

wgcf

🚤 Cross-platform, unofficial CLI for Cloudflare Warp
Go
2,850
star
2

TrustMeAlready

🔓 Disable SSL verification and pinning on Android, system-wide
Java
967
star
3

magisk-frida

🔐 Run frida-server on boot with Magisk, always up-to-date
Shell
495
star
4

apk-utilities

🛠 Tools and scripts to manipulate Android APKs
Python
186
star
5

LenovoController

🎮 A lightweight alternative to Lenovo Vantage
C#
164
star
6

cloudflare-warp-wireguard-client

Generate WireGuard profile from Cloudflare Warp account
Python
132
star
7

pi-encrypted-boot-ssh

🔑 Raspberry Pi Encrypted Boot with Remote SSH
130
star
8

dnEditor

💾 A .NET assembly editor based on dnlib
C#
122
star
9

jvm-dump-proxy

A proxy DLL for Windows to dump JVM classes at JNI level
C
61
star
10

nMAC

📱 An Android device MAC changer
C#
56
star
11

z3-python-ctf

🐍 Solving CTF challenges using Z3 and Python
Python
24
star
12

poweruser

💪 Collection of tips, tricks and scripts for becoming a true poweruser
Shell
22
star
13

authelia-basic-2fa

🗝 Use Authelia 2FA through only standard basic auth
Go
18
star
14

avast-ctf-cambridge-2018

🎖 A complete write-up of the Avast challenge given at Hack Cambridge 2018
18
star
15

nginx-gotchas

⁉ My personal list of gotchas and other tricky situations with nginx
15
star
16

SmaliHelper

An offline documentation browser for Smali
C#
14
star
17

wg-reverse-proxy

🛤 Ansible setup for building a WireGuard reverse proxy server
Shell
14
star
18

webdav-server

A simple WebDAV server in Go
Go
11
star
19

tailscale-bolt

Create self-contained, 1-click scripts, which connect any computer to your TailScale network
Shell
11
star
20

brookshear-vm

A brookshear virtual machine written in Go
Go
11
star
21

PerfectProxyDLL

A simple and stable proxy DLL for Windows x64
C
10
star
22

ProcessPrivileges

Query, enable, disable or remove privileges on a process
C#
9
star
23

CompatTelOverride

Persistently disable the Compatibility Telemetry in Windows 10
C#
8
star
24

RunInTray

Run a program in tray with its own icon
C#
7
star
25

scanogram

Scan your pictures and videos for corruption, and sort them by EXIF or modification time
Go
7
star
26

BinaryPatcher

A library to patch binaries
C#
7
star
27

proxy-redirector

A HTTP/S proxy that redirects connections
Go
7
star
28

windows-ansible

Ansible playbook to configure a Windows machine
PowerShell
7
star
29

anvil-calc

Optimal enchantment order calculator for modded Minecraft
Rust
6
star
30

pwnEd-ctf

Write-ups for pwnEd CTF in Edinburgh 2020
Python
6
star
31

WhiteScrolls

📃 Articles, papers and presentations
6
star
32

http-ci-deployer

An extremely simple HTTP-based deployment solution for Continuous Integration services
Go
5
star
33

docker-elk-arm64

ELK stack for Docker ARM64
Shell
5
star
34

devpost-api

📜 An unofficial API for DevPost
Python
4
star
35

simplewall-utils

Simple utilities for simplewall
Go
4
star
36

drunk-sshd

🍺 Byte replace patterns to make sshd accept any password as valid
4
star
37

winsock-dump-proxy

A proxy DLL for Windows to dump Windows Socket connections
C
4
star
38

overseer

Search an Android device for files containing its MAC address
C
3
star
39

android-kernel-ci

Generic auto-build repo for Android kernels using various CI
Shell
3
star
40

serve-zip

Simple HTTP server that streams directories as a ZIP
XSLT
3
star
41

byte-pattern-patcher

A minimalistic, performant, cross-platform byte pattern patcher
Go
3
star
42

sdconv

Automatic SD video conversion script
Python
2
star
43

text2pic

A text to picture translator understandable by anyone
C#
2
star
44

stirling-workshop-2

The materials for the Raspberry Pi workshop
Shell
2
star
45

sigint-workshop-1

The materials for the Dissecting Android Apps workshop
2
star
46

iddqdBot

A PvE bot for the RESTful DOOM engine
Java
2
star
47

TimetableManager

A simple timetable manager, written for a university assignment project
Java
2
star
48

jre-side-channel

Various JRE patches to aid side-channel analysis in Java
Java
2
star
49

stirling-workshop-1

The materials for the Introduction to Cyber Security workshop
2
star
50

cdx2018-ransomware-decryptor

CDX 2018 Ransomware Decryptor
Go
2
star
51

upscale-win

Workflow for upscaling and interpolating videos with NVIDIA TensorRT acceleration
Python
2
star
52

handbraked

Watch and convert videos in a directory using Handbrake
Go
2
star
53

vscode-essay

A VSCode template for HTML and PDF generation from Markdown with GitHub-style theme and extras
CSS
2
star
54

APlusGenerator

A code generator for the APlus project
C#
2
star
55

gomobiler

A stripped-down gomobile to easily build go executables for Android
Go
2
star
56

APlus

An application aiming to create truly anonymous school examination sheets while keeping things simple
C#
2
star
57

z3-wasm

Run Z3 entirely in your browser using WebAssembly
JavaScript
1
star
58

tcp-packet-parser

A PCAP analyzer that filters TCP packets and dumps them with appropriate labels
Go
1
star
59

docker-windows-process-isolation

🛳 Install Docker in process isolation mode on Windows
PowerShell
1
star
60

gitlab-gitea-migrator

Batch repository migrator from GitLab to Gitea using their APIs
Python
1
star
61

APlusServer

The server part of the APlus project
PHP
1
star
62

ieReplace

Replace Internet Explorer 11 with a stub that redirects URLs to Edge
C++
1
star
63

human-bot

A bot for МSTanks with a twist
Python
1
star
64

vscode-smali

Smali syntax highlighting for VS Code
CoffeeScript
1
star
65

NaniteProtector-demo

A demo of the Nanite Protector for Java
1
star
66

optic-go

Utilities for API generation using Optic in Go
Go
1
star
67

jekyll-bootstrap-mermaid-template

A clean and simple Jekyll + Bootstrap 4 + Mermaid template
SCSS
1
star
68

docker-windows-patcher

🚢 A memory patch to workaround Windows bug with Docker
C++
1
star