首页
社区
课程
招聘
[旧帖] [讨论]关于maxtocode能发吗?(续) 0.00雪花
发表于: 2012-2-8 11:06 1791

[旧帖] [讨论]关于maxtocode能发吗?(续) 0.00雪花

2012-2-8 11:06
1791
各位老大们 上次发的那个破解maxtocode壳的库 得到加密算法的帖子没人顶了 也是因为我没发程序出来的原因 实在对不起啊

现在小弟有点问题想请教

我在程序运行的期间用OD把那个加密函数的IL代码给导出来了

如下
IL_0000: br IL_0007
IL_0005: pop
IL_0006: ret
IL_0007: ldarg.0
IL_0008: ldarg.1
IL_0009: call instance uint8[] ChinaMobile.ADTP.Client.FileDecryptor.LogFileDecryptor::O11OOllO011O01l00110OO01(string )
IL_000E: stloc.0
IL_000F: ldarg.0
IL_0010: ldloc.0
IL_0011: ldc.i4.1
IL_0012: call instance uint8[] ChinaMobile.ADTP.Client.FileDecryptor.LogFileDecryptor::O11OllOOOOlO1(uint8[] , int32 )
IL_0017: stloc.1
IL_0018: call class [mscorlib]System.Text.Encoding [mscorlib]System.Text.Encoding::get_Default()
IL_001D: ldloc.1
IL_001E: callvirt instance string [mscorlib]System.Text.Encoding::GetString(uint8[] )
IL_0023: ret

由于想偷懒 不想逐个去把IL读懂 再用C#写出来了

我就把 原来的加密库 用ildasm翻译成IL语言 然后修改一下又用ilasm把IL文件生成DLL 当然其中很多函数为空 我没管

然后我把上述的代码 直接放到能够生成的IL文件中去  加上个 .maxstack  8  然后继续生成DLL

这回生成了 我就想用REFLECTOR打开 结果还是出问题了 我想问下 这是什么原因呢?

如下是IL文件中 我添加进去的之后函数IL代码
  .method private hidebysig instance uint8[]
          O11OllOOOOlO1(uint8[] OO1ll1OlO,
                        int32 Ol00lO0) cil managed
  {
    // Code size       0 (0x0)
    .maxstack  
    IL_0000: br IL_0007
        IL_0005: pop
        IL_0006: ret
        IL_0007: ldarg.2
        IL_0008: brtrue.s IL_0019
        IL_000A: ldarg.0
        IL_000B: ldarg.0
        IL_000C: ldfld string ChinaMobile.ADTP.Client.FileDecryptor.LogFileDecryptor::OO00l1OO
        IL_0011: call instance uint8[] ChinaMobile.ADTP.Client.FileDecryptor.LogFileDecryptor::O11OOllO011O01l00110OO01(string )
        IL_0016: stloc.0
        IL_0017: br.s IL_0026
        IL_0019: ldarg.0
        IL_001A: ldarg.0
        IL_001B: ldfld string ChinaMobile.ADTP.Client.FileDecryptor.LogFileDecryptor::O1O0Oll10OO0l1llO1l
        IL_0020: call instance uint8[] ChinaMobile.ADTP.Client.FileDecryptor.LogFileDecryptor::O11OOllO011O01l00110OO01(string )
        IL_0025: stloc.0
        IL_0026: ldarg.0
        IL_0027: ldarg.1
        IL_0028: ldloc.0
        IL_0029: call instance uint8[] ChinaMobile.ADTP.Client.FileDecryptor.LogFileDecryptor::OlO0O1Olll(uint8[] , uint8[] )
        IL_002E: ret
  } // end of method LogFileDecryptor::O11OllOOOOlO1

难道是        IL_0005: pop
        IL_0006: ret
这两句改成 nop  或者别的原因  求赐教啊 急等

