Design Principles for Secure Mechanisms C Edward Chow

  • Slides: 16
Download presentation
Design Principles for Secure Mechanisms C. Edward Chow CS 691 – Chapter 13 of

Design Principles for Secure Mechanisms C. Edward Chow CS 691 – Chapter 13 of Matt Bishop cs 691 1 chow

Design Principles for Security Mechanisms n Based on the ideas of simplicity and restriction.

Design Principles for Security Mechanisms n Based on the ideas of simplicity and restriction. n J. Saltzer and M. Schroeder Proceeding of IEEE 1975 describes 8 principles for security mechanism l Least Privileges l Fail-Safe Defaults l Economy of Mechanism l Complete Mediation l Open Design l Separation of Privilege l Least Common Mechanism l Psychological Acceptability cs 691 2 chow

Overview Simplicity makes designs and mechanisms easy to understand. n Simplicity reduces the potential

Overview Simplicity makes designs and mechanisms easy to understand. n Simplicity reduces the potential for inconsistencies within a policy or set of policies. n Minimizing the interaction of system components minimizes the number of sanity checks on data being transmitted among components. n Restriction minimizes the power of an entity. l The entity can access only information it needs. l Only communicates with other entities when necessary, and in as few and narrow ways as possible. n cs 691 3 chow

Examples n n n Sendmail reads configuration data from a binary file, compiled (freezing)

Examples n n n Sendmail reads configuration data from a binary file, compiled (freezing) from a text version of the configuration file. 3 interfaces: l The mechanism that edits the text configuration file. l The mechanism that comples (freezes) the text file. l The mechanism sendmail used to read the binary (frozen) file. Version control problem. What if text configuration file is newer than the binary file. Sendmail warns the user? Should sendmail rechecks the parameters in configuration file? If the compiler allows the string name as default UID (daemon) while the sendmail accepts only integer as UID, the input routine of sendmail will read “daemon” and return error value 0. 0 as UID is root! cs 691 4 chow

Example for Avoiding Inconsistency in Policies Policy rule 1: TA needs to report any

Example for Avoiding Inconsistency in Policies Policy rule 1: TA needs to report any cheating. n Policy rule 2: ensure the privacy of student files. n Case: l TA reminds student file not submitted. l Student asks TA to look for files in student’s directory. l TA finds two files. Unsure which files. l TA reads the first file, it turns out to be written by other l TA reads the 2 nd file, it turns out identical except names. l TA reports the cheating. l Student charges TA violating his privacy by reading the first set of files. n cs 691 5 chow

Examples of Restrictions Government officials are denied access to info for which they have

Examples of Restrictions Government officials are denied access to info for which they have no need (the “need to know” policy). They cannot communicate that which they do not know. n Case: Imparting information by not communicating Bernstein and Woodward, Watergate reporters, ask the source to hang up if information was inaccurate, remain on the line if the information was accurate. n cs 691 6 chow

Principle of Least Privileges n n n A subject should be given only those

Principle of Least Privileges n n n A subject should be given only those privileges that it needs in order to complete its task. Exception case? : for certain action, subject’s access right can be augmented but relinquished immediately on completion of the action. Append right? vs. write right In practice, most system does not have the granularity of privileges and permission required to apply this principle precisely. The designers of mechanisms try their best? Does the root/administrator user concept violate the above rule? cs 691 7 chow

Example of Tomcat User Access Control Files <? xml version='1. 0' encoding='utf-8'? > <tomcat-users>

Example of Tomcat User Access Control Files <? xml version='1. 0' encoding='utf-8'? > <tomcat-users> <rolename="cs 526 stu"/> <rolename="software. Requester"/> <rolename="tomcat"/> <rolename="cs 526 prof"/> <rolename="role 1"/> <rolename="manager"/> <rolename="admin"/> <username="cs 526 stu" password="xxxx" roles="cs 526 stu, manager"/> <username="software. Requester" password="sesame" roles="software. Requester"/> <username="tomcat" password="xxxx" roles="tomcat"/> <username="cs 526 prof" password="xxxx" roles="tomcat, cs 526 prof, manager, admin"/> <username="role 1" password="xxxx" roles="role 1"/> <username="both" password="xxxx" roles="tomcat, role 1"/> </tomcat-users> n User with Admin role can start/shutdown the Tomcat web server. n User with Manage role can insert/delete web applications. n User with cs 526 stu role can read cs 526 web pages. n When the user first accesses the web site, the user will be asked for the username and password. cs 691 8 chow

