Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Solved] Help With MD5 Key Encryption.
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming -> Crackmes
View previous topic :: View next topic  
Author Message
TheGreatMilenko
Grandmaster Cheater
Reputation: 0

Joined: 15 Nov 2007
Posts: 557
Location: Doin Tha Dayum Thang. o;

PostPosted: Thu Oct 30, 2008 10:28 pm    Post subject: [Solved] Help With MD5 Key Encryption. Reply with quote

I need some help with MD5 encryption, I totally don't understand it, And i want to make my programs more secure, By adding some MD5 into the login phase, But if theres something better then I'm willing to learn.
I don't know whether to use encryption decryption or hash...o.0
So if anyone out there wants to help, Please Do. Very Happy
The code i used to use, Noobish...
Code:
Private Sub CmdLogIn_Click()
Dim passpart1, passpart2, passpart3 As String
passpart1 = "test"
passpart2= "test"
passpart3 = "test"
If TxtKey.Text = vbNullString Then
    MsgBox "You left the Key field blank!", vbCritical, "Error"
    Exit Sub
End If

CmdLogIn.Enabled = False
TxtKey.Enabled = False

If TxtKey.Text = passpart1 + passpart2 + passpart3 Then
    Form2.Visible = True
    Unload Me
    MsgBox ("Welcome CEF User!"), vbInformation, "Success!"
    Exit Sub
Else
    MsgBox ("Incorrect Key!"), vbCritical, "Error"
    CmdLogIn.Enabled = True
    TxtKey.Enabled = True
    End If
End Sub


New more securer code, For those who might stumble upon the same question i had...
Code:

'Put this in the Form for Authorization/Login.
Option Explicit
Dim md5Test As MD5
Private Sub CmdLogIn_Click()
If TxtKey.Text = vbNullString Then
    MsgBox "You left the Key field blank!", vbCritical, "Error"
    Exit Sub
End If

CmdLogIn.Enabled = False
TxtKey.Enabled = False

If LCase(md5Test.DigestStrToHexStr(TxtKey.text)) = "24407d308f312e21b4af74389c4dd011" Then
'Where "24407d308f312e21b4af74389c4dd011" Is the hash of "CEF!"
    Form2.Visible = True
    Unload Me
    MsgBox ("Welcome CEF User!"), vbInformation, "Success!"
    Exit Sub
Else
    MsgBox ("Incorrect Key!"), vbCritical, "Error"
    CmdLogIn.Enabled = True
    TxtKey.Enabled = True
    End If
End Sub

Private Sub Form_Load()
    ' Instantiate our class
    Set md5Test = New MD5
End Sub

Also add the MD5 class module provided with the link Moller gave... Link It should pretty much explain itself, Good luck. Very Happy

_________________
~What is a Juggalo?~
Raredaredevil = Respected
Add this to your sig if you agree.


Last edited by TheGreatMilenko on Sun Nov 02, 2008 10:12 pm; edited 1 time in total
Back to top
View user's profile Send private message Yahoo Messenger
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Fri Oct 31, 2008 3:22 am    Post subject: Reply with quote

What do you mean you totally don't understand it? Like you don't understand how it works, or you don't understand how to implement it?
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
TheGreatMilenko
Grandmaster Cheater
Reputation: 0

Joined: 15 Nov 2007
Posts: 557
Location: Doin Tha Dayum Thang. o;

PostPosted: Fri Oct 31, 2008 6:06 pm    Post subject: Reply with quote

oib111 wrote:
What do you mean you totally don't understand it? Like you don't understand how it works, or you don't understand how to implement it?
EXACTLY!!!! lol
I don't know neither of those things, But i want to.
I just want to learn how these things work, I think its a button code that calls the code set in a module, But yea, Can you explain it more a bit?

_________________
~What is a Juggalo?~
Raredaredevil = Respected
Add this to your sig if you agree.
Back to top
View user's profile Send private message Yahoo Messenger
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Fri Oct 31, 2008 6:31 pm    Post subject: Reply with quote

