Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # policy generated from full system learning
- define grsec_denied {
- /boot h
- /dev/grsec h
- /dev/kmem h
- /dev/mem h
- /dev/port h
- /etc/grsec h
- /proc/kcore h
- /proc/slabinfo h
- /proc/modules h
- /proc/kallsyms h
- /lib/modules hs
- /lib64/modules hs
- /etc/ssh h
- }
- role admin sA
- subject / rvka
- / rwcdmlxi
- role shutdown sARG
- subject / rvka
- /
- /dev
- /dev/urandom r
- /dev/random r
- /etc r
- /bin rx
- /sbin rx
- /lib rx
- /lib64 rx
- /usr rx
- /proc r
- $grsec_denied
- -CAP_ALL
- connect disabled
- bind disabled
- role default
- subject /
- / h
- -CAP_ALL
- connect disabled
- bind disabled
- role sshd u
- # Role: sshd
- subject / {
- / h
- -CAP_ALL
- bind disabled
- connect disabled
- }
- role root uG
- role_transitions admin shutdown
- role_allow_ip 10.7.0.103/32
- role_allow_ip 0.0.0.0/32
- # Role: root
- subject / {
- / h
- /bin h
- /bin/bash x
- /dev h
- /dev/initctl
- /dev/tty rw
- /etc h
- /etc/bash.bashrc r
- /etc/ld.so.cache r
- /lib rx
- /lib/modules h
- /proc h
- /proc/meminfo r
- /root
- /root/.bashrc r
- /sbin h
- /sbin/gradm x
- /usr h
- /usr/lib/gconv/gconv-modules.cache r
- /usr/lib/locale/locale-archive r
- -CAP_ALL
- bind disabled
- connect disabled
- }
- # Role: root
- subject /usr/sbin/sshd o {
- user_transition_allow sshd root
- group_transition_allow nogroup root
- /
- /bin h
- /bin/bash x
- /boot h
- /dev h
- /dev/log rw
- /dev/null rw
- /dev/urandom r
- /etc r
- /etc/grsec h
- /etc/gshadow h
- /etc/gshadow- h
- /etc/ppp h
- /etc/samba/smbpasswd h
- /etc/shadow- h
- /lib rx
- /lib/modules h
- /lib64/modules h
- /proc w
- /proc/bus h
- /proc/filesystems r
- /proc/kallsyms h
- /proc/kcore h
- /proc/modules h
- /proc/slabinfo h
- /proc/sys/kernel/ngroups_max r
- /sys h
- /usr h
- /usr/lib rx
- /usr/sbin h
- /usr/sbin/sshd x
- /usr/share h
- /usr/share/ssh/blacklist.DSA-1024 r
- /usr/share/ssh/blacklist.RSA-2048 r
- /usr/share/ssh/blacklist.RSA-4096 r
- /var h
- /var/run
- /var/run/motd r
- /var/run/utmp r
- -CAP_ALL
- +CAP_SETGID
- +CAP_SETUID
- +CAP_SYS_CHROOT
- +CAP_SYS_RESOURCE
- bind 0.0.0.0/32:4301 stream tcp
- connect disabled
- sock_allow_family ipv6 netlink
- }
Add Comment
Please, Sign In to add comment