Sunday, July 8, 2012

Solution for Crackmes.de - Beezdul's Keygenme #1

Solution for Crackmes.de - Beezdul's Keygenme #1

This is the link to the original crackme: http://crackmes.de/users/beezdul/keygenme_1/

However, you will need to register before you can download the binary. 

Hints:
This crackme / keygenme was made in .net; have fun cracking it! Rules : NO PATCHING!, no selfgen. You need to make a cool keygen with cool graphics and an epic chiptune. Cheers!
Difficulty: 1 - Very easy, for newbies
Platform: Windows
Language: .NET

Published: 08. Feb, 2012

Tools Required:
ilSpy - http://wiki.sharpdevelop.net/ilspy.ashx



Since the author of this Keygenme described this as difficulty 1 and is a .NET binary, let's open it with ilSpy immediately and we immediately found the portion that is required to code our KeyGenMe. :D


private void Button1_Click(object sender, EventArgs e)
{
    bool flag = this.TextBox1.TextLength != 14;
    checked
    {
        if (!flag)
        {
            flag = (Strings.Asc(this.TextBox1.Text[4]) != 45);
            if (!flag)
            {
                flag = (Strings.Asc(this.TextBox1.Text[9]) != 45);
                if (!flag)
                {
                    object left = string.Concat(new string[]
                    {
                        Conversions.ToString(this.TextBox1.Text[0]),
                        Conversions.ToString(this.TextBox1.Text[1]),
                        Conversions.ToString(this.TextBox1.Text[2]),
                        Conversions.ToString(this.TextBox1.Text[3]),
                        "-",
                        Conversions.ToString(Strings.Asc(this.TextBox1.Text[0]) + Strings.Asc(this.TextBox1.Text[2]) * 10 + 3324),
                        "-"
                    });
                    object right = Strings.Asc(this.TextBox1.Text[1]) + Strings.Asc(this.TextBox1.Text[3]) * 10 + 1000;
                    flag = Conversions.ToBoolean(Operators.NotObject(Operators.CompareObjectEqual(this.TextBox1.Text, Operators.ConcatenateObject(left, right), false)));
                    if (!flag)
                    {
                        Interaction.MsgBox("Great job! Make a keygen!", MsgBoxStyle.Information, null);
                        return;
                    }
                }
            }
        }
        Interaction.MsgBox("You Failed :( Keep trying!", MsgBoxStyle.Information, null);
    }
}
Analysing the Algorithm behind this Crackme:
As we can see from the extracted code from the crackme, the length of the serial had to have a length of 14 and the 5th and 10th character had to be "-" without the double quotes if we look up http://www.asciitable.com/

The first 4 characters can be any random characters, the 1st and 3rd character of the 4 random characters are used to generate the 2nd set in the serial and the 2nd & 4th character of the 4 random characters are used to generate the 3rd set in the serial.

It's pretty easy now for us to code the solution for this KeyGenMe now that we now the inner algorithm for this crackme.

I have developed the solution to this crackme and placed it here.
But i will release the source code later.


I do hope that people will learn from this and find it enriching. xDDD


Cheers
0x4A61636F62

No comments:

Post a Comment