http://en.wikipedia.org/wiki/MD5

http://en.wikipedia.org/wiki/MD5#Algorithm

http://en.wikipedia.org/wiki/MD5#Pseudocode

Enjoy Laughing

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
TheGreatMilenko
Grandmaster Cheater
Reputation: 0

Joined: 15 Nov 2007
Posts: 557
Location: Doin Tha Dayum Thang. o;

PostPosted: Fri Oct 31, 2008 6:52 pm    Post subject: Reply with quote

oib111 wrote:
http://en.wikipedia.org/wiki/MD5

http://en.wikipedia.org/wiki/MD5#Algorithm

http://en.wikipedia.org/wiki/MD5#Pseudocode

Enjoy Laughing
lol WTF!
I wanted atleast a summary, Not every single thing there is to know about it, Especially the history, What am i gonna learn from that, Wadafuxmayn. Laughing

_________________
~What is a Juggalo?~
Raredaredevil = Respected
Add this to your sig if you agree.
Back to top
View user's profile Send private message Yahoo Messenger
Snootae
Grandmaster Cheater
Reputation: 0

Joined: 16 Dec 2006
Posts: 969
Location: --->

PostPosted: Fri Oct 31, 2008 8:34 pm    Post subject: Reply with quote

the pseudocode is essentially exactly what you have to fucking do
_________________
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Fri Oct 31, 2008 11:06 pm    Post subject: Reply with quote

Also, MD5 is vulnerable to attack, so I suggest using something a bit more secure.
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
TheGreatMilenko
Grandmaster Cheater
Reputation: 0

Joined: 15 Nov 2007
Posts: 557
Location: Doin Tha Dayum Thang. o;

PostPosted: Sat Nov 01, 2008 1:13 am    Post subject: Reply with quote

Snootae wrote:
the pseudocode is essentially exactly what you have to fucking do
Well wtf is pseudocode? o.O

oib111 wrote:
Also, MD5 is vulnerable to attack, so I suggest using something a bit more secure.
Well whats your opinion of better?
_________________
~What is a Juggalo?~
Raredaredevil = Respected
Add this to your sig if you agree.
Back to top
View user's profile Send private message Yahoo Messenger
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Sat Nov 01, 2008 7:57 pm    Post subject: Reply with quote

http://en.wikipedia.org/wiki/Pseudocode

Quote:

Pseudocode is a compact and informal high-level description of a computer programming algorithm that uses the structural conventions of some programming language, but is intended for human reading rather than machine reading. Pseudo-code typically omits details that are not essential for human understanding of the algorithm, such as variable declarations, system-specific code and subroutines. The programming language is augmented with natural language descriptions of the details, where convenient, or with compact mathematical notation. The purpose of using pseudocode is that it is easier for humans to understand than conventional programming language code, and that it is close enough to real code to be a compact and environment-independent description of the key principles of an algorithm. It is commonly used in textbooks and scientific publications that are documenting various algorithms, and also in planning of computer program development, for sketching out the structure of the program before the actual coding takes place.


http://en.wikipedia.org/wiki/SHA_hash_functions#SHA-2_family

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
NothingToShow
Grandmaster Cheater Supreme
Reputation: 0

Joined: 11 Jul 2007
Posts: 1579

PostPosted: Sun Nov 02, 2008 3:39 am    Post subject: Reply with quote

http://www.bullzip.com/md5/vb/md5-visual-basic.htm

