home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / alt / hackers / 1736 < prev    next >
Encoding:
Text File  |  1992-11-22  |  2.5 KB  |  61 lines

  1. Newsgroups: alt.hackers
  2. Path: sparky!uunet!think.com!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!void.ncsa.uiuc.edu!robm
  3. From: robm@void.ncsa.uiuc.edu (Rob McCool)
  4. Subject: Re: cracking login?
  5. X-Newsreader: Tin 1.1 PL5
  6. References: <1eorh6INN684@dixie.cs.ubc.ca>
  7. Message-ID: <By50uK.56G@news.cso.uiuc.edu>
  8. Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
  9. Organization: The Castle aiiruuuuuuuuuurrrrrrrg
  10. Approved: your mother approves
  11. Date: Sun, 22 Nov 1992 21:54:19 GMT
  12. Lines: 47
  13.  
  14. Moustafa Hassan (hassan@cs.ubc.ca) wrote:
  15. : I've thought of a scheme for logging in as any user in a given file system.
  16. : The only problem is that it's too easy.  I must be under some illusion.
  17. : I'd appreciate it if someone pointed out the flaw in my algorithm:
  18. : 1.  Obtain the code for login.c.  I've done this.  I'm having some trouble
  19. :     compiling it, because some constants are defined differently on my 
  20. :     system.  I should be able to fix this within a month's work.
  21. : 2.  Change the call to getpass to a function that reads in an arbitrary number
  22. :     of characters up to the newline.  This is trivial.
  23. : 3.  Remove the encryption step where the password is encrypted.
  24. : 4.  Recompile.
  25. : 5.  When executing login, give it (the publically available) user id and 
  26. :     encrypted password of any user on the system, and you're in.
  27. : As I said, this scheme is too easy, and I refuse to believe that unix systems
  28. : lack security to such a degree.  Would someone take the time to disillusion
  29. : me?
  30.  
  31. Yeah, well, there are a couple of flaws:
  32.  
  33. 1. Changing login assumes you already have broken root and are now able to
  34.   install your trojan horse login in /bin, which is the only place it would
  35.   be of any value, because:
  36.  
  37. 2. login is suid root, meaning it has to run as root in order to switch its
  38.   userid to another user's. If you can manage to get your executable login 
  39.   to be suid root, you will be in. 
  40.  
  41. That's not to say that there aren't serious holes in unix security (NFS is 
  42.   one of them), but this is certainly not one of them.
  43.  
  44.  
  45. ObHack: I had a configuration file for a list server that I had as a list of
  46.   e-mail addresses, and I needed to append some text to each line. Instead of
  47.   doing something sensible like using a perl,sed,or awk script, I did 
  48.   something like:
  49.  
  50. for i in `cat orig_file`; 
  51.     echo $i "extra text" >> new_file
  52.  
  53. There may be syntatical errors in there but you get the idea.
  54.  
  55. --
  56. Rob McCool, NCSA STG System Administrator
  57. robm@ncsa.uiuc.edu r-mccool@uiuc.edu robm@imsa.edu
  58. It was working ten minutes ago, I swear...
  59.