Re: How to enforce "user cannot invoke any programs without first logging on to the system"



"James" <jzheng22@xxxxxxxxx> writes:

I posted the question on comp.unix.admin, then I realized there is
a unix security group, so I repost here. Thanks.

Hi all,

I am writing shell scripts to enforce some security standards. One
of the rules is "Users cannot get access to shell or invoke any other
programs without first logging on to the system"

This looks simple, but there's a lot to it. On one hand, it should be
automatic... you can't do anything on unix without first logging in.
However, poorly secured webservers, for instance, can allow someone to
run commands without logging in certain circumstances. So the larger
goal of keeping all running network apps up to date with secure
versions is very important, as is having any custom code audited for
security.

Does this mean
echo "mkdir /tmp/testdir" | ssh userid@anothermachine
should be prohibited?

No. All that does is makes a directory on the local machine and
pipes the output to a shell on anothermachine. Depending on
anothermachine's sshd conf file settings, a password should be
prompted for. If not, then public key auth has been enabled and
configured. Better to look for public key files on the file system
with find and to audit sshd_config files for allowing such things if
you need to enforce that policy without exception.

How to enforce such kind of security rule? Is there ssh configuration
I should take a look at?

Yes. Typically in /etc/ssh/sshd_config

RSAAuthentication
PubkeyAuthentication settings will be of interest.


Also, you'll want to look for .rhosts files around and whether
rcommands work... There's a lot of configuration stuff to check
actually.


--
Todd H.
http://www.toddh.net/
.



Relevant Pages

  • [UNIX] Berkeley pmake Security Vulnerability
    ... Berkeley pmake Security Vulnerability ... There is a format string bug in the Berkeley's pmake 2.1.33 and below ... If the user puts a shell definition into the Makefile, ... static char eb; ...
    (Securiteam)
  • Re: Enabling telnet, ftp, pop3 for root...
    ... then opens the shell and turns back on ... run ALL the commands they want from the script, ... Since nobody had root access to the machine that held the logs, there wasn't a way that somebody could abuse privilege by hiding what they were doing, without making it quite apparent that they were trying to hide their actions. ... Those are all hurdles that are unnecessary when implementing security. ...
    (alt.os.linux)
  • Re: multiple root accounts,sudo,logging
    ... This is more for logging than security. ... Once someone has a root shell, ...
    (comp.unix.admin)
  • RE: extract zip file
    ... >> shell entirely. ... The main security concern of calling accientally a ... > you avoid a trojan horse when someone places something earlier in the ... > So for proper applications something like Archive::Zip would be ...
    (perl.beginners)
  • Re: Error 1307: Adding File Permissions to NTFS using System.Management Object in ASP.NET
    ... I tried using this code below, but I kept getting a "The security ID ... ActiveDs.IADsSecurityDescriptor folderSD = secuDesc; ... >> Shell Name Explorer.exe in Registry not found in process ...
    (microsoft.public.dotnet.languages.csharp)

Loading