首页
社区
课程
招聘
[求助].net 程序破解疑问
2009-6-23 17:59 6090

[求助].net 程序破解疑问

2009-6-23 17:59
6090
学了一天.net,还是迷迷糊糊的,有几个疑问请各位不吝赐教
1.为什么reflector反编出来的机器码在原程序中找不到?(详见2楼)
2.除了16、17的更改还有没其他的改法?如下:

public static bool Valid(string strUniqueCode, string strSerialNo)
{
    MD5 md = new MD5CryptoServiceProvider();
    strUniqueCode = BitConverter.ToString(md.ComputeHash(Encoding.ASCII.GetBytes(strUniqueCode))).Replace("-", "").Replace("B", "F").Substring(5, 20);
    strUniqueCode = BitConverter.ToString(md.ComputeHash(Encoding.ASCII.GetBytes(strUniqueCode))).Replace("-", "").Replace("E", "A").Substring(9, 10);
    return (strUniqueCode == strSerialNo);
}

能否让它返回“True”?怎么改?

[培训]《安卓高级研修班(网课)》月薪三万计划,掌握调试、分析还原ollvm、vmp的方法,定制art虚拟机自动化脱壳的方法

上传的附件:
收藏
点赞0
打赏
分享
最新回复 (9)
雪    币: 203
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
comehg 2009-6-23 20:11
2
0
最后考虑直接查机器码爆破原程序
继续跟踪SetRegisterStatus来到这儿:

private void SetRegisterStatus(bool bStatus)
{
    if (bStatus)
    {
        this.tbxSerialNo.ReadOnly = true;
        this.btnReg.Enabled = false;
        this.lblReg.Text = "已注册版本!";
    }
    else
    {
        this.tbxSerialNo.ReadOnly = false;
        this.btnReg.Enabled = true;
        this.lblReg.Text = "未注册版本!";
    }
}


好像是检查两个控件的状态,文本框只读、按钮不可用就已注册。
可切换到IL里,找到的机器码在原文件件中却查不到,不知什么原因。

IL:

.method private hidebysig instance void SetRegisterStatus(bool bStatus) cil managed
{
    .maxstack 2
    .locals init (
        [0] bool flag)
    L_0000: nop
    L_0001: ldarg.1
    L_0002: ldc.i4.0
    L_0003: ceq
    L_0005: stloc.0
    L_0006: ldloc.0
    L_0007: brtrue.s L_0038
    L_0009: nop
    L_000a: ldarg.0 ///////// 0x0002
    L_000b: ldfld class [Support]Support.baseTextBox ECertTest.SoftReg::tbxSerialNo///////// 0x007b
    L_0010: ldc.i4.1///////// 0x0017
==========>按理讲,这儿就是关键点,可得到的机器码 02 7b 17 6f 在原程序中却找不到(原程序没壳),难道不是这么排的?
    L_0011: callvirt instance void [System.Windows.Forms]System.Windows.Forms.TextBoxBase::set_ReadOnly(bool)///////// 0x006f
    L_0016: nop
    L_0017: ldarg.0
    L_0018: ldfld class [Support]Support.baseButton ECertTest.SoftReg::btnReg
    L_001d: ldc.i4.0
    L_001e: callvirt instance void [System.Windows.Forms]System.Windows.Forms.Control::set_Enabled(bool)
    L_0023: nop
    L_0024: ldarg.0
    L_0025: ldfld class [System.Windows.Forms]System.Windows.Forms.Label ECertTest.SoftReg::lblReg
    L_002a: ldstr "\u5df2\u6ce8\u518c\u7248\u672c\uff01"
    L_002f: callvirt instance void [System.Windows.Forms]System.Windows.Forms.Control::set_Text(string)
雪    币: 93
活跃值: (11)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
tease 2009-6-23 22:04
3
0
应该能找到吧......
雪    币: 7260
活跃值: (2471)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
logkiller 2009-6-24 01:48
4
0
倒 过 来 查 ;-)
雪    币: 203
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
comehg 2009-6-24 09:27
5
0
倒过来?你指6f 17 1b 02 ?试过,也找不到的。
雪    币: 93
活跃值: (11)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
tease 2009-6-24 09:39
6
0
KeyGen
有时候写注册机比爆破更简单

根据下载记录来看,LZ已经下载keygen了,别人的软件是要卖钱的,虽然写注册机很简单,但是为了原作者利益,我还是删掉了,LZ自己用就好。
帖子可以结了吧。
雪    币: 203
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
comehg 2009-6-24 10:12
7
0
分析了tease的Key1

public string Valid(string strUniqueCode)
{
    MD5 md = new MD5CryptoServiceProvider();
    strUniqueCode = BitConverter.ToString(md.ComputeHash(Encoding.ASCII.GetBytes(strUniqueCode))).Replace("-", "").Replace("B", "F").Substring(5, 20);
    strUniqueCode = BitConverter.ToString(md.ComputeHash(Encoding.ASCII.GetBytes(strUniqueCode))).Replace("-", "").Replace("E", "A").Substring(9, 10);
    return strUniqueCode;
}

第一次看到顶楼上那段时就想过,可惜不懂.net,只能看到是MD5加密的、替换、取长度,有机会好好向tease学习!
雪    币: 55
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
萧泪血 2009-6-24 22:36
8
0
public static bool Valid(string strUniqueCode, string strSerialNo)
{
    MD5 md = new MD5CryptoServiceProvider();
    strUniqueCode = BitConverter.ToString(md.ComputeHash(Encoding.ASCII.GetBytes(strUniqueCode))).Replace("-", "").Replace("B", "F").Substring(5, 20);
    strUniqueCode = BitConverter.ToString(md.ComputeHash(Encoding.ASCII.GetBytes(strUniqueCode))).Replace("-", "").Replace("E", "A").Substring(9, 10);
    return (strUniqueCode == strSerialNo);
}

直接将开头的IL语句改成:

ldc.i4.1    //将1放入stack
ret          //返回
就可以爆破了,很简单。
雪    币: 739
活跃值: (935)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
spman 2009-6-25 11:03
9
0
去掉00 再查找 ,如 00 2b 00 2c 只查找 2b 2c 就行了。

能否让它返回“True”?怎么改? ------可以直接返回true,你可以编写一个直接返回true的程序,然后。。。。。
雪    币: 203
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
comehg 2009-6-26 10:39
10
0
十分感谢楼上各位不吝赐教!
游客
登录 | 注册 方可回帖
返回