Introduction: How to Create a Virus and an Anti-Virus From Command Prompt {CMD}

Hi Guys,

This tutorial is to teach you how hackers create viruses, it would also teach you how antiviruses work and the simple way to create your own antivirus.

Disclaimer: This tutorial is for educational purposes only. Although this could be used to create a very troubling Virus, you should only use this for experimental reasons. This virus does not attack your computer's operating system environment and therefore should be safe. Please do not use this maliciously.

Launch the virus and see if your antivirus can pick on it. This would help you know if your antivirus is strong and suitable.

Step 1: Creating the Virus - BloatWare

Create your target folder - this is the folder you want your virus to attack.

For demonstration purposes, I have created a folder called Test under the C Drive.

C:\Test

This virus would create an endless number of text files which contains a different number in the text document each time.


@echo off
color 0a msg *You have just launched BloatWarez %random% :Reckon echo This is bloatware #%random% >C:\Test\%random%%random%.virus.txt goto Reckon

PS: The code above will bloat the folder as it would create an infinite number of text documents

Remember that you can change what the user sees in each document so "This is bloatware #%random%" could be anything of your choosing.

Step 2: Creating the Anti-Virus

So now we have identified the effect of the virus, let's now create the antivirus.

An antivirus, identifies and removes (quarantines) the infection. We start by writing the following code;

@echo off
color 0a
msg *Removing BloatWarez Virus
del /s *virus.txt
echo Virus Successfully Removed
pause

Go ahead and test the virus - bloatware.cmd and once you have created the viruses, use the antibloatware.cmd to remove the files. Download AntiVirus file and use it to your pleasure.

Share with your friends, see more tutorials here

Comments

author
Hitman_Hell made it!(author)2017-03-30

I got real virus

author
NAULaa made it!(author)2015-12-13

Cool virus prank.

author
zgayhart made it!(author)2017-01-15

It Deleted ALL My Files on My Desktop(the "antivirus" did(more like the Virus!))!!!!!!!!!!!!!!!!!!!!!!!!!!!!

author
zgayhart made it!(author)2017-01-15

It Deleted ALL My Files on My Desktop(the "antivirus" did(more like the Virus!))!!!!!!!!!!!!!!!!!!!!!!!!!!!!

author
ChrisH593 made it!(author)2016-10-18

Made this virus in D drive and now can't figure how to delete em using the antivirus

author
MohsinA44 made it!(author)2016-10-05

This is not a virus. This is a payload.

author
happyhippy1 made it!(author)2015-12-15

This is a great prank virus. ☺: )

author
el-mejor made it!(author)2015-09-04

Interesting point of view that how the virus works. Thanks so much

author
AbDuCt made it!(author)2015-07-26

This doesn't explain virus applications work and/or are made in the slightest. Nor does it explain what an anti-virus actually does and what techniques it deploys in order to detect virus applications. Maybe research and explain some of the techniques such as heuristics and simple checksum comparisons to a known malware database.

author
samueloppong made it!(author)2015-08-05

Thanks, I would include known techniques used as heuristics and simple checksum comparisons.

author
IPC+Oye made it!(author)2015-07-26

Well, it's not really a 'computer virus', because your 'virus' can't even replicate itself....

author
samueloppong made it!(author)2015-07-26

This is actually to help the student to understand how a virus works. There are elements I have not added to make this a potent virus for obvious reasons.

About This Instructable

35,111views

47favorites

License:

More by samueloppong:Fundamentals Of Networking | Understanding Network DevicesWho is that on my network and what is he doing? Network Forensics Tutorial?Advanced CMD Troubleshooting For the IT Pro
Add instructable to: