De4dot 参数详解OptionsFile optionsDeobfuscator options语法例子 使用查壳dnspy 解混淆运行软件解混淆后查壳解混淆后dnspy

参数详解

吾爱破解有比较详细的帖子
下载链接
CSDN
GitHub
爱盘

Options

//全局参数
-r DIR Scan for .NET files in all subdirs
//搜索当前目录以及子目录中所有程序集并去混淆
-ro DIR Output base dir for recursively found files
//同-r参数,但是并不搜索子目录,仅限当前目录
-ru Skip recursively found files with unsupported obfuscator
//跳过查找到带有de4dot不支持的混淆器的程序集
-d Detect obfuscators and exit
//查明混淆器名称,然后退出de4dot
–asm-path PATH Add an assembly search path
//增加一个被搜索的目录
–dont-rename Don’t rename classes, methods, etc.
//禁止所有重命名(比如类,方法,字段,属性,资源…)
–keep-names FLAGS
Don’t rename n(amespaces), t(ypes), p(rops), e(vents), f(ields), m(ethods), a(rgs), g(enericparams), d(elegate fields). Can be combined, eg. efm
//禁止对指定内容重命名。比如我不想重命名命名空间、类名和方法名,那么我可以添加这样一个参数”–keep-names ntm”,这里的n代表namespaces,t代表types,m代表methods
–dont-create-params
Don’t create method params when renaming
//在重命名时不创建方法参数
–dont-restore-props
Don’t restore properties/events
//不还原属性和事件
–default-strtyp TYPE
Default string decrypter type
//与–strtyp类似
–default-strtok METHOD
Default string decrypter method token or [type::][name][(args,…)]
//与–strtok类似
–no-cflow-deob No control flow deobfuscation (NOT recommended)
//不还原控制流混淆(举个例子,ConfuserEx的恐怖的switch,几乎只能让程序来还原)
–only-cflow-deob
Only control flow deobfuscation
//仅还原控制流混淆
–load-new-process
Load executed assemblies into a new process
//将程序集放在新进程中进行解混淆处理
–keep-types Keep obfuscator types, fields, methods
//保留混淆器类、字段和方法
–preserve-tokens
Preserve important tokens, #US, #Blob, extra sig data
//保持tokens不变,包括#US, #Blob, extra sig data。比如有个方法的token是0x06000008,不使用这个选项,去混淆之后某方法的token可能会变成0x06000004(比如这之前有4个无效方法被de4dot移除了),使用这个选项之后,无论怎样,方法的token始终是0x06000008
–preserve-table FLAGS
Preserve rids in table: tr (TypeRef), td (TypeDef), fd (Field), md (Method), pd (Param), mr (MemberRef), s (StandAloneSig), ed (Event), pr (Property), ts (TypeSpec), ms (MethodSpec), all (all previous tables). Use – to disable (eg. all,-pd). Can be combined: ed,fd,md
//保持表中指定种类的tokens不变。比如”–preserve-table ed,fd,md”,”–preserve-table all”
–preserve-strings
Preserve #Strings heap offsets
//保持#Strings堆偏移不变
–preserve-us Preserve #US heap offsets
//保持#US堆偏移不变
–preserve-blob Preserve #Blob heap offsets
//保持#Blob堆偏移不变
–preserve-sig-data
Preserve extra data at the end of signatures
//保持额外的签名数据偏移不变
–one-file Deobfuscate one file at a time
//一次只对一个程序集去混淆
-v Verbose
//显示详细信息
-vv Very verbose
//显示更多详细信息(?应该是,反正和-v一样都会显示信息)
-h Show this help message
//显示帮助,就是我翻译的这些内容
–help Same as -h
//同-h

File options

//局部参数
-f FILE Name of .NET file
//指定被去混淆的程序集的路径(可以是相对路径或者绝对路径)
-o FILE Name of output file
//指定输出去混淆后的程序集的路径(可以是相对路径或者绝对路径)
-p TYPE Obfuscator type (see below)
//指定混淆器类型(下面写了)
–strtyp TYPE String decrypter type
//指定如何使用字符串解密器(字符串解密器指的是被混淆程序集中的一个方法)
–strtok METHOD String decrypter method token or [type::][name][(args,…)]
//指定哪一个方法作为字符串解密器

Deobfuscator options

//混淆器参数(我就不翻译了,因为有些没用过,不是很常用)
//比如–un-name REGEX Valid name regex pattern (^[a-zA-Z_<{$][a-zA-Z_0-9<>{}$.-]*$)`

//全大写单词代表一个参数,最尾处有一个括号,里面代表默认参数,如果你不填这个参数,那么de4dot认为你输入了–un-name ^[a-zA-Z_<{$][a-zA-Z_0-9<>{}$.-]*$`,因为这是默认的
//这里有个地方要注意,REGEX的内容一定要用””包起来,比如–un-name ^就是无效的,–un-name “^”是有效的
//而BOOL只要直接输入True/False,比如–an-methods True

语法例子 de4dot.exe -r c:\my\files -ro c:\my\outputde4dot.exe file1 file2 file3de4dot.exe file1 -f file2 -o file2.out -f file3 -o file3.outde4dot.exe file1 –strtyp delegate –strtok 06000123 使用 查壳

常见的比如PEiD、Exeinfo PE

dnspy

混淆后,阅读性极差

解混淆 运行软件

以控制台界面,在所在目录打开运行
可通过Shift+右击,选择在此处打开PowerShell窗口

需要解混淆的文件,放在同目录下面比较方便,不放的话,输入绝对路径也行

de4dot.exe [同文件夹下要解混淆的文件名(或者绝对路径)] -o [解混淆后.exe(或者绝对路径)]

解混淆后查壳

解混淆我一查,还是有混淆啊!尴尬啊
不过还是有变的信息啦?

解混淆后dnspy