Code:
Option Explicit
'/******************************************************************************
' *  Copyright (C) 2000 by Robert Hubley.                                      *
' *  All rights reserved.                                                      *
' *                                                                            *
' *  This software is provided ``AS IS'' and any express or implied            *
' *  warranties, including, but not limited to, the implied warranties of      *
' *  merchantability and fitness for a particular purpose, are disclaimed.     *
' *  In no event shall the authors be liable for any direct, indirect,         *
' *  incidental, special, exemplary, or consequential damages (including, but  *
' *  not limited to, procurement of substitute goods or services; loss of use, *
' *  data, or profits; or business interruption) however caused and on any     *
' *  theory of liability, whether in contract, strict liability, or tort       *
' *  (including negligence or otherwise) arising in any way out of the use of  *
' *  this software, even if advised of the possibility of such damage.         *
' *                                                                            *
' ******************************************************************************
'
'  Form: TestSuite
'
'  DESCRIPTION:
'   A short demonstration form which calls the MD5.DLL library using a
'   standard test suite of values.  The results are displayed next to the
'   expected return set for comparison.
'
'  AUTHOR:
'     Robert M. Hubley 12/1999
'
'
'  NOTES:
'
'
'  CHANGE HISTORY:
'
'     1.0.0  RMH    2000/1/5      Original version
'
'

'= Global Variables
Dim md5Test As MD5


Private Sub btnRunTest_Click()
    lblResults(0).Caption = LCase(md5Test.DigestStrToHexStr(""))
    lblResults(1).Caption = LCase(md5Test.DigestStrToHexStr("a"))
    lblResults(2).Caption = LCase(md5Test.DigestStrToHexStr("abc"))
    lblResults(3).Caption = LCase(md5Test.DigestStrToHexStr("message digest"))
    lblResults(4).Caption = LCase(md5Test.DigestStrToHexStr("abcdefghijklmnopqrstuvwxyz"))
    lblResults(5).Caption = LCase(md5Test.DigestStrToHexStr("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"))
    lblResults(6).Caption = LCase(md5Test.DigestStrToHexStr("12345678901234567890123456789012345678901234567890123456789012345678901234567890"))
End Sub


Private Sub Form_Load()
    ' Instantiate our class
    Set md5Test = New MD5
End Sub


I don't know if that's what you requested, I just searched.
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Sun Nov 02, 2008 9:38 am    Post subject: Reply with quote

Find the address of your functions then md5 hash the memory then check it as you click the login btn.
Back to top
View user's profile Send private message
TheGreatMilenko
Grandmaster Cheater
Reputation: 0

Joined: 15 Nov 2007
Posts: 557
Location: Doin Tha Dayum Thang. o;

PostPosted: Sun Nov 02, 2008 6:02 pm    Post subject: Reply with quote

oib111 wrote:
http://en.wikipedia.org/wiki/Pseudocode

Quote:

Pseudocode is a compact and informal high-level description of a computer programming algorithm that uses the structural conventions of some programming language, but is intended for human reading rather than machine reading. Pseudo-code typically omits details that are not essential for human understanding of the algorithm, such as variable declarations, system-specific code and subroutines. The programming language is augmented with natural language descriptions of the details, where convenient, or with compact mathematical notation. The purpose of using pseudocode is that it is easier for humans to understand than conventional programming language code, and that it is close enough to real code to be a compact and environment-independent description of the key principles of an algorithm. It is commonly used in textbooks and scientific publications that are documenting various algorithms, and also in planning of computer program development, for sketching out the structure of the program before the actual coding takes place.


http://en.wikipedia.org/wiki/SHA_hash_functions#SHA-2_family
lol Holleh shet, These kinda things don't come easy i guess, Well i guess the headaches will be worth it.

Moller wrote:
http://www.bullzip.com/md5/vb/md5-visual-basic.htm

