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 15<br />

UUCP<br />

15.6 Additional <strong>Sec</strong>urity Concerns<br />

UUCP is often set up by <strong>UNIX</strong> vendors in ways that compromise security. In addition to the concerns<br />

mentioned in earlier sections, there are a number of other things to check on your UUCP system.<br />

15.6.1 Mail Forwarding for UUCP<br />

Be sure when electronic mail is sent to the uucp user that it is actually delivered to the people who are<br />

responsible for administering your system. That is, there should be a mail alias for uucp that redirects<br />

mail to another account. Do not use a .forward file to do this. If the file is owned by uucp, the file could<br />

be altered to subvert the UUCP system. Instead, use whatever other alias mechanism is supported by<br />

your mailer.<br />

15.6.2 Automatic Execution of Cleanup Scripts<br />

The UUCP system has a number of shell files that are run on a periodic basis to attempt to redeliver old<br />

mail and delete junk files that sometimes accumulate in the UUCP directories.<br />

On many systems, these shell files are run automatically by the crontab daemon as user root, rather than<br />

user uucp. On these systems, if an attacker can take over the uucp account and modify these shell scripts,<br />

then the attacker has effectively taken over control of the entire system; the next time crontab runs these<br />

cleanup files, it will be executing the attacker's shell scripts as root!<br />

You should be sure that crontab runs all uucp scripts as the user uucp, rather than as the user root.<br />

However, the scripts themselves should be owned by root, not uucp, so that they can't be modified by<br />

people using the uucp programs.<br />

If you are running an ancient version of cron that doesn't support separate files for each account, or that<br />

doesn't have an explicit user ID field in the crontab file, you should use a su command in the crontab file<br />

to set the UID of the cleanup process to that of the UUCP login. Change:<br />

0 2 * * * /usr/lib/uucp/daily<br />

to:<br />

[Chapter 15] 15.6 Additional <strong>Sec</strong>urity Concerns<br />

0 2 * * * su uucp -c /usr/lib/uucp/daily<br />

On somewhat newer crontab systems that still don't support a separate crontab file for each user, change<br />

this:<br />

file:///C|/Oreilly Unix etc/<strong>O'Reilly</strong> Reference Library/networking/puis/ch15_06.htm (1 of 2) [2002-04-12 10:45:00]

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

Saved successfully!

Ooh no, something went wrong!