[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课

收藏
免费 0
支持
分享
最新回复 (8)
雪    币: 34
活跃值: (25)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
2
晕 第一段 代码贴错了  请无视掉第一段代码

IL_0000: br IL_0007
IL_0005: pop
IL_0006: ret
IL_0007: ldarg.2
IL_0008: brtrue.s IL_0019
IL_000A: ldarg.0
IL_000B: ldarg.0
IL_000C: ldfld string ChinaMobile.ADTP.Client.FileDecryptor.LogFileDecryptor::OO00l1OO
IL_0011: call instance uint8[] ChinaMobile.ADTP.Client.FileDecryptor.LogFileDecryptor::O11OOllO011O01l00110OO01(string )
IL_0016: stloc.0
IL_0017: br.s IL_0026
IL_0019: ldarg.0
IL_001A: ldarg.0
IL_001B: ldfld string ChinaMobile.ADTP.Client.FileDecryptor.LogFileDecryptor::O1O0Oll10OO0l1llO1l
IL_0020: call instance uint8[] ChinaMobile.ADTP.Client.FileDecryptor.LogFileDecryptor::O11OOllO011O01l00110OO01(string )
IL_0025: stloc.0
IL_0026: ldarg.0
IL_0027: ldarg.1
IL_0028: ldloc.0
IL_0029: call instance uint8[] ChinaMobile.ADTP.Client.FileDecryptor.LogFileDecryptor::OlO0O1Olll(uint8[] , uint8[] )
IL_002E: ret
2012-2-8 11:09
0
雪    币: 34
活跃值: (25)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
3
晕菜
原来是没加局部变量定义
像这样
.locals init ([0] uint8[] p1,
             [1] uint8[] p2)

还有把pop改成ldnull就ok了
2012-2-8 16:49
0
雪    币: 34
活跃值: (25)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
4
又碰到新问题了 来个高手解答一下啊
发现一个调用

IL_002E: callvirt <method> 0xA00001B                  

在DLL中找得到 但是反不出来        实际上就是个ADD函数 但是就是不能从IL反编译不出来C#代码

请教下这是什么原因啊  来电人吧 难道坛子里面就我1个人了?

效果如下 有个new和两个call找不到。。。。。
IL_0000: br <label> IL_0007
        IL_0005: nop
        IL_0006: ret

        IL_0007: ldarg.1
        IL_0008: call bool [mscorlib]System.String::IsNullOrEmpty(string )
        IL_000D: brtrue.s <label> IL_0047

        IL_000F: newobj <method> 0xA000018
        IL_0014: stloc.0
        IL_0015: ldc.i4.0
        IL_0016: stloc.1
        IL_0017: br.s <label> IL_0037

        IL_0019: ldarg.1
        IL_001A: ldloc.1
        IL_001B: ldc.i4.2
        IL_001C: callvirt instance string [mscorlib]System.String::Substring(int32 , int32 )

        IL_0021: stloc.2
        IL_0022: ldloc.2
        IL_0023: ldc.i4.s 0x10
        IL_0025: call int32 [mscorlib]System.Convert::ToInt32(string , int32 )

        IL_002A: stloc.3
        IL_002B: ldloc.0
        IL_002C: ldloc.3
        IL_002D: conv.u1
        IL_002E: callvirt <method> 0xA00001B

        IL_0033: ldloc.1
        IL_0034: ldc.i4.2
        IL_0035: add
        IL_0036: stloc.1
        IL_0037: ldloc.1
        IL_0038: ldarg.1
        IL_0039: callvirt instance int32 [mscorlib]System.String::get_Length()

        IL_003E: blt.s <label> IL_0019
        IL_0040: ldloc.0
        IL_0041: callvirt <method> 0xA00001D

        IL_0046: ret
        IL_0047: ldnull
        IL_0048: ret
2012-2-8 20:27
0
雪    币: 153
活跃值: (29)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
5
不懂,友情帮顶!
2012-2-9 00:36
0
雪    币: 34
活跃值: (25)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
6
难道是小密  神啊。。。
2012-2-9 08:59
0
雪    币: 153
活跃值: (29)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
7
耗子你的账号太明显了,哈哈!
我在这潜水,这几天在为邀请码奋斗!嘿嘿!
你这东西是自己弄着玩还是公司让弄的呢?
2012-2-9 16:36
0
雪    币: 34
活跃值: (25)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
8
终于over了 感谢论坛上前辈们的教程 有时间我把思路整理下 写出来的 算是做点贡献吧
2012-2-10 22:09
0
雪    币: 153
活跃值: (29)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
9
支持发教程!
2012-2-10 22:40
0
游客
登录 | 注册 方可回帖
返回
//