© Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC © Digital_Art/ShutterstockNOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION CHAPTER 4 © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FORSharing SALE OR DISTRIBUTION Files NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION ▸ About This Chapter In this chapter, we work with the mechanisms provided by operating systems like and Windows to protect files and folders. We also take a technical look at the fifth phase© of Jones the security & Bartlettprocess: monitoring Learning, the system. LLC The chapter focuses on © Jones & Bartlett Learning, LLC these topics:NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION ■ Tailoring the security policy to grant special access to individuals or groups ■ Permission flags in Unix-like systems ■ Access control lists in Macintosh and Windows systems ■ © Jones &Monitoring Bartlett system Learning, events through LLC logging © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION ▸ 4.1 Controlled Sharing What happens if Bob needs to share files with one or two other users but not with the rest of the suite? © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTIONBob hired a clerk to do data entry for his newNOT client, FOR a big SALE surveying OR com- DISTRIBUTION pany. The new clerk, Tina, has her own login on Bob’s computer (“tina”). However, the isolation policy blocks Bob and Tina from sharing files, unless Bob logs in as administrator and bypasses the access restrictions. It is clear© Jones that we &can Bartlett create files Learning, and folders andLLC establish access rights for © Jones & Bartlett Learning, LLC them. We NOTcan share FOR files SALEwith some OR people DISTRIBUTION and hide them from others, simply by NOT FOR SALE OR DISTRIBUTION configuring the right permissions. In small cases we might get this correct through trial-and-error, but we might also leak data while implementing our solution. Instead, we begin with identifying our objectives, threats, risks, and requirements. We plan and implement our controls based on the requirements. © Jones &When Bartlett we write Learning, the requirements LLC and policy, we want to capture© Jones our general & Bartlett Learning, LLC NOT FORintent. SALE When we OR write DISTRIBUTION up implementation details, we get specific.NOT In this FOR case, SALEthe OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 136 Chapter 4 Sharing Files

requirements talk about people and general types of information (Bob, Tina, and © Jonesshared & bookkeepingBartlett Learning, data). Implementation LLC controls talk about files,© Jones folders, users, & Bartlett Learning, LLC NOT FORand access SALE rights. OR Here DISTRIBUTION are the two requirements we add to our isolationNOT FOR policy: SALE OR DISTRIBUTION ■■ Bob and Tina shall be able to read and modify the surveying company’s bookkeeping data. ■■ No one shall have access to bookkeeping data, except Bob and Tina. © Jones & Bartlett Learning,Although globalLLC restrictions like “no one ©shall” Jones are sometimes & Bartlett hard toLearning, verify, LLC accurate policy statements may require them. NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION Tailored File Security Policies To share the project files, Bob needs to adjust his user isolation security policy. Practical problems like this often arise when using one-size-fits-all policies like © Jones & Bartlett Learning, LLC“isolate everyone” or “share© everything.” Jones & We Bartlett address Learning, such things withLLC tailored NOT FOR SALE OR DISTRIBUTIONaccess policies. Three examplesNOT of tailoredFOR SALEpolicies are:OR DISTRIBUTION 1. Privacy 2. Shared reading 3. Shared updating © Jones &We Bartlett can describe Learning, a tailored policy LLC in several ways. Here we ©take Jones a systematic & Bartlett Learning, LLC NOT FORapproach. SALE We implementOR DISTRIBUTION each tailored policy underneath a systemwideNOT FOR default SALE OR DISTRIBUTION policy of either isolation or sharing. The tailored policy specifies additional access rights. These new rights may add to or replace the default rights. For each new set of rights, the tailored policy needs to consider four things: © Jones & Bartlett 1.Learning, Which files LLC or other resources are involved© (e.g.,Jones files relating& Bartlett to “Surveyors” Learning, LLC NOT FOR SALE OR DISTRIBUTIONor perhaps “Tina’s personal files”)? NOT FOR SALE OR DISTRIBUTION 2. Which users are granted these new rights (e.g., users editing the books for “Surveyors”)? 3. Do we Deny by Default, or do we retain the default access rights for these files? © Jones & Bartlett Learning, LLC4. Which access rights do we© enforce:Jones full & access,Bartlett execute, Learning, read-only, orLLC no access? NOT FOR SALE OR DISTRIBUTIONTypically, the files in questionNOT willFOR reside SALE within OR a particular DISTRIBUTION directory and be used by a particular group of people. When we describe the policy, however, we must be careful to describe what we want, rather than how we’ll do it.

© JonesBob’s & BartlettSharing Learning, Dilemma LLC © Jones & Bartlett Learning, LLC NOT FORBob needs SALE to implement OR DISTRIBUTION a tailored updating policy so that he canNOT share FOR files with SALE OR DISTRIBUTION Tina. But how should he do it? For each file, we can control access by the owner, administrators, and the rest of the users. If that’s all we have, there’s no way to grant access to two specific users while blocking access to the rest. © Jones & Bartlett Learning,Bob could LLCsolve this sharing dilemma if he© always Jones logs &in toBartlett a system adminisLearning,- LLC NOT FOR SALE ORtration DISTRIBUTION account. On some systems, these accountsNOT use FOR a specific SALE user identityOR DISTRIBUTION with a name like “system” or “root” that receives all system-related access rights. If Bob does this, the account will have full access to Tina’s files. If he wants to create files

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 4.1 Controlled Sharing 137

to share with Tina, however, he must make Tina the owner of those files. Other- wise, he wouldn’t© Jones be able & toBartlett restrict access Learning, exclusively LLC to Tina and himself. © Jones & Bartlett Learning, LLC This NOT solution FOR poses SALE a problem: OR LeastDISTRIBUTION Privilege. It may seem convenient to NOT FOR SALE OR DISTRIBUTION log into a system routinely as “root” or some other administrative identity, but it poses a real risk to the system. If Bob unexpectedly exposes the system to a virus or malicious website while using administrative privileges, the system may quickly become compromised. © Jones &We Bartlett can solve Learning,Bob’s problem LLC if we can specify additional ©access Jones rights & for Bartlett Learning, LLC NOT FOReach file SALE and folder. OR DISTRIBUTIONThere are two choices, depending on whichNOT operating FOR sys SALE- OR DISTRIBUTION tem we use: 1. Keep a list of access rights for each file, called the access control list (ACL). Each entry in the ACL identifies a specific user and contains a list of access rights granted to that user. This is available on modern versions of Windows © Jones & Bartlett Learning,and on Apple’s LLC MacOS. © Jones & Bartlett Learning, LLC NOT FOR SALE OR2. DISTRIBUTIONKeep one additional set of access rights, andNOT associate FOR it SALEwith a user OR group DISTRIBUTION. Associate a group with each file, just as we associate a user, the owner, with each file. This is available on all Unix-based systems. Windows uses a simple version of ACLs to provide basic file sharing on “home” editions© Jones of Windows. & Bartlett All Unix-based Learning, systems LLC provide group-based access © Jones & Bartlett Learning, LLC controls. NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION Practical Tip: Always organize your files into separate folders according to their access rights. Bob and Tina need to share the bookkeeping files for the surveying company. They put the files they need to share into a specific folder. They set up the folder’s access rights to let them share the © Jones &files. Bartlett Neither BobLearning, nor Tina shouldLLC store files in that folder© unless Jones both & Bartlett Learning, LLC NOT FORof SALE them should OR DISTRIBUTIONbe sharing that file. If Bob hires another clerkNOT to FORwork SALE OR DISTRIBUTION on a different customer’s books, he should set up a separate folder for that clerk.

© Jones & Bartlett 4.1.1Learning, Basic LLC File Sharing on Windows© Jones & Bartlett Learning, LLC NOT FOR SALE ORWindows DISTRIBUTION provides a very simple mechanism NOTfor sharing FOR files SALE among OR users DISTRIBUTION on a personal computer. The mechanism begins with an isolation policy; users have no access to other users’ personal files. Building on the isolation policy, we assign additional permissions to selected users. To implement tailored sharing, we put the files in a folder and enable file shar- ing for that© folder. Jones File &sharing Bartlett recognizes Learning, three sets LLC of access rights: © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 1. Owner rights: the person who owns the folder, who has full rights to read, modify, or delete anything in the folder. This can’t be changed from the file- sharing window. 2. Reader rights: users with the right to read files in the folder. © Jones3. &Read/Writ Bartlette rights: Learning, users who LLC can both read and write files ©in Jonesthe folder. & Bartlett Learning, LLC NOT FOROn SALE Windows OR 10, DISTRIBUTION Bob can easily share files or folders for NOTreading. FOR First, SALE he OR DISTRIBUTION creates the shared folder, named “Survey.” Next, he right-clicks on the folder and selects “Give access to” from the menu. This displays a submenu that lists users

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 138 Chapter 4 Sharing Files

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

FIGURE 4.1 Sharing files for reading on Microsoft . Used with permission from Microsoft. © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FORwith whom SALE he canOR share DISTRIBUTION the folder (FIGURE 4.1). Bob selects Tina NOTfrom the FOR list, andSALE OR DISTRIBUTION Windows allows her to read the file. Bob must take different steps to grant Tina both read and write access to the files. Instead of selecting Tina’s name from the “Give access to” menu, he selects “Specific people.” This displays the basic file-sharing window (FIGURE 4.2). Bob © Jones & Bartlett usesLearning, the “Add” LLCbutton in the window to add Tina© Jones as the user & Bartlett with whom Learning, he will LLC NOT FOR SALE ORshare. DISTRIBUTION Next, he sets her access rights to Read/Write.NOT The FOR Windows SALE 7 “Sharing OR DISTRIBUTION Wiz- ard” provides a similar mechanism. The “Give access to” menu works together with the basic file-sharing window to establish access rights. If the “Give access to” menu selects a user name, then the name will appear in the file-sharing window with “Read” access rights. We can use © Jones & Bartlett Learning, LLCthe window to grant Read/Write© Jones rights or & to Bartlett remove rights Learning, entirely. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 4.1.2 User Groups If Bob and Tina are using a Unix-based system or a “professional” version of Win- dows, they can use group rights to protect their files. They define a user group, © Joneswhich & servesBartlett as another Learning, set of users LLC for whom we specify access© rights. Jones A simple & Bartlett Learning, LLC NOT FORimplementation SALE OR adds DISTRIBUTION two items to each file’s access control data:NOT the name FOR of theSALE OR DISTRIBUTION file’s group, and a set of flags for access rights. If a user belongs to the file’s group and tries to access the file, the system applies the group access rights. In Bob’s case, he sets up a “survey” group that contains Tina and himself (­FIGURE 4.3). He then ensures that each file containing survey information belongs to © Jones & Bartlett thatLearning, group. Each LLC file in the group contains the following© Jones access & Bartlettinformation: Learning, LLC NOT FOR SALE OR■■ DISTRIBUTIONFile’s owner: Either Bob or Tina NOT FOR SALE OR DISTRIBUTION ■■ File’s group: Survey, containing Tina and Bob ■■ Owner access: RW-

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 4.1 Controlled Sharing 139

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

FIGURE 4.2 Microsoft’s basic file-sharing window. Used with permission from Microsoft. © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION ■■ System access: RW- ■■ Group access: RW- ■■ World access: --- © Jones & Bartlett Learning,To provide LLC access rights for groups, the ©system Jones integrates & Bartlett group identifiers Learning, LLC into many of the same places as user identifiers. When a process begins, it inherits NOT FOR SALE ORa groupDISTRIBUTION identifier from the user who started it.NOT When FOR the process SALE tries OR to access DISTRIBUTION a file, the system checks the user identity and the group identity, and it applies the specified rights if one of them matches. If neither matches, the process receives any rights granted to the “world” of users. © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC AdministrativeNOT FOR Groups SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION In a sense, access permissions for the “world” represent permissions for a partic- ular group. Likewise, some systems have one or more built-in administrative groups that provide special privileges for managing the system. In Windows, this is the role of the “Administrators” group. Unix-based systems often have a similar © Jonesgroup & thatBartlett is sometimes Learning, called the LLC “wheel” group. © Jones & Bartlett Learning, LLC NOT FORIf SALE a system OR provides DISTRIBUTION administrative groups, administratorsNOT can log FOR in using SALE OR DISTRIBUTION personal user identities. If the identity is a member of the administrative group, the user receives administrative access to the computer’s resources. This provides

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 140 Chapter 4 Sharing Files

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION FIGURE 4.3 Editing the “survey” user group on Windows. Used with permission from Microsoft.

