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

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

4 People Made This Project!

Recommendations

  • CNC and 3D Printing Contest

    CNC and 3D Printing Contest
  • Puzzles Challenge

    Puzzles Challenge
  • Rice & Grains Challenge

    Rice & Grains Challenge

25 Comments

0
Tony boy
Tony boy

Question 1 year ago on Step 2

How can I create a virus on Android

0
Kin_xwag
Kin_xwag

Question 1 year ago

Is the virus for onli windows or mac☺

0
zk2456731
zk2456731

Reply 2 years ago

Hdib

0
hamisabdallah772
hamisabdallah772

Question 3 years ago

I want you tech me how to creat a Virusi in my laptop

0
zk2456731
zk2456731

Answer 2 years ago

Manmade

0
SoomyBoomyWasTaken
SoomyBoomyWasTaken

Answer 2 years ago

This isn't what the project is for. It is for showing how antiviruses defend, making malware or viruses and sharing it is illegal most places.

1
DREWNOLT
DREWNOLT

2 years ago

I think this a very cool project! Most of the projects here just show how to make a prank or fake virus, but this project is legit, and that's awesome!

0
zk2456731
zk2456731

Reply 2 years ago

Thanks for watch

IMG_20201103_235105_543.jpg
1
DREWNOLT
DREWNOLT

Reply 2 years ago

Plus,this one shows how to program an antivirus, too!

0
NAULaa
NAULaa

6 years ago

Cool virus prank.

0
zgayhart
zgayhart

Reply 5 years ago

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

0
zgayhart
zgayhart

5 years ago

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

0
ChrisH593
ChrisH593

6 years ago

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

0
MohsinA44
MohsinA44

6 years ago

This is not a virus. This is a payload.

0
happyhippy1
happyhippy1

6 years ago

This is a great prank virus. ☺: )