Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Apple > Operating Systems

Securing Mac OS X

This chapter is from the book

Securing Mac OS X Services

The four key Mac OS X services that you can make available through the Sharing System Preferences window are File Sharing, Web Sharing, Remote Login, and FTP (Figure 18.6). All these services give network users access to aspects of your machine that they otherwise could have only by sitting down at the machine itself. Each service provides a different form of access in a different way, but all the services use the same user name and password. As indicated in Chapter 4, this arrangement provides additional security exposure, because compromise of one service's password can lead to compromise of the other services and of the machine itself.

Of the four services, Remote Login is riskiest and also the least likely to be needed. Remote Login gives authorized network users the same level of access they would have at the machine itself, except through the Unix command line rather than through the Mac interface. Unless you are a Unix expert, follow a simple rule about Remote Login:

WARNING

Do not enable Remote Login. The Unix command line is of little use to most Mac users but potentially of great use to hackers. Enabling Remote Login exposes your machine to network attacks that could take full control of the machine at the Unix level. Many Unix machines are compromised through Remote Login.

If you feel that you need to use Remote Login, make sure that your version of Mac OS X is at least 10.0.1. To check, choose About This Mac from the Apple menu. The original release of Mac OS X, 10.0, shipped with a highly insecure implementation of Remote Login called Telnet. Telnet sends its entire session in clear text, including user name and password. Anyone listening in on the conversation between a Telnet client and your Mac OS X machine (usually through automated sniffer software) would be able to capture your name and password and log in to your machine as you.

In Mac OS X 10.0.1, Apple replaced Telnet with SSH (Secure Shell). SSH uses advanced encryption techniques to make the session much more secure. Regardless of this increased security, exposing the full command-line interface of your Mac OS X machine over the network remains risky and is not very useful unless you're a Unix expert. The risk almost never justifies the reward. If you do take the risk, however, be sure to follow these guidelines:

  • Use Mac OS X 10.0.1 or later.

  • Verify that all users on the machine have well-chosen passwords.

  • Install a personal firewall.

  • Allow access to the SSH service only from IP addresses that really need it.

FTP is another Unix-based service with high security risks; generally, you should not enable it. (See Chapter 14 for details.) FTP gives authorized network users connecting to your machine the same level of access to files that they would have if they were logged in to the machine directly. FTP shows files and folders that generally are invisible in the Finder and are more difficult to access when a user is logged in directly.

Mac OS X does not support anonymous FTP, so users who access files from your machine with FTP must have a user name and password, even if you don't want them to be able to log in to your machine. Because FTP has a particularly high risk of password compromise, you should be sure that FTP users do not have administrative access to your machine. That way, if a password is compromised, the hacker will not be able to log into your machine as an administrator.

Mac OS X's File Sharing is a much more secure, easier-to-use alternative for sharing files, especially with other Macs. File Sharing is somewhat different from Remote Login and FTP in terms of the access it gives authorized network users. If an authorized network user is an admin user, that user has complete read-only access to all files and folders on the machine, in addition to any access that he or she normally would have at the machine. Non-admin users, on the other hand, have less access than they would have if they were at the machine. Specifically, a non-admin user has full access to only the files and folders within his or her home folder and not to other files, such as applications. Also, non-admin users, like guests, have read-only access to the public folders of other users of the machine. File Sharing does not display invisible files.

Mac OS X File Sharing supports guest users, just as Mac OS 9 does, so you don't need to create accounts for users with whom you want to share files—another significant advantage over FTP. By default, any guest user has read-only access to the public folders of all authorized users on the machine. A user who wants to share files with guests simply needs to place those files within his or her public folder, which is inside the home folder. Public folders also contain a drop box where guests can put (but not see) files that they want to transfer to authorized users.

Admin users can change the access privileges of files and folders on the machine, and all users can change the access privileges of files and folders within their home folders, although only public folders are actually shared to guests through File Sharing. To change an item's access privileges, choose that item in the Finder, and then the Finder's Show Info command from the File menu. In the dialog box that appears, choose Privileges from the Show pop-up menu and select the desired privileges (Figure 18.15). Even though you can assign sharing privileges to any file or folder, you can share only the folders that the Mac OS makes available for sharing—the whole hard disk for admin users, a user's home folder for nonadmin users, and public folders for guests.

Figure 18.15 Setting Mac OS X File Sharing privileges is much the same as under Mac OS 9 but somewhat more limited.