better control than logging in directly with a privileged user name like “root” or © Jones & Bartlett Learning, LLC“SYSTEM.” If administrators© log Jones in with individual,& Bartlett personalized Learning, identities, LLC we can NOT FOR SALE OR DISTRIBUTIONmore easily track their individualNOT FORactions. SALE If an administrator OR DISTRIBUTION performs a mali- cious act, we can identify the user who performed the act, even if that user was logged in as an administrator. Even though the administrative groups give us a better way of tracking administrative actions, it’s still risky to log in with such power. Many organizations © Jonesprovide & Bartlett administrators Learning, with two separateLLC identities: one for routine© Jones activities & and Bartlett Learning, LLC NOT FORone for SALE more risky OR administrative DISTRIBUTION tasks. The administrative identifierNOT is aFOR member SALE OR DISTRIBUTION of the administrative group. When logged in with the administrative identity, the user has full administrative powers. When Bob set up the computer shared with Alice, he created separate user names for users and for administration. The users “bob” and “alice” are regular © Jones & Bartlett users.Learning, “SuperBob” LLC is like the Bob account, except© Jones that it is& also Bartlett in the AdminisLearning,- LLC NOT FOR SALE ORtrators DISTRIBUTION group. When Bob hired Tina, he loggedNOT in asFOR “SuperBob” SALE and OR created DISTRIBUTION a separate user name for Tina. He also established the survey group containing the two of them (Figure 4.3).

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 4.1 Controlled Sharing 141

4.1.3 Least Privilege and Administrative Users Despite the© risks,Jones many & peopleBartlett routinely Learning, log into theirLLC personal computers with © Jones & Bartlett Learning, LLC full administrativeNOT FOR powers. SALE Some OR see itDISTRIBUTION as their right and privilege, because they NOT FOR SALE OR DISTRIBUTION own the computer in question. Many users don’t realize the risks involved. If Bob visits a malicious website or downloads a virus while logged in as an administrator, the malicious software can use his administrative privileges to infest his computer. If Bob is logged in only as a regular user, then the infestation © Joneswill, &at Bartlettmost, affect Learning, his user environment. LLC Many viruses are blocked© Jones when &they Bartlett Learning, LLC NOT FORtry to infestSALE a regular OR DISTRIBUTION user because many attack vectors depend onNOT administrative FOR SALE OR DISTRIBUTION privileges. Not all administrative accounts have unlimited rights. Some systems define user identities that represent special activities performed by the . © Jones & Bartlett IfLearning, we display the LLC process status on Unix (the “ps”© command),Jones & orBartlett the Task ManagerLearning, LLC on Windows (FIGURE 4.4), we can list all running processes along with the user NOT FOR SALE ORnames DISTRIBUTION associated with those processes. NOT FOR SALE OR DISTRIBUTION The display shows one or more special user identities for running network services, including the file server and web server. Other identities, like SYSTEM and LOCAL SERVICE, are responsible for utility processes that keep the system running. Individuals© Jones can’t & Bartlett log in with Learning, such user names. LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION FIGURE 4.4 The Task Manager’s process display on . Used with permission from Microsoft.

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 142 Chapter 4 Sharing Files

Administration by Regular Users © JonesAs an & alternativeBartlett to Learning, having administrators LLC with too much power,© some Jones operating & Bartlett Learning, LLC NOT FORsystems SALE provide OR ways DISTRIBUTION of temporarily granting administrative powersNOT FOR to people SALE OR DISTRIBUTION logged in to regular user accounts. The temporary permission relies on the person authenticating as an authorized administrator. The temporary administrative privi- lege applies to a program started by the user and disappears when the program ends. For years, the all-powerful Unix “root” account has been too powerful for © Jones & Bartlett individualLearning, users LLC to use, but too useful to eliminate© Jones entirely. & BartlettToday, Unix-based Learning, LLC NOT FOR SALE ORsystems DISTRIBUTION may have administrators who belongNOT to administrative FOR SALE groups, OR butDISTRIBUTION the administrators still must rely on root to make serious changes to the system. Typ- ically, they use the operation, which temporarily changes a user’s identity. To run a program as root, the administrator runs the setuid program, specifies the new user identity to be root, and directs it to run an administrative function © Jones & Bartlett Learning, LLCunder that user identity. The© setuid Jones function & Bartlett prompts for Learning, the root password, LLC and it NOT FOR SALE OR DISTRIBUTIONstarts the program if the userNOT types FORthe right SALE password. OR Most DISTRIBUTION Unix administrators today use a prepackaged “sudo” function that runs setuid with the identity of root. Apple’s MacOS provides “sudo,” like most Unix-based systems, but it also implements a separate mechanism for configuring sensitive parts of the system. For example, FIGURE 4.5 shows a screen that changes the system’s behavior when © Jonesrestarting. & Bartlett To enable Learning, the “Target LLCDisk Mode” button, the user first© Jonesmust click & onBartlett Learning, LLC NOT FORthe padlock, SALE which OR demands DISTRIBUTION an administrator’s password. Once theNOT user FOR types theSALE OR DISTRIBUTION password, the padlock switches to “unlocked” and the system enables the button. The same user interface allows regular users to modify many critical system preferences. MacOS uses a similar arrangement to allow regular users to adjust the rights on files and folders: Again, there is a padlock that controls the permission © Jones & Bartlett settingsLearning, and an LLC administrative password unlocks© Jonesthat lock. & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION User Account Control on Windows Starting with , Microsoft’s operating systems provide a similar mechanism, called user account control, or UAC for short. Whenever a user tries © Jones & Bartlett Learning, LLCto run an administrative function,© Jones Windows & Bartlett tells the user Learning, and asks for LLC approval. If NOT FOR SALE OR DISTRIBUTIONthe user is a regular, nonadministrativeNOT FOR user, SALE then the OR user DISTRIBUTION must provide an admin- istrative password before the task proceeds (FIGURE 4.6). The principle behind UAC is that the most dangerous attack vectors require administrative privileges or making changes to critical programs in the Windows operating system. For example, the attack might try to install a back door in the © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION FIGURE 4.5 MacOS padlock unlocks with an administrator’s password. Screenshot reprinted with permission from Apple, Inc.

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 4.2 File Permission Flags 143

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

FIGURE 4.6 User account control pop-up window. Used with permission from Microsoft. web server© software. Jones If& the Bartlett system alwaysLearning, asks before LLC performing such actions, © Jones & Bartlett Learning, LLC there is a betterNOT chance FOR thatSALE a user OR will DISTRIBUTIONdetect the attack and repel it. NOT FOR SALE OR DISTRIBUTION

▸▸ 4.2 File Permission Flags © JonesIn earlier & Bartlett examples, Learning, we indicated fileLLC permissions and other access© rights Jones by abbre & Bartlett- Learning, LLC NOT FORviations: SALE “R” for OR read, DISTRIBUTION “W” for write, and so on. If the system grantedNOT FORa particu SALE- OR DISTRIBUTION lar right, we showed the appropriate letter and showed a hyphen (“-”) otherwise. These correspond to file permission flags that the system sets to “true” if the right is present and “false” otherwise. The best-known modern implementation of file permission flags is in © Jones & Bartlett Unix.Learning, Ken Thompson LLC and Dennis Ritchie at ©Bell Jones Telephone & BartlettLaboratories Learning, origi- LLC NOT FOR SALE ORnally DISTRIBUTION developed Unix in the early 1970s. SinceNOT then, FOR Unix SALEtechnology OR has DISTRIBUTION been the foundation of many systems, including the Solaris operating system, Apple’s MacOS, and the open source Gnu and software. Unix-like systems became so significant in computing that the IEEE developed standards for such systems through its “Portable Operating System Interface” (POSIX) committee. Some experts refer© Jonesto Unix file & permissionsBartlett Learning, as “POSIX file LLC permissions.” © Jones & Bartlett Learning, LLC Unix NOTimplements FOR three SALE file-access OR DISTRIBUTIONrights (read, write, and execute/search) for NOT FOR SALE OR DISTRIBUTION each of these three sets of identities: 1. Owner (called user rights in Unix): the user who owns a file 2. Group: users belonging to the group associated with the file 3. World (called other rights in Unix): all other users © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC FIGURE 4.7 illustrates Unix permission flags for a typical file. The owner typi- NOT FORcally hasSALE the right OR to DISTRIBUTION read and write the file. Users in the file’s group,NOT and FOR all other SALE OR DISTRIBUTION users, customarily receive permission to read the file but not to write it. If a file is executable, then anyone granted the right to read the file also is granted permission

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 144 Chapter 4 Sharing Files

Owner Rights Group Rights World Rights © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

Read WriteExecute Read WriteExecute Read WriteExecute FIGURE 4.7 Unix file permissions for a typical file. © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION -l total 56 -rw-r--r--@ 1 rick ops 4321 Nov 23 08:58 data1.txt -rwxr-xr-x 1 rick ops 12588 Nov 23 10:19 hello -rw-r--r--@ 1 rick rick 59 Nov 23 10:18 hello.c © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTIONFIGURE 4.8 Unix directory listingNOT command FOR “ls.” SALE OR DISTRIBUTION

to execute it. In practice, most files that have execute permission also have read permission. This is not technically required in all cases, but it is customary. © Jones &Unix Bartlett uses similar Learning, permission LLC flags to protect folders, which© are Jones always called & Bartlett Learning, LLC NOT FORdirectories. SALE To ORopen DISTRIBUTIONa file listed in a particular directory or to searchNOT aFOR directory SALE OR DISTRIBUTION to find another directory inside it, a user needs “execute” access to that directory. To list the contents of a directory, the user needs read access to that directory. To create or delete files, the user needs write access to the files’ directory. FIGURE 4.8 illustrates permission flags as they appear in text-oriented Unix © Jones & Bartlett “shellLearning, commands.” LLC The typed command appears© inJones italics. The& Bartlett “ls” command Learning, lists LLC NOT FOR SALE ORfiles DISTRIBUTION in the current directory. If we type “ls -l”NOT we get FOR the “long” SALE directory OR DISTRIBUTION listing shown here that includes file ownership and permissions. The left column contains permission codes “rw-r-” and such to indicate access rights for each file. After skipping the first hyphen, the three-letter groups indicate rights for the file’s owner, the file’s group, and the rest of the world, respec- © Jones & Bartlett Learning, LLCtively. File names appear in ©the Jones right column. & Bartlett The permissions Learning, for the LLC data files NOT FOR SALE OR DISTRIBUTION“data1.txt” and “hello.c” matchNOT the FORpermissions SALE shown OR in DISTRIBUTION Figure 4.7. The column containing “rick” denotes the files’ owner, and the next column to the right identi- fies the owning group (either “rick” or “ops”). Unix users have several commands for adjusting a file’s rights:

■■ —short for “change mode,” it can change the rights granted to the © Jones owner,& Bartlett group, orLearning, rest of the world, LLC for a file © Jones & Bartlett Learning, LLC NOT FOR■■ chown SALE—short OR for DISTRIBUTION “change owner,” it changes the identity of NOTa file’s ownerFOR SALE OR DISTRIBUTION ■■ chgrp—short for “change group,” it changes the identity of the group associated with a file

© Jones & Bartlett 4.2.1Learning, Permission LLC Flags and Ambiguities© Jones & Bartlett Learning, LLC NOT FOR SALE ORBob DISTRIBUTION wants to create a file and allow everyone, NOTincluding FOR Tina, SALE to see it,OR but DISTRIBUTIONhe also wants to protect it from change. The file belongs to the “survey” group, which contains Tina and Bob. TABLE 4.1 shows the access rules Bob set up. Bob gives the

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 4.2 File Permission Flags 145

TABLE© 4.1 Jones Ambiguous & Bartlett Access Rules Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION Effective Access

