[CentOS] server is always getting hacked

Wed Jul 1 23:52:30 UTC 2009
Stephen Harris <lists at spuddy.org>

On Wed, Jul 01, 2009 at 04:59:36PM -0600, Warren Young wrote:
> Frank Cox wrote:
> > Gary Greene wrote:
> > 
> >> . With sudo,
> >> you get a record of what command was executed with superuser rights by whom
> >> at whenever given hour.
> > 
> > sudo bash
> If that's a problem for you, don't let people run bash via sudo. 
> There's an entire body of articles and such on which processes to 
> restrict because they can give you a sub-shell.

Configuring sudo properly is a bit of a science; for example you don't
allow "sudo less" because inside less you can shell out.  Oops.  It's
amazing how many commands actually allow shell escapes.  What you should
do is only allow a minimal set of commands.