TIP: Click on subject to list as thread! ANSI
echo: os2
to: Rodrigo Cesar Banhara
from: Jonathan de Boyne Pollard
date: 1999-10-01 10:20:08
subject: Why there are no OS/2 viruses

 RCB> To make a virus for it guys is a trivial task [...]

No it isn't.  Making a native OS/2 virus is actually a very *complex* task.

Many people rank the skills of virus writers quite highly.  But speaking as a
programmer I don't have that high a regard for them.  Writing DOS viruses is
*easy*.  It's at most 500-odd bytes of machine code, after all.  

What is complex is what OS/2 requires one to do that DOS doesn't in order to
produce a working virus.  

þ OS/2 requires a virus writer to understand the internals of the LX and NE
executable file formats, and to write code that can modify them in order to
infect files.  DOS viruses only need to understand the COM format, and
sometimes the MZ format as well, which are both a lot simpler.

þ OS/2 requires that a virus writer know how to write code that executes in
16-bit and 32-bit protected mode, as well as plain old 8086 real mode.  DOS
viruses only execute in 8086 real mode.

þ For a "stealth" virus OS/2 also requires that a virus writer know how to
write code that operates in ring 0, that hooks into the internal operations of 
the disc device driver, and that thus knows all about request packets,
adapters, and units.  DOS "stealth" viruses simply hook into the BIOS hard
disc service vector, which has a simple calling interface and which only run
in 8086 real mode.

þ For a boot sector or a "direct infector" virus OS/2 requires that a virus
writer know how to obtain access to the raw volume in OS/2, including the
locking protocol that OS/2 enforces for such operations, and also requires
that a virus writer include code that understands all of the different volume
formats that OS/2 supports and that could potentially be in use (FAT12, FAT16, 
FAT32, EXT2, and HPFS, for example).  DOS "direct infector" viruses only need
to understand FAT12 and FAT16 (and possibly FAT32 if they are ambitious,
although FAT32 isn't *that* different to the other two).

The fact that no-one, in the 8 or so years that 32-bit OS/2 has existed so
far, has produced a native OS/2 virus -- despite the fact that OS/2 is
mainstream enough to be mentioned in the computer magazines, despite the fact
that the many sysops and banks around the world who run OS/2 are tempting
targets, and despite the fact that many people have not been shy of publically 
doubting the abilities of virus writers to write viruses for OS/2 for most of
that time -- strongly indicates that none of the virus writers have found
themselves up to the task of writing an OS/2 virus.

One can only conclude that virus writers aren't actually very skilled as
programmers.  They write DOS viruses because they are *easy to write*.  They
write Windows NT macro viruses because those viruses can be written *in BASIC* 
and are again easy to write.

 ¯ JdeBP ®

--- FleetStreet 1.22 NR
114/441
* Origin: JdeBP's point, using Squish (2:257/609.3)

SOURCE: echoes via The OS/2 BBS

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.