Identity Class Access Bob Tina World

© JonesOwner & Bartlett (Bob) Learning, LLC RW RW © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION Group (Bob and Tina) ---

System (administrators) RW © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC World (everyone else) R- ?? R- NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

“world” read access to the file. He gives the group no access to the file. Will Tina be able to read the file? Because© JonesTina is both & Bartletta member Learning,of the “survey” LLC group and a member of “the © Jones & Bartlett Learning, LLC world,” theNOT access FOR rights SALEare ambiguous. OR DISTRIBUTION On the one hand, a missing access right NOT FOR SALE OR DISTRIBUTION might mean that we should forbid access to Tina because she’s a member of the survey group and the group is granted no access. However, Bob, the owner, is also a member of the survey group. Should we forbid access to him, too? On the other hand, the missing rights may simply mean that Tina acquires any rights she © Jonesdeserves & Bartlett from being Learning, a member of LLC the world. © Jones & Bartlett Learning, LLC NOT FOROn SALE Microsoft OR Windows, DISTRIBUTION access permissions tend to accumulate.NOT As FORa member SALE OR DISTRIBUTION of both the survey group and the world, Tina receives all accesses granted to those groups. In this example, Tina has read access. Unix-based systems combine rules differently. If a permission flag fails to grant a particular right, then the right is denied. When checking permissions, © Jones & Bartlett theLearning, system selects LLC the set of users (owner, group,© Jones or world) & that Bartlett best fits Learning,the user LLC accessing the file. The choice is made as follows: NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION ■■ If the “root” user accesses a file, the system grants full access to the file. ■■ If the file’s owner accesses a file, the system applies the owner rights. ■■ If a group member (who is not the file’s owner) accesses the file, the system applies the group rights. ■■ If the ©user Jones is neither & theBartlett owner nor Learning, a member of LLC the file’s group, the system © Jones & Bartlett Learning, LLC appliesNOT the world FOR rights. SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION When we apply the Unix rules to Tina, the system denies access. Unix-like systems block access to the file through explicit denial: Because Tina is a member of the group and the group has no access rights, Tina receives no access rights. If Bob accesses the file, however, the system applies the owner rights and grants © Jonesread/write & Bartlett access. IfLearning, a user is neither LLC Bob nor a member of the survey© Jones group, & then Bartlett Learning, LLC NOT FORthe system SALE applies OR worldDISTRIBUTION rights and allows read-only access. TinaNOT herself FOR would SALE OR DISTRIBUTION have read access if she weren’t a member of the survey group.

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 146 Chapter 4 Sharing Files

If Bob removes read access rights from one of his own files, he can no longer © Jonesread & the Bartlett file, even ifLearning, the rest of the LLC world has read access. Because© it Jonesis Bob’s file, & heBartlett Learning, LLC NOT FORcan change SALE the ORpermissions DISTRIBUTION back to allow read access, but he won’tNOT be able FOR to read SALE OR DISTRIBUTION the file until he changes the permissions.

4.2.2 Permission Flag Examples © Jones & Bartlett LetLearning, us return to LLC Bob’s desktop computer policy© andJones extend & it Bartlett to protect Learning,the sur- LLC NOT FOR SALE ORveyor DISTRIBUTION customer files (a “tailored updating” policy).NOT First, FOR we review SALE the OR five genericDISTRIBUTION risks, the sixth associated with Bob, and add a seventh: 7. Disclosure of the surveyor company files to people outside the bookkeeping company, which could compromise the company to its competitor. © Jones & Bartlett Learning, LLC Bob’s original policy appears© Jones in Tables & 3.3 Bartlett and 3.4. ToLearning, address the seventhLLC risk, we add the policy statements shown in TABLE 4.2. NOT FOR SALE OR DISTRIBUTIONTo implement this policy,NOT we create FOR an SALE account OR for Tina, DISTRIBUTION and Tina establishes a password for it; then we add to the security controls listed in Table 3.7. This yields the controls listed in TABLE 4.3. Remember what an “X” (“execute”) permis- sion means when applied to a directory: It indicates the right to search the direc- © Jonestory &when Bartlett trying to Learning, locate a file by LLC name. © Jones & Bartlett Learning, LLC Note that we always specify group access permissions, even for personal files. NOT FORWhen SALEcreating ORa new DISTRIBUTION user, most Unix-based systems automaticallyNOT create FOR a sepa SALE- OR DISTRIBUTION rate group just for that user. By default, all files created by that user belong to the user’s personal group. When Bob or Tina creates files containing surveyor com- pany information, they must explicitly assign those files to the “survey” group. © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE ORSecurity DISTRIBUTION Controls for the File-SharingNOT PolicyFOR SALE OR DISTRIBUTION Now let us look at a more general example: the file-sharing policy described in Table 3.5. The policy grants read access to all files by default and execute access to shared application programs. TABLE 4.4 shows the appropriate security controls. © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION TABLE 4.2 Policy Additions for Tailored Sharing of the Survey Files

Policy Policy Statement Risks © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC 8 The system shall have a regular user named Tina. 4, 7 NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 9 Tina shall have a password to protect her login. 2, 3, 4, 5, 7

10 All surveying company files shall belong to the “survey” group. 7 © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC 11 Only Bob and Tina shall be members of the “survey” group. 4, 7 NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 12 Bob and Tina shall have full access to files in the “survey” group. 1, 4, 7

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 4.3 Access Control Lists and MacOS 147

TABLE ©4.3 Jones Security & Controls Bartlett for Tina Learning, and the Shared LLC Project Files © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION Owning Access Rights Control Group Policy Number File Owner (Members) Owner Group World Statement

© Jones11 & Bartlett Tina’s Learning, directory Tina LLC Tina RWX© Jones RWX & Bartlett --- 4,Learning, 9 LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 12 Tina’s files Tina Tina RWX RW- --- 4, 9

13 Project Bob or Bob, Tina RWX RWX --- 10, 11, 12 directory Tina © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC 14 Project files Bob or Bob, Tina RWX RW- --- 10, 11, 12 NOT FOR SALE OR DISTRIBUTION Tina NOT FOR SALE OR DISTRIBUTION

TABLE 4.4 Security Controls for the File-Sharing Policy in Table 3.5 © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTIONOwning Access Rights NOT FOR SALE OR DISTRIBUTION Control Group Policy Number File Owner (Members) Owner Group World Statement

© Jones1 & Bartlett Executables Learning, System LLC System RWX© Jones RWX & BartlettR-X Learning,1, 3 LLC NOT FOR2 SALE UserOR directories DISTRIBUTIONUser User RWXNOT RWXFOR SALER-X OR4, DISTRIBUTION5

3 User files User User RWX RW- R-- 4, 5

© Jones & Bartlett Learning,Occasionally, LLC either Bob or Tina should go© throughJones and & setBartlett the access Learning, rights LLC NOT FOR SALE ORon DISTRIBUTION all files (and folders) inside their shared folder.NOT ThisFOR ensures SALE that OR both DISTRIBUTION have access rights to everything and that nobody else has inadvertently been given access rights to anything.

▸▸ 4.3 © AccessJones & Control Bartlett Learning,Lists and LLC MacOS © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION In many access control problems, we have a single group of users who all need identical access rights to a particular set of files. We can easily solve such problems with group permissions. There are, however, cases where we can’t use file permis- sion flags and a single user group to achieve Least Privilege. Consider a policy that © Jonesrequires & Bartlett these three Learning, conditions: LLC © Jones & Bartlett Learning, LLC NOT FOR1. Block SALE access OR to theDISTRIBUTION user community in general. NOT FOR SALE OR DISTRIBUTION 2. Grant read-only access to one group of users. 3. Grant read/write access to a second group of users.

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 148 Chapter 4 Sharing Files

We can’t do this with Unix-style permission flags and achieve Least Privi- © Joneslege. & We Bartlett might come Learning, close if we grant LLC read-only access to everyone© andJones read/write & Bartlett Learning, LLC NOT FORaccess SALE to the second OR DISTRIBUTION group. We also might come close if we createNOT a single FOR large SALE OR DISTRIBUTION group out of the first and second groups. We then grant read/write access to all, and we tell members of the first group to restrain themselves. To achieve Least Privilege, we need ACLs. In Section 4.1, we introduced Windows “home edition” ACLs that grant © Jones & Bartlett rightsLearning, to specific LLC users. This particular implementation© Jones can & solve Bartlett the problem Learning, just LLC NOT FOR SALE ORdescribed: DISTRIBUTION We list all users individually and grantNOT the FOR appropriate SALE access OR toDISTRIBUTION each one. This is a reasonable solution if we are controlling the rights for only a handful of people. It becomes impractical as the groups grow in size. To implement the policy for larger groups, it is easier and more reliable to estab- lish separate user groups. We then establish permissions for each group instead of © Jones & Bartlett Learning, LLCsetting permissions on a per-user© Jones basis. &It isBartlett much easier Learning, to verify correct LLC group NOT FOR SALE OR DISTRIBUTIONmembership than it is to reviewNOT the FORaccess rightsSALE for OR dozens DISTRIBUTION of individual users. Fortunately, most modern ACL implementation can specify permissions for groups of users as well as individuals. Modern Unix-based systems that include ACLs, like Apple’s MacOS, support group permissions as well as individual user permissions. Professional and “business” versions of Windows also support group © Jonespermissions. & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION MacOS ACLs MacOS ACLs are built on top of standard Unix permissions and designed to work well with Windows-style ACLs (FIGURE 4.9). Most users interact with © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION FIGURE 4.9 MacOS ACL for Bob and Tina’s shared file. Screenshot reprinted with permission from Apple, Inc.

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 4.3 Access Control Lists and MacOS 149

these ACLs through the standard Macintosh GUI, known as the “Finder.” Superfi- cially, MacOS© Jones ACLs are & similar Bartlett to the Learning, simple Windows LLC ACLs shown in Figure 4.2. © Jones & Bartlett Learning, LLC We startNOT with FOR access SALE allowed OR by the DISTRIBUTION owner, and we can add access rights for NOT FOR SALE OR DISTRIBUTION other users. As with the earlier example, one of the users can simply add access rights for the other. Just as Tina granted access to Bob, Bob can grant access for Tina (Figure 4.9). To modify the ACL, we must first unlock it by clicking on the padlock in © Jonesthe lower& Bartlett right-hand Learning, corner. Unfortunately, LLC we need administrator© rightsJones to make& Bartlett Learning, LLC NOT FORchanges SALE to an ACL.OR Thus,DISTRIBUTION Bob had to type in an administrator’sNOT name FORand pass SALE- OR DISTRIBUTION word in order to fix the ACL. Once we unlock the ACL, we add another user by clicking on the “+” box in the lower left-hand corner. The Finder then displays a list of existing users, and we click on the name we wish to add. To change the access rights in an ACL entry, we have two choices. If we want to © Jones & Bartlett removeLearning, all access LLC permissions, we can delete the© correspondingJones & Bartlett ACL entry. Learning, To do LLC NOT FOR SALE ORthis, DISTRIBUTION we select the corresponding row and then clickNOT on FOR the “-” SALE sign in the OR lower DISTRIBUTION left. Default rights, like those assigned to the owner, owning group, or world, can’t be deleted. To remove access for one of those, we click on the corresponding entry under “Privilege” and choose the access rights we want. FIGURE 4.10 shows the “pop-up” menu to choose the access rights. In the example, we choose “No Access” rights for “everyone”© Jones not & listedBartlett in the Learning,ACL. LLC © Jones & Bartlett Learning, LLC UnlikeNOT the simple FOR Windows SALE ACLsOR DISTRIBUTION described earlier, MacOS allows us to add NOT FOR SALE OR DISTRIBUTION ACL entries for groups as well as users. We first create a group by selecting “User Accounts” under the System Preferences application. We unlock the application by clicking on the padlock in the lower left and typing an administrator’s password; then we click on the plus “+” sign above the padlock, and we choose to create a © Jonesgroup. & OnceBartlett the group Learning, exists, we canLLC modify its name and members© Jones by editing & the Bartlett Learning, LLC NOT FORscreen SALE shown inOR FIGURE DISTRIBUTION 4.11. NOT FOR SALE OR DISTRIBUTION We give the group the name “survey” and select members by checking them in the “Membership” window. In the figure, we have selected Bob and Tina as members. Note that other groups also may be members of groups. To include a group in an ACL, we first display and unlock the ACL, then we © Jones & Bartlett clickLearning, the plus sign LLC to add a new entry. We select© the Jones group’s name& Bartlett from the Learning, list, and LLC NOT FOR SALE ORthen DISTRIBUTION set the group’s access rights. NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION FIGURE 4.10 Modifying the rights on a MacOS ACL entry. Screenshot reprinted with permission from Apple, Inc.

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 150 Chapter 4 Sharing Files

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

