🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
13 messages
13 total messages Started by Gary Mills Thu, 21 May 1998 00:00
Safe to make nnrpd setuid root?
#28294
Author: Gary Mills
Date: Thu, 21 May 1998 00:00
11 lines
843 bytes
I'd like to have nnrpd do authinfo user authentication against
the passwd map, using the `+' feature of nnrp.access.  To do this,
nnrpd will need to run as root while it obtains the passwd entry.
Has anyone done this, and is it safe to do so?


-- 
-Gary Mills-    -Unix Support-    -U of M Academic Computing and Networking-

Re: Safe to make nnrpd setuid root?
#28287
Author: Fluffy
Date: Thu, 21 May 1998 00:00
19 lines
1366 bytes
mills@cc.umanitoba.ca (Gary Mills) writes:

> I'd like to have nnrpd do authinfo user authentication against
> the passwd map, using the `+' feature of nnrp.access.  To do this,
> nnrpd will need to run as root while it obtains the passwd entry.
> Has anyone done this, and is it safe to do so?

It should be nominally safe, as long as you're sure your input buffer
can't be "hijacked" before you've accepted that a session is
authorized and you drop down out of root.  You might want to do an
extra-careful walkthrough of things like the authinfo generic routine
that spawn external commands.

Look in Deja News for a patch by underdog at flash.net that does what
you want with shadow passwords (if you're not shadowing, you probably
don't need to suid root).

Re: Safe to make nnrpd setuid root?
#28296
Author: Edward S. Marshall
Date: Thu, 21 May 1998 00:00
30 lines
2076 bytes
[Posted and mailed]

In article <6k088i$kl$1@canopus.cc.umanitoba.ca>,
	mills@cc.umanitoba.ca (Gary Mills) writes:
> I'd like to have nnrpd do authinfo user authentication against
> the passwd map, using the `+' feature of nnrp.access.  To do this,
> nnrpd will need to run as root while it obtains the passwd entry.
> Has anyone done this, and is it safe to do so?

Although I haven't done this, I did a quick hack to do NIS authentication
directly (as opposed to using getpw*()). One thing you might consider
doing for your implementation is writing a very small suid executable
which does nothing but take a username and a password on stdin, and exits
with a 1 or 0 depending on whether the user authenticated correctly. Then
just modify nnrpd to fork that program when the AUTHINFO information has
been collected. The beauty of this approach is that it would be relatively
painless to drop another authentication scheme in place should you change
your general authentication mechanisms (for example, using RADIUS for auth
instead of NIS/NIS+ or passwd/shadow).

Generally speaking, I'd be that you'll end up with a more secure result
by doing it this way, rather than running nnrpd as root.

-- 
/* Edward S. Marshall <emarshal@xnet.com>     http://www.xnet.com/~emarshal/ */

                   char main[] = { 0xf0, 0x0f, 0x7d, 0x8d };

Re: Safe to make nnrpd setuid root?
#28318
Author: Marc SCHAEFER
Date: Sat, 23 May 1998 00:00
24 lines
1539 bytes
Gary Mills <mills@cc.umanitoba.ca> wrote:
> nnrpd will need to run as root while it obtains the passwd entry.

no, it doesn't need to:

-rw-r--r--   1 root     root         7689 Apr 25 11:20 /etc/passwd
-rw-r-----   1 root     shadow       3276 May 22 09:02 /etc/shadow

It just needs, in that case, to have read access to the shadow file,
and thus it justs need to be sgid shadow.

Then the most damage that program can do is to read encrypted passwords.
No other danger. If you run crack from time to time, this will never
be a security risk.

NB: this is e.g. standard setting for UNIX/Linux (SuSE distribution).
    Guess what are the access permissions of xlock ?
       -rwxr-sr-x   1 root     shadow     825384 Jun 12  1997 /usr/bin/X11/xlock
    Tada. Immune against any bug in xlock (upto the point that the
    biggest problem will be read-only access to the shadow file, which
    is not a real problem with good passwords).

Re: Safe to make nnrpd setuid root?
#28326
Author: Ian Stirling
Date: Sat, 23 May 1998 00:00
32 lines
2391 bytes
Marc SCHAEFER <schaefer@alphanet.ch> wrote:
: Gary Mills <mills@cc.umanitoba.ca> wrote:
:> nnrpd will need to run as root while it obtains the passwd entry.

: no, it doesn't need to:

: -rw-r--r--   1 root     root         7689 Apr 25 11:20 /etc/passwd
: -rw-r-----   1 root     shadow       3276 May 22 09:02 /etc/shadow

: It just needs, in that case, to have read access to the shadow file,
: and thus it justs need to be sgid shadow.

: Then the most damage that program can do is to read encrypted passwords.
: No other danger. If you run crack from time to time, this will never
: be a security risk.

Yes it will.
If you use DES, with the compute power I've got at home only, 
I can crack any random alphanumeric (lower case only) password
in 5 years or so.
If I can get my hands on a decent buildingfull of computers, then it 
goes down to weeks.
DES is getting weaker by the year.

-- 
Ian Stirling.   Designing a linux PDA, see  http://www.mauve.demon.co.uk/
----- ******* If replying by email, check notices in header ******* -----
Two parrots sitting on a perch. One asks the other, "Can you smell fish?"


Re: Safe to make nnrpd setuid root?
#28327
Author: Gary Mills
Date: Sat, 23 May 1998 00:00
20 lines
1297 bytes
In <6k5uqr$4ru$1@vulcan.alphanet.ch> Marc SCHAEFER <schaefer@alphanet.ch> writes:

>Gary Mills <mills@cc.umanitoba.ca> wrote:
>> nnrpd will need to run as root while it obtains the passwd entry.

>no, it doesn't need to:

>It just needs, in that case, to have read access to the shadow file,
>and thus it justs need to be sgid shadow.

Sorry, I should have provided more information.  We are using NIS
with a secure map for passwords.  So, it needs to do RPC from a
reserved UDP port.  I've gotten this working by using seteuid(0)
before the NIS lookup and seteuid(getuid()) immediately afterwards.

-- 
-Gary Mills-    -Unix Support-    -U of M Academic Computing and Networking-

Re: Safe to make nnrpd setuid root?
#28414
Author: Ian Stirling
Date: Tue, 26 May 1998 00:00
37 lines
2761 bytes
Chris Lewis <clewis@ferret.ocunix.on.ca> wrote:
: According to Ian Stirling  <000035672623.NO_UCE@mauve.demon.co.uk>:
<snip>
:> If you use DES, with the compute power I've got at home only, 
:> I can crack any random alphanumeric (lower case only) password
:> in 5 years or so.
:> If I can get my hands on a decent buildingfull of computers, then it 
:> goes down to weeks.

: Yup, I've done it.

: On a half a dozen high end HPs it would be a few days total.

: That's why you put on password front ends that insists on multiple case
: punctuation, and no fewer than 8 characters.

But users Don't in general pick passwords that are "hard" 
For example, mixed case is rarely used (one letter in upper case only
makes it 8 times as hard to crack)
numbers are usually in groups, passwords like 
Fish+Cat Are relatively easy to crack, etc, etc.

My point is basically that DES, with user chosen passwords (apart from
the few users who understand) is no longer secure enough, and arguably
even machine chosen passwords are getting less secure.
The only options are to either make damn sure no-one gets their 
hands on the password file or switch to a hash several thousand times
slower.

-- 
Ian Stirling.   Designing a linux PDA, see  http://www.mauve.demon.co.uk/
----- ******* If replying by email, check notices in header ******* -----
Two parrots sitting on a perch. One asks the other, "Can you smell fish?"


Re: Safe to make nnrpd setuid root?
#28426
Author: Chris Lewis
Date: Tue, 26 May 1998 00:00
43 lines
2369 bytes
According to Ian Stirling  <000035672623.NO_UCE@mauve.demon.co.uk>:
> Marc SCHAEFER <schaefer@alphanet.ch> wrote:
> : Gary Mills <mills@cc.umanitoba.ca> wrote:
> :> nnrpd will need to run as root while it obtains the passwd entry.
 
> : no, it doesn't need to:
 
> : -rw-r--r--   1 root     root         7689 Apr 25 11:20 /etc/passwd
> : -rw-r-----   1 root     shadow       3276 May 22 09:02 /etc/shadow
 
> : It just needs, in that case, to have read access to the shadow file,
> : and thus it justs need to be sgid shadow.
 
> : Then the most damage that program can do is to read encrypted passwords.
> : No other danger. If you run crack from time to time, this will never
> : be a security risk.
 
> Yes it will.
> If you use DES, with the compute power I've got at home only, 
> I can crack any random alphanumeric (lower case only) password
> in 5 years or so.
> If I can get my hands on a decent buildingfull of computers, then it 
> goes down to weeks.

If you use fcrypt from crack, _all_ 6 character monocase passwords
are crackable in 18 hours, 7 character in 19 days, and 8 charactor
in 494 days.  That's on a _single_ low end HP desktop.

Yup, I've done it.

On a half a dozen high end HPs it would be a few days total.

That's why you put on password front ends that insists on multiple case
punctuation, and no fewer than 8 characters.

A full 96 character set 8 character password takes about 190 million years
to exhaustively crack on my desktop.  That's one long cup of coffee ;-)
-- 
For more information on spam, see http://spam.abuse.net/spam
Fight spam, support Rep. Chris Smith's TCPA extension: http://www.cauce.org

Re: Safe to make nnrpd setuid root?
#28463
Author: Ian Stirling
Date: Wed, 27 May 1998 00:00
22 lines
2134 bytes
Mark-Oliver Wolter <root@mow.physik.uni-bremen.de> wrote:
: Ian Stirling <0000356B3DEB.NO_UCE@mauve.demon.co.uk> wrote:
: : even machine chosen passwords are getting less secure.
: : The only options are to either make damn sure no-one gets their 
: : hands on the password file or switch to a hash several thousand times
: : slower.

: Or, as a start, to make room for more than 8 characters ...

<luser>
I've forgotten my passphrase, can't I have a shorter, easier to remember one.
</luser>


-- 
Ian Stirling.   Designing a linux PDA, see  http://www.mauve.demon.co.uk/
----- ******* If replying by email, check notices in header ******* -----
"Looks like his brainwaves crash a little short of the beach..." Duckman.


Re: Safe to make nnrpd setuid root?
#28503
Author: Mark-Oliver Wolter
Date: Wed, 27 May 1998 00:00
16 lines
1343 bytes
Ian Stirling <0000356B3DEB.NO_UCE@mauve.demon.co.uk> wrote:
: even machine chosen passwords are getting less secure.
: The only options are to either make damn sure no-one gets their 
: hands on the password file or switch to a hash several thousand times
: slower.

Or, as a start, to make room for more than 8 characters ...

-- 
   | | | MfG MOW []-)
   | | | Leher Heerstr.21, Zi.1403, 28359 Bremen, Tel. ++49-177-2503055
  M  O  W  http://www.zfn.uni-bremen.de/~g02o/
/'   |   `\  Always logon - the bright side of life !

Re: Safe to make nnrpd setuid root?
#28515
Author: Ian Stirling
Date: Thu, 28 May 1998 00:00
34 lines
2843 bytes
Mark-Oliver Wolter <root@mow.physik.uni-bremen.de> wrote:
: Ian Stirling <0000356C5E26.NO_UCE@mauve.demon.co.uk> wrote:
: : Mark-Oliver Wolter <root@mow.physik.uni-bremen.de> wrote:
: : : Or, as a start, to make room for more than 8 characters ...
: : <luser>
: : I've forgotten my passphrase, can't I have a shorter, easier to remember one.
: : </luser>

: Though 'easier to remember' does not necessarily mean 'shorter' ...

: With longer passphrases you can get the same entropy as in
: a 8-byte password *without* having to get *that* cryptic.

True, I think my main point is that, if left to themselves, 
users will generate passwords with 20 bits or under.
I suspect that to make passphrases more secure than randomly chosen
word/digit/digit, you'd need an ungodly size of dictionary to make sure
it wasn't a common one.
I suspect, if one sucked down the gutenburg texts, and the various 
film/... scripts on the net, one could get an alarming fraction of 
passphrases.

Oops, sorry, this thread has now gone way off topic, continue in sci.crypt
if you want.

-- 
Ian Stirling.   Designing a linux PDA, see  http://www.mauve.demon.co.uk/
----- ******* If replying by email, check notices in header ******* -----
Money is a powerful aphrodisiac, but flowers work almost as well.
Robert A Heinlein.


Re: Safe to make nnrpd setuid root?
#28524
Author: bill davidsen
Date: Thu, 28 May 1998 00:00
25 lines
1845 bytes
In article <6k088i$kl$1@canopus.cc.umanitoba.ca>,
Gary Mills <mills@cc.umanitoba.ca> wrote:
| I'd like to have nnrpd do authinfo user authentication against
| the passwd map, using the `+' feature of nnrp.access.  To do this,
| nnrpd will need to run as root while it obtains the passwd entry.
| Has anyone done this, and is it safe to do so?

I regard this as somewhere between "unsafe" and "a gaping hole." If
you're not running shadow passwords you don't need root, and if you are
you want a small process which does the check for you. Actually you (and
everyone else) should have a system call which takes a usersid and
password and returns a status. Assume the obvious need for delay in
response, max miss count, etc.

It should have been this way all along, having password stuff in user
programs is dumb, you can't change the algorithm.
-- 
bill davidsen <davidsen@tmr.com>  CTO, TMR Associates, Inc
"In elementary school, in case of fire you have to line up quietly in a
single file line from smallest to tallest. What is the logic? Do tall
people burn slower?"
 --Warren Hutcherson

Re: Safe to make nnrpd setuid root?
#28541
Author: Mark-Oliver Wolter
Date: Thu, 28 May 1998 00:00
20 lines
1570 bytes
Ian Stirling <0000356C5E26.NO_UCE@mauve.demon.co.uk> wrote:
: Mark-Oliver Wolter <root@mow.physik.uni-bremen.de> wrote:
: : Or, as a start, to make room for more than 8 characters ...
: <luser>
: I've forgotten my passphrase, can't I have a shorter, easier to remember one.
: </luser>

Though 'easier to remember' does not necessarily mean 'shorter' ...

With longer passphrases you can get the same entropy as in
a 8-byte password *without* having to get *that* cryptic.

-- 
   | | | MfG MOW []-)
   | | | Leher Heerstr.21, Zi.1403, 28359 Bremen, Tel. ++49-177-2503055
  M  O  W  http://www.zfn.uni-bremen.de/~g02o/
/'   |   `\  Always logon - the bright side of life !

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads