18.12.2012 Views

O'Reilly - Practical UNIX & Internet Sec... 7015KB

O'Reilly - Practical UNIX & Internet Sec... 7015KB

O'Reilly - Practical UNIX & Internet Sec... 7015KB

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

[Chapter 11] Protecting Against Programmed Threats<br />

[1] For a detailed account of one such virus, see "Experiences with Viruses on <strong>UNIX</strong><br />

Systems" by Tom Duff in Computing Systems, Usenix, Volume 2, Number 2, Spring 1989.<br />

The increased popularity of World Wide Web browsers and their kin, plus an increased market for<br />

cross-platform compatibility of office productivity tools, lead to an environment where macro viruses<br />

and Trojan horses can thrive and spread. This environment in <strong>UNIX</strong> includes:<br />

●<br />

●<br />

●<br />

●<br />

PostScript files that are FTP'd or transferred via WWW and automatically interpreted. PostScript<br />

can embed commands to alter the filesystem and execute commands, and an interpreter without a<br />

safety switch can cause widespread damage.<br />

WWW pages containing applets in languages such as Java that are downloaded and executed on<br />

the client host. Some of these languages allow the applets to open network connections to arbitrary<br />

machines, to spawn other processes, and to modify files. Denial of service attacks, and possibly<br />

others, are trivial using these mechanisms.<br />

MIME-encoded mail can contain files designed to overwrite local files, or contain encoded<br />

applications that, when run, perform malicious acts, including resending the same malicious code<br />

back out in mail.<br />

PC-based productivity tools that have been ported to <strong>UNIX</strong>. Many large companies want to<br />

transition their PC users to <strong>UNIX</strong> using the same software that they use on PCs. Thus, there is a<br />

market for firms who make PC software to have identical behavior in a <strong>UNIX</strong>-based version of<br />

their code. The result is software that can exchange macro-based viruses with PCs through sharing<br />

of data and macro source files.<br />

There is also the rather interesting case now of versions of <strong>UNIX</strong> (and <strong>UNIX</strong>-like systems, such as<br />

Linux) that run on PC hardware. Some PC-based viruses, and boot-sector viruses in particular, can<br />

actually infect PCs running <strong>UNIX</strong>, although the infection is unlikely to spread very far. The computer<br />

usually becomes infected when a person leaves an infected floppy disk in the computer's disk drive and<br />

then reboots. The computer attempts to boot the floppy disk, and the virus executes, copying itself onto<br />

the computer's hard disk. The usual effect of these viruses is to make the <strong>UNIX</strong> PC fail to boot. That is<br />

because the viruses are written for PC execution and not for <strong>UNIX</strong>.<br />

You can protect yourself against viruses by means of the same techniques you use to protect your system<br />

against back doors and crackers:<br />

1.<br />

2.<br />

3.<br />

4.<br />

5.<br />

6.<br />

Run integrity checks on your system on a regular basis; this practice helps detect viruses as well as<br />

other tampering. (See Chapter 9.)<br />

Don't include nonstandard directories (including .) in your execution search path.<br />

Don't leave common bin directories (/bin, /usr/bin, /usr/ucb, etc.) unprotected.<br />

Set the file permissions of commands to a mode such as 555 or 511 to protect them against<br />

unauthorized alteration.<br />

Don't load binary code onto your machine from untrusted sources.<br />

Make sure your own directories are writable only by you and not by group or world.<br />

file:///C|/Oreilly Unix etc/<strong>O'Reilly</strong> Reference Library/networking/puis/ch11_01.htm (7 of 9) [2002-04-12 10:44:46]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!