首页
社区
课程
招聘
[原创].net下爆破Advanced System Cleaner
发表于: 2005-2-17 12:45 9510

[原创].net下爆破Advanced System Cleaner

2005-2-17 12:45
9510
名称:Advanced System Cleaner
版本:1.2.3
官方网址:http://www.winxp-manager.com/asc/index.html
编译程序:VB.net
功能:注册表、垃圾文件、隐私信息的清理

下载后安装并运行,为20天试用版,弹出如下NAG窗口,提示“未注册,还有20天的试用时间,你花一点点小钱就可以得到完整版”。



用Reflector打开asc.exe,发现程序范了兵家大忌:没有用混淆器。在AdvancedSystemCleaner.Module2下发现MyClsRegister类,从名称看来是和注册相关的,内容如下:
public class MyClsRegister
{ 
      // Methods
      static MyClsRegister();
      public MyClsRegister();
      public static void DelExprie();
      public static string GetRegCodeValue();
      private static string GetRegisterCode(string strCodeWord, string strValue);
      public static string GetRegName();
      public static void Registered();

      // Fields
      private static RegistryKey ObjRK;
}


打开其中的Registered()方法,就可以找到判断注册信息的关键点了
public static void Registered()
{ 
      string text2 = Module2.MyClsRegister.GetRegName();
      string text1 = Module2.MyClsRegister.GetRegCodeValue();
      if ((StringType.StrCmp(text1, "", false) == 0) &line; (StringType.StrCmp(text2, "", false) == 0))
      { 
            Module1.blnRegistered = false;
      }
      else
      { 
            string text3;
            string text4;
            string text5;
            string text6;
            try
            { 
                  text3 = text1.Substring(0, 5);
                  text4 = text1.Substring(6, 5);
                  text5 = text1.Substring(12, 5);
                  text6 = text1.Substring(0x12, 5);
            }
            catch (Exception exception1)
            { 
                  ProjectData.SetProjectError(exception1);
                  Module1.blnRegistered = false;
                  ProjectData.ClearProjectError();
                  return;
                  ProjectData.ClearProjectError();
            }
            if (StringType.StrCmp(text6, Module2.MyClsRegister.GetRegisterCode(text3 + text4 +Module1.ainfo.Version.Substring(0, 4), text5), false) != 0)
            { 
                  Module1.blnRegistered = true;
            }
            else
            { 
                  Module1.blnRegistered = true;
            }
      }
} 


稍微注意一下text1和text2的取得,原来是通过注册表取得用户信息,这可以在初始函数.cctor()中看出:
static MyClsRegister()
{ 
      Module2.MyClsRegister.ObjRK = Registry.CurrentUser.OpenSubKey(@"Software\" + Module1.ainfo.Company + @"\Advanced System Cleaner");
} 


然后新建了UserName和Code两项,用来保存信息。因为我们初次安装时,根本不会建立这两项,所以执行到
      if ((StringType.StrCmp(text1, "", false) == 0) &line; (StringType.StrCmp(text2, "", false) == 0))
      { 
            Module1.blnRegistered = false;
      } 


时,if总是为真的。爆破的思路确定了,将false改为true即可。对应该句的IL指令为
      ...
      L_002c: brfalse.s L_003f
      L_002e: ldc.i4.0 
      L_002f: stsfld bool AdvancedSystemCleaner.Module1::blnRegistered
      L_0034: nop 
      L_0035: br L_00c5
      L_003a: br L_00c4
      L_003f: nop 
      L_0040: nop 
      L_0041: ldloc.0 
      L_0042: ldc.i4.0 
      L_0043: ldc.i4.5 
      ... 


用UltraEdit打开asc.exe,这里要定位该代码的位置。可以在Reflector中将显示语言改为IL,寻找一段特别的指令序列,我选择了L_003f到L_0043的五条指令,对应的十六进制数据是"00 00 06 16 1B"。在UltraEdit中搜索这个数据,可以确定唯一的位置在000522a0h处。

00052290h: 00 70 16 28 A6 00 00 0A 16 FE 01 60 2C 11 16 80 ;
000522a0h: 3B 00 00 04 00 38 8B 00 00 00 38 85 00 00 00 00 ;
000522b0h: 00 06 16 1B 6F 5A 01 00 0A 0C 06 1C 1B 6F 5A 01 ;

其中0005229eh处的16对应idc.i4.0,80对应stsfld,后面的3b 00 00 04则应该是blnRegistered的标识。将16改为17,既idc.i4.1,保存修改。

再次运行,呵呵,已经爆破成功了。将时间调后1个月,运行正常,没有了NAG,直接进入主窗口。(现在比较堕落,不爱跟算法了。)

[课程]Android-CTF解题方法汇总!

收藏
免费 7
支持
分享
最新回复 (9)
雪    币: 339
活跃值: (1510)
能力值: ( LV13,RANK:970 )
在线值:
发帖
回帖
粉丝
2
支持!!!  
2005-2-17 12:54
0
雪    币: 93944
活跃值: (200219)
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
3
支持...
2005-2-17 12:56
0
雪    币: 238
活跃值: (250)
能力值: ( LV9,RANK:170 )
在线值:
发帖
回帖
粉丝
4
支持楼主!!
请问Reflector在那儿有下的,确实是好东西
2005-2-17 13:14
0
雪    币: 5275
活跃值: (451)
能力值: (RANK:1170 )
在线值:
发帖
回帖
粉丝
5
官方网站http://www.aisto.com/roeder/dotnet/
2005-2-17 13:33
0
雪    币: 238
活跃值: (250)
能力值: ( LV9,RANK:170 )
在线值:
发帖
回帖
粉丝
6
谢谢!!
2005-2-17 15:15
0
雪    币: 214
活跃值: (100)
能力值: ( LV4,RANK:50 )
在线值:
发帖
回帖
粉丝
7
好,支持
2005-2-17 20:38
0
雪    币: 225
活跃值: (40)
能力值: ( LV8,RANK:130 )
在线值:
发帖
回帖
粉丝
8
Reflector真是个好东东啊~~~~
2005-2-17 21:29
0
雪    币: 214
活跃值: (15)
能力值: ( LV4,RANK:50 )
在线值:
发帖
回帖
粉丝
9
请问楼主:Reflector是个什么东东?是个反汇编工具吗?
2005-2-17 22:46
0
雪    币: 5275
活跃值: (451)
能力值: (RANK:1170 )
在线值:
发帖
回帖
粉丝
10
是.NET下的反编译工具,一用就知道
2005-2-18 17:42
0
游客
登录 | 注册 方可回帖
返回
//