1. 程式人生 > >推薦.Net、C# 逆向反編譯四大工具利器

推薦.Net、C# 逆向反編譯四大工具利器

都是 byte 團隊 arr ica 信息 fill blank csdn

在項目開發過程中,估計也有人和我遇到過同樣的經歷:運行環境出現了重大Bug亟需解決、或者由於電腦掛了、舊代碼覆蓋新代碼,而在這種情況下,我們不能直接在當前的代碼中修改這個Bug然後發布,這會導致更嚴重的問題,因為相當於版本回退了。還有電腦掛了代碼整個都沒有,這種情況下 我們只能只能利用一些逆向的技巧和工具了 來解析在服務器發布好的dll。那麽你只是單純的修改一個.Net程序集中的某個方法或功能,而且這個程序集還是出自於你自己或你所在團隊之手,這實在是一件非常容易的事情,這和破解別人的程序完全不同,你不會遇到無法破解的加密算法,也不會遇到讓人惡心的加殼混淆。所以我要把用過的工具一個個的列出來總結一下。

推薦四大發編譯工具

1:.Net Reflector 【收費】

一提起.Net逆向,其實很多人第一反應都是Reflector這款神器,這一方面是由於Reflector良好的用戶體驗和強大的插件功能,另一方面要歸功於Reflector堪稱完美的智能反編譯能力,使用它不僅能看到反編譯後的IL源碼甚至能直接反編譯出C#源碼,而且和編寫時的代碼幾無二致,如果需要還可以直接另存為工程文件用Visual Studio打開,不過現在已經收費了,所以老司機都選擇破解版,有錢人選擇正版。 破解地址就不在這裏放出,大家自行搜索.

使用方法:可以直接把dll、exe拖放到左側,或者文件選擇選擇

官方網址:http://www.red-gate.com/products/dotnet-development/reflector/

技術分享圖片

2:ILSpy/dnSpy 【免費】

ILSpy是唯一免費且開源的.NET反編譯器,它基於MIT許可證發布。ILSpy的代碼生成和語法高亮功能做的非常好。對於反編譯的程序集,它既可以將其保存在一個文件中,也可以為所有文件創建一個項目。ILSpy是一個獨立的工具,沒有Visual Studio集成。,ILSpy 是為了完全替代收費的Reflector而生,它是由 iCSharpCode 團隊出品,這個團隊開發了著名的 SharpDevelop 。ILSpy 完全開源,ILSpy的使用和上面的Reflector完全類似,可以直接把dll、exe拖放到左側,或者文件選擇選擇。

官方網址:http://ilspy.net/跳轉到https://github.com/icsharpcode/ILSpy

技術分享圖片

ILSPY還有一款同門師弟,感覺比ILSPY還強大

dnSpy is a .NET assembly editor, decompiler, and debugger forked from ILSpy

* Assembly editor
* Decompiler
* Debugger
* Tabs and tab groups
* Themes (blue, dark, light and high contrast)

If you want to help, fork the project and send pull requests.

Latest release: https://github.com/0xd4d/dnSpy/releases

Latest build: https://ci.appveyor.com/project/0xd4d/dnspy/build/artifacts

技術分享圖片

3:JetBrains dotPeek【免費】

JetBrains是捷克的一家軟件開發公司,出品了大量著名的開發工具,包括:IntelliJ IDEA、PHPStorm、ReSharper、TeamCity、YouTrack等等,每一款產品都如雷貫耳。dotPeek 是 JetBrains 開發的一款.Net反編譯工具,是.Net工具套件中的一個相比於前面幾款工具來說,dotPeek算比較小眾的一款,它生成的代碼質量很高,它還會嘗試到源代碼服務器上抓取代碼。DotPeek的導航功能和快捷鍵非常便捷。它還能精確查找符號的使用,同時支持插件。DotPeek不能與Visual Studio集成。個人感覺它最大的特色就是Visual Studio風格,這對於那些長期在Visual Studio下進行開發的人來說應該更親切一點。

