Jake: Yeah, but wouldn't it be cool if it did?
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).
Just to clear things up: Computer viruses exploit security holes/vulnerabilities specific to certain programs — preferably server programs, so you can do a remote attack. In order to discover and exploit such holes, you need to study the software in question — a pretty difficult thing to do if you don't have the source code, access to a copy of the target system allowing you to run a selection of penetration testing tools against it (doing so on the real target may well alert its owners that some dirty work is afoot), or at the very least access to the executable file. More commonly, a virus author waits until a security update by the software developer uncovers a security hole in the program. If you are fast, you can act then and write a virus. Most users are lazy with updates (or company policies might get in the way), allowing the virus to spread to versions of the program missing the security update.
But in order to write a virus, even if you know the security hole, you need advanced knowledge about programming, and that knowledge is the sole domain of computer science students and complete nerds that have been teaching themselves programming since the age of six. Writing and testing a virus so it works the way you want and doesn't get detected prematurely might take a bit longer than an overnight hacking session. (Well, there are exceptionally skilled long trained hackers who might indeed be able to do this.) In any case you definitely need the following things in order to complete this task:
- A compiler or assembler (not needed for scripts) that generates code for the target system.
- The software with the security hole in order to test your virus.
- The target hardware on which the virus shall be executed.
- Profound knowledge in computer science (being a programmer for a living).
Having said this, there are virus building kits, built by (groups of) black hat hackers as per the above description, allowing essentially anyone with nefarious purposes, capable of wielding a mouse, and only little if any knowledge of the target system (usually called "script kiddies") to whip up a virus, worm or Trojan in a relatively limited time. The resulting malware is generally meant to work against known security weaknesses in widely-used programs or operating systems, on the basis that someone, somewhere will not yet have his system patched, and the larger the installed base, the higher the number of unpatched systems and the higher the chance of getting a sufficiently large number of them infected (a measurement of the success of a virus). 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.
Furthermore, the term "virus" technically only refers to a program that infects other programs or files. If it just infects other machines without attaching itself to programs, it's a worm. No matter what the type of malware, media will typically refer to it as a virus.
- 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. (In the Japanese version, he just uses the satellite as a midpoint to access the servers.)
Kaiba: Hooray for cyber-terrorism.
- These are the main 'villains' which Dual and Dorothy must 'compress and delete' in Garakowa Restore The World. Partially subverted. Mother released updates to view fragments of programs as viruses. Deleting worlds has created more of these.
- 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 he was later augmented by Alexander Luthor), 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.
- In Sonic the Hedgehog, when Robo-Robotnik takes back Mobotropolis, Snively, in one of his HeelFace Turn moments, installs a computer virus that kicks in whenever Robo-Robotnik attempts to access the location of Knothole. As he does so through his robotic body, Robo-Robotnik comes down with a cold, which puts him out of commission from time to time.
- Westworld: Present in Unbuilt Trope form way back in 1973—or alluded to, at least. The film never explains why the scarily realistic humanoid robots are malfunctioning, but the head programmer notes that that malfunctions are increasing in frequency and spreading throughout the three parks. After he uses the word "contagious", a more skeptical programmer shoots back "I must confess I find it difficult to believe in a disease of machinery."
- 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.
- He also assumes that the aliens would figure out the virus within a few minutes and counter it, which is why part of the plan involved blowing up the mothership with a nuke. Having their command center wiped out would sow huge amounts of confusion among the alien attackers, preventing them from concentrating on the virus and delaying action on their part.
- 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 Wolfenstein 3D.
- 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, 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.
- In the film Hackers, there's a virus named Da Vinci that threatens to sink an oil tanker fleet that drives much of the plot. Near the end, hackers around the world barrage a mainframe with such viruses as "Cookie Monster", which is defeated by typing in "cookie".
- Cyberjack: A group of terrorists seize control of a tech company so they can steal the computer virus that they were developing, which caught their attention earlier when the virus briefly 'escaped' and caused a plane crash. Goes into full-on Hollywood Science when the main villain merges himself with the virus to become god, gaining Telepathy in the process.
- In The Pillars of Reality, computers are rare, so viruses (called "contagions") are even rarer. Only a few people even know that such a thing can be done, let alone how to fix it, so when one is discovered, its very existence is perhaps more alarming than what it was actually doing.
- 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 by the name of Venjix. Within three years of its release onto the internet it had nuked the planet, presumably by getting access to military computers.
- The Big Bad of Superhuman Samurai Syber-Squad is a malevolent AI named Kilokhan who colludes with a hacker to create computer viruses as the Monster of the Week.
- 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 (2003) 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.
- In Lois And Clark: The New Adventures of Superman, a pair of "hackers" unleashed a "virus" called "The Ides of Metropolis" which was designed to destroy all "software programs" in every computer across America. In order to stop the spread of this malicious virus, Superman had to manually fly a 3.5" floppy disk with the antidote to three major backbone servers.
- The favored tactic of Christopher Pelant on Bones. He's so skilled he can even carve malware on bones that activate when image-scanned into a computer.
- One episode of Welcome to Our Village, Please Invade Carefully, the alien invaders' computer gets a virus - and, since the computer is sentient, and is indeed one of the series' major characters, we get to see (or hear, as this is radio) the infection from the computer's point of view.
- 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.
- Mega Man:
- The Maverick virus in Mega Man X is a nasty example, as it seems to quickly degrade reploid thought patterns and make them increasingly volatile and violent, especially towards humans.
- Mega Man Battle Network takes place in a cyberworld fully-populated with advanced electronics, many of them with embedded systems that can be accessed via the Internet. Naturally, a large portion of your enemies are viruses, or malicious program-entities that could spawn viruses and Eldritch Abominations referred to as Bugs.
- In Retrovirus, the whole point of the game is to clear a computer system from a virus found in a spam email.
- Similar to the above example with Retrovirus, the similar NeonXSZ also involves a computer virus running throughout a computer system, this time with Viruses and Malware separated into two factions. Unlike Retrovirus, however, the player can choose to side with them.
- Most of Galerians is spent looking for a Lilia, a Living Macguffin with a computer virus stored in her head. Known simply as the Virus Program, it was created as a failsafe against an A.I. that was starting to go off the rails. The protagonist, Rion, has complementary activator program to stored in his head, so Lilia and Rion must be united in order to destroy the A.I. after it develops delusions of godhood.
- Code 7 has Code 7. It is currently unclear what it does, but everything hints that it will bring The End of the World as We Know It.
- The main plot point of Prismata's story mode is a virus going out of control.
- In Kingdom Hearts coded, System Sector floors are occasionally infected with a generic virus that increases enemy strength and forces you to bet 100% of your SP on the Self-Imposed Challenge.
- The backstory of the .hack games involves a powerful virus called "Pluto's Kiss" being released on the web on the Christmas' eve of 2005. It caused every computer and system connected to the Internet to crash simultaneously, causing an previously unseen amount of damage around the globe. The web itself was destroyed in the attack and all the info within was lost forever. In the aftermath, the Internet went back to the ARPANET days and it took years to become available to the public again. During the investigation, it was discovered that one Operative System was immune to not only Pluto's Kiss but to all other known virus. Once the web became public again, said OS developed by ALTIMIT Company became by law the default OS in all new computer in order to prevent another Pluto's Kiss. Then CC Corp launched "The World", the first MMORPG available post crash, triggering the events of franchise.
- Hypnospace Outlaw, being an early internet simulator, has a fair amount of viruses that you can contract through your in-game browser. And then there's Mindcrash, which ends up actually killing HypnOS users.
- 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."
- Homestar Runner: Strong Bad receives a virus email in "Virus" which looks like text gibberish. Strong Bad then runs his virus scanner to find that he in fact has over 400,000 viruses on his computer, enough to cause the rest of the Homestar universe to glitch until Bubs shoots the computer with a shotgun.
- In the webseries for The Trash Pack, computer viruses are treated like actual viruses to Scummy Screen, being a living computer himself. Of course, Trash-A-Pillar gives him one thanks to a link that said to click on it to download a virus and get one million dollars. Hey, it seems like a good deal at the time to both of them.
- In various GoAnimate videos, there's the "Barney Error", which traps a person's computer on a screen mentioning how Barney was killed by a random person and had a bomb placed in their lair. They are told not to touch their computer for 24 hours lest the bomb goes off. Attempts to circumvent this tend to lead to the countdown speeding up quickly to the final ten seconds, where they must put in a code or they lose everything. It depends on the creator on how successful the infected is on stopping it.
- In RWBY Volume 2, Cinder is able to infect Beacon with a trojan horse, which allows her inside access to everything within the school. This gets passed further in Volume 3 when Ironwood places his Scroll on Ozpin's desk, causing it to be infected and giving her access to Atlesian information like who Penny really is.
- Played for Laughs in RWBY Chibi where Winter, Ozpin, Ooblek and Port are confused as to why their computers are infected when they have some of the best defenses. Then, Penny walks by and sneezes, causing Winter to gawk in utter confusion.
- The trolls in Homestuck contain two people who use viruses - Sollux, a hacker who creates really effective viruses, and Karkat, a script kiddie who calls himself a programmer but who gets Sollux to do all the hard work for him. The troll story starts when Karkat runs a ridiculously dangerous virus created by Sollux on his own computer in a fit of blind pique, blowing it up and putting a Curse on himself, all his friends, and everyone he will ever meet.
- The page image is from Gunshow's The Anime Club, where a virus titled killallnerds.exe is designed and deployed against the titular club members to delete all of anime movies and episodes on their hard drive. They use it back against those responsible in the end.
- Vinesauce streamer Joel is fond of intentionally downloading and executing these in his "Windows Destruction" streams, where he loads up Windows on a virtual machine and attempts to cripple it as much as possible. Some of his favorites include .exe files disguised as .mp3 or .avi files (this is why just about every Windows technician strongly encourages users to disable the "Hide extensions for known file types" toggle; with it enabled, "filename.mp3.exe" will simply appear as "filename.mp3") and ransomware that prevents the infected system from booting into any OS unless they obtain an unlock code from the author (which usually entails paying said author, hence the term).
- Personified with Megabyte of ReBoot. His "sister" Hexadecimal is a little more unpredictable but less actively malicious.
- Regular Show gave us the Doomageddon virus, disguised as Error 220. The only way it could get destroyed was to smash the computer with a hammer. In its physical form, it resembled a bacteriophage.
- Adventure Time episode "A Glitch is a Glitch" has Ice King upload a virus to the Universal Source Code of Ooo, deleting everything so that he and Princess Bubblegum are the last two people in the universe. The virus looks like a glitchy Ice King head with cursor arrows for eyebrows, and it physically eats bits of code. Finn and Jake defeat it by grossing it out and causing it to throw up the code.
- Also personified with Swayzak in the Toonami TIE Trapped In Hyperspace. He infects the Absolution and other ships in the area For the Evulz. At the end, he infects TOM.
- 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.
- The Storm botnet fell into decline, only to be replaced by more of the things. In no particular order:
- Conficker: Updated itself automatically and killed off Anti-malware programs.
- Srizbi: Outputed several times more spam than Storm, and was capable of creating its own command-and-control 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. It is removable with tools such as Kaspersky's TDSS Killer.
- Stuxnet - a worm supposedly developed to hamper and/or ruin Iran's nuclear facilities. Essentially, a weaponized computer virus. Thankfully, its highly specialized nature made it harmless to most other kinds of computers...but that hasn't stopped more well-rounded descendants like "Flame" and "Duqu" from popping up.
- Floppy disc-transmitted viruses used to be a major feature on the computing landscape, before technology marched on and they were replaced by malware that leveraged the Autorun feature for plug-n-play software in optical discs and USB flash drives. One of the most notable and infamous viruses that spread in this way was the legendary Friday the 13th Virus, also known as the Jerusalem Virus.
- One type of malware derived from the concept of viruses is the E-mail delivered worm. One of the more infamous worms that stalked the Internet lured schmucks into opening the infected payload by pretending to contain pictures of Anna Kournikova.
- Rogue "anti-virus" programs pass themselves off as legitimate anti-virus programs when they force themselves onto your computer. Then they begin to tell you that your computer is chock-full of viruses and registry errors, and try to coerce you into buying a license for the program by compromising your computer under the guise of the viruses that they claim to protect from. These range from subtle, like Winfixer, to cartoonishly evil, like Nava Shield.
- MEMZ is a trojan that, unlike many kinds of viruses, was not created with malicious intent and was instead intended to be shown off on Youtube. The effects it can have on the computer when launched, however, are still very devastating: over the next several minutes, it will cause the cursor to move on its own, open various Google searches, play error messages, taunt the user, and eventually cause the screen to flash before creating a collapsing tunnel effect. Attempting to halt the program once it is activated will cause it to bluescreen the computer. Furthermore, once the program is activated, it will automatically overwrite the computer's boot sector: even if the trojan's other payloads can be stopped, the computer will be rendered completely unusable upon being rebooted, with only a looping image of "Nyan Cat" playing on start-up.
- Lose/Lose is a "game" trojan that looks and plays like an old space-shooter like Galaga, but with one key difference: every enemy killed in the game will delete a file on your computer. Depending on how far into the game the players progress and how high they score, it's even possible to delete system files and render the computer unusable.