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

Home > Articles > Apple > Operating Systems

Mac OS X Client General Security Practices

In order to make Mac OS X more user friendly, security measures had to be sacrificed by the manufacturers. Learn how to improve the security on your system without completely abandoning usability.
This chapter is from the book

This chapter is from the book

"I think I'll call him Stampy."
—Bart Simpson

To have a secured workstation, all aspects of the machines' security need to be considered. From physical security to account management to boot options, the quality of the base configuration of your operating system makes a huge difference in the overall security of the host. There are many analogies that can be used to describe the need for secure OS configuration; A house needs a solid foundation to survive a storm, a chain is only as good as its weakest link, a tree with shallow roots is easily toppled. Regardless of which analogy you prefer, realize that the more effort and attention to detail you provide to your base configuration, the more secure and reliable your host will be.

This advice holds particularly true for Mac OS X. OS X is a powerful, modern operating system with a UNIX core. When using the operating system for day-to-day activities, it is easy to use and provides a stable platform for your applications. However, in the hands of a malicious user attempting to gain access to your data or resources, it is powerful and dangerous. Through proper configuration and maintenance, your Mac OS X workstation can provide a stable and secure platform for your applications.

Mac OS X as it ships out of the box is designed to be user friendly. However, to be user friendly, some sacrifices have been made that make it less secure. Also, there are some common configuration practices that can further reduce the overall security of the core operating system. This chapter presents techniques that you can employ that make Mac OS X more secure and have a minimal impact on the usability of the system.

Concerns About Physical Access

Physical security is a trait often overlooked when attempting to secure a host. However, it is an important aspect of information security. Lack of physical security in a workplace can allow illicit and almost untraceable access. According to various reports, between 38% and 70% of all computer attacks are insider attacks. Insider attacks are violations of the security of a resource by someone within your organization. These attacks are common because not only will an insider potentially have the motivation to attack, they will have easier access to trusted resources than an outside entity. Controlling physical access to a host is the first step in preventing an insider attack.

Physical Security in the Workplace

At a previous job, one of us (Bruce) shared an office with seven other system administrators. They worked around the clock on a shift basis, so it was not unusual for only one or two people to be in the office at a time. This gave some workers unsupervised physical access to their coworkers machines for hours on end. They took great joy in breaking into each others' computers and performing various acts of mischief. Over time, the administrators became skilled at locking down their workstations to make it difficult for those trying to play tricks on them. It was increasingly a real cat-and-mouse game as their defensive and offensive skills became refined.

In the end, the activity caused the workers to become much more security conscious and better administrators. Luckily, they were all friends and knew their boundaries with each other and the company. However, if the situation had been slightly different and there was a malicious user in the group, there could have been great harm done. It is easy to imagine situations where someone could impersonate a coworker in an effort to get them fired or harm the company. Many insider attacks are actually due to a disgruntled employee. Physical security is not simply a matter for data centers and security systems. It is something every employee needs to be concerned with.

Doors, Locks, and Guards

The first step in keeping a machine secure from prying fingers is keeping the host in a restricted location. How restricted you keep the host depends on the risk and potential loss of someone gaining illicit physical access. Depending on your level of risk, you may use locked doors, electronic security systems, or even armed guards. Even in an office environment, a coworker may be your worst enemy. Simply closing and locking your office door while you are away from your host may be enough to keep your machine secure from prying hands and eyes.

Remember, you are not securing only your host. Any resource your host can access is vulnerable if your host is compromised. Your host is only a link in a chain.

Open Firmware Password

Assuming someone gains access to your host, all is not lost. There are ways to prevent a person from gaining various types of access. Unfortunately, there are things that you can't stop. A malicious user can steal a whole machine or open it up and steal sensitive parts such as the hard drive or other storage media. Some computer cases have locks or places where antitheft devices can be attached. These mechanisms can make theft much more difficult for the casual attacker. The antitheft techniques differ from machine to machine, so consult the documentation that came with your computer.

