プログラムブログ

PHP、Database、ネットワーク、サーバセキュリティ

SUIDが付与されているファイルの抽出

# find / -perm -u+s -exec ls -la ‘{}’ ‘;’

例. vmware centOS5 デフォルト (運用時はここから不要なSUIDを削っていく必要がある)
-rwsr-xr-x 1 root root 31244  3月 14  2007 /bin/ping6
-rwsr-xr-x 1 root root 24120  5月 24  2008 /bin/su
-rwsr-xr-x 1 root root 35864  3月 14  2007 /bin/ping
-rwsr-xr-x 1 root root 38840  5月 24  2008 /bin/umount
-rwsr-xr-x 1 root root 57908  5月 24  2008 /bin/mount
-rwsr-xr-x 1 root root 13108 11月 29  2007 /usr/bin/rlogin
-rws–x–x 1 root root 19128  5月 24  2008 /usr/bin/chsh
—s–x–x 2 root root 160280  5月 24  2008 /usr/bin/sudoedit
—s–x–x 2 root root 160280  5月 24  2008 /usr/bin/sudo
-rwsr-xr-x 1 root root 43976  1月  6  2007 /usr/bin/at
-rwsr-xr-x 1 root root 22984  1月  6  2007 /usr/bin/passwd
-rwsr-xr-x 1 root root 24588  5月 24  2008 /usr/bin/newgrp
-rws–x–x 1 root root 17900  5月 24  2008 /usr/bin/chfn
-rws–x–x 1 root root 1812708  6月 21  2008 /usr/bin/Xorg
-rwsr-sr-x 1 root root 315416 11月 10  2007 /usr/bin/crontab
-rwsr-xr-x 1 root root 50296  5月 24  2008 /usr/bin/gpasswd
-rwsr-xr-x 1 root root 18544 11月 29  2007 /usr/bin/rcp
-rwsr-xr-x 1 root root 46972  5月 24  2008 /usr/bin/chage
-rwsr-xr-x 1 root root 8908 11月 29  2007 /usr/bin/rsh
-rwsr-xr-x 1 root root 64908  5月 24  2008 /usr/libexec/libvirt_proxy
-rwsr-xr-x 1 root root 176328  5月 24  2008 /usr/libexec/openssh/ssh-keysign
-rwsr-xr-x 1 root root 147447  5月 24  2008 /usr/kerberos/bin/ksu
-r-sr-xr-x 1 root root 20444  3月  3  2008 /usr/lib/vmware-tools/sbin32/vmware-hgfsmounter
-rwsr-xr-x 1 root root 6240  1月  6  2007 /usr/sbin/ccreds_validate
-rws–x–x 1 root root 35036  5月 24  2008 /usr/sbin/userhelper
-rwsr-xr-x 1 root root 6820  6月 14  2008 /usr/sbin/usernetctl
-r-s–x— 1 root apache 24711  1月 21  2008 /usr/sbin/suexec
-rwsr-xr-x 1 root root 6728  5月 24  2008 /usr/sbin/userisdnctl
-rwsr-xr-x 1 root root 19184  5月 24  2008 /sbin/unix_chkpwd
-rwsr-xr-x 1 root root 12248  5月 24  2008 /sbin/pam_timestamp_check
-rwsr-xr-x 1 root root 70484  7月 31 14:49 /sbin/mount.nfs
-rwsr-xr-x 1 root root 70488  7月 31 14:49 /sbin/umount.nfs4
-rwsr-xr-x 1 root root 70488  7月 31 14:49 /sbin/mount.nfs4
-rwsr-xr-x 1 root root 70488  7月 31 14:49 /sbin/umount.nfs

No comments yet. Be the first.

Leave a reply