大神论坛

找回密码
快速注册
查看: 1072 | 回复: 0

[原创] 逆向破解南方专业起名程序V3.7最新版注册码分析与注册机

主题

帖子

0

积分

初入江湖

UID
688
积分
0
精华
威望
0 点
违规
大神币
68 枚
注册时间
2023-10-14 10:57
发表于 2024-01-15 21:32
本帖最后由 TwilightZ 于 2024-01-15 21:32 编辑

分析过程

分析自动Net程序,有混淆。

直接de4处理并找到注册验证:

private void method_0(object sender, EventArgs e)
{
ProjectData.ClearProjectError();
if (Class18.bool_16)
{
base.Close();
}
else if (Strings.Len(Class15.string_1) == 0)
{
Interaction.MsgBox("机器码不能为空,如不能解决,请与南方联系。", MsgBoxStyle.OkOnly, null);
}
else
{
Conversions.ToString(Class1.smethod_0().Registry.GetValue("HKEY_CURRENT_USER\Software\NanfangSoft .net\ProName730", "PCNB", ""));
string text = Strings.Trim(this.vmethod_2().Text);
string text2 = Strings.Trim(this.vmethod_6().Text);
if ((text2.Length < 14) | (text2.Length > 15)) //长度15位
{
this.vmethod_0().Text = "注册码不对!";
}
else
{
string text3 = Strings.Mid(text2, 1, 4) + Strings.Mid(text2, 9, 4);
string text4 = Strings.Mid(text2, 5, 1);
string text5 = Strings.Mid(text2, 6, 1);
string text6 = Strings.Mid(text2, 7, 1);
string text7 = Strings.Mid(text2, 8, 1);
string text8 = Strings.Mid(text2, 13, 1);
string str = Strings.Mid(text2, 14, 1);
if ((Operators.CompareString(text4, "6", false) == 0) | (Operators.CompareString(text4, "7", false) == 0) | (Operators.CompareString(text4, "B", false) == 0))
{
text4 = "1";
}
if ((Operators.CompareString(text4, "8", false) == 0) | (Operators.CompareString(text4, "9", false) == 0) | (Operators.CompareString(text4, "C", false) == 0))
{
text4 = "2";
}
if (Operators.CompareString(text5, "A", false) == 0)
{
text5 = "0";
}
if (Operators.CompareString(text5, "B", false) == 0)
{
text5 = "1";
}
if (Operators.CompareString(text5, "C", false) == 0)
{
text5 = "2";
}
if (Operators.CompareString(text5, "D", false) == 0)
{
text5 = "3";
}
if (Operators.CompareString(text5, "E", false) == 0)
{
text5 = "4";
}
if (Operators.CompareString(text5, "F", false) == 0)
{
text5 = "5";
}
if (Operators.CompareString(text5, "G", false) == 0)
{
text5 = "6";
}
if (Operators.CompareString(text5, "H", false) == 0)
{
text5 = "7";
}
if (Operators.CompareString(text5, "J", false) == 0)
{
text5 = "8";
}
if (Operators.CompareString(text5, "K", false) == 0)
{
text5 = "9";
}
string value = "20" + text4 + text5;//5、6位组成年份
if ((Operators.CompareString(text6, "6", false) == 0) | (Operators.CompareString(text6, "7", false) == 0) | (Operators.CompareString(text6, "B", false) == 0))
{
text6 = "1";
}
if ((Operators.CompareString(text6, "4", false) == 0) | (Operators.CompareString(text6, "5", false) == 0) | (Operators.CompareString(text6, "A", false) == 0))
{
text6 = "0";
}
if (Operators.CompareString(text7, "A", false) == 0)
{
text7 = "0";
}
if (Operators.CompareString(text7, "B", false) == 0)
{
text7 = "1";
}
if (Operators.CompareString(text7, "C", false) == 0)
{
text7 = "2";
}
if (Operators.CompareString(text7, "D", false) == 0)
{
text7 = "3";
}
if (Operators.CompareString(text7, "E", false) == 0)
{
text7 = "4";
}
if (Operators.CompareString(text7, "F", false) == 0)
{
text7 = "5";
}
if (Operators.CompareString(text7, "G", false) == 0)
{
text7 = "6";
}
if (Operators.CompareString(text7, "H", false) == 0)
{
text7 = "7";
}
if (Operators.CompareString(text7, "J", false) == 0)
{
text7 = "8";
}
if (Operators.CompareString(text7, "K", false) == 0)
{
text7 = "9";
}
string value2 = text6 + text7;//7、8位组成月份
if (Operators.CompareString(text8, "A", false) == 0)
{
text8 = "0";
}
if (Operators.CompareString(text8, "B", false) == 0)
{
text8 = "1";
}
if (Operators.CompareString(text8, "C", false) == 0)
{
text8 = "2";
}
string value3 = text8 + str;//13、14位组成日
if (((text2.Length == 15) & ((Operators.CompareString(Strings.Mid(text2, 15, 1), "1", false) == 0) | (Operators.CompareString(Strings.Mid(text2, 15, 1), "2", false) == 0))) && Class1.smethod_0().FileSystem.FileExists(Class20.string_8 + "\syspnam730.dll"))
{
Class1.smethod_0().FileSystem.DeleteFile(Class20.string_8 + "\syspnam730.dll");
}
int num = Conversions.ToInteger(value);//年 <=2030
int num2 = Conversions.ToInteger(value2);//月 1-12
int num3 = Conversions.ToInteger(value3);//日 1-28
if ((num3 < 1) | (num3 > 28) | (num < 2013) | (num > 2030) | (num2 < 1) | (num2 > 12) | (num < DateAndTime.Now.Year) | ((num == DateAndTime.Now.Year) & (num2 < DateAndTime.Now.Month)))
{
this.vmethod_0().Text = "注册码不对!";
}
else if (this.short_0 == 1)
{
this.method_1(this.vmethod_8(), new EventArgs());
}
else if (Strings.Len(Strings.Trim(this.vmethod_4().Text)) == 0)
{
this.vmethod_0().Text = "您没有输入姓名。";
}
else if (Strings.Len(text3) == 0)
{
this.vmethod_0().Text = "您没有输入注册码。";
}
//机器码和注册码比较
else if (Class18.smethod_3(ref text, ref text3) & !File.Exists(Class20.string_8 + "\syspnam730.dll"))
{
Class1.smethod_0().Registry.SetValue("HKEY_CURRENT_USER\Software\NanfangSoft .net\ProName730", "Name", this.vmethod_4().Text);
string text9 = Strings.UCase(text3);
Class20.smethod_11(ref text, ref text9, ref value, ref value2, ref value3);
Class20.bool_0 = true;
this.vmethod_0().Text = "注册成功!点击'退出',您现在可以使用本程序了。";
}
else
{
this.vmethod_0().Text = "注册码不对!";
}
}
}
int num4;
if (num4 != 0)
{
ProjectData.ClearProjectError();
}
}

分析可知:注册码长度15位,1-4位+9-12位为机器码转换信息,5、6位授权年份信息,7、8位授权月份信息,13、14位授权日信息,第15位1或2固定。

且年<=2030年,月:1-12,日:1-28,授权的时间信息比较简单,看相应代码即可。

机器码和注册码比较Class18.smethod_3(ref text, ref text3)

跟进看一下,调用太复杂,不容易得到算法,也是原贴楼主困惑的地方,相互调用太多了,直接挖代码可能有难度,换个思路直接反射调用。

注册机编写

试了下反射调用成功。
获取机器码:

机器码转换:

注册码拼接:

搞定~~~


食用说明

仅限于学习交流,请勿用于商业或非法用途。


注:若转载请注明大神论坛来源(本贴地址)与作者信息。

返回顶部