FIGURE 4.11 Choosing users for a group in Apple’s MacOS. © JonesScreenshot reprinted & with Bartlett permission from Apple, Inc.Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION When we create a new file on a Macintosh, the file grants full rights to the owner and read-only access to everyone else. This does not, however, mean that we are sharing files by default. Every user has a “home directory” that carries his or her user name; within that directory are personal directories with names like © Jones & Bartlett Learning, LLCDesktop, Documents, Downloads,© Jones Library, & Bartlett and Pictures. Learning, By default, LLCother users NOT FOR SALE OR DISTRIBUTIONcannot read these directories.NOT Even FORif they haveSALE read OR access DISTRIBUTION to the files themselves, they can’t read the files because they can’t reach them easily. Only the Public direc- tory grants read access to users in general. If we wish to share files with others, we either place the files in the Public directory, or in another directory that’s not part of our user file directories. For © Jonesexample, & Bartlett Bob might Learning, create a “Projects” LLC directory in the root directory© Jones that is read& Bartlett- Learning, LLC NOT FORable by SALE everyone. OR Within DISTRIBUTION that directory, he creates a new directoryNOT for every FOR proj SALE- OR DISTRIBUTION ect, and he sets access permissions to allow project members only. When Tina creates a file in their shared “survey” directory, the file will grant full access to her and read access to everyone else. This is the default behavior. The protections on its directory will protect the file from other users. The system will © Jones & Bartlett not,Learning, however, automaticallyLLC fill in the ACL with© Jonespermissions & Bartlett for Bob. He Learning, will be LLC NOT FOR SALE ORable DISTRIBUTION to read the file because, by default, he receivesNOT read FOR access SALE with the OR rest DISTRIBUTION of the world. Unlike the rest of the world, he can read the directory. This allows him to actually read the file.

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 4.4 Microsoft Windows ACLs 151

Although this approach will protect the “survey” files from being read by out- siders, it is© best Jones to explicitly & Bartlett change permissions Learning, to blockLLC access by people outside © Jones & Bartlett Learning, LLC the group.NOT Bob won’tFOR share SALE his administrativeOR DISTRIBUTION password with Tina, so she can’t NOT FOR SALE OR DISTRIBUTION change ACLs herself. However, she can type in a “chmod” command by hand to remove access by the world (“others”) to her new files.

© Jones▸▸ &4. Bartlett4 Microsoft Learning, Windows LLC ACLs © Jones & Bartlett Learning, LLC NOT FORACLs firstSALE appeared OR inDISTRIBUTION Windows operating systems with the introductionNOT FOR of Win SALE- OR DISTRIBUTION dows NT in 1993. The ACLs evolved over subsequent releases of “professional” versions of Windows, including Windows 10. The basic file sharing introduced in Section 4.1.1 uses the ACL system through a simplified interface. All changes made through basic file sharing are reflected in the ACLs. © Jones & Bartlett Learning,Windows hasLLC produced a particularly effective© Jones ACL implementation & Bartlett Learning, by pro- LLC NOT FOR SALE ORviding DISTRIBUTION flexible and sophisticated inheritance.NOT In most FOR cases, SALE the file OR in a DISTRIBUTION folder inherits access rights cleanly and simply from the enclosing directory. Files and folders automatically inherit changes made to an enclosing folder’s access rights. This makes it easier to manage rights in file hierarchies. The ACLs used in MacOS and Sun’s Solaris operating system are similar to those in Windows© Jones to ensure& Bartlett they work Learning, well together. LLC Version 4 of the Network © Jones & Bartlett Learning, LLC File SystemNOT also FORadopted SALE an ACL OR mechanism DISTRIBUTION that is very similar to Windows. NOT FOR SALE OR DISTRIBUTION Although these ACLs are similar, each has its own interface, graphical and other- wise, for viewing and changing ACLs. In addition, the other systems use different techniques to inherit ACL settings and apply default rights. On Windows, we display a file’s ACL by selecting the file and choosing the © Jones“Properties” & Bartlett menu Learning,entry. The ACLs LLC reside under the “Security” ©tab Jones (FIGURE 4.12& Bartlett). Learning, LLC NOT FORThe top SALE pane ofOR the DISTRIBUTION ACL window lists the entries for differentNOT users FORor classes SALE OR DISTRIBUTION of users. When we click on one of those entries, the lower pane displays the

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION FIGURE 4.12 Access control list from Microsoft Windows. Used with permission from Microsoft.

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 152 Chapter 4 Sharing Files

corresponding access rights and restrictions. A check mark under “Allow” grants © Jonesthat &right; Bartlett a check markLearning, under “Deny” LLC blocks that right. © Jones & Bartlett Learning, LLC NOT FORAs SALE with earlierOR DISTRIBUTION ACL examples, the access rights in FigureNOT 4.12 FOR can’t SALE be OR DISTRIBUTION expressed with a set of file permission flags. The ACL describes rights for two dif- ferent users, Bob and “SYSTEM,” and for two different groups, “Administrators” and “Survey.” Windows provides several different displays for ACLs. The display in Figure 4.12 only shows the rights for the user or group chosen in the display’s © Jones & Bartlett upperLearning, pane. In LLCthe figure we see only the rights© grantedJones to & the Bartlett survey group. Learning, We LLC NOT FOR SALE ORneed DISTRIBUTION to select the other entries individually to seeNOT the FORrights granted SALE to OR those DISTRIBUTION users or groups. When a Windows ACL has two or more entries that apply to the current pro- cess, the access rights are combined. We discussed this earlier with the example in Table 4.1. If Bob gives read access to everyone and omits any access rights for the © Jones & Bartlett Learning, LLCsurvey group, Tina can still ©read Jones it. The &absence Bartlett of a right Learning, does not forbidLLC access NOT FOR SALE OR DISTRIBUTIONin Windows ACLs. NOT FOR SALE OR DISTRIBUTION 4.4.1 Denying Access Windows allows us to explicitly deny access rights. The ACLs provide separate © Jones“Allow” & Bartlett and “Deny” Learning, flags (FIGURE LLC 4.13) for each right. On Unix,© we Jones deny access & Bartlett Learning, LLC NOT FORby being SALE silent, OR by failing DISTRIBUTION to grant access rights. On Windows, weNOT can specifically FOR SALE OR DISTRIBUTION deny access to particular users or groups. This produces more ambiguity: What does it mean if one ACL entry grants access while another denies access? Windows resolves this by always applying the Deny entries first. The system looks at the access rights being requested and the identity of the process making © Jones & Bartlett theLearning, request. If LLCa Deny entry matches a user name© Jones or group & Bartlettassociated Learning,with the LLC NOT FOR SALE ORprocess, DISTRIBUTION Windows denies the specified accessNOT rights. FOR Windows SALE then OR reviews DISTRIBUTION the Allow entries. If any entry matches the process owner or one of its groups, then the corresponding access rights are granted, unless the right was previously denied through a Deny entry. This makes Deny access convenient in some cases but tricky in others. Let us © Jones & Bartlett Learning, LLCreturn to the example of Bob,© Tina, Jones and the & surveyBartlett group. Learning, Clearly Bob wantsLLC to give read/write access to the survey group, so he puts the appropriate rights in the ACL. NOT FOR SALE OR DISTRIBUTIONAfter a meeting with the secretiveNOT manager FOR SALEof the surveying OR DISTRIBUTION company, he decides to revise the ACLs. He adds an ACL entry to his survey files to specifically deny access by the user “Alice.” When Alice logs in, she is denied access to the survey files even if some other ACL entry grants her access by mistake. This produces the result Bob wants. © Jones Following& Bartlett another Learning, uncomfortable LLC talk with the surveying company© Jones manager, & Bartlett Learning, LLC NOT FORhowever, SALE Bob gets OR worried. DISTRIBUTION If he creates another user, then he’ll haveNOT to updateFOR theSALE OR DISTRIBUTION ACLs to deny that new user, too. Bob decides it’s easier to simply deny access by “Users” to the survey data files. He assumes that Tina will still have access because she is a member of the survey group. Instead, Windows applies all Deny ACL entries first. Because Tina (and Bob, © Jones & Bartlett forLearning, that matter) LLC is a user and all users are denied© Jones access, & Tina Bartlett is denied Learning, access; LLC NOT FOR SALE ORnobody DISTRIBUTION can access the survey files until Bob removesNOT FOR the Deny SALE entry. OR DISTRIBUTION The Deny feature can make an ACL hard to interpret. The Windows ACL dis- play in FIGURE 4.14 lists the rights by the sets of users involved. However, a single

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 4.4 Microsoft Windows ACLs 153

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

FIGURE 4.13 Denying access in a Windows ACL. Used with permission from Microsoft. © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE ORset DISTRIBUTION of users may be subject to both Allow and DenyNOT rights, FOR and SALE all Deny OR rights DISTRIBUTION are applied first. We must examine the list twice: once applying the Deny rights, and again applying the Allow rights.

Determining Access Rights © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC To determineNOT the FOR actual SALE rights applied OR DISTRIBUTION to a particular file under Windows, we NOT FOR SALE OR DISTRIBUTION have two choices. First, we can manually review the rights for each user and group. We need to keep track of Allow and Deny rights, apply the Deny rights first, and apply Allow rights only if they don’t contradict an earlier Deny right in the ACL. Our second choice is to click on the “Advanced” button at the bottom © Jonesof the & ACLBartlett window. Learning, This opens anotherLLC window that gives us finer© Jones control & over Bartlett Learning, LLC NOT FORthe access SALE rights. OR If DISTRIBUTIONwe click on the “Effective Permissions” tabNOT in that FOR window, SALE OR DISTRIBUTION we can ask Windows to determine the access rights granted to a particular user or group.

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 154 Chapter 4 Sharing Files

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION FIGURE 4.14 Advanced security settings for Windows ACLs. Used with permission from Microsoft. Building Effective ACLs © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE ORIn DISTRIBUTIONgeneral, Deny by Default yields the best approachNOT to FORbuilding SALE ACLs. WeOR start DISTRIBUTION with no rules granting access to anyone. We add access rights required by the owner and the system, and then we add access rights required by others who use the files. We won’t need to use Deny entries if we haven’t granted access rights we must later rescind. Occasionally, we might encounter a case where it’s more practical to use a Deny © Jones & Bartlett Learning, LLCentry than to build the ACL using© Jones Deny by & Default. Bartlett For example,Learning, a college LLC may have a user group for all students called, of course, “Students.” As soon as people register, NOT FOR SALE OR DISTRIBUTIONthey are added to the group. NOTHowever, FOR there SALE are certain OR items DISTRIBUTION that incoming fresh- men aren’t allowed to use. We can implement this with Deny by Default if we create a separate group containing “Students Minus Freshmen.” However, it is easier to create a separate group named “Freshmen” and create a Deny entry that applies just © Jonesto Freshmen. & Bartlett It should Learning, be easier to LLC move students in and out of the© Freshmen Jones group & Bartlett Learning, LLC than to maintain a separate “Students Minus Freshmen” group. NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 4.4.2 Default File Protection When we create a file, we rarely stop and think about its access rights. We assume the file will receive appropriate rights automatically. In practice, we often rely on © Jones & Bartlett theLearning, file’s directory LLC to protect the file for us. © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTIONIn Unix-based systems, new files are assignedNOT a FORdefault SALE set of file-protection OR DISTRIBUTION flags. These flags usually grant the owner full access and provide read-only access to everyone else. If the file is in a private folder, like “My Documents,” the folder

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 4.4 Microsoft Windows ACLs 155

