标 题:
【原创】.net下爆破Advanced System Cleaner
发帖人:tankaiha
时 间: 2005-02-17 12:45
原文链接:http://bbs.pediy.com/showthread.php?threadid=11212
详细信息:
名称: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,直接进入主窗口。(现在比较堕落,不爱跟算法了。)
| | |||
|