How to make a virus?

How can I make virus using C language?


First of all, what is a virus?


  1. What we call a 'virus' should actually be called 'malicious code'. Not all malicious codes are virus.
  2. What is a 'malicious code': A program that does something unwanted (usually harms the data in the machine) without the knowledge and permission of the user (victim) and self replicates itself to other connected machines.
  3. Malicious Codes are mainly of three types: (1) Trojans (2) Virus (3) Malware. In summary: Trojans are the programs (mostly developed by hackers) to steal your personal info (such as keyloggers - reading keystrokes from your computer). Virus harm your computer. Malware don't harm your machine but they harass you (e.g. by showing ads, by installing browser extensions/add-ons etc).
  4. Since it is my favorite subject and I've done lots of research on this, I suggest you to read Security in Computing by Willis H Ware. He has explained in detail how malicious codes attach to your files, transient virus, resident virus, why formatting your disk doesn't remove virus etc.
How to make a virus using ANY language:
  1. As I said, a virus must be doing two things: (1) Self Replication (2) Doing something unwanted in victim's computer.
  2. Now, every programming language has ability to
    1. copy files/folders,
    2. delete files/folders,
    3. update/modify files/folders,
    4. create new files/folders,
    5. change registries,
    6. make a file/folder hidden etc.
  3. All you need to learn is how to do all this with C (or any programming language).
  4. What you'll ultimately need to do is:
    1. Create a program that finds the name of the folders, its subfolders and the files recursively.
    2. To each file/folder, it should harm (by deleting files or by making the contents corrupt or anything you want)
    3. Should self-replicate (copying itself to every possible network/location to get spread)
    4. Should be self-activating (by changing the registries to trigger the events - e.g. put it in the startup registry and the program will automatically run every time the computer starts)
  5. Tip: Don't use Shell Scripts or Command Batches. The modern antivirus are now capable enough to identify their harmful behaviors.
Best of luck

answered by Ruchir Gupta on Quora.com


Comments

Popular Posts