itself is unreadable by others. Even if users are allowed to read the file, they can’t actually reach© Jones it if they & can’t Bartlett retrieve itLearning, from its folder. LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION Inherited Rights Systems that support ACLs, like Apple’s MacOS, often support an inheritance mech- anism for assigning ACLs to new files. We assign the ACL we want to a particular © Jonesfolder. & WhenBartlett we create Learning, new files in LLC that folder, the files receive the© inherited Jones ACLs. & Bartlett Learning, LLC While this makes ACLs a bit more practical, there are still shortcomings. In NOT FORMacOS, SALE for example, OR DISTRIBUTION there is no way to assign the inherited ACLsNOT except FOR through SALE OR DISTRIBUTION typed commands. The mechanism rarely is used in practice. Another problem is that the systems often use static inheritance. If we make any changes to the inherited ACL, we will need to manually propagate the changed ACL to all files in the folder. MacOS © Jones & Bartlett andLearning, other Unix-based LLC systems often provide tools© toJones simplify & the Bartlett problem ofLearning, chang- LLC ing access rights on a set of files. For example, MacOS provides a menu item “Apply to NOT FOR SALE ORenclosed DISTRIBUTION items” that applies a folder’s access rightsNOT to all FOR files and SALE folders OR it contains. DISTRIBUTION

Dynamic ACLs Microsoft © Windows Jones 2000& Bartlett introduced Learning, dynamic ACLs LLC that inherit access rights © Jones & Bartlett Learning, LLC from the enclosing folder. In other words, the files themselves don’t really keep their own NOTACLs. Instead,FOR SALE they use OR the “parent”DISTRIBUTION ACL, which is retrieved from their NOT FOR SALE OR DISTRIBUTION folder. When we create a new file, it simply inherits access rights from the folder in which we save the file. This inheritance is dynamic because we can change permissions on all files in © Jonesa folder & Bartlett just by changing Learning, permissions LLC on the folder itself. As long© as Jonesthe files inside & Bartlett Learning, LLC the folder inherit their ACL from the folder, we change all ACLs when we change NOT FORthe folder’s SALE ACL. OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION Dynamic ACLs also make it more difficult to establish tailored access rights. According to Deny by Default, we make fewest mistakes when we start with no access rights and then add the ones we need. The inherited rights may include rights we don’t want to grant, and then we must disable inheritance before we © Jones & Bartlett establishLearning, the rights LLC we want. © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTIONWindows usually applies a global user isolationNOT policy.FOR WhenSALE we OR create DISTRIBUTION a file in our own Documents directory, we are generally the only user with access to it. The system may grant administrative access to certain groups and identities as well to support built-in system functions, but regular users are not granted access by default. It can be difficult to grant access to files stored in a user’s personal folders. When© Bob Jones created & his Bartlett Survey Folder, Learning, he placed LLC it on the root directory of his © Jones & Bartlett Learning, LLC C: drive. ThisNOT makes FOR it easySALE for otherOR DISTRIBUTIONusers to find. The path name is short and NOT FOR SALE OR DISTRIBUTION simple. This does not pose a security problem as long as Bob restricts the folder’s access rights. Bob can’t do this from the ACL display in the Properties window (Figure 4.12). He must click on the “Advanced” button at the bottom to see the Advanced ACL display (Figure 4.14). © Jones &The Bartlett display showsLearning, the default LLC permissions established for© the Jones new Survey & Bartlett Learning, LLC NOT FORFolder. SALE The right OR two DISTRIBUTION columns describe the inheritance; the entireNOT ACL isFOR inherited SALE OR DISTRIBUTION from the C: drive root. By default, “Users” and “Authenticated Users” have broad access rights to the folder. This is a problem. Folders created in the root directory

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 156 Chapter 4 Sharing Files

of Bob’s tower computer share their contents by default. This grants access to Alice © Jonesand &to anyBartlett other new Learning, users brought LLC in. © Jones & Bartlett Learning, LLC NOT FORTo SALE set the permissionsOR DISTRIBUTION correctly, Bob must eliminate the undesiredNOT FORrights. SALEHe OR DISTRIBUTION can’t simply delete the offending inherited entries and leave other inherited entries in place. He can’t deny access to Authenticated Users because that also denies access to Tina and him. He must disable inheritance on the Survey Files folder to eliminate the unwanted access permissions. He clicks on the button marked “Dis- © Jones & Bartlett ableLearning, inheritance,” LLC located below the “Add” button.© Jones He may reenable& Bartlett inheritance Learning, by LLC NOT FOR SALE ORclicking DISTRIBUTION the button again. NOT FOR SALE OR DISTRIBUTION When Bob clicks the “Disable inheritance” button, Windows asks him which permissions, if any, it should give to this disinherited folder. He may either “convert inherited permissions into explicit permissions,” which simply copies the existing permissions, or he may remove all permissions. It is probably safer to convert the © Jones & Bartlett Learning, LLCpermissions and then remove© the Jones unwanted & ones.Bartlett If we remove Learning, all inherited LLC permis- NOT FOR SALE OR DISTRIBUTIONsions, we may accidentally hideNOT files FOR or folders SALE from OR the systemDISTRIBUTION and disable useful services like file backups. Bob converts the permissions instead of removing them. Below the inheritance button is a check box about replacing child object per- missions. The check box lets us copy existing, inherited permissions to files and folders enclosed in this one. This doesn’t apply to Bob’s situation because he has © Jonesjust created& Bartlett an empty Learning, folder. There LLC are no files or subfolders. © Jones & Bartlett Learning, LLC NOT FORAfter SALE the system OR DISTRIBUTION copies the permissions, Bob deletes the rightsNOT for FORUsers andSALE OR DISTRIBUTION Authenticated users. He leaves the rights for SYSTEM and Administrators; it isn’t clear which system features will fail if we omit those. We leave system-specific permissions in place unless we have a really compelling reason to remove them. Finally, Bob adds ACL entries. He adds one for himself, giving him full con- © Jones & Bartlett trol.Learning, He adds another LLC for the survey group, and© gives Jones it full &control. Bartlett This yields Learning, the LLC NOT FOR SALE ORACL DISTRIBUTION in FIGURE 4.15. New files or folders createdNOT in the FOR Survey SALE Folder OR will DISTRIBUTIONinherit this ACL. Though unnecessary, Bob could add a Deny entry for Alice, as illus- trated in Figure 4.13. In either case, the new access rules apply to all files and folders inside the Survey Folder. The access rights shown in a file’s Security tab combine both the inherited © Jones & Bartlett Learning, LLCrights and any rights we apply© directlyJones to &that Bartlett file. Inherited Learning, rights appear LLC as rights NOT FOR SALE OR DISTRIBUTIONwith greyed-out boxes eitherNOT checked FOR or unchecked.SALE OR If DISTRIBUTIONwe decide to change the rights of a file, the locally assigned (not inherited) rights appear as solid boxes. For example, in FIGURE 4.16 we see the access rights for “Everyone.” The two greyed-out boxes show that Everyone has inherited “Read” and “Read & Execute” rights. We have also checked the “Modify” and “Write” boxes, granting those per- © Jonesmissions & Bartlett to Everyone Learning, as well. Thus, LLC Everyone can read, execute, and© modifyJones the & file. Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 4.4.3 A Different Trojan Horse Alice’s Arts, Continued: Alice hired a new clerk, Eve, who will also cre- ate advertising fliers on the computer Bob shares with Alice. Bob has created a new login for Eve. Eve took advantage of shared root folders to © Jones & Bartlett Learning,install a computer LLC game on Bob’s computer.© Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTIONEve told Tina about the game. Tina triedNOT it butFOR didn’t SALE enjoy it.OR Later, DISTRIBUTION however, Bob noticed that confidential files had been copied from the survey folder to the game folder.

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 4.4 Microsoft Windows ACLs 157

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION FIGURE 4.15 Revised ACL for the survey folder. Used with permission from Microsoft.

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION FIGURE 4.16 Adding to inherited rights in a Windows ACL. Used with permission from Microsoft.

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 158 Chapter 4 Sharing Files

How did this happen? Bob established his access restrictions correctly. His © Jonescomputer & Bartlett followed Learning, the appropriate LLC Chain of Control while it started© Jones up. Why & did Bartlett Learning, LLC NOT FORhis information SALE OR leak DISTRIBUTION out anyway? It can be very hard to track downNOT the FOR cause SALE of OR DISTRIBUTION such leaks. In this case, we blame it on Eve’s computer game. The game contained a Tro- jan horse feature that looked in restricted directories and copied whatever files the process could find. Nothing happened when Eve or Alice played the game because © Jones & Bartlett theyLearning, didn’t have LLC access to the survey folder. When© Jones the game & Bartlett ran from Learning,Bob’s or LLC NOT FOR SALE ORTina’s DISTRIBUTION login, it copied every file in the survey folderNOT to FOR the game SALE folder. OR DISTRIBUTION Trojan horse software illustrates a common shortcoming of file-based access control. When a user runs some software, the software inherits the user’s access rights. If the software wants to steal information from the user, then the user might not detect the theft. © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTIONA Trojan Horse ProgramNOT FOR SALE OR DISTRIBUTION To understand how Bob’s defenses failed, let us look at the file protection. TABLE 4.5 lists the access rights applied to the sensitive files. Specifically, Bob only granted access to Tina. He specifically didn’t grant access to Eve, and he may still be deny- © Jonesing access& Bartlett to Alice. Learning, Thus, a user LLClogged in as Alice or Eve can’t© possibly Jones read & orBartlett Learning, LLC write survey files. At least, they can’t read or write such files directly. NOT FORWhen SALE Tina OR runs DISTRIBUTION a program, the program starts a process. TheNOT process FOR follows SALE OR DISTRIBUTION the instructions listed in the program, using the access rights belonging to Tina. If the program says, “Let’s copy files from the survey folder to somewhere else,” then the process follows those instructions. Alice or Eve still can’t read files in the © Jones & Bartlett SurveyLearning, Folder, LLCbut the process creates new copies© Jones of those &files. Bartlett Anyone Learning,can read LLC those new files. NOT FOR SALE OR DISTRIBUTIONFIGURE 4.17 shows how the Trojan game works.NOT WithinFOR SALEthe figure, OR we DISTRIBUTION divide up the resources into those on the left, belonging to Tina, and those on the right, belonging to Eve. The arrows and the “RWX” notations indicate the user access rights. Eve cannot access the survey folder directly because there is no arrow con- © Jones & Bartlett Learning, LLCnecting it to Eve’s process. © Jones & Bartlett Learning, LLC Whenever the game starts running, it activates its Trojan feature. The game NOT FOR SALE OR DISTRIBUTIONlooks for files in protected folders,NOT FORlike the SALE survey ORfolder, DISTRIBUTION and copies each one to

TABLE 4.5 Access Rights Applied to the Stolen Files

© Jones & Bartlett Learning, LLC Effective Access© Jones & Bartlett Learning, LLC NOT FOR AccessSALE Rights OR for DISTRIBUTION “World” NOT FOR SALE OR DISTRIBUTION Resources or “Other” Users Tina’s Processes Eve’s Processes

Survey files --- RW- --- © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOTEve’s FOR shared SALE game fileOR DISTRIBUTIONR-X R-X NOT FOR RWXSALE OR DISTRIBUTION Copied survey files RW- RW- RW-

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 4.5 Monitoring Cyber System Security 159

Tina’s Resources Eve’s Resources © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION R-X Game’s Tina’s Game Executable Process File

© Jones & BartlettRW- Learning,RW- LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOTRWX FOR SALE OR DISTRIBUTION

Private Spread- RW- Spread- sheet Eve’s Process sheet Copy © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION FIGURE 4.17 Trojan game copies one of the survey files.

