For this reason, it's a good idea to disable any interfaces you're not using to connect to a network or the Internet. To do so, launch System Preferences, and select the Network pane. Select each interface you want to disable, and for each one, select the button that looks like a gear at the bottom of the interface list, and choose Make Inactive from the pop-up menu.
This disables the interface, but doesn't delete it -- so you can easily change it back to Make Active to restore access to the interface.
Make use of encryption options
Mac OS X offers a number of options for encrypting your data to prevent access to it if your Mac is lost or stolen. I've already touched on a couple of these, but the biggest example is FileVault, which can also be activated and managed from the Security pane in System Preferences.
FileVault converts your entire home folder into an encrypted disk image. The image is mounted and accessible only when you are logged in. At all other times, it is unreadable. FileVault uses industry-standard encryption, and if you use Time Machine, any backups of your home folder's contents are equally encrypted.
Note: FileVault must be enabled by each user who wants to have an encrypted home directory. Each home directory will be encrypted as a separate disk image file.
FileVault supports the use of a master password as a safety net that can be used to reset user passwords and access encrypted home folders if users forget their passwords. If both a user password and a master password are lost or forgotten, however, there is no way to retrieve data from the encrypted home folder.
To enable FileVault, launch System Preferences, select the Security pane, and then select the FileVault tab. You can set or change a master password using the Change button next to the master password description. (You must be an administrative user of the computer to do this, and you must know the current master password if one is already set.)
Next, click the Turn On FileVault button. Enabling FileVault for the first time can take a significant amount of time because the entire contents of your home folder are copied into a newly created encrypted disk image. If you have tens or hundreds of gigabytes of data, this could take hours or even days (much like an initial Time Machine backup).
For this reason, it's easiest to set up FileVault when you first create a user account (and thus there is little data in the home folder). During this initial copy, you will also need to ensure that you have at least as much free space on your hard drive as the size of your home folder, since all the data will be copied. Once enabled, FileVault encrypts and decrypts items on the fly when you log in or log out, and it generally won't slow down performance significantly.
Disk Utility also lets you create encrypted disk images. Disk images look and act like virtual hard drives and can be created as blank images or copies of existing disks or folders. Mounting an encrypted disk image and accessing the contents requires a password. This makes encrypted disk images helpful if you want to secure only a portion of your files, if you need to securely store files outside your home folder, or if you need to securely share files by e-mail or other mechanisms.
To create an encrypted disk image, launch Disk Utility, and click the New Image button in the tool bar. You can select the size, name (which will be displayed as a disk/volume name when image is mounted), file name and location of the image file itself, and various other disk format options (which can typically be left as their default selections). To enable encryption, choose 128-bit or 256-bit AES encryption from the Encryption pop-up menu.
After you've made your selections, click the Create button. When Disk Utility creates the image, it will prompt you to enter and verify a password that will be required to open the disk image file. The password assistant is available in this prompt (in the form of a button with a key icon, just as when changing a user account password).
Use Keychains wisely
The Mac OS X Keychain is a feature that securely collects passwords for a vast number of functions -- including e-mail and instant messaging accounts, Web services, Wi-Fi networks and file servers. The Keychain stores this information in encrypted format and is decrypted only when you provide a master password.
Keychains can also contain encrypted notes (such as bank account information) and security certificates, all of which can be accessed and managed from the Keychain Access application in the Utilities folder on your Mac. In the Keychain Access window, right-click or control-click on an available Keychain to change the password, lock the keychain or alter settings that will cause the keychain to lock automatically. You can also create or delete Keychains here.
By default, each user account has a Keychain associated with it that is unlocked with the user's password at log-in. If a user's password is reset through a method other than the Accounts pane in System Preferences (such as by an administrator account or from the Mac OS X Install DVD), the account and Keychain passwords will become out of sync. You can fix this by manually changing the Keychain password to match your log-in password, or you can reset the Keychain using Apple's Keychain First Aid feature, which can also help troubleshoot other types of Keychain problems.
Keychains offer both security and convenience. You can improve security by using multiple Keychains (each of which contains different information) with different passwords or by simply changing your account's Keychain password. This ensures that even if your user account password is compromised, the data in your Keychain(s) -- including passwords to other services -- will remain securely encrypted. As with a firmware password, if you forget a Keychain's password, its contents will be irretrievable.
Get the most out of Leopard's firewall
Mac OS X has included an optional firewall for some time, traditionally based on the open-source Unix ipfw firewall. Leopard introduced a newer, dynamic firewall option. This new firewall (click the Firewall tab in the Security pane in System Preferences) is straightforward, which is helpful for users who simply want their computers protected without having to create and manage complex firewall rules.
You can choose to block all incoming traffic, which prevents your Mac from accepting any data that it didn't explicitly request, such as a Web page. You can also allow only core system services to accept incoming data or allow access based on specific applications or system processes.
This last option is the most commonly used, and it will cause Leopard to alert you any time an application wants to accept nonrequested incoming data. If you allow incoming data for an application, it gets added to the list of allowed applications. Applications such as iChat require incoming connections to function properly.
You can use the list in System Preferences to selectively remove applications from the allowed list or even just as a quick way of verifying which applications are on the list. You can also change an allow rule into a block rule, which will prevent an application from receiving incoming data or asking you to allow access.
Two other options -- enable logging and enable stealth mode -- are available via the Advanced button. Logging, as you might guess, logs all traffic that is received by your Mac and how that traffic is filtered. Stealth mode will cause your Mac to ignore ping requests from other computers and prevent outside users from easily detecting your Mac on a network. This increases security but can also limit the effectiveness of remote troubleshooting of network problems.
Leopard's new dynamic firewall interface is really a simple way to establish basic firewall rules. Connections are still evaluated based on the network port numbers used by each request, but the firewall has been made much simpler for everyday users to enable and configure. For power users, the full ipfw suite, which lets you develop much more complex firewall rules, is still included as part of Leopard and can be accessed via the Terminal. And as with any computer, you can use port-scanning tools to verify the effectiveness of your firewall configuration in shielding your Mac.
One reason to understand and use the firewall is the common use of public Wi-Fi networks. Such networks are often unprotected, meaning that any data you exchange over the network can easily be snooped on. However, it also means that any malicious user connected to the same network has the capacity to port-scan your Mac and attempt to determine vulnerabilities. Working with the firewall and enabling stealth mode are two good ways to protect your Mac in these situations.
Delete files and erase disks securely
While you may think that you're permanently deleting files when you empty the Trash or erase a disk using Disk Utility, the truth is that you aren't. You're really just marking the disk sectors where files were stored as available to store new data. Until the disk space occupied by the "deleted" files is overwritten at least once, many hard drive recovery and forensic tools can recover deleted files.
Fortunately, Macs offer a couple of ways to ensure that deleted data stays deleted. First up and simplest is the Secure Empty Trash command, located just under the normal Empty Trash command in the Finder's File menu. This performs a simple overwrite of the disk sectors containing any files being trashed. In some instances, serious forensic investigators could reconstruct files that have been overwritten with a single pass, but for most users, this option offers ample security by preventing easy recovery of deleted items.
If you really want to ensure that items can't be recovered, Disk Utility's secure-erase features allow you to erase an entire disk or the free space of a disk, which includes both disk space that was never used and space where files had existed before being deleted.
Whether you're erasing the entire disk or just the free space, you can choose to securely erase data with a single pass of blank data (also known as zeroing out a disk), seven passes or 35 passes. A seven-pass erase meets U.S. Department of Defense standards for secure data removal; a 35-pass erase typically takes hours or days to complete but will ensure that nothing is recoverable. When erasing an entire disk, click the Security Options button to choose the number of passes; when erasing free space, click the Erase Free Space button to see these options.
To use either feature, select the hard drive or volume that contains data you want to erase securely in the list to the left of the Disk Utility window, then select the Erase tab on the right side. If you want to erase only free space, click the Erase Free Space button.
To erase an entire disk/volume, click the Security Options button, select the number of passes to be made, and choose the appropriate disk format and the name for the newly erased disk. Then click Erase to erase the disk. (Note: You can't erase the start-up disk that a Mac is using -- if you want to securely erase the primary/startup drive, you'll need to boot from an alternate disk, such as an external hard drive or the Mac OS X Install DVD.)
Don't share anything you don't have to
Macs offer users a lot of ways to share information. The Sharing pane in Leopard's System Preferences offers 11 different choices (though one them, Xgrid computational cluster sharing, isn't likely to be used by the majority of people).
The list ranges from general file and printer sharing to remote log-in and control of your Mac using Leopard's screen sharing, Apple Remote Desktop, and secure shell (SSH) command-line access. Even personal Web site hosting (Internet sharing) and Bluetooth sharing are supported, as are Remote Apple Events, which allow applications on one Mac to trigger actions on another.
The simple advice here is "Don't enable any type of sharing you're not actively using." Every time you enable sharing of any service, it opens up an avenue for someone to remotely access and/or manipulate your Mac. This could mean accessing shared files or taking complete control of the computer. If you need to share something, then by all means do so -- but if not, keep everything as locked down as you can.
Another danger is the Back to My Mac service offered by Apple's MobileMe, which lets your MobileMe account automatically connect you to your Mac using file, printer or screen sharing over the Internet. This is a highly convenient feature, but not only does it rely on leaving sharing services running and open; it also relies on making those services accessible from the Internet at large. If your MobileMe account is compromised, then so is your entire Mac.
If you need to enable sharing, and chances are that you will at some point, do it in as restrictive a manner as possible. Virtually every sharing service offers at least minimal controls. In the case of DVD and CD sharing, you can opt to have your Mac ask you before allowing remote access. In the case of many services that are user-based, you can choose which users are allowed to access the service remotely.
Most importantly, in the case of file sharing, you can designate both which folders are shared and who has access to those folders. Even though the default setting is to allow all users access to the general Shared folder and to allow everyone access to the Public folder inside each user's home folder, you can add and remove specific folders from the list of those being shared. Share only what is needed, and limit access to as few users as possible.