• 用ildasm破解和用ilasm来重新编译<转>


    今天学会了怎么来用ildasm破解和用ilasm来重新编译

    (1)程序员用高级OO语言(C#,VB.Net,VC.Net,Cobol,Python..)编写代码,这些代码经过
    .Net 编译器(比如Visual Studio.Net),编译成统一的MSIL(Microsoft Intermediate Language)。NET应用程序是以MSIL的形式出现的,只有在程序执行的时候才通过即时编译器JIT(Just-In-Time)被编译为本机代 码。
    (2)程序执行的时候,由JIT装入程序的MSIL,JIT同时作了很多其他的工作(装载相应的运行库,安全检测。。) 最后JIT将转化成本地机器码(EXE或者DLL)。
    (3)本地机器码被装入内存,开始执行。

    就是通过这几个步骤,.net实现了编程语言无关(都转化成MSIL);平台无关(执行的
    时候根据本地配置,生成相应的机器码);安全性(JIT里面做了很多检测)。

    作为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

    原文地址:http://www.cnblogs.com/OwenWu/archive/2010/06/30/1768027.html

  • 相关阅读:
    js 对象合并
    python3 TypeError: 'str' does not support the buffer interface in python
    django rest framework 再撸体验
    linux shell输入重定向
    httpie 取代 curl
    wget 断点续传 & nginx文件服务器
    select2 demo
    vmare centos 6.8 minimal 无法上网
    protocol http not supported or disabled in libcurl apt-get
    python3 -pip
  • 原文地址:https://www.cnblogs.com/wenjl520/p/1777773.html
Copyright © 2020-2023  润新知