Mail Server Access Rights n n n n Mail server accepts mail from Internet

Mail Server Access Rights n n n n Mail server accepts mail from Internet and copies the msgs to a spool directory. A local server will complete delivery. Mail server needs rights l to access network port 25, l To create files in the spool directory l To alter those files (copy msg to file, rewrite delivery address if needed, incase of aliases? ) It should surrender the right when finishes. It should not access the users’ files. Local server only has the read and delete access to spool direcotry. The admin should only be able to access subjects and objects involved in mail queueing and delivery, in case it is compromised? ? cs 691 9 chow

Principle of Fail-Safe Defaults Unless a subject is given explicit access to an object,

Principle of Fail-Safe Defaults Unless a subject is given explicit access to an object, it should be denied access to that object. n If the subject is not able to complete its action/task, it should undo those changes it made in the security state of the system before it terminates. If the program fails, the system is still safe. n What happens if the program crashes, not fails? n Mail server should not write msg to a different directory than spool (if it is full). It should just close the network connection, issue an error msg and stop. n cs 691 10 chow

Principle of Economy of Mechanism n n n Security mechanisms should be as simple

Principle of Economy of Mechanism n n n Security mechanisms should be as simple as possible. Fewer errors; less checking and testing Bad example: Mechanism on host A allows access based on the ident protocol. Ident protocol sends the user name associated with a process that has a TCP connection to a remote host. A compromised host can send any identity. Interface to other modules are particular suspect. Example of Do. S attack using Finger protocol. It returns infinite streams of characters. Client will crash. cs 691 11 chow

Principle of Complete Mediation All accesses to objects be checked to ensure that they

Principle of Complete Mediation All accesses to objects be checked to ensure that they are allowed. n Unfortunately, most OS will check the access right when the object was “open”, but will not check access right again when the client program reads. The OS cached the results of the first check. n If the owner disallows reading the file after the file descriptor is issue, the kernel will still allow the client process to read. n DNS server caches Domain name-IP address entries. The attacker can “poison” the cache with incorrect entries, a host will be routed to a spoof site. n cs 691 12 chow

Principle of Open Design n n n The security of a mechanism should not

Principle of Open Design n n n The security of a mechanism should not depend on the secrecy of its design or implementation. Attack such as disassembly and analysis, dumpsterdiving for source code, Isn’t “Security through obscurity” a good principle? Example: cryptograph software, algorithms. How about proprietary softare/trade secrets? The famous Content Scramble System (CSS). 1999 break by Norway group. Plaitiff’s lawyer filed law suit containing the source code! cs 691 13 chow

Principle of Separation of Privilege A system should not grant permission based on a

Principle of Separation of Privilege A system should not grant permission based on a single condition. n Separation of duty principle. n Company checks > 75 K signed by two officers. n Berkeley Unix allows a user to change to root if l The user knows root password. l The user is in the wheel group (the group with GID 0). n cs 691 14 chow

Principle of Least Common Mechanism n n n Mechanisms used to access resources should

Principle of Least Common Mechanism n n n Mechanisms used to access resources should not be shared. Virtual machie/memory concept follows this. Internet access route should not be shared? How to restrict the attackers’ access to the segment of Internet connected to a web site? Purdue SYN intermediary system. Secure Collective Defense Project. cs 691 15 chow

Principle of Psychological Acceptability Security mechanisms should not make the resource more difficult to

Principle of Psychological Acceptability Security mechanisms should not make the resource more difficult to access than if the security mechanisms were not present. n Example SSH. n Example: not allow access after 3 tries. n cs 691 16 chow