Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Secure-Shell
[Top] [All Lists]

Enhancements.

Subject: Enhancements.
Date: Fri, 1 Oct 2004 08:22:41 +0100

All,

wanted to control 1000 users logging on to a Tru64 box without the need to
generate 1000 keys and use the force commands option.
We needed the users to logon onto the box but did not want all of them to
be able to run commands. Checked the documentation for Openssh
and various other sources and could not find a way of controlling this
without keys.

Looked at the latest source 3.9p1 source and made changes to session.c to
allow us to control this thru the system sshrc file.

# sshrc

# SSH_SHELL_COMMAND     - shell command the user is attempting to run. Not
set
#                         if user is running interactive login.
# SSH_PARENT            - PID of the sshd connection process.
#
# These parameters are set with Kevin Tomlinsons Patch to session.c


# Check to see if this user is running a command
if [ "${SSH_SHELL_COMMAND}" ]
then case ${SSH_SHELL_COMMAND} in
     /bin/ls*)  :;;                             # Allow LS commands
     *)         echo "Security Violation. Session Terminated" >&2
                kill -15 ${SSH_PARENT};;        # Dont allow commands
     esac
fi
exit 0

Not sure where to post this patch or if its of any use to anyone else but
would like to share.

Thanks


Kevin Tomlinson
UNIX Enterprise Consultant
RHCE - RedHat Certified Engineer.
HCE - Hewlett Packard Certified Engineer.
Solaris - Certified Administrator , Certified Network Administrator ,
Certified Security Administrator.
ktomlinson@scarpgold.co.uk


<Prev in Thread] Current Thread [Next in Thread>
  • Enhancements., Kevin P Tomlinson <=