Your Mac's bootstrapping process is controlled by something called Open Firmware. Open Firmware is a small program contained on a chip within your computer that controls its boot process. Open Firmware was developed many years ago and is used for many different computing platforms, including Sun and Apple's Macintosh series. It is similar to a BIOS on a PC but provides much more functionality and extensibility than a typical BIOS implementation.

Newer versions of Open Firmware password-protect your boot process. To make use of this functionality, you must be running Open Firmware version 4.1.7 or newer. You can find what version your machine is running by launching System Profiler and looking for the Boot ROM Version section (see Figure 3.1). If you need to upgrade your Open Firmware, go to http://www.info.apple.com/ and search for the correct upgrade based on your platform. Alternatively, firmware updates are also available on your Mac OS X 10.2 installation CD.

Figure 3.1Figure 3.1 Open Firmware information from System Profiler.

After you have updated your machine, download the Open Firmware Password application from http://docs.info.apple.com/article.html?artnum=120095 or install it from the Mac OS X 10.2 installation CD. This application allows you to password-protect certain functions of Open Firmware when the system is being booted, including

  • Booting to CD-ROM, NetBoot, or a specific disk

  • Booting in verbose mode

  • Booting into single user mode

  • Booting to the Open Firmware prompt (Command-Option-O-F at startup) and issuing commands

Figure 3.2 shows the Open Firmware Password utility in action. Be sure you use a difficult-to-guess password.

Figure 3.2Figure 3.2 Setting an Open Firmware password.

These features are great in a lab environment when a normal unattended boot is desired, but booting to a CD would generally only be done by a malicious user. Unfortunately, many people would like to have a higher degree of security by requiring a password at boot time to simply bring the operating system up. This functionality is analogous to a POST password on a PC. Although Apple does not supply a tool for directly configuring a boot password, Open Firmware does support this concept.

nvram is a program accessible via the Terminal program that displays the contents of many variables stored within Open Firmware. Running it as a normal user allows you to view the public values and not modify any of the values. Running it via sudo nvram prints any private fields, such as the password, and allows modification of the Open Firmware contents. The –p flag prints the contents of Open Firmware:

bash-2.05a$ sudo nvram -p
Password:
... a great deal of output...
security-mode  command
... more output...
security-password  %e8%cc%d2%cf%c1%c1

Rather than use the nvram command, a machine can be booted directly to the Open Firmware prompt. Pressing Command-Option-O-F as a machine is being booted, bypasses the normal boot process and provides you with a prompt that directly controls Open Firmware. The security mode can be reset to none by issuing the setenv security-mode none command at the Open Firmware prompt. printenv displays all Open Firmware variables. Typing reset-all reboots the host after resetting the password. For a complete discussion of Open Firmware commands, see Apple Tech Note 1061 at http://developer.apple.com/technotes/tn/tn1061.html.

The security mode set by the Apple Open Firmware Password application is set to command. This provides the level of functionality listed earlier. To set the security mode to the original value that shipped with your machine, execute sudo nvram security-mode="none". To enable password protection for all Open Firmware activities, including booting to the default disk, set the security-mode to full. This forces a user who wants to boot a machine to know the Open Firmware password to access the normal operating system. To make brute forcing the password unlikely, be sure to set a password that is difficult to guess and contains a variety of characters.

NOTE

The security password displayed by the nvram command is not a cryptographically secured password. The password is simply displayed in its hexadecimal representation. This is merely an obfuscation of the password, not actual protection. Be aware that a user with administrative privileges can easily decrypt this password and use it later without your knowledge.

Password-protecting Open Firmware does not ensure the host cannot be booted in a manner counter to what you intend. An attacker who can open the case of the computer can force a password reset. By adding or removing memory, the host is put into a mode where it is possible to reset the PRAM by pressing Command-Option-P-R at boot time. Once the PRAM is reset three times, the password protection is removed. This quirk in the Open Firmware architecture underscores the reason for physical locks on your hosts.

Also, a utility called FWSucker allows an attacker, once logged in to a host, to harvest the Open Firmware password. Even guest users can decrypt the password. FWSucker is available from http://www.msec.net/software/. Again, Open Firmware password protection must be treated as a tool in protecting your host, not absolute protection.

