De4Dot是一个很强的.Net程序脱壳,反混淆工具,支持对于以下工具混淆过的代码的清理:如 Xenocode、.NET Reactor、MaxtoCode、Eazfuscator.NET、Agile.NET、Phoenix Protector、Manco Obfuscator 、CodeWall、NetZ .NET Packer 、Rpx .NET Packer、Mpress .NET Packer、ExePack .NET Packer、Sixxpack .NET Packer、Rummage Obfuscator、Obfusasm Obfuscator、Confuser 1.7、Agile.NET、Babel.NET、CodeFort、CodeVeil、CodeWall、CryptoObfuscator、DeepSea Obfuscator、Dotfuscator、 Goliath.NET、ILProtector、MPRESS、Rummage、SmartAssembly、Skater.NET、Spices.Net 等。

另外,在软件保护混淆时,关键位置使用虚拟化混淆,de4dot没法还原的。

下载:

原作者0xd4d 的github地址: https://github.com/0xd4d/de4dot  版本是:de4dot 3.1.41592

Tianjiao基于0xd4d的de4dot,推出了修改版:https://github.com/Tianjiao/de4dot  版本是:de4dot mod

Assets

de4dot-net472.zip

de4dot-netcoreapp2.2.zip

Source code(zip)

Source code(tar.gz)

安装:

  1. Tianjiao修改的版,提供已编译好的可执行文件。

  2. 由于de4dot是用C#编写的开源(GPLv3).NET解混淆器和解压缩器,也可以下载源码,用Microsoft Visual Studio打开de4dot.netframework.sln 工程,简单配置编译条件变量 NETFRAMEWORK ,设置Release 模式,编译获得可执行文件。

用法:

1.  将文件拖放到de4dot.exe上,然后等待几秒钟即可去除混淆。

2. Deobfuscate一次多个文件

1

   de4dot -r c:input -ru -ro c:output

3. 检测混淆器
使用 -d 选项在没有deobfuscating的情况下检测混淆器。

1

2

de4dot -d -r c:input

de4dot -d file1.dll file2.dll file3.dll

4. 找到所有反混淆dll/exe并反混淆:

1

de4dot -r c:\input -ru -ro c:\output

5. 使用de4dot-x64.exe 脱壳C# dll  exe 文件:

1

de4dot "d:\xx.exe" -p xc

  • -p xc  指定壳类型 , 这里是xc,表示Xenocode壳.

  • 这样会在exe的相同目录生成一个 xx_cleaned.exe 的文件

  • 要指定输出路径请使用 -o "d:\output\xx.exe"

6.其他

小窍门:如果在使用de4dot的过程中碰到如下错误,只需连续按“忽略”按钮15次,或者在命令行中使用"--dont-rename"选项。

帮助文档:

== MaxtoCode (3.79sp1) - (3.87) Partial Fix by Tianjiao ==
Source code: https://github.com/Tianjiao/de4dot

Some of the advanced options may be incompatible, causing a nice exception.
With great power comes great responsibility.

de4dot <options> <file options>
Options:
  -r DIR           Scan for .NET files in all subdirs
  -ro DIR          Output base dir for recursively found files
  -ru              Skip recursively found files with unsupported obfuscator
  -d               Detect obfuscators and exit
  --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
  --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
  --default-strtok METHOD
                   Default string decrypter method token or [type::][name][(args,...)]
  --no-cflow-deob  No control flow deobfuscation (NOT recommended)
  --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
  --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
  --preserve-strings
                   Preserve #Strings heap offsets
  --preserve-us    Preserve #US heap offsets
  --preserve-blob  Preserve #Blob heap offsets
  --preserve-sig-data
                   Preserve extra data at the end of signatures
  --one-file       Deobfuscate one file at a time
  -v               Verbose
  -vv              Very verbose
  -h               Show this help message
  --help           Same as -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:
