Owing to the (to me inexplicable) behaviour of virus/malware writers* we have to waste PC (and our own) time and resources on running anti-virus/malware killers. Fortunately there are some great free ones (I use Avast!, and recommend it to anyone), but I have wondered in the past if there were ever any viruses released for consoles. As far as I can see, up until the sixth generation (N64, Playstation, Saturn, etc) this would have been impossible, as the games were on un-writable (or rather, un-corruptable by malicious code) media such as cartridge or CD-ROM. But when the original XBox came out, it had a hard-drive that contained the operating system, plus the XBox was (as far as I know) the first console to really have a large home-brew scene. So as far as I could see, there was a danger that some ****er could code a virus that would attach itself to an XBox homebrew program (be it an emulator, XBMC, or whatever) and wipe the hard drive when the program is run. Thankfully that never happened (I've been an XBox owner for about ten years now (the shop I bought my XBox from modded it whilst I waited, as I partly wanted it for MAME) and a regular at xbox-scene.com, and if such a virus/trojan did exist then I'm sure I would have read about it) and I've run dozens of XBox homebrew programs (my XBox is still my main emulation machine) with no problem. But now, especially, with both the XBox 360 and PS3 having hard-drives and downloadable games, it does make me wonder if (or when) a console will be attacked by a virus. Modern consoles are picking up the bad side of PCs (games released untested and with bugs since the companies can release a patch later, no split-screen multiplayer, etc) and the threat of malware might one day be of concern to console only gamers too. * I can understand people who write malware that steals your credit card information. I certainly don't support it, I hasten to add, but at least I can understand what they get out of it. But what does someone who writes a virus that just corrupts your games and data, or wipes the hard drive, get out of it? Just the knowledge that later on, some (innocent) users are going to lose their data and be put to the time and effort of trying to rebuild what they've lost? It baffles me.
There is no known malware for retail consoles, though there is no reason malware couldn't exist for modded consoles which can run unsigned code. In fact, someone did craft a trojan which masqueraded as a XDK recovery a few years back. When run, it would destroy the XDK. It was well noted here on the forums.
There was also some "taihen" malware that was bricking the DS. Can't remember what it was masquerading as - a hentai slideshow, I think? edit: Does the Ouya count as a console? If so: There's *loads* of Android malware of all kinds. Most of which apparently comes from third-party app stores as well as sideloaded content. That's the downside of it being an "open" console...
There was a Dreamcast game that came with a bonus CD which contained a virus. It wouldn't harm the Dreamcast but it would harm the a PC if the disc was placed in to one. The entire release was recalled then re-released.
Depending on how you define "malware" any "softmod" or boot disc would be malware. It would get the console to run illegal code that it shouldn't be running. Many consoles can be soft modded or "compromised" with a boot disc, certainly going back to the Dreamcast. To my knowledge, there was a more traditional virus spread on the XBOX 360 version of Borderlands 2, where playing online with infected users could cause your save files to get corrupted. You can find more info on google by searching "borderlands 2 virus" or something like that.