Jump to content
Tuts 4 You

[crackme] # New Crackme .NET #


RDGMax

Recommended Posts

XenocodeRCE

 

Xenocode

6C756A2F697151776E477058393452736A67467248673D3D

 

 

Was quit easy, and it's called a "keygenme", but correct me if I'm wrong :)

 

n.b; are you the real Tejon owner ?

Edited by Xenocode
  • Like 1
Link to comment

Was quit easy, and it's called a "keygenme", but correct me if I'm wrong :)

 

n.b; are you the real Tejon owner ?

 

Excellent..Tomorrow..level 2 OK

 

Correct if you get the serial is a semi keygen me.. if you patch it's a.. crackme :)

Edited by RDGMax
Link to comment

Keygen + src for Level 1:


 


 
/**
 * atom0s!keygen.exe (c) 2013 [atom0s@live.com]
 * 
 * Keygen for RDGMax CrackMe found here:
 * http://forum.tuts4you.com/topic/32850-new-crackme-net/
 */
 
namespace atom0s_keygen
{
    using System;
    using System.IO;
    using System.Security.Cryptography;
    using System.Text;
    using System.Windows.Forms;
 
    public partial class frmMain : Form
    {
 
        /// <summary>
        /// Default Constructor
        /// </summary>
        public frmMain()
        {
            InitializeComponent();
        }
 
        /// <summary>
        /// Text input change event handler.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void txtUsername_TextChanged(object sender, EventArgs e)
        {
            if (this.txtUsername.Text.Length < 6)
            {
                this.txtSerial.Text = "Invalid Username Length! (6+ chars needed!)";
                return;
            }
 
            var serial = this.StringToHex(this.EncryptString(this.txtUsername.Text));
            this.txtSerial.Text = string.IsNullOrEmpty(serial) ? "Invalid username input; cannot create serial!" : serial;
        }
 
        /// <summary>
        /// Converts the input string to a hex string.
        /// </summary>
        /// <param name="strInput"></param>
        /// <returns></returns>
        private string StringToHex(string strInput)
        {
            var str = string.Empty;
            for (var x = 1; x <= strInput.Length; x += 1)
            {
                var exp = String.Format("{0:X}", (int)strInput[x - 1]);
                if (exp.Length == 1) exp = "0" + exp;
                str += exp;
            }
            return str;
        }
 
        /// <summary>
        /// Encrypts the input string with DES encryption.
        /// </summary>
        /// <param name="strInput"></param>
        /// <returns></returns>
        private string EncryptString(string strInput)
        {
            if (string.IsNullOrEmpty(strInput))
                return string.Empty;
 
            var key = new byte[] { 0xD4, 0xED, 0x34, 0x93, 0x1C, 0x48, 0xAC, 0x08 };
            var vec = new byte[] { 0x12, 0x44, 0x16, 0xEE, 0x88, 0x15, 0xDD, 0x41 };
            
            var desProvider = new DESCryptoServiceProvider();
            var stream = new MemoryStream();
            var str = string.Empty;
 
            try
            {
                // Convert the input to bytes..
                var data = Encoding.UTF8.GetBytes(strInput);
 
                // Encrypt the data with DES..
                var encStream = new CryptoStream(stream, desProvider.CreateEncryptor(key, vec), CryptoStreamMode.Write);
                encStream.Write(data, 0, data.Length);
                encStream.Flush();
                encStream.Close();
 
                // Encode the return in base64 format..
                str = Convert.ToBase64String(stream.ToArray());
            }
            catch
            {
            }
            finally
            {
                stream.Close();
            }
 
            return str;
        }
    }
}

atom0s!keygen.zip

  • Like 1
Link to comment

 

Keygen + src for Level 1:

 

/**

 * atom0s!keygen.exe (c) 2013 [atom0s@live.com]

 * 

 * Keygen for RDGMax CrackMe found here:

 * http://forum.tuts4you.com/topic/32850-new-crackme-net/

 */

 

namespace atom0s_keygen

{

    using System;

    using System.IO;

    using System.Security.Cryptography;

    using System.Text;

    using System.Windows.Forms;

 

    public partial class frmMain : Form

    {

 

        /// <summary>

        /// Default Constructor

        /// </summary>

        public frmMain()

        {

            InitializeComponent();

        }

 

        /// <summary>

        /// Text input change event handler.

        /// </summary>

        /// <param name="sender"></param>

        /// <param name="e"></param>

        private void txtUsername_TextChanged(object sender, EventArgs e)

        {

            if (this.txtUsername.Text.Length < 6)

            {

                this.txtSerial.Text = "Invalid Username Length! (6+ chars needed!)";

                return;

            }

 

            var serial = this.StringToHex(this.EncryptString(this.txtUsername.Text));

            this.txtSerial.Text = string.IsNullOrEmpty(serial) ? "Invalid username input; cannot create serial!" : serial;

        }

 

        /// <summary>

        /// Converts the input string to a hex string.

        /// </summary>

        /// <param name="strInput"></param>

        /// <returns></returns>

        private string StringToHex(string strInput)

        {

            var str = string.Empty;

            for (var x = 1; x <= strInput.Length; x += 1)

            {

                var exp = String.Format("{0:X}", (int)strInput[x - 1]);

                if (exp.Length == 1) exp = "0" + exp;

                str += exp;

            }

            return str;

        }

 

        /// <summary>

        /// Encrypts the input string with DES encryption.

        /// </summary>

        /// <param name="strInput"></param>

        /// <returns></returns>

        private string EncryptString(string strInput)

        {

            if (string.IsNullOrEmpty(strInput))

                return string.Empty;

 

            var key = new byte[] { 0xD4, 0xED, 0x34, 0x93, 0x1C, 0x48, 0xAC, 0x08 };

            var vec = new byte[] { 0x12, 0x44, 0x16, 0xEE, 0x88, 0x15, 0xDD, 0x41 };

            

            var desProvider = new DESCryptoServiceProvider();

            var stream = new MemoryStream();

            var str = string.Empty;

 

            try

            {

                // Convert the input to bytes..

                var data = Encoding.UTF8.GetBytes(strInput);

 

                // Encrypt the data with DES..

                var encStream = new CryptoStream(stream, desProvider.CreateEncryptor(key, vec), CryptoStreamMode.Write);

                encStream.Write(data, 0, data.Length);

                encStream.Flush();

                encStream.Close();

 

                // Encode the return in base64 format..

                str = Convert.ToBase64String(stream.ToArray());

            }

            catch

            {

            }

            finally

            {

                stream.Close();

            }

 

            return str;

        }

    }

}

 

 

 

Excellent bro.. Solve this level (Level 2) for get the Level 3..

You Are a Machine
Link to comment

 

Excellent bro.. Solve this level (Level 2) for get the Level 3..

You Are a Machine

 

 

Level 2:

 

Name: atom0s

Serial: 506C3262614972635645513D

  • Like 1
Link to comment

Level 2:

 

Name: atom0s

Serial: 506C3262614972635645513D

 

The level 3. Will not use the same encryption method. because you only have to know the key

Link to comment

Yeah level 2 the key only changed; same code as my previous keygen, just change the key to:


            var key = new byte[] { 0x18, 0x45, 0x53, 0x76, 0x57, 0xB7, 0x92, 0x6A };
Link to comment
Teddy Rogers

The [crackme] tag has been added to your topic title.

Please remember to follow and adhere to the topic title format - thankyou!

[This is an automated reply]

Link to comment

Level 2:


 


Name: master131


Serial: 776D4A552F4B3343432B7467506A7479794A79474A673D3D


 


Note to RDGMax, your anti-debug method using NtQueryInformationProcess with the ProcessDebugObjectHandle and ProcessDebugPort flags isn't 64-bit/AnyCPU compatible because you've declared the P/Invoke signature incorrectly.


 


I didn't hardcode the byte array key to show that I actually did the reversing myself.