the games folder belonging to Eve. Once the copying is finished, the game itself starts running.© Jones The Trojan & Bartlett feature may Learning, cause a slight LLC delay in starting the game, © Jones & Bartlett Learning, LLC but the delayNOT won’t FOR be enough SALE to arouseOR DISTRIBUTION suspicion. NOT FOR SALE OR DISTRIBUTION When we run a program, we implicitly trust the program’s author to write a program that does us no real damage. We assume that the author isn’t going to insert malicious features like the one that copies Tina’s secret files. This implicit trust also extends to anyone who has the right to modify a program we run. When © JonesTina & runs Bartlett the game, Learning, she trusts Eve LLC not to insert malicious features© intoJones that game. & Bartlett Learning, LLC NOT FORSocially, SALE Tina’s assumptionOR DISTRIBUTION might be reasonable; people avoid workingNOT with FOR others SALE OR DISTRIBUTION they can’t really trust.

Transitive Trust: A Basic Principle We use the term Transitive Trust to describe this implicit spreading of trust. © Jones & Bartlett IfLearning, we trust a particular LLC entity to protect our data,© Jones then we &implicitly Bartlett trust Learning, anyone LLC NOT FOR SALE ORthat DISTRIBUTION the entity trusts. In this case, the surveyingNOT company FOR SALEtrusts Tina OR and DISTRIBUTION Bob to keep their bookkeeping data secret. Bob trusts his computer. If we apply Tran- sitive Trust, we see that all implicitly trust Bob’s computer’s defenses. Bob also implicitly trusts Eve with the bookkeeping data, not realizing that his employee, Tina, will run the game that Eve owns. © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION ▸▸ 4.5 Monitoring Cyber System Security This section addresses the final step of our risk management frameworks: moni- toring the system for correct and secure operation. There are many ways to mon- © Jonesitor &a system. Bartlett The Learning,simplest approach LLC is to set up alerts or alarms© that Jones occur when& Bartlett Learning, LLC NOT FORsomething SALE really OR unusual DISTRIBUTION happens. NOT FOR SALE OR DISTRIBUTION For example, companies that use online banking often configure the soft- ware to send warning messages to cell phones when really large transactions take

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 160 Chapter 4 Sharing Files

place. Hundreds of public, nonprofit, and private enterprises have had their bank © Jonesaccounts & Bartlett looted by Learning, cyber thieves. LLC This type of alert reports all large© Jones transactions, & Bartlett Learning, LLC NOT FORmaking SALE it harder OR for DISTRIBUTIONthieves to attack without detection. NOT FOR SALE OR DISTRIBUTION Most computing systems also provide event logging. A typical computer is the proverbial black box: The outside gives few clues of what goes on inside. As com- puters have evolved, they have done more and more while displaying less and less. Early computers contained vast arrays of blinking lights, each connected to an inter- © Jones & Bartlett nalLearning, signal or data LLC item. While these lights provided© Jones a great deal & ofBartlett raw data aboutLearning, the LLC NOT FOR SALE ORcomputer’s DISTRIBUTION behavior, they could only display statusNOT and FOR errors SALEat the hardware OR DISTRIBUTION level. Inside a running program, the computer produces countless intermediate results we never see. The final result is our focus. We ignore everything else the computer does, except for the answers we need. The computer forgets everything else, too, unless we make it keep records. © Jones & Bartlett Learning, LLC Forgetfulness poses a security© Jones problem. & Bartlett If an attack Learning, occurs, we want LLC to know NOT FOR SALE OR DISTRIBUTIONeverything we can about theNOT process FOR that performed SALE OR the attack.DISTRIBUTION When did it start? Who started it? What was it supposed to be doing? We can’t answer those questions unless the computer keeps records of what it does. We call those records in a set of files called the event log or the audit trail. While file-based access controls provide preventative controls that block security © Jonesviolations, & Bartlett event logging Learning, provides LLCdetective controls that help us detect© Jones security & vio Bartlett- Learning, LLC NOT FORlations SALE we failed OR to block. DISTRIBUTION FIGURE 4.18 displays an event log from MicrosoftNOT FORWindows. SALE OR DISTRIBUTION Catching an Intruder In an ideal world, the security system notifies us immediately when an intruder appears. We receive an alert on a cell phone or a box pops up on the computer © Jones & Bartlett display,Learning, announcing LLC the problem. © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION FIGURE 4.18 Windows security event log. Used with permission from Microsoft.

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 4.5 Monitoring Cyber System Security 161

Computers can’t always provide such clear-cut warnings. Detection is harder when the ©intruder Jones masquerades & Bartlett as someoneLearning, else. LLCIf the intruder behaves more © Jones & Bartlett Learning, LLC or less likeNOT the legitimate FOR SALE user, we’ll OR detect DISTRIBUTION the intrusion only by looking at larger NOT FOR SALE OR DISTRIBUTION patterns of behavior. We need to analyze the event log.

An Incident: In 1986, the astronomy department of the University of California, Berkeley, owned a Unix timesharing system. Computers were © Jones &expensive Bartlett back Learning, then, and they LLC paid for the machine by charging© Jones research & Bartlett Learning, LLC projects $300 an hour to use it. The Unix system had a built-in mech- NOT FORanism SALE that OR kept DISTRIBUTION a log of system events. The department expandedNOT FOR the SALE OR DISTRIBUTION mechanism so they could calculate the amount of time spent by each project and send monthly bills. The system seemed to work flawlessly until the lab manager noticed © Jones & Bartlett Learning,a 75-cent differenceLLC between the amount© of Jones computing & Bartletttime used Learning,and LLC the amount billed. He told his new lab assistant, Clifford Stoll, to find out NOT FOR SALE OR DISTRIBUTIONwhy. Stoll appreciated that the 75-cent difference,NOT FOR though SALE small, ORdid not DISTRIBUTION make sense. It indicated a real problem with the system or its account- ing. Stoll’s research uncovered an intruder who was nicknamed “the Wily Hacker.” Stoll ultimately tracked him across the 1980s internet to his home© in JonesGermany. & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC Stoll’s investigation led him to other computer centers visited by the Wily NOTHacker, FOR and Stoll’s SALE story OR took DISTRIBUTION most sites by surprise. Few systems NOT FOR SALE OR DISTRIBUTION actually kept event logs of any kind, and fewer still actually bothered to look at the logs. This was true even of government and military systems the intruder visited.

© Jones &Typically, Bartlett we can Learning, detect intruders LLC only if they leave evidence© of Jonestheir visit. & For Bartlett Learning, LLC NOT FORexample, SALE we might OR find DISTRIBUTION files created while the nominal owner wasNOT out of FOR town andSALE OR DISTRIBUTION out of touch. If intruders clean up after themselves, we might have no records at all. Logging gives us a separate record of what happens on our computer so that we can retrace such incidents. © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE ORTrust, DISTRIBUTION but Verify: A Basic PrincipleNOT FOR SALE OR DISTRIBUTION Russian expert Suzanne Massey met several times with U.S. President Ronald Rea- gan to provide insight on the Russian people. She introduced him to a Russian proverb that in English says “Trust, but verify.” In other words, if we want to prevent a bad outcome but we can’t directly control the relevant events, then we should monitor© Jones those events& Bartlett closely instead.Learning, LLC © Jones & Bartlett Learning, LLC CybersecurityNOT FOR controls SALE can’t ORprevent DISTRIBUTION all bad outcomes. If we lock computers NOT FOR SALE OR DISTRIBUTION so tightly that they are perfectly safe, they will be perfectly useless. We need to allow a broad range of potentially risky activities. Instead of forbidding such activ- ities, we monitor our systems. We try to detect trouble as soon as it develops. Event logging is an important tool in verifying that things are okay, but it © Jonesis not & theBartlett only tool. Learning, Many antivirus LLC systems try to automatically© Jonesscan every & file Bartlett Learning, LLC NOT FORthat enters SALE the ORsystem, DISTRIBUTION and thus try to prevent a malware-infectedNOT file fromFOR being SALE OR DISTRIBUTION installed. But antivirus programs can’t monitor every path a file might take into the system. Antivirus programs also run periodic scans to detect malware that

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 162 Chapter 4 Sharing Files

somehow entered the system. The antivirus scan verifies that the system contains © Jonesno recognizable & Bartlett malware. Learning, A firewall LLC can also play a role in detecting© Jones intrusions. & Bartlett Learning, LLC NOT FORNo firewall SALE can OR block DISTRIBUTION all attacks, but higher performance firewallNOT systems FOR may SALE OR DISTRIBUTION include features to detect intrusions by monitoring network traffic.

4.5.1 Logging Events © Jones & Bartlett AnLearning, event log is LLC no more—or less—than a data© file. Jones Whenever & Bartlett a significant Learning, event LLC NOT FOR SALE ORtakes DISTRIBUTION place, the system writes a brief descriptionNOT of that FOR event SALE into the log.OR In DISTRIBUTION prac- tice, most systems keep several separate event logs. Each operating system takes its own approach to logging, but many keep separate logs for “system” events and “security” events.

■■ The system log records the start-up and shutdown of the system itself and © Jones & Bartlett Learning, LLC of major processes. It also© mayJones record & theBartlett opening Learning,and closing of LLC important NOT FOR SALE OR DISTRIBUTIONfiles or other major systemNOT resources. FOR SALE OR DISTRIBUTION ■■ The security log records all major access control requests, like logins, and all access control denials, like password failures or attempts to read protected files. Most systems also have one or more additional logs for collecting events © Jonesfrom & application Bartlett programs.Learning, These LLC logs are very important for© many Jones organiza & Bartlett- Learning, LLC NOT FORtions, becauseSALE theOR applications DISTRIBUTION perform business tasks. In a bank,NOT for example, FOR theSALE OR DISTRIBUTION software that processes account deposits and withdrawals keeps a log of all such transactions. Later, an auditing program compares account balances against the transaction log to verify correctness.

© Jones & Bartlett ALearning, Log Entry LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION When something important (an event) takes place inside a program, the program creates a log entry. The program then passes the log entry to the appropriate event log. A typical log entry contains the following:

■■ Time and date of the event © Jones & Bartlett Learning, LLC■■ Source of the event—the© process Jones or &system Bartlett component Learning, that detected LLC it NOT FOR SALE OR DISTRIBUTION■■ User identity—a user associatedNOT FOR with theSALE event OR DISTRIBUTION ■■ Type of event—what happened, classified into a category of events ■■ Event details—these vary with the type of event and the details of the occurrence Figure 4.18 shows the Event Viewer used by Windows to display log entries. © JonesThe left& Bartlett pane of the Learning, window gives LLC a choice of several management© displays; Jones under & Bartlett Learning, LLC NOT FOREvent ViewerSALE it OR offers DISTRIBUTION to display any of five different event logs. TheNOT figure FOR shows SALE OR DISTRIBUTION the System log, which reports events from applications. Most are for “informa- tion,” while others report a “Warning” or “Error.” The table shows selected col- umns from each log entry. We may also select a log entry and examine its other © Jones & Bartlett contents.Learning, A well-written LLC application will produce© Jones an event & logBartlett to keep Learning, track of LLC what it does and to report inconsistencies and other unusual events. NOT FOR SALE OR DISTRIBUTIONMany organizations use these logs whenNOT they FOR perform SALE an informationOR DISTRIBUTION ­systems audit. This is a formal review of the system’s integrity and of the data it maintains regarding the organization’s business. These audits often occur when

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 4.5 Monitoring Cyber System Security 163

auditing a firm’s financial condition. Auditors or security experts may perform more specific© Jones security & audits. Bartlett If the Learning,system logs keep LLC a record of all significant © Jones & Bartlett Learning, LLC events, thenNOT they FORprovide SALE an “audit OR trail” DISTRIBUTION by which an investigator can reconstruct NOT FOR SALE OR DISTRIBUTION what took place.

