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

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

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

 

在專案開發過程中,估計也有人和我遇到過同樣的經歷:執行環境出現了重大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

在專案開發過程中,估計也有人和我遇到過同樣的經歷:執行環境出現了重大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