Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Sep 2009 18:44:48 +0100
From:      Chris Rees <utisoft@googlemail.com>
To:        Freminlins <freminlins@gmail.com>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: Non-root user and accept() or listen()
Message-ID:  <b79ecaef0909141044l63ec4e76xdebba5f06e645b8e@mail.gmail.com>
In-Reply-To: <eeef1a4c0909140947s5f10b4cdidbd7b41a5539186c@mail.gmail.com>
References:  <eeef1a4c0909140947s5f10b4cdidbd7b41a5539186c@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
2009/9/14 Freminlins <freminlins@gmail.com>:
> Hi,
>
> I am not sure if this exists (but don't think so), so I am asking.
>
> Is there a sysctl type thing to disallow non-root users, or indeed any
> specified user or group, from running a program with listen() ?
>
> What I am looking at is improving network security, such that if a user
> account is compromised it can then not be used to run a dodgy web
> server/whatever on a non-privileged port. Although I can firewall off any
> port I wish, it seems like an obvious thing to disallow any user from
> opening a listening socket in the first place. I am suggesting something
> like "sysctl user.socket_listen" with enable or disable.
>
> Am I being really daft? Or does this exist already?
>
>
> Cheers,
> Frem.


Isn't this a bit drastic? Listening sockets are opened by very many
types of processes, as well as remembering that sendmail, BIND, and
others don't actually run as root... I suppose it'd be possible, but
would it actually be useful?

BTW, there may be an ipfw rule for this, I'll have to look it up when
my servers are back online!

Chris



-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in a mailing list?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b79ecaef0909141044l63ec4e76xdebba5f06e645b8e>