.NET破解体验 ildasm.exe的使用

by 博主 20. 五月 2008 17:45

.NET中可以使用ildasm.exe来破解BIN目录下面的DLL文件,解成IL格式.修改后可用ilasm来进行重新编译.

方法:
/// <summary>
/// 使用cmd调用ildasm.exe 参数:argm= ildasm F:\\overred.exe /out=F:\\overred.il
/// </summary>
public static bool cmdCreateIL(string argm)
{
    System.Diagnostics.Process p = new System.Diagnostics.Process();
    p.StartInfo.FileName = "cmd.exe";
    p.StartInfo.UseShellExecute = false;
    p.StartInfo.RedirectStandardInput = true;
    p.StartInfo.RedirectStandardOutput = true;
    p.StartInfo.RedirectStandardError = true;
    p.StartInfo.CreateNoWindow = false;

    try
    {
        p.Start();
        p.StandardInput.WriteLine(argm);
        p.StandardInput.WriteLine("exit");
        p.StandardOutput.ReadToEnd();
        p.Close();
        return true;
    }
    catch
    {
        return false;
    }
    finally
    {
        p.Dispose();
    }
}

作为Cracker,可以用.Net Framework SDK自带的工具进行MSIL和EXE(DLL)之间的互换:
利用FrameworkSDK\Bin\目录下的ilasm和ildasm
(1)ilasm示例:
下面的命令对 MSIL 文件 myTestFile.il 进行汇编并产生可执行文件 myTestFile.exe。
ilasm myTestFile
下面的命令对 MSIL 文件 myTestFile.il 进行汇编并产生 .dll 文件 myTestFile.dll。
ilasm myTestFile /dll
下面的命令对 MSIL 文件 myTestFile.il 进行汇编并产生 .dll 文件 myNewTestFile.dll。
ilasm myTestFile /dll /output:myNewTestFile.dll
(2)ildasm示例
下面的命令使 PE 文件 MyHello.exe 的元数据和反汇编代码显示在 Ildasm.exe 的默认 GUI 中。
ildasm myHello.exe
下面的命令对 MyFile.exe 文件进行反汇编,并将结果 MSIL 汇编程程序文本存储在 MyFile.il 文件中。

ildasm MyFile.exe /output:MyFile.il
下面的命令对 MyFile.exe 文件进行反汇编,并将结果 MSIL 汇编程序文本显示到控制台窗口中。

ildasm MyFile.exe /text
如果文件 MyApp.exe 包含嵌入的托管和非托管资源,则下面的命令将产生以下 4 个文件:
MyApp.il、MyApp.res、Icons.resources 和 Message.resources:

ildasm MyApp.exe /output:MyApp.il
下面的命令对 MyFile.exe 的 MyClass 类中的 MyMethod 方法进行反汇编,并将输出显示到控制台窗口中。

ildasm /item:MyClass::MyMethod MyFile.exe /text
在上面的示例中,可能有几个具有不同签名的 MyMethod 方法。
下面的命令对返回类型为 void 且带有参数 int32 和 System.string 的 MyMethod 方法进行反汇编。

ildasm /item:"MyClass::MyMethod(void(int32,class System.String))" MyFile.exe /text

ildasm反编译工具 ildasm下载.rar (110.87 kb) 

ildasm反编译工具 ildasm 2.0 下载rar (128.85 kb)

Tags: , , , ,

学习心得 | DotNet技术资料

评论

添加评论



(将显示你的Gravatar头像)  

biuquote
微笑得意调皮害羞酷大笑惊讶发呆喜欢可怜尴尬闭嘴噘嘴皱眉伤心抓狂呕吐坏笑漫骂发怒
Loading



Supidea.com 晨飞的梦 @ All Rights Reserved. Powered by BlogYi.NET ver:1.8.0.0. 苏ICP备09011404号

关于博主

kamau
抱着美好的理想背井离乡,这酸甜苦辣只能默默忍受。既然选择了路,就得风雨兼程……

Calendar

<<  五月 2012  >>
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

在日历中查看文章

最近的评论

Comment RSS

声明

      本博所发一切破解相关附件只作学习研究交流之用,严禁用于商业用途,请在下载24小时内删除。
      本博所有网友评论不代表本博立场,版权归其作者所有。

© Copyright 2009