The Event Logging Mechanism © JonesFIGURE & 4.19Bartlett shows theLearning, major elements LLC of the event logging mechanism.© Jones Here & are Bartlett Learning, LLC NOT FORthe four SALE steps in OR logging DISTRIBUTION an event: NOT FOR SALE OR DISTRIBUTION 1. A program detects a significant event. The program constructs a log entry to describe the event, and it places it in an input buffer to pass to the logging process. The program then tells the logging process that a new event has occurred. © Jones & Bartlett 2.Learning, The logging LLC process retrieves the event from© Jones the buffer. & IfBartlett so configured, Learning, LLC NOT FOR SALE OR DISTRIBUTIONthe logger may discard less-important eventsNOT and FOR keep onlySALE the moreOR DISTRIBUTION important ones. 3. The logging process writes the events to the log file. Systems may keep separate log files for different purposes. Windows, for example, keeps five separate logs. 4. System© adminisJonestrators & Bartlett use a log viewerLearning, to monitor LLC the logs and to discover © Jones & Bartlett Learning, LLC interestingNOT events FOR or SALE trends. SomeOR DISTRIBUTIONsystems have automated log monitors. NOT FOR SALE OR DISTRIBUTION Some administrators study the logs themselves. The first challenge in event logging is to control the amount of information collected. Some programmers like to treat everything that happens as a significant © Jonesevent, & andBartlett this yields Learning, vast numbers LLC of events. As the logs grow larger,© Jones it becomes & Bartlett Learning, LLC NOT FORharder SALE to see really OR importantDISTRIBUTION events. Most systems place a limitNOT on the FOR log files’ SALE OR DISTRIBUTION size, because they can devour the free space on a hard drive. In practice, we include or exclude events from the log at every point in the logging process. Programmers often include “debug” settings in their programs that increase or decrease the amount of logging performed. If the program runs © Jones & Bartlett well,Learning, we tell it to LLC ignore more common events. If© the Jones program & hasBartlett problems, Learning, we tell LLC it to report its behavior in greater detail. NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

Logging Program Process © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC ProgramNOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION Audit Log Program

Log Input Buffer © Jones & Bartlett Learning, LLC Log © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION Viewer NOT FOR SALE OR DISTRIBUTION

FIGURE 4.19 Event logging in the operating system.

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 164 Chapter 4 Sharing Files

Detecting Attacks by Reviewing the Logs © JonesIt isn’t & enoughBartlett to justLearning, collect log LLC entries; we also need to detect© and Jones respond & toBartlett Learning, LLC NOT FORsignificant SALE occurrences. OR DISTRIBUTION When Berkeley was being visited by the WilyNOT Hacker, FOR they SALE OR DISTRIBUTION relied on Unix event logs to make researchers pay for their fair share of computing costs. They would not have looked at their logs and detected the Hacker’s activities otherwise. The Berkeley event logs did not contain an event record saying “The Wily © Jones & Bartlett HackerLearning, was here,” LLC nor did the logger pop up ©a message Jones saying & Bartlett “Intruder Learning, Alert!” LLC NOT FOR SALE ORCliff DISTRIBUTION Stoll simply knew there was a 75-cent anomalyNOT in FOR the logging SALE and OR accounting DISTRIBUTION records. It took a great deal of analysis to suggest the existence of the intruder, and even more investigation to actually find and catch him. Following the exposure of the Wily Hacker and the Morris worm in the late 1980s, the U.S. government dispatched teams of experts to assess the security of © Jones & Bartlett Learning, LLCgovernment computer systems.© Jones The experts & Bartlett took a redLearning, team approach: LLC They NOT FOR SALE OR DISTRIBUTIONtested security by trying to breakNOT into FOR the systems. SALE They OR succeeded DISTRIBUTION in almost every case. Even worse, they were almost never detected, no matter how obvious they thought they were. Two conditions contributed to the red teams’ successes. First, most computer systems did not monitor or pay attention to events that might indicate an attack. © JonesWhile & someBartlett military Learning, systems were LLC required to keep event logs, ©few Jones sites actually & Bartlett Learning, LLC NOT FORdid so, SALE and fewer OR still DISTRIBUTION paid any attention to the data they collected.NOT The FOR second SALE OR DISTRIBUTION condition reflected the poor quality of computers at that time; computer behavior was very erratic. If something unusual took place, operators naturally blamed it on software failures. Responsible system administrators no longer ignore logs. Most have tools that © Jones & Bartlett automaticallyLearning, checkLLC logs for unexpected patterns© Jones and potential & Bartlett problems. Learning, A few LLC NOT FOR SALE ORhave DISTRIBUTION the knowledge and insight to analyze theNOT logs FORthemselves. SALE To ORdo this, DISTRIBUTION the administrator must have a good understanding of how the system works and what the different log events mean, as well as be familiar with “normal” event patterns. It takes practice to review event logs effectively. A good way to start is to look at a log and try to find evidence of known © Jones & Bartlett Learning, LLCactivities. For example, the© Windows Jones log& Bartlett identifies successfulLearning, and LLC failed login NOT FOR SALE OR DISTRIBUTIONattempts. If there have beenNOT several FOR recent SALE login failures,OR DISTRIBUTION the log should reflect them. If there was trouble while trying to install new software, the log should reflect the errors.

© Jones4.5.2 & BartlettExternal Learning, Security LLCRequirements © Jones & Bartlett Learning, LLC NOT FOREarly mainframeSALE OR computers DISTRIBUTION were staffed with operators. AlthoughNOT the computersFOR SALE OR DISTRIBUTION often were festooned with hundreds of lights and switches, most operators relied on its console display to track the computer’s behavior. The console contained a printer, and its printout was called the console log. Every major event that occurred inside the computer was reported on the log. This helped the operators keep the © Jones & Bartlett computerLearning, running LLC efficiently. The log also reported© Jones security & Bartlettrelevant events, Learning, like LLC NOT FOR SALE ORlogin DISTRIBUTION failures on a timesharing system. NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 4.5 Monitoring Cyber System Security 165

As computers shrank in size and cost, vendors eliminated the console and its log. This made© Jones the computers & Bartlett cheaper Learning, and easier to operate,LLC but it also eliminated a © Jones & Bartlett Learning, LLC lot of informationNOT FOR about SALEwhat the OR system DISTRIBUTION was doing. In 1983, the U.S. Department NOT FOR SALE OR DISTRIBUTION of Defense (DOD) published requirements for “trusted operating systems” titled Trusted Computer System Evaluation Criteria (TCSEC), often called the Orange Book. One requirement was that operating systems keep a log of security relevant events. This requirement remained when the Orange Book was replaced by a new © Jonesset of & standards Bartlett called Learning, the Common LLC ­Criteria in 2000. © Jones & Bartlett Learning, LLC NOT FORTh SALEe Orange OR Book DISTRIBUTION and Common Criteria are examples of standardsNOT thatFOR estab SALE- OR DISTRIBUTION lish cybersecurity requirements, including logging requirements. The risk manage- ment frameworks call for system monitoring, which usually includes event logging.

Laws, Regulations, and Industry Rules © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC Recent U.S. laws, regulations, and industry rules establish security requirements NOT FOR SALE ORfor DISTRIBUTION computer systems and are listed below. In NOTgeneral, FOR the rules SALE require OR organiza DISTRIBUTION- tions to monitor their computer systems for intrusions or other misuse; the orga- nizations must provide evidence that they do so.

■■ SOX (Sarbanes–Oxley Act), enacted by Congress in 2002, establishes requirements© Jones for financial& Bartlett and accounting Learning, practices. LLC © Jones & Bartlett Learning, LLC ■■ HIPAANOT (Health FOR Insurance SALE Portability OR DISTRIBUTION and Accountability Act), passed in NOT FOR SALE OR DISTRIBUTION 1996, establishes security standards for certain types of health information. Rules governing HIPAA implementation call for system logging. ■■ GLBA (Gramm–Leach–Bliley Act), passed in 1999, requires financial institutions to protect customer information against security threats. © Jones■■ &FISMA Bartlett (Federal Learning, Information LLC Security Management Act), passed© Jones in 2002, & Bartlett Learning, LLC NOT FORrequires SALE U.S. OR government DISTRIBUTION agencies to implement agency-wideNOT information FOR SALE OR DISTRIBUTION security programs. NIST promotes its Risk Management Framework to comply with FISMA. ■■ PCI DSS (Payment Card Industry Data Security Standard) is an industry standard followed by everyone who issues and processes credit and debit © Jones & Bartlett Learning,cards. One LLC requirement is that organizations© Jones track all access& Bartlett to network Learning, LLC NOT FOR SALE OR DISTRIBUTIONresources and cardholder data. NOT FOR SALE OR DISTRIBUTION ■■ ISO 27000 is a family of information security standards managed by the International Standards Organization (ISO). The standards focus on continuous process improvement. The standards call for continuous security monitoring, both to detect security problems and to assess the effectiveness of the© security Jones processes & Bartlett themselves. Learning, LLC © Jones & Bartlett Learning, LLC Some,NOT but not FOR all, ofSALE these specificallyOR DISTRIBUTION require logging and log monitoring. NOT FOR SALE OR DISTRIBUTION In practice, effective logging can show that the organization complies with more general security rules. Standards for financial accounting may also persuade an organization to keep logs, and the logs may play an important role in subsequent financial audits. © Jones &Many Bartlett organizations Learning, set up LLCtheir logs to meet auditing requirements.© Jones &Cor Bartlett- Learning, LLC NOT FORporations SALE routinely OR hireDISTRIBUTION independent accounting firms to performNOT annual FOR audits SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 166 Chapter 4 Sharing Files

of the company’s financial status. The accounting firm must have access to the © Jonescomputers & Bartlett used to Learning, process the corporation’sLLC financial data. The© Jones audit process & Bartlett Learning, LLC NOT FORexamines SALE cybersecurity OR DISTRIBUTION measures and uses the logs to verify thatNOT the FOR measures SALE OR DISTRIBUTION have been working. Financial audits aren’t the only reason a company keeps logs. If a company accepts credit card transactions, the computers that handle those transactions are subject to PCI DSS requirements, and these mandate event logging. If the com- © Jones & Bartlett panyLearning, has an in-house LLC clinic, its records are covered© Jones by HIPAA & Bartlett regulations, Learning, which LLC NOT FOR SALE ORalso DISTRIBUTION require security event logging. NOT FOR SALE OR DISTRIBUTION External Requirements and the Security Process In the risk management frameworks, we implement security controls based on © Jones & Bartlett Learning, LLCelements analyzed in earlier© steps:Jones requirements, & Bartlett risks, Learning, threat agents, LLC and ulti- mately on the assets we protect. When external requirements oblige us to incor- NOT FOR SALE OR DISTRIBUTIONporate particular security measures,NOT FOR we need SALE to include OR DISTRIBUTIONthem in the framework. This isn’t always an easy task. What if our assessment doesn’t yield any risks that these requirements address? For example, enterprise-grade internet firewalls often earn a Common Crite- © Jonesria certification & Bartlett based Learning, on a “protection LLC profile.” The profile places© manyJones require & Bartlett- Learning, LLC NOT FORments SALE on the firewallOR DISTRIBUTION product. Some of these requirements mightNOT not FOR directly SALE OR DISTRIBUTION address threats the vendor has identified. This may be an error on the vendor’s part, or the Common Criteria evaluation may pose requirements that this partic- ular product doesn’t really need. In either case, the vendor must choose between saving money on the product implementation or earning Common Criteria © Jones & Bartlett certification.Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTIONTo incorporate these additional requirements,NOT FOR we SALE take one OR of DISTRIBUTION three approaches: 1. Interpret external requirements in the context of our identified risks and then combine them with our other security requirements. 2. Analyze as risks any legal or contractual problems that could arise from © Jones & Bartlett Learning, LLC lacking a certification. © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION3. Treat certifications as assets.NOT FOR SALE OR DISTRIBUTION We do not want to simply add the external requirements to our policy. While this is the easiest way to do the planning and design, it may yield the most risk. For example, the external requirement may call for “strong authentication,” and the implementation may simply choose a product that a vendor claims will pro- © Jonesvide &“strong Bartlett authentication.” Learning, This LLCsolution may be more expensive© thanJones compara & Bartlett- Learning, LLC NOT FORbly strong SALE alternatives. OR DISTRIBUTION Moreover, the “strong authentication” mayNOT defend FOR against SALE OR DISTRIBUTION the wrong types of attacks. The first approach is also the simplest from a practical standpoint: We add to our policy by interpreting these external requirements. This allows us to integrate the external requirements with our strategy to address the threats. This works in © Jones & Bartlett situationsLearning, where LLC we develop a policy based on© someone Jones else’s & Bartlettrisk assessment. Learning, LLC NOT FOR SALE OR DISTRIBUTIONThe second approach acknowledges that NOTwe face FOR risks ifSALE we ignore OR the DISTRIBUTION exter- nal requirements. At some point, every organization makes an explicit or implicit assessment of the risks and benefits of complying with external rules. Most

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 4.6 Resources 167

