Computer Virus

"Noah: Is that your answer to everything? "Upload a virus?" The world doesn't work like that, Jake.

Jake: Yeah, but wouldn't it be cool if it did?"

- Callahans Crosstime Saloon

"Grif: I find viruses that feature a laughing skull work the best."

- Red vs. Blue

In fiction, anyone can write a computer virus overnight. While physicists might be more skilled to do so, even journalists demonstrate the skills to write computer viruses that can wipe out a complete technologically advanced alien fleet within minutes. There's no need to find a vulnerability in the system to exploit, no need for a development environment, heck you don't even need to know if the alien computers use ones and zeros (maybe they use threes, tens and tomatoes).

The term "virus" is also commonly misused--technically a computer virus infects other programs, or at least other files or the operating system. Not all malware is a virus.

And just to be clear, writing a virus or other malware requires:
 * Knowledge of a security hole. This is actually pretty hard, and you're not going to get it when you knew nothing about the target system until one commercial break ago.
 * Advanced programming knowledge. And we mean advanced.  Most programmers are not capable of writing a virus with just the knowledge in their head.
 * Some way to generate programs that run on the target system. If it isn't scripted, you may need an appropriate compiler or assembler.
 * Lots of time. You're probably not going to do it in an overnight hacking spree, and certainly not in fifteen minutes. It's still a freshly written program and needs to be tested and debugged on an appropriate target or emulation thereof.
 * Some way to get the program onto the target system and exploit the security hole. If you can't log in to the system or get someone who is already logged in to open a file of your choosing, this itself is a huge obstacle.

Having said this, there are virus building kits, built by (groups of) black hat hackers, allowing essentially anyone with nefarious purposes and only little if any knowledge of the target system (usually called "script kiddies") to whip up malware fast, for use against known security holes that people haven't bothered to fix yet. But even those kits require getting familiar with their workings, just like any other computer program, and they will certainly work no better against the command and control systems of an invading alien fleet than throwing toothpicks at them.

Though, of course, nobody cares.

Anime & Manga
"Kaiba: Hooray for cyber-terrorism."
 * Yu-Gi-Oh! does this early on: Seto Kaiba uses the supercomputer in his basement to whip up and send a computer virus that will weaken and destroy a hologram of his Blue Eyes White Dragon in only minutes. His method for finding a hole in Pegasus' security? Take over and literally crash a satellite into the building housing the main servers.

Comic Books

 * In Infinite Crisis, Batman tells Oracle to upload every computer virus on Earth to Brother Eye as a way of slowing it down. Even if Batman had Oracle so Crazy Prepared as to have every computer virus on file and ready for launch, a) Brother Eye would be immune to most of them, as Batman created him most likely with all kinds of attacks in mind, and b) it would be amazingly stupid to let in anything that didn't come from one of his OMACs and was of the wrong size or file type -- it's not like he's torrenting on the side while he's repelling the heroes.

Film

 * In Independence Day a computer genius from MIT writes a computer virus overnight that wipes out the attacking technologically superior alien fleet. A lot of people found it implausible that a human computer could interface with alien technology and that the virus just happens to be compatible with the alien system. A deleted scene would have shown the guy studying the aliens' computer system in a crashed ship. It's also implied that human technology has been largely reverse-engineered from alien tech. The aliens were also established to be using Earth's satellites to relay messages, so their systems must have been compatible to some degree.
 * In The Net, the main character is a computer programmer who collects the viruses that she combats. In one of the opening scenes, she's fixed a virus that was afflicting Doom.
 * The Parole Officer features a caper that relies on a computer virus, uploaded from a porn site, that sets off every building alarm in Manchester.
 * In The Matrix Trilogy, the Big Bad Agent Smith goes from being a program created to police the Matrix to being able to copy himself over other programs and even people after being killed by Neo at the end of the first movie. It's ironic considering his "humans are a virus" rant to Morpheus earlier in the same film.

Live Action TV

 * In the Stargate SG-1 episode Avenger 2.0, Jay Felger and Major Carter write a computer virus that disables a DHD by scrambling its symbols and corresponding coordinates. While it is not clear whether these two studied computer science, all other work they do just concerns physics.
 * Although Major Carter did write the dialing program which imitates a DHD for the (American) Earth gate, so it's not the first programming she has done along those lines.
 * The Big Bad of Power Rangers RPM is a self-aware computer virus. Within three years of its release onto the internet it had nuked the planet, presumably by getting access to military computers.
 * Subverted on Buffy the Vampire Slayer when Giles asks if they can use a computer virus to defeat a demon uploaded onto the internet. Jenny replies that he's seen too many movies.
 * The way the Cylons disabled the Colonial Fleet in Battlestar Galactica Reimagined was often described as a Virus, though in reality it was a backdoor that the Cylons placed during the development of a navigation program that most Colonial ships (military and civilian) used.
 * An actual computer virus is, however, used in Valley of Darkness and gives the Fleet quite a lot of headaches in the following episodes before being purged.

Video Games

 * Depending on your choices in Uplink, you will be tasked with either spreading a computer virus intended to destroy the Internet, or spreading the antivirus meant specifically to stop it. You can also run the virus on your own gateway computer, but it's not recommended.
 * In Tron Evolution and Tron 2.0, virus-infected Programs are major enemies, and the source of the virus comprises one of the major boss battles. Of course, with the universe in question, computer viruses are treated as a de facto Zombie Apocalypse.

Webseries

 * Viciously parodied in Red vs. Blue. When Simmons is attempting to gain control of an enemy computer system and explaining the complications of doing so, Griff says "try uploading a virus into the mainframe, I find one with a laughing skull works the best."

Western Animation

 * Personified with Megabyte of Re Boot.

Real Life

 * Virtumonde has become the overnight virus of choice and, due to its effectiveness and the ease with which it can be put together, dozens of variants exist and, combined with variants of the My Web Search infection, make up the majority of viruses professionally cleaned from computers. Catching it can mean a 3-figure trip to the computer guys or a hard drive wipe for most people.
 * The Storm Worm Trojan horse, a professionally produced virus, can show how scary one of these things can be. Collectively, the computers it has infected form a botnet that was once of the most powerful supercomputers in the world. Some people even thought it was a fetal AI.
 * But wait! It gets better! The Storm botnet fell into decline, only to be replaced by more of the things. In no particular order:
 * Cornficker: Updated itself automatically and killed off Anti-malware programs.
 * Srizbi: Outputed nearly nive times more spam than Storm, and was capable of creating its own CnC servers.
 * TDL-4: Deletes all other viruses to keep them from attracting attention, and has so far proven to be indestructible for Kaspersky and Symantec.