Has anyone encountered a virus that actually harms the hardware of the
host computer? The virus-engineers usually quite clever when it comes
to malicious code.
(and I don't mean in an indirect way, e.g. annoying the user beyond
sanity so the user assualts the hardware from pure frustration)
Assuming you can solve the *VIRUS* part, the "harms the hardware"
part is fairly easy to construct for a certain class of hardware:
bombs, missiles, etc. that are *SUPPOSED* to blow up, but not
necessarily right now. It is also likely easy to screw up
safety-critical systems on board aircraft, automobiles, spacecraft,
or controlling nuclear reactors. That's why they are called
safety-critical.
I do know, and personally witnessed several times and caused at
least once, that an old TRS-80 monitor would start to smoke if you
had the TRS-80 connected to an in-circuit CPU emulator and did not
permit the startup ROM to initialize the video circuitry with
reasonable timing. (The emulator would power up with the CPU paused
just before executing the first instruction if you didn't tell it
to do otherwise) If not corrected within a few minutes, you had a
dead monitor, and a horribly-smelling room. I think you could
accomplish the same thing by removing the CPU chip and powering it
up. I believe that certain early PC monitors (e.g. 1984) also had
the same problem if given strange video frequencies.
Although no one ever tried it to my knowledge, explicitly setting
the video circuits to their power-up values would probably have
accomplished the same thing deliberately - and since TRSDOS ran
completely unprotected on a Z80 with no hardware memory protection
and no privilege required to do I/O instructions, if you could get
a user to run your program, you're able to fry the system. However,
the community of TRS-80 users wasn't connected well enough to really
make a virus workable.
XFree86 warns of possible hardware damage if you attempt to drive
a monitor beyond its capabilities, for example, 1280x1024 @80Hz on
a monitor only designed to do 640x480 @60Hz. I believe that modern
monitors are protected to the extent that they won't self-destruct. But
if they do, I won't be responsible for replacing your monitor.
This leaves open the possibility that hardware damage can be caused by
a few keystrokes or mouse clicks in the monitor configuration section
of your OS GUI.
On a modern PC there are probably a few things that can be done to
at least reduce the life of the hardware:
- Repeatedly spin up and spin down the hard drive.
- Shut off all the software-controlled fans.
- Run the CPU in a continuous infinite loop (e.g. SETI@HOME) for maximum heat
- Repeatedly power-cycle the motherboard, by setting an alarm for it to
wake up, then shutting off power.
There are a number of things that, while not necessarily "hardware damage",
would probably cause you to return your system to the factory for repair
or junk it, as a normal OS re-install wouldn't fix it:
- re-flashing the BIOS with nothing but HALT instructions.
- loading garbage firmware into devices such as hard disks, wireless network
cards, CD-ROM drives, etc.
- reformatting the hard drive with a strange format with, say, 387-byte
sectors.
Now for the C relevance: all of the above *MIGHT* be done
with the following program:
#include <stdio.h>
void main(int argc, char **argv)
{
fflush(stdin);
exit(0);
}
Gordon L. Burditt