Login Window

If a malicious user manages to successfully boot your machine, there are still more configuration options that will make their life difficult. By default, Mac OS X logs in automatically to the primary account on the machine. This gives anyone with the capability to boot the machine full access to the operating system. This can be disabled in the Accounts System Preferences panel. Under the Users tab, uncheck the line labeled Log in Automatically as [username]. This causes a login window to be displayed after the next boot.

In the Login Options tab (see Figure 3.3), there are several other default options that should be changed. The Login Window can display a list of user accounts on the machine and allow you to select one or it can simply display a blank username input field. By selecting Name and password you force a local attacker to know both the account name and the password. This might not be a huge barrier, but it is one more thing the attacker must know. Please note that starting in Mac OS X 10.2, the previous login name is not shown.

Figure 3.3Figure 3.3 Login options.

You also might want to check the Hide the Restart and Shutdown Buttons check box. This prevents users from shutting down or restarting the machine by one mouse click from the login screen. However, be aware that the power button still works so it is still possible to power off the machine.

Finally, uncheck the check box for Show Password Hint After 3 Attempts to Enter a Password. Selecting this causes the hint that was entered when the user was created to be displayed on the login screen. This can be handy if you have forgotten your password, but it can also be handy for an attacker. Make a point of remembering your password and you will need this option. Besides, after you get used to logging into your machine, entering your password will become second nature to you.

Screen Locking

All these configuration steps are useful if an attacker gains access to a host that is powered off. Things are a bit different when you are logged into a host and have stepped away for a moment. If you leave your machine unattended while you are logged in, you have bypassed all boot security mechanisms for an attacker with physical access.

Luckily, the screen saver for Mac OS X can be password-protected. Under the Activation tab in the Screen Effects Preferences panel there is a radio button to force the screen saver to ask for your password when normal operation resumes (see Figure 3.4). This effectively locks the screen while Screen Effects are active. There is also a slider on the same tab that controls how long the machine needs to be idle before the screen is locked.

Figure 3.4Figure 3.4 The Screen Effects Preferences panel.

This timer is great in instances when you forget to lock your workstation. However, it is not practical to stand watch over your machine for a series of minutes while you wait for Screen Effects to turn on. On the Hot Corners tab of the Screen Effects Preferences panel you can specify a corner (or corners) where you can drag your mouse to lock your screen. This allows you to lock your workstation at will without having to wait.

Mac OS X Screen Locking

Mac OS X screen locking is not as robust and secure as other operating systems' locking mechanisms. Under Windows XP you must press Control-Alt-Delete, a special key sequence that sends an interrupt to the core processor to make sure some other application is not pretending to be the Windows Lock screen. OS X has no such mechanisms. In fact, you can send some commands to the operating system while the screen is locked. For instance, you can force the system to take a screen capture of the lock screen by pressing Command-Shift-3. It is obvious that the OS X password protected Screen Effects does not provide the highest level of security in locked screen. However, it is important to note that the attacker at this point would have physical access anyway so even a bulletproof screen lock can be bypassed with a screwdriver and a few minutes to pry out the hard drive.

System Preferences Locking

You may have noticed a lock in the bottom-left corner of some System Preferences panes. The capability to lock a preference pane is present in the Network and System panes primarily and may also be available in panes provided by third-party software. This lock enables you to password-protect sensitive system settings, preventing unauthorized or unintentional changes. By clicking the lock within a pane, users of the workstation cannot change the configuration of that pane. When a change needs to be made, click the lock again and you will be prompted for a username and password. Type the credentials of your administrative user account and the pane will once again allow modification. Figure 3.5 shows a pane as it looks before and after locking has been utilized. The locking mechanism provided by the preferences lock only applies to the current user. It is not a global lock for all users, therefore its utility is limited. Use specific attributes for user rights to control their ability to modify Preferences panes. See User Accounts and Access Control later in this chapter for more information on per user access control.

Figure 3.5Figure 3.5 Comparison of locked and unlocked Accounts panel.

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