organizations make decisions on standards and compliance through a separate ­decision-ma© kingJones process. & Bartlett A few may Learning, perform a single LLC assessment that incorpo- © Jones & Bartlett Learning, LLC rates bothNOT security FOR risks SALEwith risks OR of noncompliance. DISTRIBUTION NOT FOR SALE OR DISTRIBUTION In the third approach, certifications of products and processes or regulatory compliance may be treated as assets themselves. This is the best approach when dealing with ISO certifications because detailed requirements are often tailored to the organization. For example, the organization may be required to implement © Jonesprocesses & Bartlett to track andLearning, repair flaws LLC found in their systems, but the© details Jones of detect & Bartlett- Learning, LLC NOT FORing and SALE tracking OR flaws DISTRIBUTION will be customized to the organization. NOT FOR SALE OR DISTRIBUTION

▸▸ 4.6 Resources © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE ORImportant DISTRIBUTION Terms Introduced NOT FOR SALE OR DISTRIBUTION administrative group Orange Book audit trail other rights Common Criteria red team event logging setuid file permission© Jones flags & Bartlett Learning,Transitive LLC Trust © Jones & Bartlett Learning, LLC group rightsNOT FOR SALE OR DISTRIBUTIONTrust, but verify NOT FOR SALE OR DISTRIBUTION information systems audit user group log entry user rights

© JonesAbbreviations & Bartlett Learning, Introduced LLC © Jones & Bartlett Learning, LLC NOT FORACL—access SALE control OR DISTRIBUTION list PCI DSS—Payment CardNOT Industry FOR SALE OR DISTRIBUTION DOD—U.S. Department of Defense Data Security Standard FISMA—Federal Information POSIX—Portable Operating System Security Management Act Interface GLBA— Gramm–Leach–Bliley Act SOX—Sarbanes–Oxley Act © Jones & Bartlett HIPAALearning,—Health LLC Insurance Portability TCSEC© Jones—Trusted & Computer Bartlett System Learning, LLC NOT FOR SALE OR andDISTRIBUTION Accountability Act EvaluationNOT FOR Criteria SALE OR DISTRIBUTION ISO—International Standards UAC—user account control Organization

4.6.1 Review© Jones Questions & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC R1. SummarizeNOT FOR how eachSALE of the OR three DISTRIBUTION tailored file security policies changes the NOT FOR SALE OR DISTRIBUTION access rights of files under the two default security policies. R2. Explain how Windows home edition ACLs can solve Bob’s security problem. R3. Explain how the “user group” feature of Unix can solve Bob’s security © Jones & policyBartlett problem. Learning, LLC © Jones & Bartlett Learning, LLC NOT FORR4. SALEExplain ORwhy itDISTRIBUTION is safer for administrators to use two differentNOT accounts FOR SALE OR DISTRIBUTION when working with a computer. Explain the difference between the two accounts.

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 168 Chapter 4 Sharing Files

R5. Describe the behavior of “sudo” on Unix. When is “sudo” used? © JonesR6. & DescribBartlette the Learning, behavior of the LLC padlock icon on Apple’s MacOS.© Jones When is & the Bartlett Learning, LLC NOT FOR SALEpadlock ORused? DISTRIBUTION NOT FOR SALE OR DISTRIBUTION R7. Describe the behavior of UAC on modern versions of Microsoft Windows. In what circumstances does a UAC pop-up appear? R8. Summarize the behavior of Unix file-permission flags. Identify the sets of users that such permissions can control and what access rights are © Jones & Bartlett Learning,enforced LLC for each set. © Jones & Bartlett Learning, LLC NOT FOR SALE ORR9. DISTRIBUTION Explain how Unix-like systems decide whichNOT of FOR its three SALE sets of OR access DISTRIBUTION rights to apply when a particular user’s process opens a file. R10. List the columns that we need to provide when describing security controls implemented with Unix-style permission flags. R11. Describe the basic features of an access control list. © Jones & Bartlett Learning, LLCR12. Compare the access rights© Jones established & Bartlett in Figure 4.10Learning, with those LLC established NOT FOR SALE OR DISTRIBUTION in Figure 4.2. NOT FOR SALE OR DISTRIBUTION R13. Explain how access restrictions on a folder or directory can block a user’s access to a file, even if the file itself may be readable by that user. R14. If we create a Windows ACL in which we “Deny” all permissions to Alice, but we “Grant” all permissions to everyone, does Alice have any access to the file? © JonesR15. & WhenBartlett we cre Learning,ate a file, explain LLC how that file acquires its initial© Jones ACL under & Bartlett Learning, LLC NOT FOR SALEWindows. OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION R16. If we change the ACL for a folder under Windows, what typically happens to the ACLs for the files within that folder? R17. Why is a program containing a Trojan considered malicious? R18. Explain how a Trojan program can make secret data belonging to one user © Jones & Bartlett Learning,visible to LLC another user. © Jones & Bartlett Learning, LLC NOT FOR SALE ORR19. DISTRIBUTION Give an example of Transitive Trust. ExplainNOT who FOR trusts SALE whom OR and why.DISTRIBUTION R20. Describe the typical contents of an entry in an event log. R21. Describe the typical steps taken to log an event. R22. Summarize some laws, regulations, and industry standards that lead systems to maintain event logs. © Jones & Bartlett Learning, LLCR23. Explain three ways to© incorporate Jones & external Bartlett security Learning, requirements LLC into the NOT FOR SALE OR DISTRIBUTION risk management framework.NOT FOR SALE OR DISTRIBUTION 4.6.2 Exercises E1. This may be most appropriate as an in-class exercise. Form teams of three © Jones & orBartlett more class Learning, members with LLC user names (e.g., users A, B, C©, andJones D). Find & Bartlett Learning, LLC NOT FOR SALEshared hard OR drive DISTRIBUTION space that is accessible by all team members.NOT Then FOR do SALE OR DISTRIBUTION the following: ■■ Team members should individually create folders that are accessible to no other team members through Deny by Default. Remove inherited access rights if needed to achieve this. © Jones & Bartlett Learning,■■ Each LLC team member should create a© single Jones word-processing & Bartlett file Learning, and LLC NOT FOR SALE OR DISTRIBUTIONstore it in the new folder. The nameNOT of the FOR file should SALE be his OR or herDISTRIBUTION user name: A creates “A.doc,” B creates “B.doc,” and so on. Make these files readable by the “World.”

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 4.6 Resources 169

■■ A should add read/search access rights to its folder for B, B should add ©rights Jones for C &, and Bartlett C for D, andLearning, so on. Be sure LLC that no other access rights © Jones & Bartlett Learning, LLC NOTare granted FOR to SALE team members OR DISTRIBUTION for accessing the individual folders. NOT FOR SALE OR DISTRIBUTION ■■ Without changing access rights or moving the word-processing files outside of these original folders, each student should copy other team members’ files into his or her own folder. Repeat this until each student has a copy of all team members’ files. © Jones & DescribeBartlett how Learning, this took place. LLC © Jones & Bartlett Learning, LLC NOT FORE2. SALECreate t woOR separate DISTRIBUTION user identities on your system. Both shouldNOT beFOR regular, SALE OR DISTRIBUTION nonadministrative users. (You may use existing regular user identities for this.) Log in as one of the users (we’ll call it “User 1”) and do the following: ■■ Create a folder on the hard drive. Put it in a place that all users can reach. ■■ Set access rights for this folder to allow “execute” or “search” access by © Jones & Bartlett Learning,the secondLLC user (“User 2”), but grant© “noJones read” &access. Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION■■ Create one or two word-processingNOT files inside FOR that SALE computer. OR DISTRIBUTION Log in as User 2 and answer the following questions about attempts to access the files. a. Try to display the new folder. What happens? b. Open the word-processing program. Tell it to open one of User 1’s ©new Jones files. Instead & Bartlett of browsing Learning, through folders LLC to find the file, start © Jones & Bartlett Learning, LLC NOTfrom theFOR root SALE of the hard OR drive DISTRIBUTION and type in the file’s full path name. NOT FOR SALE OR DISTRIBUTION Describe what happens. c. Log in as User 1 and remove the “search” or “execute” right from the folder. Log back in as User 2 and again open the word-processing program. Tell the word processor to open the file. Start from the root © Jones & Bartlettof the hard Learning, drive, and LLCtype in the file’s full path name.© What Jones happens? & Bartlett Learning, LLC NOT FORE3. SALERiko is wORriting DISTRIBUTION a program. Bob’s computer contains a compilerNOT that FOR SALE OR DISTRIBUTION will take Riko’s source code (the program she’s written) and produce an executable program file (with an “.exe” suffix). Thus, we have three users of interest: Bob, Riko, and everyone else, and these files: the compiler, Riko’s written program, and the executable program built by the compiler. © Jones & Bartlett Learning,The program LLC is to be protected according© toJones the security & Bartlett policy given Learning, in LLC TABLE 4.6 NOT FOR SALE OR DISTRIBUTION. Answer the following questionsNOT based FOR on this SALE scenario. OR DISTRIBUTION

TABLE 4.6 Policy for Protecting Riko’s Custom Program

#© Requirement Jones & Bartlett Learning, LLC © JonesRisks & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 1 Everyone shall have execute access to the compiler program. 1, 2

2 Riko shall have full access to the program’s source code. 2, 4, 5

© Jones3 & Bartlett Riko shall Learning, have full access LLC to the program’s executable file. © Jones & Bartlett Learning,2, 5 LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 4 Bob shall have read and execute access to the program’s executable file. 1, 2, 4, 5

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning,© Jones LLC & Bartlett Learning LLC, an Ascend Learning© Jones Company. & NOT Bartlett FOR SALE Learning, OR DISTRIBUTION. LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 170 Chapter 4 Sharing Files

a. Use Unix permission flags to provide security controls for Riko’s file. © Jones & BartlettMake t heLearning, list of permissions LLC in the format of Table 4.3.© Jones & Bartlett Learning, LLC NOT FOR SALEb. Make OR a lis DISTRIBUTIONt of the advantages in solving this problem NOTwith Unix FOR SALE OR DISTRIBUTION permission flags versus using Windows “professional” ACLs. Which would you prefer? Why? c. Make a list of the advantages in solving this problem with Windows professional ACLs versus using Windows home edition ACLs. Which © Jones & Bartlett Learning,would LLC you prefer? Why? © Jones & Bartlett Learning, LLC NOT FOR SALE ORE4. DISTRIBUTION Apply Transitive Trust to a computer youNOT use. IdentifyFOR SALE organizations OR DISTRIBUTION that you implicitly trust, particularly the hardware and software vendors that provide the programs you run on your computer. Also note any users who can modify programs you would typically use, including administrative users. © Jones & Bartlett Learning, LLCE5. (Windows Professional© only)Jones Following & Bartlett the example Learning, described LLC in Figure NOT FOR SALE OR DISTRIBUTION 4.15, create a survey folderNOT that FOR shares SALE files between OR DISTRIBUTION two users. Capture and save or print out each window that pops up as you set up the correct access situation. Explain each step you take and what happens. After setting up the appropriate ACL on the folder, create a file in the folder. Use the “Advanced” display (as in Figure 4.15) to show the ACL inherited by © Jones & theBartlett newly created Learning, file. LLC © Jones & Bartlett Learning, LLC NOT FORE6. SALELocate the OR event DISTRIBUTION log on your own computer. Examine the NOTlog and FOR locate SALE OR DISTRIBUTION events caused by a recent action of yours (logging in, for example). Print out that part of the log, highlighting the entries caused by your behavior. Explain why you believe the log entry reflects your own action.

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION

© Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION