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