Mac OS X File Sharing uses a different AppleShare (AFP) authentication protocol than previous versions of Mac File Sharing. It uses Diffie-Hellman Exchange (DHX) rather than random-number exchange. DHX, described in Chapter 14, is highly secure and supports longer passwords than random-number exchange. (Mac OS X File Sharing currently uses only the first eight characters of the password however.) Most Macs support DHX for File Sharing, but some older ones may not. If an older Mac doesn't support DHX, it may send its user's password in clear text, which would be indicated in the Chooser (Figure 14.6). Most older Macs can be upgraded to use the latest AppleShare client, which supports DHX.

Mac OS X Web Sharing operates through the Unix-standard Apache Web server. Apache is extremely powerful, but Apple does not make its features available through the Mac OS X user interface. Experts can access these features through Apache's text-file and command-line interface, but the procedure is complex and not recommended.

When Web Sharing is enabled, specific folders are shared at specific URLs. Users of the machine can have their own Web sites, and the machine as a whole has a general Web site. Any files that users put in their Sites folders within their home folders will be available over the Web at http://computers-IP-address/~username/, in which computers-IP-address is the IP address of the machine and username is the user's short name. The tilde (~) is an unfortunate Unix standard that Apple chose not to eliminate. Any files that you put in the Documents folder, which is inside the WebServer folder in the Library folder on your hard disk, will be available at your computer's main site at http://computers-IP-address/.

Mac OS X does not provide an easy way to apply privileges to files shared through Web Sharing. Web Sharing seems to be intended for Web sites that are accessible to the whole network to which the machine is connected. Apache does provide a high level of control in this area, but this control is available only through its text-file-based interface.

As you can see, each of the Mac OS X sharing services works a bit differently, which can be confusing and can lead to security holes if you assume that one service works the same way as another. Table 18.1 summarizes the levels of access that these services grant to admin users, nonadmin users, and guests.

Table 18.1

Service

Type of Access

Admin-User Access

Nonadmin User Access

Guest Access

Remote Login

Unix command line

Same as at machine

Same as at machine

None

FTP

Files and folders via FTP client

Same as at machine

Same as at machine

None
(no anonymous FTP)

File Sharing

Files and folders via AppleShare client

Same as at machine, plus read-only access to everything

User's home folder other users' public, folders

Public folders

Web Sharing

Web site via Web browser

Main and user sites

Main and user sites

Main and user sites


You can use the NetInfo Manager utility to set many advanced items associated with Mac OS X services (Figure 18.16). NetInfo is recommended only for expert users, however, because the risk of decreasing the security of a service far outweighs the potential benefits of tweaking that service. If you feel you know what you're doing, you can use NetInfo to put a user in a specific group, change the port used by File Sharing, or enable and set details of File Sharing's logging (see "Detecting and responding to security threats" later in this chapter). You can also use NetInfo to enable the root account, but doing so is asking for trouble.

Figure 18.16 You can use the NetInfo Manager to change advanced features of Mac OS X services.

Remember that Mac OS X services run as Unix processes. Most Unix processes keep running even if you've logged out of your machine. Don't assume that a service is no longer accessible just because you've logged out. Either stop the service before you log out or shut down the machine rather than just log out of it.

You should also be sure that services that could run in the Classic compatibility layer are secure. See chapters 7 through 10 for details on securing these services, although all network services that run under Mac OS 9 do not necessarily run under Classic. To secure Classic services such as Program Linking, you need to run an older application that starts the Classic environment and then choose the service from the Classic Apple menu or the third-party user interface.

The Unix security community is an active one. Black hats (hackers) are always looking for new Unix security holes, and white hats (the good guys) are always working to fix them or to find them before the black hats do. Fixes are released in the form of patches that are applied to Unix-system files. Apple makes patches available through the Software Update System Preferences window. (Unix patches usually are applied through the command line.) It's important to run Software Update periodically or set it to check for updates automatically (Figure 18.17). Apple maintains a security Web site at http://www.apple.com/support/security/ that provides details of the updates and related security issues.

Figure 18.17 Software Update will help you ensure that any security patches that Apple releases are applied to your system as soon as possible.

Peachpit Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Peachpit and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about Peachpit products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites; develop new products and services; conduct educational research; and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email ask@peachpit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by Adobe Press. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.peachpit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020