I have just read this question: Could this code damage my processor? and this made me think.
Is it possible to damage hardware just by software? I heard that "in the good old days" (TM), when hard disk actuators were controlled by software, they could be hit against the central spindle, which would damage the drive permanently.
There was also the infamous Chernobyl virus which just killed the BIOS and rendered the machine useless, until someone reflashed it.
And there are microcode updates, which can be flashed to the CPU (and I don't know much about them).
But is this still possible today? Could you damage hardware by software? Execute the hcf
(Halt & Catch fire) instruction? Grill the cat by increasing WLAN output power?
So yes, software can damage (or even destroy) hardware.
As a computer virus is only code, it cannot physically damage computer hardware. However, it can create scenarios where hardware or equipment controlled by computers is damaged. For example, a virus may instruct your computer to turn off the cooling fans, causing your computer to overheat and damage its hardware.
Malware, or malicious software, is any program or file that is intentionally harmful to a computer, network or server. Types of malware include computer viruses, worms, Trojan horses, ransomware and spyware.
Yes, you sure can in general. Sometimes in practice it is harder than you think, sometimes very easy.
Say for example you have a gpio pin, that is used as an input and tied to Vcc. Make it an output and drive it low, you can usually sink more than you can source so you can absorb a lot but if this is a voltage rail and they didnt put some limiting resistors in there, a power up strap option for example, the smoke will come out.
Even in PC's i2c is bit banged in some places, same deal you have a bug, accidental or intentional, do enough i2c to get the target to think it is its turn to drive the data line, but you drive the data line to, in the opposite direction. you can sink more than source, whoever is sourcing is likely to melt down their output.
I think I heard that one of the (popular family of) graphics processors is no where near capable of handling sustained operations at that clock rate. Think about a machine gun that can fire X bullets per minute, very few can SUSTAIN that for very long without melting the barrel. Thats what they did here, if you do too much with the gpus you will melt the chip without the heat sink being able to do anything no matter how much cooling you attach to the case. this may be a myth, who knows...things like this have happened. Normally you put temp sensors in the chip that cause something in the power system outside to reset the chip/board or turn it off. which is why your pc will go into panic beeping when you try to bring it up without the heat sink on the cpu. You can try this yourself, leave the heat sink fan in to keep the tach up but dont have it touch the cpu. you might destroy the cpu or motherboard so try this at your own risk.
Generally the problems that you might have had inside a chip where you could do a few things and the chip would fail from the inside. We dont normally hand route the whole thing, there are tools that do a lot of that work or check that work to prevent these sorts of things, not fool proof of course, but less likely. board designs though, still very much hand built, and the software drivers normally dont try to do bad things like drive gpio lines against sources and things like that. Not as easy to bang the head of a floppy or hard drive against the inside of the case as it used to be, that sort of thing, although it wouldnt surprise me if you could mess with some settings and gouge a grove in a disk platter or something like that. a Lot harder to catch a monitor on fire.
As already mentioned by other posters, pushing and stressing components, excessive computations, things like that. for computers where there are software controlled cooling fans you can probably go in and turn off the automated, if any, control system and set the fan at a fixed speed, of say...off...turn them all off and see what happens. Some brand of laptop had that problem you upgrade the bios and it slowed the cpu fan down causing hard drive failures and/or other failures in the system. change the bios setting or install the right bios and replace the damaged hardware (if possible/practical) and not dead.
For a while there Linux was excessively parking hard drive heads on laptops or something like that, causing premature disk failure.
Apple is well known for hardware failure, a long lists of class action suits. Some driven by software. Not that other brands dont have bad stuff from time to time, but other brands normally dont control the hardware and software in one package making it harder to isolate one company, or worse a company that should know better than to destroy its own stuff. Apple often likes to get their name in the news anyway, free or cheap advertising.
It has been shown, or at least I read, that you can infect a mac battery, batteries are smart now in laptops, with a virus, such that after a clean wipe and re-install of the operating system the battery will re-infect the system with the virus. (just a matter of time for this to happen on any platform not just the one) I wonder what else you can do to modern laptop batteries firmware, it is very easy to catch modern battery technologies on fire, perhaps you could do that with software.
You can software control the disc tray in desktop computers, you could open and close it until it fails (I saw a thereifixed it where the cdrom tray was used to rock a baby cradle this way).
With fanless handhelds, smartphones, tablets. I bet you could defeat the temperature limits and stress components to create heat, probably causing the battery to go.
blowing speakers is an easy one, just do it.
A lot of stuff uses ftdi chips to interface usb to pretty much anything. some of those can have the pins changed from whatever function they are normally, a serial port perhaps, to software bit-banged control, and it is where i started at the top, take what was supposed to be an input, make it an output and drive the other way until something melts down.
Being someone who likes to build and overclock computers, I can name a few (very extreme) cases where this could potentially happen. (I emphasize potentially because such conditions are somewhat unrealistic in most machines today.)
The first example is a BIOS flash. Some motherboards allow you to flash (modify) the BIOS via software from within the OS. This opens a backdoor for malware to flash the BIOS to something that will damage the processor. (for example, increase the voltage to 2V - and BOOM!!!)
In a second case, some motherboard provide overclocking tools that allow you to change CPU settings from within the OS. If a virus takes over that - then like in the first example, set your CPU to settings that are damaging and fry it.
In a third example (possibly the most realistic ones) are the stress-tests and intensive applications. For example, most laptops today aren't designed to run numerical code for very long durations and may overheat. Although hardware temperature sensors will usually shutdown a machine that has overheated to a certain point, the thresholds tend to be very high - and it is not safe to sustain a CPU at a temperature just below the safety shutdown threshold.
An example of some code that has the potential to overheat a CPU is my answer to this micro-optimization question: How do I achieve the theoretical maximum of 4 FLOPs per cycle?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With