More Group Sites
Education Books
School Rankings
Jobless Net
Better Home
Enviro++
更好教育论坛


Help | Subscribe/Unsubscribe | Rules | Other Group Sites: Better Education | Better Education Forum
 
Welcome Guest Search | Active Topics | Members | Log In | Register

Decompile a .NET assembly using ildasm.exe and edit and recompile it using ilasm.exe Options · View
hong
Posted: Tuesday, June 23, 2009 5:34:34 AM

Rank: Administration
Groups: Administration

Joined: 11/23/2008
Posts: 350
Points: 756
Location: Australia
Decompile a .NET assembly using ildasm.exe and edit and recompile it using ilasm.exe



Although there is no tool that allows you to see the source code of a compiled assembly, there are tools that are shipped with the .NET framework that will allow you to decompile a .NET assembly using ildasm.exe and edit and recompile it using ilasm.exe. The decompiler shows method signatures and member variables, but the code is in .NET byte code. The .NET byte code is extremely hard to modify for an ordinary programmer.

If Visual Studio <2005> is installed on your machine, the tools are located at C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\ildasm.exe. It's easier to use Visual Studio Command Prompt to start the tools. Otherwise they are located at C:\Windows\Microsoft.NET\Framework\<v2.0.50727\> and are on every computer that has the .NET framework installed.

"ildasm.exe" is Microsoft .NET Framework Intermediate Language (MSIL) Disassembler. First load your .NET assembly and then you can dump the IL code to a file and modify it. Then recompile it via ilasm.exe, which is MSIL assembler. After modifying your code, you would then recompile it using "ilasm.exe 'FileName' /DLL.

Traditionally the compiler (eg native c/c++) compiles the source into machine code so it’s hard to do reverse engineering. The issue with a .net assembly is that it can be decompiled into an IL via ildasm.exe. To prevent the reverse engineering of the .net Intermediate Language, a Dotfuscator profession edition needs to be used before your application is released. With Dotfuscator, the function or method names, namespaces and so on are renamed. It will be near impossible to modify the obfuscated .NET byte code.

See more details about MSIL Assembler (Ilasm.exe) at http://msdn.microsoft.com/en-us/library/496e4ekx(VS.85).aspx


There are also many other important tools available from Visual Studio Command Prompt, such as Microsoft .NET Assembly to Type Library Converter: TlbExp.exe and TlbImp.exe.

Sponsor
Posted: Tuesday, June 23, 2009 5:34:34 AM
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

ASPNET Theme created by Boskone (Dan Ferguson)
Powered by Yet Another Forum.net version 1.9.1.8 (NET v2.0) - 3/29/2008
Copyright © 2003-2008 Yet Another Forum.net. All rights reserved.
This page was generated in 0.862 seconds.