home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume21 / cops / part04 < prev    next >
Encoding:
Internet Message Format  |  1990-03-21  |  46.4 KB

  1. Subject:  v21i026:  System ecurity analysis tool, Part04/05
  2. Newsgroups: comp.sources.unix
  3. Approved: rsalz@uunet.UU.NET
  4. X-Checksum-Snefru: 2e9b24a9 19930f06 5a050ca0 502b7e91
  5.  
  6. Submitted-by: Dan Farmer <df@sei.cmu.edu>
  7. Posting-number: Volume 21, Issue 26
  8. Archive-name: cops/part04
  9.  
  10. #    This is a shell archive.
  11. #    Remove everything above and including the cut line.
  12. #    Then run the rest of the file through sh.
  13. #----cut here-----cut here-----cut here-----cut here----#
  14. #!/bin/sh
  15. mkdir cops 2>/dev/null
  16. mkdir cops/docs 2>/dev/null
  17. mkdir cops/src 2>/dev/null
  18. mkdir cops/extensions 2>/dev/null
  19. # shar:    Shell Archiver
  20. #    Run the following text with /bin/sh to create:
  21. #    cops/docs/cops
  22. #    cops/docs/cron
  23. #    cops/docs/dev
  24. #    cops/docs/dir
  25. #    cops/docs/file
  26. #    cops/docs/group
  27. #    cops/docs/home
  28. #    cops/docs/is_able
  29. #    cops/docs/kuang.1
  30. #    cops/docs/kuang.man
  31. # This archive created: Tue Jan 30 23:27:05 1990
  32. # By:    dan (Purdue University)
  33. echo shar: extracting cops/docs/cops '(1742 characters)'
  34. cat << \SHAR_EOF > cops/docs/cops
  35. .TH COPS 1 "December 31, 1989"
  36. .UC 4
  37. .SH NAME
  38. cops \- Checks security of system for potential danger areas.
  39. .SH SYNOPSIS
  40. .B cops
  41. .SH DESCRIPTION
  42. .I cops
  43. runs a set of programs that each check a different aspect of security
  44. on a Unix system.  If any potential security holes do exist, the results
  45. are either mailed or saved to a report file.
  46. .PP
  47. The following programs are currently executed by
  48. .I cops
  49. \-\- see the appropriate man page or other documentation for 
  50. more information on each of the following:
  51. .Ps
  52. root.chk    dev.chk       dir.chk
  53. file.chk    group.chk     home.chk
  54. rc.chk      passwd.chk    pass.chk
  55. user.chk    cron.chk
  56. .Pe
  57. In addition, it runs the U-kuang expert system, which runs these
  58. additional programs:
  59. .Ps
  60. init_kuang  kuang         addto
  61. clearfiles  filewriters   members
  62. .Pe
  63. .PP
  64. .I cops
  65. uses three internal variables that may be changed to determine where
  66. who gets any reports generated, if it is to mailed or saved to a file.
  67. The variable $SECURE_USERS is used to determine who gets mailed any
  68. results.  $SECURE is the directory that
  69. .I cops
  70. is in.  And finally, if the variable $MAIL is set to be NO, then
  71. .I cops
  72. will save the report in a file called
  73. .I report.$$
  74. , where $$ is the process id number of cops (this will change
  75. everytime), otherwise,
  76. .I cops
  77. will mail the report to the whomever is listed in $SECURE_USERS.
  78. .SH FILES
  79. .Ps
  80. root.chk    dev.chk      dir.chk
  81. file.chk    group.chk    home.chk
  82. rc.chk      passwd.chk   pass.chk
  83. user.chk    cron.chk     init_kuang
  84. kuang       addto        clearfiles
  85. filewriters members
  86. .Pe
  87. .SH "SEE ALSO"
  88. .Ps
  89. root.chk(1)    dev.chk(1)      dir.chk(1) 
  90. file.chk(1)    group.chk(1)    home.chk(1) 
  91. rc.chk(1)      passwd.chk(1)   pass.chk(1) 
  92. user.chk(1)    cron.chk(1)
  93. .Pe
  94. SHAR_EOF
  95. echo shar: extracting cops/docs/cron '(973 characters)'
  96. cat << \SHAR_EOF > cops/docs/cron
  97. .TH CRON.CHK 1 "December 31, 1989"
  98. .UC 4
  99. .SH NAME
  100. cron.chk  \- Checks contents of cron file(s) for potential danger.
  101. .SH SYNOPSIS
  102. .B cron.chk
  103. .SH DESCRIPTION
  104. .I cron.chk
  105. checks pathnames and files inside the cron files for writability.
  106. It filters out all paths or files that have a /tmp, /dev/null,
  107. or /dev/*ty, plus everything after a ">"; e.g. if crontab is writing
  108. to a file it doesn't care.
  109. .PP
  110. Since cron is run with root privileges, any file that root uses as input
  111. inside the cron files or any program that root executes is potential danger.
  112. World writable files can be changed by anyone to cause a root owned process
  113. to give away unwarranted privileges.
  114. .SH FILES
  115. /usr/lib/cron
  116. /usr/spool/cron/crontabs/*
  117. .SH "SEE ALSO"
  118. is_writable(1)
  119. .SH BUGS
  120. Spurious messages can occur; a more stringent method (if perhaps less
  121. careful of a check) would be to test just the 6th field, instead of
  122. all the fields after the fifth.  Also throwing away /tmp, etc. could
  123. be a mistake.
  124. SHAR_EOF
  125. echo shar: extracting cops/docs/dev '(873 characters)'
  126. cat << \SHAR_EOF > cops/docs/dev
  127. .TH DEV.CHK 1 "December 31, 1989"
  128. .UC 4
  129. .SH NAME
  130. dev.chk  \- Checks writability of devices and special files.
  131. .SH SYNOPSIS
  132. .B dev.chk
  133. [
  134. \-g
  135. ]
  136. .SH DESCRIPTION
  137. .I dev.chk
  138. checks the permissions of /dev/mem, /dev/kmem, and
  139. all devs listed in the file /etc/fstab (the
  140. .I mount
  141. command would be
  142. a preferable way of getting the file system name, but the syntax of the
  143. output is variable from machine to machine), and flags them if they are
  144. readable by using the
  145. .I is_readable
  146. command, unless they are NFS mounted,
  147. in which case they are ignored.  It also checks for unrestricted NFS
  148. mountings in /etc/exports, and finally checks a small number of key files
  149. that should not be world readable.
  150. .PP
  151. options are:
  152. .TP
  153. .B \-g
  154. Check for group writability as well as world.
  155. .SH FILES
  156. .Ps
  157. /usr/adm/sulog
  158. /etc/btmp
  159. /.netrc 
  160. /etc/fstab
  161. /etc/exports
  162. L.sys
  163. .Pe
  164. .SH "SEE ALSO"
  165. is_writable(1)
  166. SHAR_EOF
  167. echo shar: extracting cops/docs/dir '(625 characters)'
  168. cat << \SHAR_EOF > cops/docs/dir
  169. .TH DIR.CHK 1 "December 31, 1989"
  170. .UC 4
  171. .SH NAME
  172. dir.chk  \- Checks critical directories for writability.
  173. .SH SYNOPSIS
  174. .B dir.chk
  175. [
  176. \-g
  177. ] name ...
  178. .SH DESCRIPTION
  179. By default
  180. .I dir.chk
  181. checks all directories in the file
  182. .I dir.chklst
  183. to see if they are world writable.
  184. .PP
  185. The configuration file is merely a list of directories, one per line,
  186. that are checked by
  187. .I dir.chk.
  188. Any line starting with a "#" is ignored.
  189. .PP
  190. options are:
  191. .TP
  192. .B \-g
  193. Check for group writability as well as world.
  194. .SH EXAMPLE
  195. .Ps
  196. #   Lines are of the format:
  197. #    /path/to/file
  198. /etc
  199. /usr
  200. /usr/bin
  201. .Pe
  202. .SH FILES
  203. dir.chklst
  204. .SH "SEE ALSO"
  205. is_writable(1)
  206. SHAR_EOF
  207. echo shar: extracting cops/docs/file '(613 characters)'
  208. cat << \SHAR_EOF > cops/docs/file
  209. .TH FILE.CHK 1 "December 31, 1989"
  210. .UC 4
  211. .SH NAME
  212. file.chk  \- Checks critical files for writability.
  213. .SH SYNOPSIS
  214. .B file.chk
  215. [
  216. \-g
  217. ] name ...
  218. .SH DESCRIPTION
  219. By default
  220. .I file.chk
  221. checks all files in the file
  222. .I file.chklst
  223. to see if they are world writable.
  224. .PP
  225. The configuration file is merely a list of files, one per line,
  226. that are checked by
  227. .I file.chk.
  228. Any line starting with a "#" is ignored.
  229. .PP
  230. options are:
  231. .TP
  232. .B \-g
  233. Check for group writability as well as world.
  234. .SH EXAMPLE
  235. .Ps
  236. #   Lines are of the format:
  237. #    /path/to/file
  238. /etc/*
  239. /.profile
  240. .Pe
  241.  
  242. .SH FILES
  243. file.chklst
  244. .SH "SEE ALSO"
  245. is_writable(1)
  246. SHAR_EOF
  247. echo shar: extracting cops/docs/group '(654 characters)'
  248. cat << \SHAR_EOF > cops/docs/group
  249. .TH GROUP.CHK 1 "December 31, 1989"
  250. .UC 4
  251. .SH NAME
  252. group.chk  \- Checks group file(s) for inconsistencies.
  253. .SH SYNOPSIS
  254. .B group.chk
  255. .SH DESCRIPTION
  256. .I group.chk
  257. checks the group files -- /etc/group and ypgroup if yellow pages are being
  258. used -- for incorrect number of fields, duplicate groups, non-alphanumeric
  259. group names, blank lines, and non-numeric group id's. 
  260. .SH FILES
  261. .Ps
  262. /etc/group
  263. group.chk uses the process id as a temporary file name for the ypchecking.
  264. .Pe
  265. .SH "SEE ALSO"
  266. .Ps
  267. group(5)
  268. .Pe
  269. Awk part based on _passwd_ from _The AWK Programming Language_, page 78.
  270. .SH BUGS
  271. It doesn't use the exact syntax of yellow pages to check for errors.
  272. SHAR_EOF
  273. echo shar: extracting cops/docs/home '(270 characters)'
  274. cat << \SHAR_EOF > cops/docs/home
  275. .TH HOME.CHK 1 "December 31, 1989"
  276. .UC 4
  277. .SH NAME
  278. home.chk  \- Checks user home directories for world writability.
  279. .SH SYNOPSIS
  280. .B home.chk
  281. .SH DESCRIPTION
  282. This checks all of the user home directories (it calls getpwent() to
  283. get user directories) for world writability.
  284. SHAR_EOF
  285. echo shar: extracting cops/docs/is_able '(406 characters)'
  286. cat << \SHAR_EOF > cops/docs/is_able
  287. .TH IS_ABLE 1 "December 31, 1989"
  288. .UC 4
  289. .SH NAME
  290. is_writable, is_readable\- Check for write/read\-ability of a file.
  291. .SH SYNOPSIS
  292. .B is_writable
  293. [
  294. \-g
  295. ] file
  296. .PP
  297. .B is_readable
  298. [
  299. \-g
  300. ] file
  301. .SH DESCRIPTION
  302. By default
  303. .I is_writable
  304. and
  305. .I is_readable
  306. both check a file to see if it is writ/read-able by group all.  It
  307. returns a "0" if this is true.
  308. .PP
  309. options are:
  310. .TP
  311. .B \-g
  312. Check for group writability.
  313. SHAR_EOF
  314. echo shar: extracting cops/docs/kuang.1 '(2809 characters)'
  315. cat << \SHAR_EOF > cops/docs/kuang.1
  316. NAME
  317.     kuang -    rule based system to find inconsistencies in the security
  318.         configuration of a BSD 4.2 Unix.
  319.  
  320. SYSNOPSIS
  321.     edit init_kuang to reflect attackers initial goals
  322.     sh kuang > tracelog
  323.  
  324. DESCRIPTION
  325.     Kuang is a rule based system that searches for a path from an
  326. initial set of privileges to a desired set.  Given a goal, kuang uses
  327. rules to determine a set of subgoals which are sufficient to achieve the
  328. initial goal.  The rules are then applied to the subgoals to determine a
  329. set of sub-subgoals, etc.  This process repeats until there are no new
  330. goals to examine.  If a subgoal can be directly achieved using the
  331. attacker's initial privileges, then a line is added to the file
  332. 'Success' that describes how the attacker can achieve the top level goal.
  333.     The rules for Unix can be divided into three categories
  334. depending on whether they deal with files, users, or groups.  Kuang
  335. embodies these rules in three shell scripts, dofiles, douids, and
  336. dogids.  Goals that have been examined are recorded in the files
  337. files.p, uids.p, and gids.p.  The files files.n, uids.n, and gids.n
  338. record the goals that will be examined next.  The shell script, kuang,
  339. applies the goals in each .n file to the corresponding rule file.
  340.     The initial privileges and ultimate goal are set up in the shell
  341. script, init_kuang.  If the program finds a sequence of rules that
  342. connects the initial privileges to the ultimate goal, that sequence will
  343. be recorded in the file Success.  Each step in the sequence is recorded
  344. as a pair of words.  For example, the line "gids users, write
  345. /usr/bob/.login, trojan baldwin, grant staff, write /etc, replace
  346. /etc/passwd" means that the password file can be replaced because the
  347. group staff has write access to the directory /etc, and you can get
  348. access to the staff group because the .login file for the user bob can
  349. be written by members of the group users, which is one of your initial
  350. privileges.
  351.  
  352. FILES
  353.     *.n        - goals to process in the next round.
  354.     *.x        - goals currently being processed.
  355.     *.p        - goals that have been examined.
  356.     uids.*        - goals related to user IDs.
  357.     gids.*        - goals related to group IDs.
  358.     files.*        - goals related to files.
  359.     Success        - log of holes that are found.
  360.     tracelog    - step by step trace of search.
  361.  
  362. AUTHOR
  363.     Bob Baldwin, MIT Lab for Computer Science, Programming and
  364. Systems Group.  
  365. E-Mail Address   :
  366.  
  367. baldwin@xx.lcs.mit.edu
  368. ...!mit-eddie!baldwin
  369.  
  370. Kuang was inspired by William Gibson's book, Neuromancer, which won the
  371. 1984 Hugo award.  In honor of Gibon's book, systems that use rule based
  372. searching to find security holes should be called a kuang-type systems.
  373.  
  374. BUGS
  375.     Needs to be smarter about command files (e.g., it should look
  376. for writeable files executed via crontab).
  377.     Doesn't include rules for all the programs that run with
  378. their user id set to root.
  379. SHAR_EOF
  380. echo shar: extracting cops/docs/kuang.man '(36594 characters)'
  381. cat << \SHAR_EOF > cops/docs/kuang.man
  382. .ps 12
  383. .vs 12
  384. .PH ````
  385. .nr W 80
  386. .in 0
  387. .ce 3
  388. \fBKuang: Rule-Based Security Checking\fP
  389. Robert W. Baldwin
  390. MIT, Lab for Computer Science Programming Systems Research Group
  391.  
  392. .PP
  393. The security of data in a particular computer depends both on the
  394. integrity of the computer's protection mechanism and on the consistent
  395. uses of those mechanisms by the users of that computer.  Software
  396. verification and specification technology addresses the integrity
  397. problem, but very little has been done to insure that the protection
  398. mechanisms are being used consistently.  This paper describes a
  399. rule-based system that finds inconsistencies in the set of protection
  400. decisions made by the users of an information system.
  401.  
  402. .PP
  403. \fBIntroduction\fP
  404. .PP
  405. The trend in commercial computer systems has been to increase the the
  406. number of mechanisms that allow users to execute commands and to
  407. increase the number of mechanisms that allow users to share
  408. information.  All of these mechanisms must be considered to be part of
  409. the protection system.  For example, if users can specify a set of
  410. commands that will be executed automatically every night, then the
  411. database that contains these commands, and the program that processes
  412. the database must be considered part of the protection system.  Even
  413. if the program has been certified to work correctly, the access list
  414. for the command database and the set of privileges available to the
  415. processing program must be considered to be part of the protection
  416. configuration \**
  417. .FS
  418. The protection configuration is a subset of the
  419. access matrix.  The access matrix specifies how each user can access
  420. each object.  I use the term
  421. .ul
  422. protection configuration
  423. to refer to the portion of the access matrix concerning the objects 
  424. used by any piece of the protection system.
  425. .FE
  426. of that computer.  The problem
  427. considered in this paper is ensuring that the protection configuration
  428. is consistent with the user's security goals.
  429. .PP
  430. The goal of flexible information processing and sharing makes
  431. computers more useful, but that goal also makes protection systems
  432. larger and more complex.  The large number of interactions between the
  433. pieces of the protection system makes it hard for the users to make
  434. protection decisions correctly.  This is particularly true when parts
  435. of an information system are managed by novices (e.g., personal work
  436. stations).  Users need automated tools for analyzing the interactions
  437. between the pieces of a large protection system.
  438. .PP
  439. This paper describes a class of systems, called Kuang-type \**
  440. .FS
  441. This
  442. project was inspired by William Gibson's book
  443. .ul
  444. Neuromancer
  445. , which won the 1984 Nebula award for best science fiction novel.
  446. Gibson's book describes innovative ways to visualize the structure of
  447. information systems.  In particular, it describes a program called a
  448. Kuang Grade Mark 11 Ice Breaker (
  449. .ul
  450. ice
  451. refers to the mechanisms used
  452. to protect access to information).  The program described in this memo
  453. is a greatly simplified version of that ice breaker program.
  454. .FE
  455. systems, for analyzing large protection configurations.  
  456. This class of systems is illustrated by a Simple Unix Kuang program
  457. (SU-Kuang) that answers a question about a Unix protection
  458. configuration.  The question is "what if an attacker had access to a
  459. given set of privileges (groups), could that attacker become
  460. super-user?".  SU-Kuang allows a system manager to perform a simple
  461. what-if analysis of a protection configuration, and in this mode it
  462. helps the manager make protection decisions.  A typical use of SU-Kuang
  463. is to run it periodically to see if access to the group, World, (i.e.,
  464. minimum privileges) is sufficient to become super-user.  In this mode
  465. Kuang functions as an automatic security checker.  SU-Kuang is just one
  466. possible tool for helping users cope with the complexity of a large
  467. protection system.  Some other desirable tools are mentioned at the
  468. end of this paper.
  469. .PP
  470. The heart of the SU-Kuang program is a set of rules that describe the
  471. Unix (BSD4.2) protection system from the point of view of an
  472. attacker.  For example, one rule says that if an attacker can write
  473. the file /etc/passwd (the authentication database), then that attacker
  474. can become super-user.  To decide whether to use this rule, an
  475. attacker would examine the protection configuration of the target
  476. machine to see what privileges are required to write the file
  477. /etc/passwd.  Using similar rules, SU-Kuang can answers the what-if
  478. question by performing a backward chaining search of the protection
  479. configuration (see figure
  480. .ul
  481. goal-tree
  482. ).  Given a goal, like become
  483. super-user, SU-Kuang examines all the rules to produce a list of
  484. subgoals that would be sufficient to meet its goal.  Recursively, each
  485. of the subgoals can be processed to produce a list of sub-subgoals.
  486. The process continues until there are no new goals.  At each step, if
  487. a goal can be achieved using the initial privileges of the attacker,
  488. SU-Kuang prints out a message that describes the sequence of steps
  489. that leads from the initial goals to the target goal.
  490. .sp
  491. .sp
  492. .nf
  493.              Become Super-User
  494.              /                     \\
  495.             /                       \\
  496.    Replace /etc/passwd      Write /.rhosts
  497.         /        \\                      .
  498.        /          \\                    . .
  499.  Become Staff   Write /etc
  500.      .                                   .
  501.     . .                                 . .
  502.    .   .                               .   .
  503.  
  504.  
  505. .fi
  506. (Example of a goal-tree used by SU-Kuang.  The nodes of the tree
  507. are goals desired by an attacker.
  508. The children of each node are the subgoals that are sufficient to
  509. achieve the parent goal.  The goal-tree used by SU-Kuang is a pure
  510. OR-tree.  Any one of the subgoals is sufficient to grant the parent goal.)
  511.  
  512. .PP
  513. Notice that SU-Kuang does not find holes in the Unix operating system.
  514. It finds mistakes in the protection configuration.  For example,
  515. SU-Kuang found a security hole on an MIT machine that resulted from
  516. two incorrect decisions about who should have write access to start-up
  517. command files.  SU-Kuang points out holes by describing the sequence
  518. of steps used to exploit the hole.  The sequence SU-Kuang printed was:
  519. "member MIT, write ~tom/.cshrc, member A_STAFF, write ~dick/.login,
  520. member STAFF, write /etc, replace /etc/passwd, become ROOT".  This
  521. means that the attacker had access to the group MIT, which all users
  522. are in.  The MIT group had write access to one of the start-up command
  523. files executed automatically when the user Tom (not his real
  524. name) logged in.  Anyone in the MIT group could add commands to Tom's
  525. start-up command file, and have these commands executed with Tom's
  526. privileges next time Tom logged into the machine.  Tom is a member of
  527. the Athena Staff group, which is not particularly privileged.  However,
  528. the A_STAFF group does have write access to one of Dick's start-up
  529. command files, and Dick is a member of the Staff group, which is one
  530. of the most privileged groups.  In fact, members of the staff group
  531. can write the directory that contains the password database.  Write
  532. access to the directory allows staff members to delete and recreate
  533. the password database.  By creating a password database that has a
  534. known password for the super-user account, members of the staff group
  535. can acquire super-user privileges.
  536. .PP
  537. My experience running SU-Kuang is that these mistakes are created
  538. periodically because the users do not understand the interactions
  539. between the numerous pieces of the Unix protection system.  However,
  540. it is not complicated to write a program that can explore all the
  541. possible interactions.  SU-Kuang itself is a simple program, and
  542. generating the rules that describe the pieces of the protection system
  543. is also easy (see section
  544. .ul
  545. rules
  546. ).  The simplifying idea is to
  547. describe the protection system in terms of how an attacker can
  548. manipulate it.  Using this framework, performing the analysis is easy.
  549. .PP
  550. I consider any system that uses attacker-oriented rules to be a
  551. Kuang-type system.  The remainder of this paper describes the Unix
  552. Kuang system I built to determine whether a given set of privileges is
  553. sufficient to become super-user.  The nature of the rules and the
  554. process used to deduce them is illustrated in section
  555. .ul
  556. rules
  557. , which lists the set of rules used to model Unix.  The model used by
  558. SU-Kuang was incomplete in several ways, so section
  559. .ul
  560. extensions
  561. describes some of the features of Unix that were not
  562. modeled.  The incomplete model turned out to be very effective at
  563. finding security holes, so section
  564. .ul
  565. experience
  566. presents the
  567. lessons learned from running SU-Kuang on the computers at MIT.  The last
  568. section discusses other kinds of Kuang systems and their benefits.
  569. .PP
  570. \fBRules to model Unix\fP
  571. .PP
  572. The first step in generating attacker-oriented rules is to determine
  573. the types of goals that are relevant to an attacker of the target
  574. system.  These goal types can be deduced from the basic protection
  575. model of the operating system, so before presenting the rules, the
  576. Unix protection model is summarized.  The second step is to make a
  577. list of the pieces of the protection system and to examine each one in
  578. terms of the goals an attacker could achieve using each piece.
  579. The pieces of the Unix protection system that were included in the
  580. prototype's model are listed below along with the rules used to
  581. describe each piece.
  582. .PP
  583. \fBSummary of the Unix protection model\fP
  584. .PP
  585. The Unix protection model concerns processes and files.  Associated
  586. with each process is one user identifier UID, and one or more group
  587. identifiers (GIDs).  The UID and GIDs are generally inherited when one
  588. process forks another.  One exception is that the super-user (UID =
  589. 0) can change the UID and GIDs of his current process.  The other
  590. exception is that a user can associate a UID and GID with a program
  591. stored in the file system.  When anyone runs such a program, the
  592. process executing that program will run with the stored user and/or
  593. group IDs.
  594. .PP
  595. Associated with each file is one UID, one GID, and nine permission
  596. bits.  The nine permission bits are divided into three groups to
  597. specify the read, write, and execute rights for the file's owner
  598. (specified by the UID), for the members of the file's group (specified
  599. by the GID), and for all others (the World group).  Directories are a
  600. special case of files.  For a directory, read permission allows a
  601. process to list a directory, write permission allows a process to
  602. create or delete files in that directory, and execute permission
  603. allows a process to resolve names in that directory even if the
  604. directory is unreadable.
  605. .PP
  606. When a process accesses a file or directory it is given either owner,
  607. group, or world access permissions, but only one of those three.
  608. Owner access is granted if the process and file UIDs match; Group
  609. access is granted if the process and file UIDs are different but the
  610. file's GID is in the list of GIDs for the process; otherwise, World
  611. access is granted.  The super-user has full access to all files and
  612. directories.  Only the owner or the super-user can change the access
  613. permissions of a file.
  614. .PP
  615. \fBThree types of attacker goals\fP
  616. .PP
  617. The Unix protection model deals with users, groups, and files, so
  618. those are the three types of goals that will concern an attacker.  The
  619. canonical user goal is "execute one of the attacker's programs with a
  620. particular UID".  For example, the top level goal is "execute a
  621. program chosen by the attacker under UID zero (i.e., as
  622. super-user)".  It is important that the attacker be able to specify
  623. the program to be executed with super-user privileges.  The login
  624. program runs as super-user, and anyone can run it.  The attacker wants
  625. to specify the computation performed with super-user privileges.  One
  626. scheme for getting access to super-user privileges is to write the
  627. command file that is executed automatically when the super-user logs
  628. in.
  629. .PP
  630. Group ID goals are similar.  The canonical form of a GID goal is
  631. "execute an arbitrary program with a particular group ID".  One
  632. possible way to achieve this goal is to add the attacker's UID to the
  633. list of users allowed to access the desired group.  This authorization
  634. database is stored in the file /etc/group.
  635. .PP
  636. The canonical file goal is "obtain read/write/replace access to a particular
  637. file".  Achieving a file goal usually involves getting access to a
  638. particular group or user ID.  However, if the attacker wants to replace
  639. a file, one way to do that is to delete the old file and create a new
  640. one.  That can be done if the attacker has write or replace access to
  641. the directory that contains the target file.
  642. .PP
  643. In summary, SU-Kuang considers three types of goals for an attacker of
  644. Unix: user, group, and file.  Each type of goal can lead to subgoals
  645. of the same or different type.
  646. .PP
  647. \fBSome pieces of the Unix protection system\fP
  648. .PP
  649. This section presents the rules that describe many of the pieces of the
  650. Unix protection system.  Section
  651. .ul
  652. extensions
  653. describes the
  654. significant pieces that were left out of the prototype's model.  The
  655. pieces of the Unix protection system include all programs, like 
  656. .ul
  657. login,
  658. that have the set user/group ID property.  It also  includes programs
  659. like 
  660. .ul
  661. cron
  662. (cron executes commands in the future) that
  663. are forked off by processes that run with special user or group IDs.
  664. Finally, programs like 
  665. .ul
  666. sh
  667. (a command interpreter) must be included
  668. in the protection system because when they are started they execute
  669. commands from a file using the privileges of the user invoking them.
  670. .PP
  671. Each rule describes how a piece of the protection system can be
  672. used by an attacker to achieve a desired goal in terms of the ability
  673. to achieve a subgoal.  The method used to achieve a goal given the
  674. subgoal may require that some condition be true.  For that reason the
  675. rules include a condition that can be tested to decide if the subgoal
  676. should be pursued.  The conditions are general predicates on the state
  677. of the protection configuration.  For example, the rule that says that
  678. an attacker can become the super-user by writing the password file,
  679. has the condition that the password file is writable by someone other
  680. than the super-user.
  681. .PP
  682. In the rules listed below, the notation \*Q/d/f\*U means a
  683. pathname for the file \*Qf\*U in the directory with pathname \*Q/d\*U.
  684. The goal, \*Qbecome U\*U, means to execute an arbitrary command under the
  685. user ID \*QU\*U.  The goal, \*Qmember G\*U, means the same thing for
  686. group \*QG\*U.  The goal, \*Qwrite /d/f\*U, means being able to write the
  687. file \*Q/d/f\*U.  Finally, \*Qreplace /d/f\*U, means being able to write
  688. \*Q/d/f\*U or being able to delete \*Q/d/f\*U and recreate it.
  689. .PP
  690. \fBThe file system\fP
  691. .PP
  692. Most programs in the protection system use the file hierarchy to
  693. locate their databases.  If the file hierarchy can be modified, then
  694. the protection system can be tricked into using the wrong database
  695. files.  The file hierarchy itself must be treated as one of the
  696. main databases in the protection configuration.
  697. .PP
  698. The notation \*QOwner(/d/f)\*U refers to the UID associated with the
  699. file \*Q/d/f\*U.  Similarly \*QGroup(/d/f)\*U refers to the file's GID.
  700. The expression \*QGroupWrite(/d/f)\*U is true if the file \*Q/d/f\*U can
  701. be written by the members of \*QGroup(/d/f)\*U.  The expression
  702. \*QWorldWrite(/d/f)\*U is true if the file can be written by members of
  703. the World group (i.e., all users).
  704. .sp
  705. Rules{
  706. .sp
  707. .ul
  708. <Goal/Condition/Subgoal/Note>
  709. .PP
  710. Replace /d/f Write /d/f
  711. .PP
  712. Replace /d/f Replace /d\**
  713. .FS
  714. The condition stops the
  715. recursion at the root directory of the file system.
  716. .FE
  717. .PP
  718. Write /d/f Become Owner(/d/f)\**
  719. .FS
  720. The owner of a file can
  721. always change the access permissions to allow owner write access.
  722. .FE
  723. .PP
  724. Write /d/f GroupWrite(/d/f) Member Group(/d/f)
  725. .PP
  726. Write /d/f WorldWrite(/d/f) Member World\**
  727. .FS
  728. This subgoal is
  729. is achievable by all users provided they can get to the file.  The
  730. notable exceptions are users logged in via anonymous ftp or uucp
  731. connections.  These users have restricted access to the file
  732. hierarchy.
  733. .FE
  734. .sp
  735. }
  736. .PP
  737. \fBlogin\fP
  738. .PP
  739. The login program uses two database to set the UID and GIDs of the
  740. user's command interpreter.  The contents of
  741. these databases and the protection of the databases themselves
  742. must be considered part of the protection configuration.
  743. .PP
  744. The user name \*Qroot\*U refers to the super-user.  The label, \*QU\*U, stands
  745. for an arbitrary UID including \*Qroot\*U.  The label, \*QG\*U, stands for
  746. an arbitrary GID.  The expression \*QUIDS(G)\*U expands to all the
  747. UIDs authorized to use the group \*QG\*U according to the files
  748. /etc/group or /etc/passwd.
  749.  
  750. .sp
  751. Rules{
  752. .sp
  753. .ul
  754. <Goal/Condition/Subgoal/Note>
  755.  
  756. Become U Replace /etc/passwd\**
  757. .FS
  758. This rule matches the goal \*QBecome root\*U.
  759. .FE
  760.  
  761. Member G Replace /etc/group
  762.  
  763. Member G Become UIDS(G)\**
  764. .FS
  765. The subgoal means to try to become any member of the group \*QG\*U.
  766. .FE
  767. .sp
  768. }
  769. .PP
  770. \fBrsh, rlogin, rcp\fP
  771. .PP
  772. Berkeley Unix includes several remote execution commands that greatly
  773. improve the usability of multiple Unix hosts connected by a network.
  774. The underlying authentication protocol does not resist an attacker
  775. that can transmit arbitrary messages on the network, but even if that
  776. problem was fixed, the databases used by these programs would have to
  777. be considered as part of the protection system.
  778. .PP
  779. The file /etc/hosts.equiv lists the names of the hosts that are
  780. trusted by the target machine's administrators.  If a user has an
  781. account on the target machine, and on one of the trusted hosts, then
  782. that user can log into the target machine from the trusted machine
  783. without supplying a password.  Users can list additional hosts (or
  784. other users) that they trust in a file (.rhosts) in their home
  785. directory.
  786. .PP
  787. The expression \*QNotEmpty(/d/f)\*U is true if the file /d/f exists and
  788. it is not empty.  The label, \*Q~U\*U, refers to the home directory of user
  789. \*QU\*U.
  790. .sp
  791. Rules{
  792. .sp
  793. .ul
  794. <Goal/Condition/Subgoal/Note>
  795. .PP
  796. Become U (~U/.rhosts) /etc/hosts\**
  797. .FS
  798. If there is
  799. a host listed in the user's remote access database and the host name
  800. table is replaceable, then an attacker can make his host appear to be
  801. the host listed in the user's database.  This assumes that the
  802. attacker has super-user privileges on some host that can talk to the
  803. target host, because the attacker will need to create an account with
  804. the target's user name.  This attack will become obsolete when hosts
  805. start using a distributed name server rather than a fix hostname
  806. database.  However, the name server will open other avenues of attack.
  807. .FE
  808. .PP
  809. Become U Write ~U/.rhosts\**
  810. .FS
  811. The remote execution routines insist that the target user be the owner
  812. of the database file, so replace access is not sufficient to use this
  813. attack.
  814. .FE
  815. .PP
  816. Become U root Replace /etc/hosts.equiv\**
  817. .FS
  818. Remote execution with super-user privileges is only accepted from
  819. the hosts listed in ~root/.rhosts, so replacing the hosts.equiv file
  820. cannot be used to directly gain access to super-user privileges.
  821. .FE
  822. .sp
  823. }
  824. .PP
  825. \fBshells\fP
  826. .PP
  827. Several command interpreters, called shells, have been written for
  828. Unix.  Different users can use different shells, but all shell have
  829. some mechanism for executing a list of commands when a user logs in.
  830. The files that specify these initialization commands are a part of the
  831. protection configuration that each user can change.
  832. .PP
  833. The expression \*QExists(/d/f)\*U is true if the file /d/f exists.
  834. .sp
  835. Rules{
  836. .sp
  837. .ul
  838. <Goal/Condition/Subgoal/Note>
  839. .PP
  840. Become U Exists(~U/.login) Replace ~U/.login\**
  841. .FS
  842. This file contains the commands read when a user logs in.
  843. The conditional should really test to see if the user is actually using
  844. the /bin/csh command interpreter.  If csh is being used, then
  845. this rule will work even if the file .login doesn't exist, so
  846. the conditional is overly strict.
  847. .FE
  848. .PP
  849. Become U Exists(~U/.cshrc) Replace ~U/.cshrc\**
  850. .FS
  851. This file is read each time a /bin/csh is executed such as at login
  852. and when a command file is executed.  The conditional is also overly
  853. strict.
  854. .FE
  855. .PP
  856. Become U Exists(~U/.profile) Write ~U/.profile\**
  857. .FS
  858. Same trick for the /bin/sh command interpreter.
  859. .FE
  860. .sp
  861. }
  862. .PP
  863. \fBcron\fP
  864. .PP
  865. Cron is a program that is forked off when a Unix system is booted.
  866. This means that it runs with super-user privileges.  Cron reads a
  867. database (/usr/lib/crontab) that describes the commands that should be
  868. executed periodically.  By default these commands are executed with
  869. \*Qroot\*U privileges.
  870. .sp
  871. Rules{
  872. .sp
  873. .ul
  874. <Goal/Condition/Subgoal/Note>
  875.  
  876. Become root none Replace /usr/lib/crontab
  877. .sp
  878. }
  879. .PP
  880. \fBsendmail\fP
  881. .PP
  882. The Unix mail system has many features that allow flexible forms of
  883. information sharing.  The most interesting feature (to system builders
  884. and to attackers) is that receiving mail can trigger the invocation of
  885. a program which is passed the mail message as its input.  The file
  886. /usr/lib/aliases specifies the human readable form of a binary
  887. database that describes mailing lists, mail forwarding, and programs
  888. to invoke when mail is received by certain mailboxes.  Being able to
  889. modify this database allows an attacker to get access to other
  890. people's user and group IDs because the mail sending program runs with
  891. the privileges of the user who invokes it.  If the destination of the
  892. message is on the same host as the source, then the receiving program
  893. (also sendmail) will run with the invoker's privileges.  If the source
  894. of the message is on another computer, then sendmail will run under
  895. the UID \*Qdaemon\*U.
  896. .sp
  897. Rules{
  898. .sp
  899. .ul
  900. <Goal/Condition/Subgoal/Note>
  901. .PP
  902. Become daemon none Replace /usr/lib/aliases\**
  903. .FS
  904. This assumes
  905. that the command to build the binary database can be executed by
  906. everyone, or that it is executed automatically when the mailer detects
  907. that the binary database is out of date.  There should also be rules
  908. to see if the binary database can be written directly.
  909. .FE
  910. .PP
  911. Become root none Replace /usr/lib/aliases\**
  912. .FS
  913. Assumes that
  914. \*Qroot\*U sends mail to some user on this machine.  Such users can be
  915. found by scanning the mail logs, which are usually World readable.  If
  916. such a user exists, the aliases database can be set up to tell sendmail to
  917. deliver mail to the recipient and invoke the attacker's program.  Next
  918. time root sends mail to that user, the attacker's program will be
  919. invoked with root privileges.  The program would test to see if it was
  920. running with \*Qroot\*U privileges, and if so plant a trap door such as
  921. making /.rhosts publicly writable.
  922. .FE
  923. .sp
  924. }
  925. .PP
  926. \fBboot\fP
  927. .PP
  928. When a Unix reboots, it executes the commands in the file /etc/rc.
  929. This file usually executes the commands in the file /etc/rc.local.
  930. .sp
  931. Rules{
  932. .sp
  933. .ul
  934. <Goal/Condition/Subgoal/Note>
  935.  
  936. Become root Exists(/etc/rc) Replace /etc/rc
  937.  
  938. Become root Exists(/etc/rc.local) Replace /etc/rc.local
  939. }
  940. .PP
  941. \fBExtensions to the Unix model\fP
  942. (extensions)
  943. .PP
  944. This section lists some of the important pieces of the Unix protection
  945. system that were left out of the SU-Kuang's model.  Most of these
  946. pieces could be added easily.
  947. .PP
  948. The major deficiency of the model is that it does not include all of the
  949. programs that run with super-user privileges.  Each of these
  950. programs must be modeled if there is some way that an attacker could
  951. use the programs' databases to get access to root privileges.
  952. .PP
  953. Locating all the programs that run with super-user privileges is not
  954. easy.  Many ordinary programs are executed inside of command files
  955. that are run with root privileges.  This points out another
  956. shortcoming of SU-Kuang.  It does not look inside of command files.
  957. For example, on system restart, Unix executes the commands in the file
  958. /etc/rc with super-user privileges.  That file executes additional
  959. commands in the file /rc.local, so those commands also runs as root.
  960. The prototype has an explicit rule that covers this case, whereas it
  961. should deduce this and other cases by parsing the commands in /etc/rc.
  962. .PP
  963. The prototype does not understand search paths.  On Unix, as with most
  964. systems, users do not specify the full pathname of the programs they
  965. want to execute.  Instead, users specify a sequence of directories
  966. that should be searched to find the program.  Often users tell their
  967. command interpreter to first look in a private directory of commands,
  968. and quite often that directory is writable by any member of the user's
  969. primary group.  If an attacker can write a user's private command
  970. directory, then the attacker can plant a trojan horse on that user.
  971. For example, the user may want to execute /usr/local/gnuemacs, but the
  972. user may end up executing the attacker's program in
  973. /usr/smith/@_bin/gnuemacs.  To model this attack, SU-Kuang would need to
  974. be able to read each user's startup command file to determine each
  975. user's search path.
  976. .PP
  977. The file goals considered by the model only include write and replace
  978. access to a file.  Read access is not considered.  To include read
  979. access, each piece of the protection system must be re-examined to see
  980. if it could provide read access to an arbitrary file.  For example,
  981. the Unix finger program, which displays information about users, runs
  982. with super-user privileges so it can read an information file (.plan)
  983. in the specified user's home directory.  Unfortunately, some
  984. implementations of the finger program allow the .plan file to be a
  985. symbolic link to another file, and thus the finger program allows read
  986. access to any file on the system.
  987. .PP
  988. The rules that model the file system do not include the fact that the
  989. disks can be accessed via the raw device files.  Reading and writing
  990. the device files can be used to read and write arbitrary blocks on the
  991. disks.  These files should only be accessible to the super-user, but
  992. often anyone can read them.  If so, an attacker can read any file on
  993. the disk.
  994. .PP
  995. A different kind of deficiency in the model is that it does not allow
  996. the attacker to guess at passwords.  On a system that allows users to
  997. pick their own passwords, an attacker can usually guess a few of the
  998. passwords.  Assuming that an attacker can read the password file,
  999. \**
  1000. .FS
  1001. Protecting the password file from users logged in on a guest
  1002. account or using anonymous file transfer is a good idea.  However,
  1003. protecting it from ordinary users is hard.  Many programs need read
  1004. access to the non-password information kept in that file, and making
  1005. all those programs run with special privileges may create more
  1006. problems than it solves.
  1007. .FE
  1008. the attacker can test passwords at the rate of about ten per second.\**
  1009. .FS
  1010. There are lots of tricks that speed up the execution of
  1011. the Unix salted DES function on a 32 bit machine.
  1012. .FE
  1013. A 2000 word dictionary of common passwords can be processed at the
  1014. rate of a few minutes per account.
  1015. .PP
  1016. As in any kind of modeling, the better the model, the better the
  1017. results.  Fortunately, in the case of Unix, making the model more
  1018. detailed does not require using a more complicated framework. The
  1019. rule-based framework of SU-Kuang is flexible enough to model all the
  1020. features described in this section.
  1021. .PP
  1022. \fBPrototype Implementation\fP
  1023. (implementation)
  1024. .PP
  1025. The SU-Kuang program described in this paper is easy to
  1026. implement.  The primary inputs to the program are a list of groups
  1027. (privileges) accessible to the attacker (including the special group
  1028. \*QWorld\*U), and the target goal (usually \*Qbecome root\*U).  The
  1029. program examines the protection configuration of the machine it is
  1030. running on, so this can be considered a secondary input.  The
  1031. primary output is a list of the ways that an attacker can achieve the
  1032. target goal from the initial privileges.  Internally, the program
  1033. builds a goal-tree based on a set of rules that are compiled into the
  1034. program.  When a node of the goal-tree can be directly achieved using
  1035. the initial privileges, the program prints out the sequence of steps
  1036. that describe the path from the given node of the goal-tree to the
  1037. root of the goal-tree.
  1038. .PP
  1039. In classic Unix style, the prototype was initially implemented by a
  1040. set of shell scripts (command files).  Later, to improve performance,
  1041. some of the shell scripts were re-written in C.  The top level
  1042. shell script keeps track of the goal-tree, and invokes other shell
  1043. scripts to generate successive levels of the goal-tree.  For each of the
  1044. three kinds of goals (user, group, and file), there is a shell script
  1045. that reads a list of goals of that kind and produces a list of
  1046. subgoals.
  1047. .PP
  1048. Associated with each node of the goal-tree is a human readable comment
  1049. that describes the path from each node to the root of the goal-tree.
  1050. This comment is appended to a list of 'successes' if the
  1051. associated goal can be directly achieved using the initial privileges
  1052. of the attacker.  Since each comment specifies the sequence of steps
  1053. an attacker could use to achieve the target goal given the current
  1054. goal, it is easy to derive the comments for subgoals from the comments
  1055. of parent goals.  The subgoal comments is the parent goal's comment
  1056. plus an indication of which rule was used to derive the subgoal.
  1057. .PP
  1058. The basic data abstraction used by SU-Kuang is a goal-table.  There
  1059. are three goal-tables, one for each type of goal.  The operations on a
  1060. goal table are: 
  1061. .ul
  1062. new, 
  1063. .ul
  1064. addto, and 
  1065. .ul
  1066. next.  The 
  1067. .ul
  1068. new
  1069. operation creates an empty goal table.  It takes a set of initial
  1070. goals that are directly achievable by the attacker.  The 
  1071. .ul
  1072. addto
  1073. operation adds a goal and a comment to the table.  If the goal is
  1074. already in the table, the table is not changed.  If the goal is in the
  1075. set of directly achievable goals, then 
  1076. .ul
  1077. addto also appends the
  1078. comment to the file that contains a list of successes.  The operation,
  1079. .ul
  1080. next, examines a goal-table and returns any goal-comment pair that
  1081. it has not already returned.  The 
  1082. .ul
  1083. addto
  1084. operation is effectively
  1085. the inner loop of a rule interpreter.
  1086. .PP
  1087. The goal-table abstraction is implemented by four files.  One file
  1088. keeps track of all of the goals in the table and it is used to avoid
  1089. duplicate goals.  Another file holds the list of goals initially
  1090. available to the attacker.  Two files are used to support the next
  1091. operation.  One file records all the goal-comment pairs that have been
  1092. returned by the next operations, the other file lists the goal-comment
  1093. pairs that have been added to the table but not yet selected by the
  1094. next operation.
  1095. .PP
  1096. Using the goal-table abstraction it is easy to express rules as lines
  1097. of a shell script.  Figure
  1098. .ul
  1099. shell
  1100. rule shows a rule and its shell
  1101. script implementation.  The conditional part of the rules are
  1102. expressed by shell script conditionals (e.g., \*Q-z\*U means that a file
  1103. exists and has a length of zero, \*Q!\*U and \*Q&&\*U mean logical
  1104. negation and conjunction).
  1105. .sp
  1106. Rules{
  1107. .sp
  1108. .ul
  1109. <Goal/Condition/Subgoal>
  1110.  
  1111. Become root NotEmpty(/.rhosts) Replace /etc/hosts
  1112. .sp
  1113. }
  1114.  
  1115. .nf
  1116. # $User and $OldComment are set by the goal-table next operation.
  1117. # $FileGoals refers to the goal-table object for file type goals.
  1118. if (($User == "root") && (! -z /.rhosts))  then
  1119.     set NewComment="Fake HostAddress, $OldComment"
  1120.     set SubGoal="Replace /etc/hosts"
  1121.     addto $FileGoals $SubGoal $NewComment
  1122. endif
  1123. .fi
  1124. Sample rule and corresponding shell script line.
  1125.  
  1126. .PP
  1127. The implementation of SU-Kuang is straight forward.  The only reason
  1128. for describing it in this paper is to demonstrate how easy it is to
  1129. process the attacker-oriented rules that describe a protection system.
  1130. .PP
  1131. \fBExperience\fP
  1132. (experience)
  1133. .PP
  1134. The SU-Kuang system has been run on a large number of
  1135. sites managed by personnel with a wide range of skills and interests
  1136. in security.  It has almost always found a hole.  A Kuang that
  1137. incorporates the extensions described in section
  1138. .ul
  1139. extensions
  1140. would find more holes.
  1141. .PP
  1142. I believe that holes are created because users do not understand how
  1143. the various pieces of the protection system interact.  The main
  1144. evidence for this is that fact that most holes are found in the
  1145. protection databases that are maintained by ordinary users (e.g.,
  1146. .login and .rhosts).  Also, users who have recently been given special
  1147. privileges tend to create holes that allow anyone to achieve
  1148. super-user privileges.  When I tell users about the problems SU-Kuang
  1149. finds, they often do not understand what was wrong with the decision
  1150. they made.
  1151. .PP
  1152. Users create security holes periodically.  When I ran SU-Kuang
  1153. periodically on one computer that had a large complicated protection
  1154. configuration (e.g., the authorization databases included 300 users
  1155. and 25 groups), SU-Kuang found new holes every week or two.  Often
  1156. these new holes were created when someone modified a security
  1157. database.  One common procedure for modifying a database is to first
  1158. rename the original, then copy of the original into a file with the
  1159. proper name, and finally edit the copy.  The motivation for the first
  1160. rename step is to preserve the timestamp that indicates when the
  1161. database was last written.  Unfortunately, the file copy step does not
  1162. copy the protection information from the original database.  The
  1163. protection for the copy is determined by the defaults for the
  1164. currently running process.  It is not determined by the original.  The
  1165. file UID is set to the UID of the process that performs the copy,
  1166. and the GID is set to the GID of the directory that contains
  1167. the file.  The permission bits are set to a default value specified in
  1168. the copier's login command file.
  1169. .PP
  1170. The holes found by SU-Kuang point out that it is hard to set up multiple
  1171. separate security groups under BSD4.2 Unix.  For example, a group
  1172. that allows its members to install programs in the /etc directory,
  1173. also allows its members to replace the authentication database in
  1174. /etc/passwd.  The fact that users run with their full privileges (i.e.,
  1175. they can access multiple groups in the same process), makes Berkeley
  1176. Unix easier to use than other versions of Unix that force users to
  1177. access one group at a time.  However, that same feature makes it
  1178. easier for an attacker to plant a trojan horse on a user that is a
  1179. member of a lower privilege group (e.g., the implementors of some
  1180. project) and a member of a high privilege group (e.g., staff).
  1181. .PP
  1182. The impression I have gotten from running SU-Kuang is that most of the
  1183. features that make Unix easy to use also make Unix hard to secure.
  1184. However, SU-Kuang does make it easier to build a secure protection
  1185. configuration for Unix.    
  1186.  
  1187. .PP
  1188. \fBDiscussion\fP
  1189. (conclusions)
  1190. .PP
  1191. To increase the usefulness of computers, systems designers have
  1192. provided an increasing number of mechanisms that allow users to
  1193. execute commands and share information.  Since these new mechanisms
  1194. must be considered part of the protection system, this trend has made
  1195. protection systems larger and progressively harder to understand.  As
  1196. a protection system becomes more complex, it becomes unlikely that
  1197. all the protection decisions are made correctly, and these mistakes
  1198. can ruin the overall security of the information and resources
  1199. controlled by computers.  The commercial environment presents a
  1200. special problem because usability is the primary goal of commercial
  1201. information systems, but security cannot be neglected.  There needs to
  1202. be some way to manage the complexity of the protection systems that arise
  1203. on information systems that stress usability.
  1204. .PP
  1205. This paper presents one approach for achieving both usability and
  1206. security.  The idea is to use rule-based systems to analyze the
  1207. interactions between all the decisions that make up a computer's
  1208. protection configuration.  If analyzing a protection configuration is
  1209. easy, then the manager of a system can ensure that the system meets
  1210. the security objectives of its users.  A program that performs a
  1211. simple analysis of a Unix protection configuration was presented to
  1212. illustrate that this sort of rule-based system is easy to build if
  1213. the protection system is described from the attacker's viewpoint.
  1214. This simple Unix analysis system, called SU-Kuang, answered the
  1215. question "given access to a particular set of privileges,
  1216. can an attacker achieve super-user privileges?".  Using SU-Kuang,
  1217. a security manager could ensure that a system did not allow ordinary
  1218. user to achieve super-user privileges.
  1219. .PP
  1220. SU-Kuang is just one of many helpful Kuang-type systems.  For example,
  1221. many security objectives are expressed in terms of limiting the set of
  1222. people who have access to particular privileges.  A Kuang-type system
  1223. that computed the set of privileges accessible to each user would help
  1224. a security manager determine whether the security objectives are being
  1225. met.  Even better, if the bulk of the security objectives can be
  1226. expressed in computer understandable form, then the bulk of the work
  1227. of checking computer security could be automated.
  1228.  
  1229. SHAR_EOF
  1230. #    End of shell archive
  1231. exit 0
  1232.  
  1233.