In this tutorial we will learn how to create our own antivirus program to detect an delete any virus we fed up in our Antivirus Database.As we all know Antivirus are actually programs which have potential to detect wide range of dangerous programs also know as virus.Remember this is an example lab showing basics of antivirus program and which makes you able to learn how to code antivirus to detect a specific virus.So before you develop or design a antivirus program you must have database of viruses.The more databases you have the more powerful your antivirus will be.
Here in this tutorial we will manually create a virus and them put them inside a folder or drive and then we write an anitivirus program to detect that virus and delete them.
STEP 1:First create a demo virus programe and name it satish.bat
Now using Notepad I am going to creat a FORK BOMB Virus which when run on any Windows Machine the Machine will get hang within 2 minutes.After running this Virus code you have to manually shutdown your system using physical Button because even shutdown command also not work and neither any other key or mouse.So if you want to test this virus you can test it on your windows PC but i will suggest you to test it inside your windows pc installed inside any Virtualization software like VirtualBox or Vmware.
-Now open Notepad and write the below online code.
%0|%0
-Now save the file as satish.bat
STEP 2:Now copy paste the satish.bat file inside C drive.
STEP 3:Now Iam going to write the Antivirus Program to detect the virus satish.bat and if find delete it.
-Open again a new notepad and write the below code inside it and save it as Antivirus.bat.
@echo off title Virus Detection Tool By Satish Tiwary echo Detecting Viruses...... echo created by ETHICAL HACKING TUITION CENTER JAIPUR :start cd C:\ IF EXIST satish.bat goto infected IF NOT EXIST virus.bat goto clean :infected echo WARNING SATISH.BAT VIRUS DETECTED! del satish.bat pause goto start :clean echo your System is secure now and virus has been deleted! pause exit
STEP 4:Now go to your C drive and check whether your virus file satish.bat has been deleted by your antivirus program or not.
If you find any problem regarding the code you can ask here through comment section.
This is false
The code is (In English)
Only look in the C drive for satish.bat
if satish.bat exists delete it. If satish.bat does not exist then you’re good.
See the problem here? It only scans for satish.bat. Not any real viruses
LikeLike