[Coco] Coco virus/worms are possible!
Robert Gault
robert.gault at worldnet.att.net
Sun Dec 12 14:20:43 EST 2004
A topic that comes up occasionally is "can a Coco be infected in a
manner similar to current PCs". Generally the answer is no but I've just
come across a method that could make infection a possibility.
I was asked about a Coco game that was stated to start running when the
DIR command was issued. Now how can that be possible as DIR just prints
text to the screen. Well, DIR does much more in order to get that text
for printing.
One of the things done by DIR is to load the disk FAT table into a
buffer at $600. As this table is no larger than a 256 byte sector, this
should be safe. However, the game formats track 17 with six 1024 byte
sectors. That means when DIR loads T17S2 (the FAT) it gets more than
bargained for. The buffer is flooded way past the NMI vector at $983.
Since all disk I/O makes use of the NMI, this game probably puts an
address into $982 that vectors to some code loaded from T17S2. Nothing
really bad can happen on a floppy system but on a hard drive system a
malicious program could erase the hard drive.
More information about the Coco
mailing list