(if software could actually damage hardware, virus programmers would have been doing it for ages)
In the really old days (about 1984) a friend of me made a program that broke the monitor.In those days the sync was 100% controlled by the computer and increasing the vertical sync
to about 200 Hz made the monitor useless after. The ASM snippet was never released, it was just an experiment we did.
Todays monitors just refuse to hang on if the sync is too high, but not our monochrome monitor of 1984, he he
There was also a program around on the C64 that made the
stepmotor of the floppydrive play music by stepping it
insanely fast, it usually broke the drive after an hour or so...
Finally there are the viruses that try to fash your BIOS,
they can be "lucky" if there is no shadow and crash it all...