Available Network Services
While user access to administrative controls is an important issue for system administrators within an organization, monitoring which network services are active is of paramount importance to anyone who administers and operates a Linux system.
Many services under Community Enterprise Linux behave as network servers. If a network service is running on a machine, then a server application (called a daemon), is listening for connections on one or more network ports. Each of these servers should be treated as a potential avenue of attack.
Network services can pose many risks for Linux systems. Below is a list of some of the primary issues:
The threat of buffer overflow vulnerabilities is mitigated in Community Enterprise Linux by ExecShield, an executable memory segmentation and protection technology supported by x86-compatible uni- and multi-processor kernels. ExecShield reduces the risk of buffer overflow by separating virtual memory into executable and non-executable segments. Any program code that tries to execute outside of the executable segment (such as malicious code injected from a buffer overflow exploit) triggers a segmentation fault and terminates.
Execshield also includes support for No eXecute (NX) technology on AMD64 platforms and eXecute Disable (XD) technology on Itanium and Intel 64 systems. These technologies work in conjunction with ExecShield to prevent malicious code from running in the executable portion of virtual memory with a granularity of 4KB of executable code, lowering the risk of attack from stealthy buffer overflow exploits.
To limit exposure to attacks over the network, all services that are unused should be turned off. To enhance security, most network services installed with Community Enterprise Linux are turned off by default. There are, however, some notable exceptions:
When determining whether to leave these services running, it is best to use common sense and err on the side of caution. For example, if a printer is not available, do not leave Community Enterprise Linux ships with three programs designed to switch services on or off. They are the Services Configuration Tool ( Services Configuration Tool illustration If unsure of the purpose for a particular service, the Services Configuration Tool has a description field, illustrated in Figure 46.3, "Services Configuration Tool", that provides additional information.
Checking which network services are available to start at boot time is only part of the story. You should also check which ports are open and listening. Refer to "Verifying Which Ports Are Listening" for more information. Potentially, any network service is insecure. This is why turning off unused services is so important. Exploits for services are routinely revealed and patched, making it very important to regularly update packages associated with any network service. Refer to "Security Updates" for more information.
Some network protocols are inherently more insecure than others. These include any services that:
Remote memory dump services, like Other services like Examples of inherently insecure services include All remote login and shell programs ( FTP is not as inherently dangerous to the security of the system as remote shells, but FTP servers must be carefully configured and monitored to avoid problems. Refer to "Securing FTP" for more information about securing FTP servers.
Services that should be carefully implemented and behind a firewall include:
More information on securing network services is available in "Server Security".
The next section discusses tools available to set up a simple firewall.
Risks To Services
Identifying and Configuring Services
cupsd
- The default print server for Community Enterprise Linux.
lpd
- An alternative print server.
xinetd
- A super server that controls connections to a range of subordinate servers, such as gssftp
and telnet
.
sendmail
- The Sendmail Mail Transport Agent (MTA) is enabled by default, but only listens for connections from the localhost.
sshd
- The OpenSSH server, which is a secure replacement for Telnet.cupsd
running. The same is true for portmap
. If you do not mount NFSv3 volumes or use NIS (the ypbind
service), then portmap
should be disabled.
system-config-services
), ntsysv, and chkconfig
. For information on using these tools, refer to Controlling Access to Services.
Figure 46.3. Services Configuration Tool
Insecure Services
netdump
, transmit the contents of memory over the network unencrypted. Memory dumps can contain passwords or, even worse, database entries and other sensitive information.
finger
and rwhod
reveal information about users of the system.rlogin
, rsh
, telnet
, and vsftpd
.
rlogin
, rsh
, and telnet
) should be avoided in favor of SSH. Refer to "Security Enhanced Communication Tools" for more information about sshd
.
finger
authd
(this was called identd
in previous Community Enterprise Linux releases.)
netdump
netdump-server
nfs
rwhod
sendmail
smb
(Samba)
yppasswdd
ypserv
ypxfrd