Host Intrusion Detection
Through the setuid() and setgid() system calls, a person can get privilege which he/she does not have. These systems calls can be executed especially in programs
which have the setuid or setgid bit set. A good example is the
The ls(1) command on such files show the following
Look for setuid and setgid files (especially setuid root
files) everywhere on your system. Intruders often leave setuid copies of
find / -user root -perm -4000 -print
Note that the above examples search the entire directory
tree, including NFS/AFS mounted file systems. Some find(1)
For good security on your host, try to have the minimum
no of setuid programs. If a setuid command is not being used you can
---------------------------- If you install SunOS5.7 with the complete OEM option, it comes with other packages like kerberos, gss etc. I again copy the line from the entry in root file in cron
So even if you do have a valid setuid code, it automatically
gets converted to type data, as a find is made via cron for such
I wish to ask why only the c-shell was secured..ie.you
can't execl("/usr/bin/csh", "csh", 0); it says.. csh: permission denied.
---------------------------- csh checks whether the real userid (getuid()) and the effective user id (geteuid()) return the same value. If not, it exits. So you can't execute csh this way. ---------------------------- I'm not sure whether you went thru the gsscred_clean script & the man pages of gsscred and gssd. They speak abt the Network security and not converting the setuid code to data. To change an exec to data, you have to change the magic no. of the file. ---------------------------- For those who are new to GSS, it stands for Generic Security
Service. It is related to RPC authentication and provides a layer
gsscred_clean is a script in /usr/lib/gss to cleanup the entries from /etc/gss/gsscred_db. As of today GSS is used only by RPC apps. Have fun. ---------------------------- Check your system binaries to make sure that they haven't been altered. We've seen intruders change programs on UNIX systems such as login, su, telnet, netstat, ifconfig, ls, find, du, df, libc, sync, any binaries referenced in /etc/inetd.conf, and other critical network and system programs and shared object libraries. Compare the versions on your systems with known good copies, such as those from your initial installation media. Be careful of trusting backups; your backups could also contain Trojan horses. Trojan horse programs may produce the same standard checksum
and timestamp as the legitimate version. Because of this, the
Have a Unix Problem
Unix Books :-
Return to : - Unix System Administration Hints and Tips (c) www.gotothings.com All material on this site is Copyright.
|