home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / question / 10524 < prev    next >
Encoding:
Internet Message Format  |  1992-08-30  |  3.6 KB

  1. Xref: sparky comp.unix.questions:10524 comp.unix.admin:4773
  2. Path: sparky!uunet!auspex-gw!guy
  3. From: guy@Auspex.COM (Guy Harris)
  4. Newsgroups: comp.unix.questions,comp.unix.admin
  5. Subject: Re: NFS security flawed (was: Re: chown : HELP!)
  6. Message-ID: <14371@auspex-gw.auspex.com>
  7. Date: 30 Aug 92 01:28:37 GMT
  8. References: <id.2FQS.7B6@ferranti.com> <p6c4vho@rhyolite.wpd.sgi.com> <4x91H880a9@atlantis.psu.edu>
  9. Sender: news@auspex-gw.auspex.com
  10. Followup-To: comp.unix.questions
  11. Organization: Auspex Systems, Santa Clara
  12. Lines: 60
  13. Nntp-Posting-Host: auspex.auspex.com
  14.  
  15. >    The NFS concept that you shouldn't by default trust uid=0 has
  16. >a fatal flaw.  If a person breaks root on a client machine, all he
  17. >has to do is su to any other user on the system (like bin, adm,
  18. >daemon, or sys) and have root access within minutes anyway.  NFS
  19. >will just accpet the remote uid to be the same user as the local uid,
  20. >and you're in.  No authentication.
  21.  
  22. That's not a fatal flaw with the notion that you shouldn't, by default,
  23. trust a UID of 0.
  24.  
  25. It's a fatal flaw with the notion that you *should* trust any *other*
  26. credentials that come over the wire if there's no way of making sure
  27. that they aren't faked.
  28.  
  29. >    Unfortunately, there really isn't a better solution out there.
  30.  
  31. Well, there are a variety of *other* solutions; whether they're
  32. "better", or "worse", or "just the same" probably depends on the person
  33. judging them, and their requirements for security.
  34.  
  35. NFS, when using "UNIX authentication" has a simple "UID-mapping" scheme;
  36. the NFS server can map a user ID of 0 to another user ID.  AT&T's RFS,
  37. and, I believe, some NFS implementations, allow a more elaborate mapping
  38. to be done, which can map other user IDs as well; RFS may support
  39. different UID maps for different clients, but I don't know if any NFS
  40. implementations do so.
  41.  
  42. Some ONC RPC implementations support "DES authentication", and allow NFS
  43. to use that as well as "UNIX authentication".  With "DES
  44. authentication", the credentials are encrypted with a password derived,
  45. in part, from the user's password, and include an encrypted "verifier"
  46. to make it harder to forge credentials and have the forged credentials
  47. appear valid.  It can be a pain to set up and get working, and I've
  48. heard claims that it's possible to crack the encryption scheme.
  49.  
  50. Sun will, I think, also have a "Kerberos authentication" flavor in
  51. future ONC RPC implementations (SunOS 5.0, the OS component of Solaris
  52. 2.0, may already have it); the credentials include, I believe, a ticket
  53. handed out by a Kerberos server.
  54.  
  55. Vernon's point remains valid - if a remote file server of *ANY* sort
  56. blindly trusts the credentials on all incoming requests, then somebody
  57. else has to make sure nobody will forge credentials.  Maybe you have a
  58. community where you can trust everybody not to cheat; maybe you can
  59. arrange that nobody become root on their machine, and thus can arrange
  60. that nobody "su" to another user, or install OS software that puts out
  61. forged credentials; or maybe you can find people who do forge
  62. credentials, and hunt them down and kill them.
  63.  
  64. If that happens to be true, you can, at least with NFS and, I think,
  65. with RFS, turn off *all* user ID mapping, in which case NFS and, I
  66. think, RFS will act just like a local UNIX file system, at least in that
  67. regard.  There's nothing *intrinsic* to NFS that means that you *can't*
  68. get root access, under *any* circumstances; were that true, my
  69. workstation would have all sorts of fun trying to do various things, as
  70. it has to use NFS to get at *all* its files.
  71.  
  72. I don't know what the Andrew File System does to detect forged
  73. credentials, nor what OSF's DCE DFS will do, nor what any other
  74. distributed file systems do.
  75.