How do I create a computer virus?

Computer VirusIf you are interested in creating a computer virus, Trojan, worm, malware, or other malicious program as revenge, payback, or as a prank we suggest you rethink. Creating a virus that deletes files or causes other issues resolves nothing and will result in prosecution by the law. In other words, you could be fined or sent to prison.

Instead of creating computer viruses or other malware consider learning a computer programming language. You'll learn a lot more by learning one or more programming languages and become more qualified in getting hired at a company that designs programs or analyzes viruses. No one ever got hired because they wrote a computer virus.

I only want to write a virus to learn how they work.

You will learn a lot more about how computer programs and viruses work by learning to program than you ever will by writing and tinkering with computer viruses. A computer virus is only a program designed to do malicious tasks on the computer such as deleting files, inserting its code into other files, and copying itself to other places and computers accessible to the computer that is running the virus. By learning to program, you'll not only know how these tasks are possible, but also learn much more.

I need to test my virus scanner.

You can create test virus files that can be used to test your computers anti-virus scanner without having to create your own virus. See the link below for additional information and code on how to create a test virus.

If I create a good computer virus, I will be famous.

No, the only fame you may get is a brief news article or a picture of you being handcuffed and sent to prison. Once incarcerated it will go on your record and make it next to impossible to get hired at any respectable computer company and impossible to get hired by any government agency.

If you were to write a computer virus that was successful you would want to remain anonymous in fear of being prosecuted by the law. Also, if you think about it, almost everyone knows who Bill Gates is and what he has done for computers but have no clue about Jeffrey Parson.

If I write a good virus, I'll get hired at a security firm or antivirus company.

False, no respectable security firm or antivirus company wants to affiliated with a virus or malware creator that infected potential customer computers. If you're interested in getting a job with a security firm or antivirus company you'll have a much better chance by learning to programming, becoming a participant in security discussions, being a beta tester, or finding vulnerabilities in programs and reporting them to the developers. Companies such as Google will even pay good money to anyone who reports bugs or security vulnerabilities about any of their products.

Can you send me additional details, examples, or other information about creating viruses?

No, Computer Hope will not send anyone any other additional information about creating computer viruses, worms, or Trojans. This document was only created to help deter people from creating computer viruses and learn computer programming instead.

What programming languages should I learn?

Programming language such as C, C++, C#, Java, Perl, PHP, and Python are all good programming languages for new computer programmers. See the link below if you are not exactly sure what language to start learning first.