This article is from the Computer Viruses FAQ, by Nick FitzGerald n.fitzgerald@csc.canterbury.ac.nz with numerous contributions by others.
Not perfectly; although software defenses can significantly reduce your
risk of being affected by viruses *when applied appropriately*. All
virus defense systems are tools--each with its own capabilities and
shortcomings. Learn how your system works and be sure to work within
its limitations.
Using a layered approach, a very high level of protection/detection can
be achieved with software only.
1. ROM BIOS--password (access control) and selecting to boot
from the hard drive rather than from diskette. (Some may
consider this hardware.)
2. Boot sectors--integrity management and change detection.
3. OS programs--integrity management of existing programs,
scanning of unknown programs. Requirement of authentication
values for any new or transmitted software.
4. Locks that prevent writing to a fixed or floppy disk.
As each layer is added, undetected invasion becomes more difficult.
Nevertheless, complete protection against any possible attack cannot be
provided without dedicating the computer to pre-existing or unique
tasks. International standardization on the IBM PC architecture is both
its greatest asset and its greatest vulnerability.
 
Continue to: