Crack Me Lvl 0 | Absolute Beginner

Okay, we’re going to get this stuff started off right. The goal is to create a base for the future tutorials and to have a little fun learning how to crack software. This is an absolute beginner’s level crack and I’ll even be showing the source code with a minor change in the salt used for the license file.
Target: Calculator App built w/ Tutorials
Framework: 4.0
Language Coded: VB.Net
//////////UPDATED 4March ////////////
MD5 Checksum: 3F6FADF427915CEFA86BA973A4089626
CrackMeLvl0App

/////////Check Readme///////////////////
Solution:  http://uaktech.net/crack-me-level-0-absolute-beginner-solution/

Mission : Crack app to accept whatever strings you type in, whatever your license file says, or completely patch it to not need a license file.

Imports System.Security.Cryptography
Public Class Form1
    '////////////Our Declares////////////
    Dim num1, num2 As String
    Dim oper As String
    Dim user, serial As String
    Dim salt As String = "ComputerGeeksFromGoogle+"
    '////////////End of Decalres/////////
    '////////////The Number Buttons//////
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        TextBox1.AppendText("1")
    End Sub
    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        TextBox1.AppendText("2")
    End Sub
    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
        TextBox1.AppendText("3")
    End Sub
    Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
        TextBox1.AppendText("4")
    End Sub
    Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
        TextBox1.AppendText("5")
    End Sub
    Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
        TextBox1.AppendText("6")
    End Sub
    Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click
        TextBox1.AppendText("7")
    End Sub
    Private Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click
        TextBox1.AppendText("8")
    End Sub
    Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click
        TextBox1.AppendText("9")
    End Sub
    Private Sub btnZero_Click(sender As Object, e As EventArgs) Handles btnZero.Click
        TextBox1.AppendText("0")
    End Sub
    '///////////End of Number Buttons//////
    '///////////Control Buttons +-/*=//////
    Private Sub btnAdd_Click(sender As Object, e As EventArgs) Handles btnAdd.Click
        If num1 = "" Then
            num1 = TextBox1.Text
            oper = "+"
            TextBox1.Clear()
        Else
            num1 = CalculateIt(CDbl(num1), CDbl(TextBox1.Text), oper)
            oper = "+"
            TextBox1.Clear()
        End If
    End Sub
    Private Sub btnEquals_Click(sender As Object, e As EventArgs) Handles btnEquals.Click
        If oper = "" Then
            MsgBox("You must enter a second number")
            Exit Sub
        End If
        num2 = TextBox1.Text
        TextBox1.Text = CStr(CalculateIt(CDbl(num1), CDbl(num2), oper))
    End Sub
    Private Sub btnMinus_Click(sender As Object, e As EventArgs) Handles btnMinus.Click
        If num1 = "" Then
            num1 = TextBox1.Text
            oper = "-"
            TextBox1.Clear()
        Else
            num1 = CalculateIt(CDbl(num1), CDbl(TextBox1.Text), oper)
            oper = "-"
            TextBox1.Clear()
        End If
    End Sub
    Private Sub btnMultiply_Click(sender As Object, e As EventArgs) Handles btnMultiply.Click
        If checklicense() = False Then
            MsgBox("Sorry, you must be licensed to use this feature!")
            notifylicense()
        Else
            If num1 = "" Then
                num1 = TextBox1.Text
                oper = "*"
                TextBox1.Clear()
            Else
                num1 = CalculateIt(CDbl(num1), CDbl(TextBox1.Text), oper)
                oper = "*"
                TextBox1.Clear()
            End If
        End If
    End Sub
    Private Sub btnDivide_Click(sender As Object, e As EventArgs) Handles btnDivide.Click
        If checklicense() = False Then
            MsgBox("Sorry, you must be licensed to use this feature!")
            notifylicense()
        Else
            If num1 = "" Then
                num1 = TextBox1.Text
                oper = "/"
                TextBox1.Clear()
            Else
                num1 = CalculateIt(CDbl(num1), CDbl(TextBox1.Text), oper)
                oper = "/"
                TextBox1.Clear()
            End If
        End If
    End Sub
    Private Sub btnclear_Click(sender As Object, e As EventArgs) Handles btnclear.Click
        TextBox1.Clear()
        num1 = ""
        num2 = ""
        oper = ""
    End Sub
    '///////////End Of Control Buttons/////
    '///////////Our Calculator Function////
    Private Function CalculateIt(ByVal n1 As Double, n2 As Double, ByVal op As String) As Double
        Select Case op
            Case "+"
                Return n1 + n2
            Case "-"
                Return n1 - n2
            Case "*"
                Return n1 * n2
            Case "/"
                Return n1 / n2
        End Select
        Return vbNull
    End Function
    '///////////End of Calculator Funct////
    '///////////License Key Funct//////////
    Private Function checklicense() As Boolean
        Dim ss As String = generatehash(user & salt)
        If serial <> ss Then
            Return False
        Else
            Return True
        End If
    End Function
    Private Function generatehash(ByVal source As String) As String
        Dim ue As New System.Text.UnicodeEncoding()
        Dim bytesource() As Byte = ue.GetBytes(source)
        Dim md5 As New MD5CryptoServiceProvider()
        Dim hash() As Byte = md5.ComputeHash(bytesource)
        Return Convert.ToBase64String(hash)
    End Function
    Private Function notifylicense(Optional ByVal errcode As Integer = 0)
        Select Case errcode
            Case 1001
                If MsgBox("Your license file contains invalid license info. Would you like to re-input your details again?", MsgBoxStyle.YesNo) = MsgBoxResult.No Then
                    Return ""
                    Exit Function
                End If
        End Select
        user = InputBox("Please Enter Username", , user)
        If user = "" Then notifylicense()
        serial = InputBox("Please enter serial", , serial)
        If checklicense() = True Then
            MsgBox("Thank you for registering")
            isLicensed(True)
            System.IO.File.WriteAllText(Application.StartupPath & "/reg.lic", "" & user & "" & serial & "")
        Else
            MsgBox("Sorry that was incorrect")
        End If
        Return ""
    End Function
    Private Function isLicensed(ByVal chkrep As Boolean)
        If chkrep = True Then
            ToolStripStatusLabel1.Text = "Registered to " & user
        Else
            notifylicense("1001")
        End If
        Return ""
    End Function
    '//////////////End of License Check/////////
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Try
            System.IO.File.OpenRead(Application.StartupPath & "/reg.lic")
            Dim lic As System.IO.StreamReader = New System.IO.StreamReader(Application.StartupPath & "/reg.lic")
            Dim lic2, usr() As String
            lic2 = lic.ReadLine
            usr = Split(lic2, ">")
            usr = Split(usr(1), "<")             user = usr(0)             usr = Split(lic2, ">")
            usr = Split(usr(3), "<")
            serial = usr(0)
            isLicensed(checklicense())
        Catch ex As Exception
        End Try
    End Sub
End Class

If you have concerns over using my Compiled EXE, then use source to compile yourself -_-
Tutorial should be posted by Wednesday Mar 6th with a Level 1. Have fun 🙂

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.