C#逆向反编译工具JetBrains dotPeek

1、dotPeek

官网地址:https://www.jetbrains.com/decompiler/
dotPeek 是 JetBrains 开发的一款.Net反编译工具,是.Net工具套件中的一个。

  • 将 .NET 程序集反编译为 C#

dotPeek 是一款基于 ReSharper 捆绑反编译器的免费独立工具。 它可以可靠地将任意 .NET 程序集反编译为对等的 C# 或 IL 代码。

这款反编译器支持包括库 (.dll)、可执行文件 (.exe) 和 Windows 元数据文件 (.winmd) 在内的多种格式。

  • 将反编译代码导出至 Visual Studio 项目

在反编译完程序集后,您可以将其另存为 Visual Studio 项目 (.csproj)。 如果您需要从旧程序集恢复丢失的源代码,此举可以为您节省大量的时间。

  • 下载源代码并调试第三方代码

dotPeek 可以根据 PDB 文件识别本地源代码,或者从 Microsoft Reference Source Center 或 SymbolSource 等源服务器中获取源代码。

dotPeek 还可以作为符号服务器运行,为 Visual Studio 调试器提供调试程序集代码所需的信息。
在这里插入图片描述
在这里插入图片描述
以下是使用dotPeek反编译作者写的C#程序的.exe(ProjectManager.exe):
在这里插入图片描述

2、ILSpy

官网地址:https://github.com/icsharpcode/ILSpy

ILSpy is the open-source .NET assembly browser and decompiler.

.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
在这里插入图片描述
以下是使用ILSpy反编译作者写的C#程序的.exe(ProjectManager.exe):
在这里插入图片描述

3、dnSpy

官网地址:https://github.com/dnSpy/dnSpy

dnSpy is a debugger and .NET assembly editor. You can use it to edit and debug assemblies even if you don’t have any source code available.

dnSpy是一款开源的基于ILSpy发展而来的.net程序集的编辑,反编译,调试神器。
主要功能:1、程序集编辑;2、反编译器;3、调试工具;4、Tabs及tabs分组;5、提供多主题。
在这里插入图片描述
以下是使用dnSpy反编译作者写的C#程序的.exe(ProjectManager.exe):
在这里插入图片描述

4、.NET Reflector

官网地址:https://www.red-gate.com/products/dotnet-development/reflector/

Decompile, understand, and fix any .NET code, even if you don’t have the source.
在这里插入图片描述

  • Look inside any .NET code
    Debug your application
    Follow bugs through your application to see where the problem is – your own code, third-party libraries, or components used by your application.

  • Understand how applications work
    Inherited an application with no documentation and no comments? Use .NET Reflector to understand how the code runs and avoid bugs.

  • Look inside APIs, SharePoint, and other third-party platforms
    Third-party platforms aren’t always well-documented. Use .NET Reflector to look inside their assemblies, and see how they work and which APIs you can call.

以下是使用Reflector反编译作者写的C#程序的.exe(ProjectManager.exe):
在这里插入图片描述

5、ildasm

官网地址:https://docs.microsoft.com/zh-cn/dotnet/framework/tools/ildasm-exe-il-disassembler

IL 反汇编程序是 IL 汇编程序 (Ilasm.exe) 的配套工具。 Ildasm.exe 可利用包含中间语言 (IL) 代码的可移植可执行 (PE) 文件,并创建适合输入到 Ilasm.exe 的文本文件 。

此工具会自动随 Visual Studio 一起安装。 若要运行该工具,请使用 Visual Studio 开发人员命令提示或 Visual Studio 开发人员 PowerShell。

以下是使用ildasm反编译作者写的C#程序的.exe(ProjectManager.exe):

在这里插入图片描述
查看C#的dll或exe所依赖.Net版本。
Microsoft SDK自带的ildasm.exe工具, 是一个反编译工具, 可以查看编译好后的dll的文件。
双击ildasm.exe, 把你要识别的.dll文件拖进来, 就会反编译了. 接着在ildasm里, 双击第一行的MANIFEST, 前面五行会类似如下显示, 注意一定要是mscorlib。
当你看到.ver 1:0:5000:0, 说明它是在.net1.1的版本下编译的;
如果看到的是.ver 2:0:0:0, 说明它是.net2.0版本下编译的。
这里看到的是.ver 4:0:0:0,说明它是.net4.0版本下编译的。

在这里插入图片描述

后记

如果你觉得该方法或代码有一点点用处,可以给作者点个赞、赏杯咖啡;╮( ̄▽ ̄)╭
如果你感觉方法或代码不咋地//(ㄒoㄒ)//,就在评论处留言,作者继续改进。o_O???
谢谢各位童鞋们啦( ´ ▽´ )ノ ( ´ ▽´)っ!!!

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
THE END
分享
二维码
< <上一篇
下一篇>>