22.12.2012 Views

Front cover - IBM Redbooks

Front cover - IBM Redbooks

Front cover - IBM Redbooks

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.

For example, if a system is being used as a file server, there is little benefit in<br />

enabling electronic mail (e-mail) services. E-mail services run as root, and there<br />

is a long history of e-mail-related security breaches. Proper system-hardening<br />

procedures call for these services to be shut down, resulting in a dedicated<br />

system with the fewest opportunities for exploitation.<br />

The process of hardening a UNIX or GNU/Linux server begins at the time of<br />

installation. Thereafter, additional activities are performed, which include:<br />

► Eliminating points of attack by shutting down or reconfiguring services and<br />

ports as well as removing unnecessary libraries<br />

► Adding robustness to the file system by looking at file ownership and<br />

permissions<br />

► Properly setting up user accounts so that privileged accounts are only used<br />

when appropriate (and necessary) and that all accounts have proper,<br />

non-trivial passwords<br />

Some common guidelines for configuring UNIX servers more securely by default<br />

are available from CERT's Web site at the following URL:<br />

ftp://info.cert.org/pub/tech_tips/UNIX_configuration_guidelines<br />

9.4.2 Partitioning for protection<br />

Typically, no matter the flavor of UNIX being installed, a number of partitions are<br />

defined, each having a specific purpose, such as SWAP and /tmp. Beyond these<br />

obvious partitions, work should be done to protect against out-of-disk-space<br />

denial-of-service attacks.<br />

Some examples of typical attacks are trying to create an excessive generation of<br />

logging data; or filling the file system of the UNIX server with large files through<br />

FTP, or, if your Domino server isn’t configured properly, by trying to send<br />

inordinately large messages that will make the mail.box file grow accordingly and<br />

allocate the needed space on the hard drive.<br />

The best way to protect against this kind of attack is to segment the file system<br />

hierarchy into separate physical partitions:<br />

► root partition (“/”): This partition can be small because it generally contains<br />

just the kernel, meaning the necessary files, libraries, and configuration for<br />

booting in /bin, /sbin, /etc, and /lib. Access to the attached devices is provided<br />

through the /dev and /devices directories. Many GNU/Linux distributions store<br />

kernels and symbol data in the /boot directory, whereas kernel libraries are<br />

stored under /lib.<br />

► /usr partition: This partition is normally where user-accessible applications<br />

are stored. Normally, /usr does not contain data or configuration files that<br />

Chapter 9. Server hardening 389

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

Saved successfully!

Ooh no, something went wrong!