官方網址:http://www.jetbrains.com/decompiler/

技術分享圖片

4:Telerik JustDecompile 【需要輸入信息安裝】不喜歡這個就卸載了

Telerik JustDecompile是一個免費的.NET反編譯器,但是有商業化支持。它生成的代碼質量也很高。它可以為反編譯程序集得到的代碼創建一個項目。JustDecompile提供了健壯的查找功能,能夠支持全文查找和符號使用查找。它還有一個插件系統,目前在Telerik的網站上有兩個可用的擴展。JustDecompile不能與Visual Studio集成。

官方網址:http://www.telerik.com/products/decompiler.aspx

技術分享圖片

總結:

使用舒服些如下:

dnSPY>ILSPY>Net Reflector>doPeek

下面是一個dll裏面的方法反編譯後的對比:

技術分享圖片

技術分享圖片

技術分享圖片

技術分享圖片

轉:https://blog.csdn.net/crisschan/article/details/53170847

dnSpy - 一款 .NET 程序逆向工具

項目地址:https://github.com/0xd4d/dnSpy

項目作者:0xd4d

dnSpy 是一款針對 .NET 程序的逆向工程工具。該項目包含了反編譯器,調試器和匯編編輯器等功能組件,而且可以通過自己編寫擴展插件的形式輕松實現擴展。該項目使用 dnlib讀取和寫入程序集,以便處理有混淆代碼的程序(比如惡意程序)而不會崩潰。

已發布工具的下載地址:

最新發布:https://github.com/0xd4d/dnSpy/releases

或者通過源碼構建該項目,參考 Wiki

特性展示

Edit any method, property or event in C# or Visual Basic

技術分享圖片

Edit any type (class), method, property, event, field

技術分享圖片

Add, remove, rename any type (class), method, property, event, field

技術分享圖片

Edit, add, remove .NET resources and save them to disk

技術分享圖片

The IL editor allows editing method bodies at the IL level: IL instructions, locals, exception handlers

技術分享圖片

技術分享圖片

Debug any .NET assembly, no source code required

技術分享圖片

Raw contents of locals (eg. decrypted byte arrays) can be saved to disk

技術分享圖片

Optimizations for smaller screens

技術分享圖片

Multiple tabs and tab groups

技術分享圖片

Search assemblies

技術分享圖片

Assembly analyzer

技術分享圖片

Highlighted references, keywords, use Tab, Shift+Tab, Ctrl+Shift+Up, Ctrl+Shift+Down to select next or previous reference or Alt+Up/Down for next definition

技術分享圖片技術分享圖片

Structure visualizer adds colorized vertical guide lines between braces; loops, try/catch and conditional blocks are shown in different colors

技術分享圖片

Structure visualizer is very useful when you‘re in a method like this:

技術分享圖片

Go to: Entry Point, Module Initializer, MD Token, MD Table Row

技術分享圖片技術分享圖片技術分享圖片

Syntax highlighted tooltips with XML doc comments when hovering over a type (class), method, property, event, field

技術分享圖片

Background images can be shown in the text editor

技術分享圖片

Same image with left margin and top margin set to 75%

技術分享圖片

Export to project decompiles all selected assemblies and creates a Visual Studio solution

技術分享圖片

Command line decompiler, supports Windows, Linux, Mac

技術分享圖片

Scripting with C# REPL, control the debugger and other extensions with C#

技術分享圖片

Hex editor

技術分享圖片

Metadata editor, click on a token or press Ctrl+Shift+D

技術分享圖片技術分享圖片

該項目的翻譯相關

如果你想要幫助翻譯 dnSPY 成其它語言,請點擊此處。

Wiki

具體命令和編譯相關的內容請參考 Wiki 。

轉:https://blog.csdn.net/kongwei521/article/details/54927689

推薦.Net、C# 逆向反編譯四大工具利器