"A virus, a virus. He thinks I am a virus. A virus, a virus. Well, perhaps, I'll be a virus today."
A computer virus is a self-replicating program, usually designed with the intention of causing damage to or otherwise altering computer systems. The nomenclature originates from a pathological virus in the sense that a virus reproduces and causes harm to its host.
In 2154, the warp matrix of the Enterprise was compromised by a subroutine planted by a group of Klingon Augments. The subroutine also compromised the starship's command protocols. (ENT: "Affliction", "Divergence")
Prior to his open defection to the Maquis in 2372, Michael Eddington planted cascade viruses in Deep Space 9 and the USS Defiant's computers. This allowed him to disable the Defiant at a critical time. Fortunately, Odo was able to find and delete the one in the station's computers before it could be activated. (DS9: "For the Uniform")
Also during that year, when the missile Cardassian ATR-4107 ("Dreadnought") accidentally targeted Rakosa V, part of B'Elanna Torres's plan to disable it involved activating a Cardassian back-up file that was part of the missile's original systems. The new systems reacted to it by initiating a counter-virus response program and although they were eventually able to neutralize it, the time spent doing so provided Torres with the distraction that she needed to gain access to an area where she could destroy the missile. (VOY: "Dreadnought")
Later during that year, Harry Kim suggested that The Clown might be a computer virus of some sort, unaware that he was actually a malevolent mainfestation of the fears of the Kohl that had been trapped in the neural network. The Clown mocked him for this suggestion and commented that he had a "mind full of technical and operational thoughts and ideas." (VOY: "The Thaw")
Ramuran tracers use computer viruses to eliminate any records of their presence from alien ships. Both of USS Voyager's encounters with the Ramurans in 2374 were erased in this manner. (VOY: "Unforgettable")