- Code: Select all
subject /specialdir h
Then I started /specialdir/hiddenproc, checked out its PID (i.e. 12345) and enabled the RBAC system. As expected, the 12345 entry dissappeared from the /proc directory listing. Then I tried to 'cat /proc/12345/cmdline' and quite unexpectedly, I could still view it. I could also view the dir listing of /proc/12345.
Even worse, after restarting /specialdir/hiddenproc, its PID even showed up in the /proc directory, making it visible to ps, pstree etc.
Am I doing something wrong or is this a problem with grsecurity?
I'm running grsec 2.0.1 on a kernel 2.6.7 and gradm 2.0.1.
Here is my complete policy (which is in no way intended to be secure yet):
- Code: Select all
role admin sA
subject / r {
/ rwcdmxi
}
role default G
role_transitions admin
subject / {
/ rwcdmxi
/proc rw
/proc/kcore h
/proc/sys r
/etc rx
/etc/grsec h
/bin rx
/sbin rx
/usr/bin rx
/usr/sbin rx
/usr/local/bin rx
/usr/local/sbin rx
/lib rx
/usr/lib rx
/boot r
/vmlinuz r
/vmlinuz.old r
/root rx
/root/.* rwcdmxi
/dev
/dev/grsec h
/dev/urandom r
/dev/random r
/dev/zero rw
/dev/input rw
/dev/psaux rw
/dev/null rw
/dev/tty0 rw
/dev/tty1 rw
/dev/tty2 rw
/dev/tty3 rw
/dev/tty4 rw
/dev/tty5 rw
/dev/tty6 rw
/dev/tty7 rw
/dev/tty8 rw
/dev/console rw
/dev/tty rw
/dev/pts rw
/dev/ptmx rw
/dev/dsp rw
/dev/mixer rw
/dev/initctl rw
/dev/fd0 r
/dev/cdrom r
/dev/mem h
/dev/kmem h
/dev/port h
/dev/log rw
-CAP_SYS_MODULE
-CAP_SYS_RAWIO
-CAP_MKNOD
-CAP_SYS_ADMIN
-CAP_NET_ADMIN
-CAP_NET_BIND_SERVICE
-CAP_SYS_TTY_CONFIG
}
subject /specialdir h