using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
using System.Windows.Forms; namespace RDG_CrackMe_Level_2
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }         private byte[] GetKeyFromString(string value)
        {
            var bytes = new byte[8];
            var key = new byte[8];
            var encoding = new ASCIIEncoding();
            int charIndex = 0;
            encoding.GetBytes(value, charIndex, value.Length, bytes, charIndex);             byte[] buffer2 = new SHA1CryptoServiceProvider().ComputeHash(bytes);
            charIndex = 0;
            do
            {
                key[charIndex] = buffer2[charIndex];
                charIndex++;
            } while (charIndex <= 7);             return key;
        }         public string Generate(string name)
        {
            return Sth(Se(name));
        }         public string Sth(string StrToHex)
        {
            string str2 = string.Empty;
            for (int i = 1; i <= StrToHex.Length; i++)
            {
                string expression = ((int) StrToHex[i - 1]).ToString("X");
                if (expression.Length == 1) expression = "0" + expression;
                str2 += expression;
            }
            return str2;
        }         public string Se(string strSource)
        {
            string str = string.Empty;
            var objDES = new DESCryptoServiceProvider();
            var Vector = new byte[] { 0x12, 0x44, 0x16, 0xEE, 0x88, 0x15, 0xDD, 0x41 };
            byte[] TheKey = GetKeyFromString("6889948"); // (0x18, 0x45, 0x53, 0x76, 0x57, 0xB7, 0x92, 0x6A)
            
            try
            {
                byte[] bytes = Encoding.UTF8.GetBytes(strSource);                 using (var stream = new MemoryStream())
                using (var stream2 = new CryptoStream(stream, objDES.CreateEncryptor(TheKey, Vector), CryptoStreamMode.Write))
                {
                    stream2.Write(bytes, 0, bytes.Length);
                    stream2.FlushFinalBlock();
                    str = Convert.ToBase64String(stream.ToArray());
                }
            }
            catch
            {
            }             return str;
        }         private void generateButton_Click(object sender, EventArgs e)
        {
            if (nameTextBox.Text.Length >= 6)
                serialTextBox.Text = Generate(nameTextBox.Text);
        }
    }
}

Edited by master131
  • Like 1
Link to comment

 

Level 2:

 

Name: master131

Serial: 776D4A552F4B3343432B7467506A7479794A79474A673D3D

 

Note to RDGMax, your anti-debug method using NtQueryInformationProcess with the ProcessDebugObjectHandle and ProcessDebugPort flags isn't 64-bit/AnyCPU compatible because you've declared the P/Invoke signature incorrectly.

 

I didn't hardcode the byte array key to show that I actually did the reversing myself.

using System;

using System.IO;

using System.Security.Cryptography;

using System.Text;

using System.Windows.Forms;

namespace RDG_CrackMe_Level_2

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }

        private byte[] GetKeyFromString(string value)

        {

            var bytes = new byte[8];

            var key = new byte[8];

            var encoding = new ASCIIEncoding();

            int charIndex = 0;

            encoding.GetBytes(value, charIndex, value.Length, bytes, charIndex);

            byte[] buffer2 = new SHA1CryptoServiceProvider().ComputeHash(bytes);

            charIndex = 0;

            do

            {

                key[charIndex] = buffer2[charIndex];

                charIndex++;

            } while (charIndex <= 7);

            return key;

        }

        public string Generate(string name)

        {

            return Sth(Se(name));

        }

        public string Sth(string StrToHex)

        {

            string str2 = string.Empty;

            for (int i = 1; i <= StrToHex.Length; i++)

            {

                string expression = ((int) StrToHex[i - 1]).ToString("X");

                if (expression.Length == 1) expression = "0" + expression;

                str2 += expression;

            }

            return str2;

        }

        public string Se(string strSource)

        {

            string str = string.Empty;

            var objDES = new DESCryptoServiceProvider();

            var Vector = new byte[] { 0x12, 0x44, 0x16, 0xEE, 0x88, 0x15, 0xDD, 0x41 };

            byte[] TheKey = GetKeyFromString("6889948"); // (0x18, 0x45, 0x53, 0x76, 0x57, 0xB7, 0x92, 0x6A)

            

            try

            {

                byte[] bytes = Encoding.UTF8.GetBytes(strSource);

                using (var stream = new MemoryStream())

                using (var stream2 = new CryptoStream(stream, objDES.CreateEncryptor(TheKey, Vector), CryptoStreamMode.Write))

                {

                    stream2.Write(bytes, 0, bytes.Length);

                    stream2.FlushFinalBlock();

                    str = Convert.ToBase64String(stream.ToArray());

                }

            }

            catch

            {

            }

            return str;

        }

        private void generateButton_Click(object sender, EventArgs e)

        {

            if (nameTextBox.Text.Length >= 6)

                serialTextBox.Text = Generate(nameTextBox.Text);

        }

    }

}

 

Has been compiled for x32 Bro

Link to comment

What obfuscator did you use to make repetitive functions and assigns? Or you coded all yourself?

I used a stupid app for make garbage.. Crackme not hard bro.

Is Valid if you patch the crackme..if you get the serial number better :)

Link to comment

No I only asked what type of obfuscator you used because I love it. I will try to add for my future packer a copy of thousands of similar methods and stupid references :D


Link to comment

No I only asked what type of obfuscator you used because I love it. I will try to add for my future packer a copy of thousands of similar methods and stupid references :D

 

I not use external obfuscator bro.. only code

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...