-
-
[原创]一个.NET crackme简单分析
-
发表于:
2009-2-18 11:44
7869
-
【文章标题】: 一个.NET CM分析(ReWrit__s_Crackme__8)
【文章作者】: creantan
【作者邮箱】: creantan@126.com
【作者主页】: www.crack-me.com
【下载地址】: www.crackmes.de
【编写语言】: Microsoft Visual C# / Basic .NET
【使用工具】: Reflector,ildasm,ilasm,UltraEdit
【作者声明】: 只是感兴趣,没有其他目的。失误之处敬请诸位大侠赐教!
--------------------------------------------------------------------------------
【详细过程】
第一次分析dotNET的CM。。呵呵。。。简单的一个CM适合对dotNet破解不熟的菜菜。。大鸟飞过。。
crackmes.de随便找了个没人玩的CM
ReWrit's Crackme #8
Kinda easy crackme...
you just have to patch it so it shows
the correct password in the (gray)textbox
and remove the nag...
private void InitializeComponent()
{
this.components = new Container();
ComponentResourceManager manager = new ComponentResourceManager(typeof(Form1));
this.button1 = new Button();
this.textBox1 = new TextBox();
this.label1 = new Label();
this.label2 = new Label();
this.textBox2 = new TextBox();
this.timer1 = new Timer(this.components); //定义一个定时器
base.SuspendLayout();
manager.ApplyResources(this.button1, "button1");
this.button1.Name = "button1";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new EventHandler(this.button1_Click);
manager.ApplyResources(this.textBox1, "textBox1");
this.textBox1.Name = "textBox1";
manager.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
manager.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
manager.ApplyResources(this.textBox2, "textBox2");
this.textBox2.Name = "textBox2";
this.textBox2.ReadOnly = true;
this.timer1.Interval = 0x2710; //设置时间为10秒
this.timer1.Tick += new EventHandler(this.timer1_Tick);//这里双击timer1_Tick
manager.ApplyResources(this, "$this");
base.AutoScaleMode = AutoScaleMode.Font;
base.Controls.Add(this.textBox2);
base.Controls.Add(this.label2);
base.Controls.Add(this.label1);
base.Controls.Add(this.textBox1);
base.Controls.Add(this.button1);
base.FormBorderStyle = FormBorderStyle.FixedDialog;
base.MaximizeBox = false;
base.MinimizeBox = false;
base.Name = "Form1";
base.Load += new EventHandler(this.Form1_Load);
base.ResumeLayout(false);
base.PerformLayout();
}
private void timer1_Tick(object sender, EventArgs e)
{
MessageBox.Show("NAG!", "NAG!");//NAG!找到了
}
private void button1_Click(object sender, EventArgs e)
{
int num = new Random().Next(0, 0x4c4b40);//取0-0x4c4b40之间的随机数。。。
if (this.textBox1.Text == num.ToString())//比较输入的数字和随机生成的数字比较是否相等
{
new Form2().Show();//相等第二个窗口出现
}
else
{
this.textBox1.Text = "Wrong Password!";//错误显示“Wrong Password!”
}
}
private void button1_Click(object sender, EventArgs e)
{
int length = this.textBox1.Text.Length;//取name的长度
int num2 = 0;
int num3 = 0;
for (int i = 0; i < length; i++)//一个小循环
{
num2 += this.textBox1.Text[i];
num2 *= i;
}
int num5 = new Random().Next(0, 0x1388);//取0-0x1388之间的随机数
num3 = num2 * num5;
if (this.textBox2.Text == num3.ToString())//判断输入的密码是否与算出的num3相等
{
MessageBox.Show("Good Job!", "Good Boy!");
}
else
{
MessageBox.Show("Wrong Password!", "Bad Boy!");
}
}
IL_0000: ldstr "NAG!"//直接ret就可以了:IL_0000: ret这样NAG就解决了
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)