Type un (Unknown)
  --un-name REGEX  Valid name regex pattern (^[a-zA-Z_<{$][a-zA-Z_0-9<>{}$.`-]*$)

Type an (Agile.NET)
  --an-name REGEX  Valid name regex pattern (^[\u2E80-\u9FFFa-zA-Z_<{$][\u2E80-\u9FFFa-zA-Z_0-9<>{}$.`-]*$)
  --an-methods BOOL
                   Decrypt methods (True)
  --an-rsrc BOOL   Decrypt resources (True)
  --an-stack BOOL  Remove all StackFrameHelper code (True)
  --an-vm BOOL     Restore VM code (True)
  --an-initlocals BOOL
                   Set initlocals in method header (True)

Type bl (Babel .NET)
  --bl-name REGEX  Valid name regex pattern (^[\u2E80-\u9FFFa-zA-Z_<{$][\u2E80-\u9FFFa-zA-Z_0-9<>{}$.`-]*$)
  --bl-inline BOOL Inline short methods (True)
  --bl-remove-inlined BOOL
                   Remove inlined methods (True)
  --bl-methods BOOL
                   Decrypt methods (True)
  --bl-rsrc BOOL   Decrypt resources (True)
  --bl-consts BOOL Decrypt constants and arrays (True)
  --bl-embedded BOOL
                   Dump embedded assemblies (True)

Type cf (CodeFort)
  --cf-name REGEX  Valid name regex pattern (!^[a-zA-Z]{1,3}$&!^[_<>{}$.`-]$&^[\u2E80-\u9FFFa-zA-Z_<{$][\u2E80-\u9FFFa-zA-Z_0-9<>{}$.`-]*$)
  --cf-embedded BOOL
                   Dump embedded assemblies (True)

Type cv (CodeVeil)
  --cv-name REGEX  Valid name regex pattern (!^[A-Za-z]{1,2}$&^[\u2E80-\u9FFFa-zA-Z_<{$][\u2E80-\u9FFFa-zA-Z_0-9<>{}$.`-]*$)

Type cw (CodeWall)
  --cw-name REGEX  Valid name regex pattern (!^[0-9A-F]{32}$&!^[_<>{}$.`-]$&^[\u2E80-\u9FFFa-zA-Z_<{$][\u2E80-\u9FFFa-zA-Z_0-9<>{}$.`-]*$)
  --cw-embedded BOOL
                   Dump embedded assemblies (True)
  --cw-decrypt-main BOOL
                   Decrypt main embedded assembly (True)

Type cr (Confuser)
  --cr-name REGEX  Valid name regex pattern (^[a-zA-Z_<{$][a-zA-Z_0-9<>{}$.`-]*$)
  --cr-antidb BOOL Remove anti debug code (True)
  --cr-antidump BOOL
                   Remove anti dump code (True)
  --cr-decrypt-main BOOL
                   Decrypt main embedded assembly (True)

Type co (Crypto Obfuscator)
  --co-name REGEX  Valid name regex pattern (!^(get_|set_|add_|remove_)?[A-Z]{1,3}(?:`\d+)?$&!^(get_|set_|add_|remove_)?c[0-9a-f]{32}(?:`\d+)?$&^[\u2E80-\u9FFFa-zA-Z_<{$][\u2E80-\u9FFFa-zA-Z_0-9<>{}$.`-]*$)
  --co-tamper BOOL Remove tamper protection code (True)
  --co-consts BOOL Decrypt constants (True)
  --co-inline BOOL Inline short methods (True)
  --co-ldnull BOOL Restore ldnull instructions (True)

Type ds (DeepSea)
  --ds-name REGEX  Valid name regex pattern (^[\u2E80-\u9FFFa-zA-Z_<{$][\u2E80-\u9FFFa-zA-Z_0-9<>{}$.`-]*$)
  --ds-inline BOOL Inline short methods (True)
  --ds-remove-inlined BOOL
                   Remove inlined methods (True)
  --ds-rsrc BOOL   Decrypt resources (True)
  --ds-embedded BOOL
                   Dump embedded assemblies (True)
  --ds-fields BOOL Restore fields (True)
  --ds-keys BOOL   Rename resource keys (True)
  --ds-casts BOOL  Deobfuscate casts (True)

Type df (Dotfuscator)
  --df-name REGEX  Valid name regex pattern (!^(?:eval_)?[a-z][a-z0-9]{0,2}$&!^A_[0-9]+$&^[\u2E80-\u9FFFa-zA-Z_<{$][\u2E80-\u9FFFa-zA-Z_0-9<>{}$.`-]*$)

Type dr3 (.NET Reactor)
  --dr3-name REGEX Valid name regex pattern (^[\u2E80-\u9FFFa-zA-Z_<{$][\u2E80-\u9FFFa-zA-Z_0-9<>{}$.`-]*$)
  --dr3-types BOOL Restore types (object -> real type) (True)
  --dr3-inline BOOL
                   Inline short methods (True)
  --dr3-remove-inlined BOOL
                   Remove inlined methods (True)
  --dr3-ns1 BOOL   Clear namespace if there's only one class in it (True)
  --dr3-sn BOOL    Remove anti strong name code (True)

Type dr4 (.NET Reactor)
  --dr4-name REGEX Valid name regex pattern (^[\u2E80-\u9FFFa-zA-Z_<{$][\u2E80-\u9FFFa-zA-Z_0-9<>{}$.`-]*$)
  --dr4-methods BOOL
                   Decrypt methods (True)
  --dr4-bools BOOL Decrypt booleans (True)
  --dr4-types BOOL Restore types (object -> real type) (True)
  --dr4-inline BOOL
                   Inline short methods (True)
  --dr4-remove-inlined BOOL
                   Remove inlined methods (True)
  --dr4-embedded BOOL
                   Dump embedded assemblies (True)
  --dr4-rsrc BOOL  Decrypt resources (True)
  --dr4-ns1 BOOL   Clear namespace if there's only one class in it (True)
  --dr4-sn BOOL    Remove anti strong name code (True)
  --dr4-sname BOOL Rename short names (False)

Type ef (Eazfuscator.NET)
  --ef-name REGEX  Valid name regex pattern (!^[a-zA-Z]$&!^#=&!^dje_.+_ejd$&^[\u2E80-\u9FFFa-zA-Z_<{$][\u2E80-\u9FFFa-zA-Z_0-9<>{}$.`-]*$)

Type go (Goliath.NET)
  --go-name REGEX  Valid name regex pattern (!^[A-Za-z]{1,2}(?:`\d+)?$&^[\u2E80-\u9FFFa-zA-Z_<{$][\u2E80-\u9FFFa-zA-Z_0-9<>{}$.`-]*$)
  --go-inline BOOL Inline short methods (True)
  --go-remove-inlined BOOL
                   Remove inlined methods (True)
  --go-locals BOOL Restore locals (True)
  --go-ints BOOL   Decrypt integers (True)
  --go-arrays BOOL Decrypt arrays (True)
  --go-sn BOOL     Remove anti strong name code (True)

Type il (ILProtector)
  --il-name REGEX  Valid name regex pattern (^[\u2E80-\u9FFFa-zA-Z_<{$][\u2E80-\u9FFFa-zA-Z_0-9<>{}$.`-]*$)

Type mc (MaxtoCode)
  --mc-name REGEX  Valid name regex pattern (!^[oO01l]+$&!^[A-F0-9]{20,}$&^[\u2E80-\u9FFFa-zA-Z_<{$][\u2E80-\u9FFFa-zA-Z_0-9<>{}$.`-]*$)
  --mc-cp INT      String code page (936)

Type mp (MPRESS)
  --mp-name REGEX  Valid name regex pattern (^[\u2E80-\u9FFFa-zA-Z_<{$][\u2E80-\u9FFFa-zA-Z_0-9<>{}$.`-]*$)

Type rm (Rummage)
  --rm-name REGEX  Valid name regex pattern (!.)

Type sk (Skater .NET)
  --sk-name REGEX  Valid name regex pattern (!`[^0-9]+&^[\u2E80-\u9FFFa-zA-Z_<{$][\u2E80-\u9FFFa-zA-Z_0-9<>{}$.`-]*$)

Type sa (SmartAssembly)
  --sa-name REGEX  Valid name regex pattern (^[\u2E80-\u9FFFa-zA-Z_<{$][\u2E80-\u9FFFa-zA-Z_0-9<>{}$.`-]*$)
  --sa-error BOOL  Remove automated error reporting code (True)
  --sa-tamper BOOL Remove tamper protection code (True)
  --sa-memory BOOL Remove memory manager code (True)

Type sn (Spices.Net)
  --sn-name REGEX  Valid name regex pattern (!^[a-zA-Z0-9]{1,2}$&^[\u2E80-\u9FFFa-zA-Z_<{$][\u2E80-\u9FFFa-zA-Z_0-9<>{}$.`-]*$)
  --sn-inline BOOL Inline short methods (True)
  --sn-remove-inlined BOOL
                   Remove inlined methods (True)
  --sn-ns1 BOOL    Clear namespace if there's only one class in it (True)
  --sn-rsrc BOOL   Restore resource names (True)

Type xc (Xenocode)
  --xc-name REGEX  Valid name regex pattern (!^[oO01l]{4,}$&!^(get_|set_|add_|remove_|_)?[x_][a-f0-9]{16,}$&^[\u2E80-\u9FFFa-zA-Z_<{$][\u2E80-\u9FFFa-zA-Z_0-9<>{}$.`-]*$)

String decrypter types
  none             Don't decrypt strings
  default          Use default string decrypter type (usually static)
  static           Use static string decrypter if available
  delegate         Use a delegate to call the real string decrypter
  emulate          Call real string decrypter and emulate certain instructions

Multiple regexes can be used if separated by '&'.
Use '!' if you want to invert the regex. Example: !^[a-z\d]{1,2}$&!^[A-Z]_\d+$&^[\w.]+$

Examples:
de4dot -r c:\my\files -ro c:\my\output
de4dot file1 file2 file3
de4dot file1 -f file2 -o file2.out -f file3 -o file3.out
de4dot file1 --strtyp delegate --strtok 0600012

参考资料

1)de4dot 反混淆工具使用 https://blog.csdn.net/u012278016/article/details/104659622

2)脱壳工具 - De4dot https://blog.csdn.net/JiangBuLiu/article/details/94721590

3) 自己修改的de4dot专克MaxtoCode https://bbs.pediy.com/thread-247482.htm

来源:

[分享].Net脱壳利器de4dot介绍-加壳脱壳-看雪论坛-安全社区|安全招聘|bbs.pediy.com  https://bbs.pediy.com/thread-259563.htm

[分享].Net脱壳利器de4dot介绍相关推荐

  1. python利器怎么编程-bluepy 一款python封装的BLE利器简单介绍

    1.bluepy 简介 bluepy 是github上一个很好的蓝牙开源项目,其地址在 LINK-1, 其主要功能是用python实现linux上BLE的接口. This is a project t ...

  2. 虹科分享 | 简单实用的CANopen介绍,看完你就明白了(2)——CANopen框架与七种服务类型

    目前,CANopen通讯协议已经在工业领域得到了广泛的使用,由于其面向对象的设计思路,CANopen协议已成为欧洲等国家的自动化公司标配的通讯接口之一.在本系列文章中,我们将介绍CANopen协议的基 ...

  3. office deployment tool_工具 | 分享一个小利器,从此 Office 快速打开不是事

    平常打开 Office 软件(Word.Excel.PowerPoint),大家有没有觉得有点慢呢? 为了提升软件利用效率,很多人给 Office 软件安装了各种各样的插件,不过因此,软件打开也变慢了 ...

  4. 【案例分享】高效率利器 - SC 频谱分析仪

    Case Study - 案例分享 公司 主题 Tele2, Latvia (拉脱维亚 - 欧洲国家) 高效率利器 - SC频谱分析仪 地图 介绍 干扰是移动运营商必须面对的最常见问题之一.性能不足的 ...

  5. PMCAFF微分享 | 供应链金融套利套汇介绍

    分享主题:供应链金融&套利套汇介绍 分享时间:7月4日(周六)21:30 分享地点:PMcaff互联网金融群|第七期 分享嘉宾:Julie Yao&Johnson 文字整理:May-天 ...

  6. Web前端培训分享:前端开源平台介绍

    作为一个前端开发者,写代码处理BUG是日常,我们可以通过去看一些大神的代码来学习大神的思路,今天小千就来给大家介绍几个国内可以访问的开源代码平台. 1.GitHub:这个就不用多说了,程序员都知道.全 ...

  7. Jerry在2020 SAP全球技术大会的分享:SAP Spartacus技术介绍的文字版

    这是Jerry 2020年的第86篇文章,也是汪子熙公众号总共第268篇原创文章. 这篇文章的视频版本如下: https://v.qq.com/x/page/b3212l6kqvg.html 这个分享 ...

  8. html按钮分享功能实现,一个分享按钮的插件使用介绍(可扩展,内附开发制作流程)...

    前几天由于工作需要制作一个分享按钮,考虑到后续其他项目可能也会用到,于是就打算写成插件化,正好也给我自己的插件jquery.hooray增加一个新的功能,为了不浪费大家时间,我先把demo放出来,如果 ...

  9. mac 查看环境变量_Mac开工利器Homebrew介绍

    前言 最近好多测试小伙伴悄然换上了MAC,下面介绍一款攻城狮们macOS下都在用的神器-Homebrew. 一.Homebrew简介 Homebrew是一款Mac OS平台下的软件包管理工具,拥有安装 ...

  10. 切分数据集(train_test_split),思路分享及手打代码和介绍sklearn中train_test_split,适合小白入门

    本篇博客介绍train_test_split,步骤1-4是自己手打代码和思路分享,步骤5介绍如何使用sklearn中的train_test_split,步骤3有介绍随机种子哦,简单易懂,适合小白入门 ...

最新文章

  1. 新手必看的编程介绍,帮你推荐学习方案!
  2. Macosx Setdns
  3. linux网卡内核文件在哪里,linux-2.6.35内核配置和网卡驱动添加
  4. linux安装python3教程_linux下安装python3和对应的pip环境教程详解
  5. PLM Integration
  6. 【转】第00课导读:生活中的设计模式——启程之前,请不要错过我
  7. 2. 移动安全渗透测试-(Android安全基础)
  8. navicat for mysql 数据传输_如何利用Navicat for MySQL数据库进行数据传输
  9. Silverlight.XNA(C#)跨平台3D游戏研发手记:(七)向Windows Phone移植之双向交互
  10. 日志分隔工具Cronolog
  11. Ubuntu 19.04 缺少libpng12.so.0
  12. oa系统是什么?如何使用企业oa办公系统?
  13. 高级UI-滤镜和颜色通道
  14. 使用Xcode8遇到的问题以及解决方案
  15. macOS Big Sur 11.6.6 (20G624) 正式版 ISO、PKG、DMG、IPSW 下载
  16. python 爬取漫画《黑鹭尸体宅配便》
  17. CRMEB商城直播功能-微信小程序直播
  18. android9 apk自动安装功能,如何在Android7.0、8.0、9.0系统下通过Intent安装apk
  19. matlab 零速检测,一种基于车辆零速检测的惯性导航误差修正方法与流程
  20. sendto recvfrom 详解

热门文章

  1. Jetson Xavier中安装DIGITS-》Caffee中的错误
  2. 测试用例(二)APP基本功能测试用例
  3. 2021年“泰迪杯”数据分析技能B题-肥料登记数据分析赛题
  4. rgba颜色转换16进制颜色
  5. 24点自动出题,可打印,A4排版
  6. VB基础知识之Do...Loop循环
  7. 火狐firebug和firepath插件安装
  8. 【Scratch案例教学】scratch手把手教小朋友制作飞机大战、空中格斗、星际争霸等超酷游戏
  9. 英特尔傲腾技术:部署更简单,内存提升游戏性能
  10. hi3559_imx334_sensor修改配置1080P60