Code:
Option Explicit
'/******************************************************************************
' *  Copyright (C) 2000 by Robert Hubley.                                      *
' *  All rights reserved.                                                      *
' *                                                                            *
' *  This software is provided ``AS IS'' and any express or implied            *
' *  warranties, including, but not limited to, the implied warranties of      *
' *  merchantability and fitness for a particular purpose, are disclaimed.     *
' *  In no event shall the authors be liable for any direct, indirect,         *
' *  incidental, special, exemplary, or consequential damages (including, but  *
' *  not limited to, procurement of substitute goods or services; loss of use, *
' *  data, or profits; or business interruption) however caused and on any     *
' *  theory of liability, whether in contract, strict liability, or tort       *
' *  (including negligence or otherwise) arising in any way out of the use of  *
' *  this software, even if advised of the possibility of such damage.         *
' *                                                                            *
' ******************************************************************************
'
'  Form: TestSuite
'
'  DESCRIPTION:
'   A short demonstration form which calls the MD5.DLL library using a
'   standard test suite of values.  The results are displayed next to the
'   expected return set for comparison.
'
'  AUTHOR:
'     Robert M. Hubley 12/1999
'
'
'  NOTES:
'
'
'  CHANGE HISTORY:
'
'     1.0.0  RMH    2000/1/5      Original version
'
'

'= Global Variables
Dim md5Test As MD5


Private Sub btnRunTest_Click()
    lblResults(0).Caption = LCase(md5Test.DigestStrToHexStr(""))
    lblResults(1).Caption = LCase(md5Test.DigestStrToHexStr("a"))
    lblResults(2).Caption = LCase(md5Test.DigestStrToHexStr("abc"))
    lblResults(3).Caption = LCase(md5Test.DigestStrToHexStr("message digest"))
    lblResults(4).Caption = LCase(md5Test.DigestStrToHexStr("abcdefghijklmnopqrstuvwxyz"))
    lblResults(5).Caption = LCase(md5Test.DigestStrToHexStr("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"))
    lblResults(6).Caption = LCase(md5Test.DigestStrToHexStr("12345678901234567890123456789012345678901234567890123456789012345678901234567890"))
End Sub


Private Sub Form_Load()
    ' Instantiate our class
    Set md5Test = New MD5
End Sub


I don't know if that's what you requested, I just searched.
Thanks Moller, I think this is somewhat the coding i need.
Edit:Actually Moller this worked great, I used it with my button code and it created a hash which i used for the authorization, I'm beginning to understand it. Very Happy

dnsi0 wrote:
Find the address of your functions then md5 hash the memory then check it as you click the login btn.
Huh? But then what if other people use it, Wouldn't the address change after each use?

Edit 2: Another quick question, Is MD5 Hash easily Reversible?
Like Ex:
I used this for a hash test-
InputMD5: "MilenkoHax" Created "a8bce04a64ffa25c192a2f18153f50cd"
Can people use this hash "a8bce04a64ffa25c192a2f18153f50cd" and reverse it back to "MilenkoHax"?

_________________
~What is a Juggalo?~
Raredaredevil = Respected
Add this to your sig if you agree.
Back to top
View user's profile Send private message Yahoo Messenger
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Sun Nov 02, 2008 9:40 pm    Post subject: Reply with quote

A hash is irreversible. You can't just go backwards through the steps and it will be back to normal (I'm not sure how it works so don't ask). That's what's so good about hashes, since they're irreversible people can't reverse things such as windows passwords. They can only use brute force, dictionary, or rainbow attack.
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
TheGreatMilenko
Grandmaster Cheater
Reputation: 0

Joined: 15 Nov 2007
Posts: 557
Location: Doin Tha Dayum Thang. o;

PostPosted: Sun Nov 02, 2008 9:42 pm    Post subject: Reply with quote

oib111 wrote:
A hash is irreversible. You can't just go backwards through the steps and it will be back to normal (I'm not sure how it works so don't ask). That's what's so good about hashes, since they're irreversible people can't reverse things such as windows passwords. They can only use brute force, dictionary, or rainbow attack.
Alright, Thats great! Thanks guys, Now i understand this more clearly, And once i set the key its done.
Thanks again for your help. Very Happy
-TheGreatMilenko

_________________
~What is a Juggalo?~
Raredaredevil = Respected
Add this to your sig if you agree.
Back to top
View user's profile Send private message Yahoo Messenger
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Sun Nov 02, 2008 10:51 pm    Post subject: Reply with quote

Your welcome that's why we're here Smile
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming -> Crackmes All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites