Libvirt virtualization policies
Posted: Fri Feb 17, 2017 2:25 pm
current title: Libvirt virtualization policies
---
I've been trying to deploy policies for libvirtd, qemu, virsh, virt-install and other virtualization programs and this is my third try, in which I finally think I'm getting it right.
I'd like to post how I did it, with lots of detail. Because just to get to the right learning settings it took me a lot of time, and while I might benefit if more advanced grsecurity users review my policies and correct me, it is also likely that newbies can benefit from the polices that I will eventually post, as I believe I'm finally doing it right.
It'll be a few posts.
First, this is how I arrived at the learning polices to set. I'll just diff, consecutively, /etc/grsec/policy files of the fime (I always back up policies, work on the copied back up, and only then substutute the new policy into /etc/grsec/policy.)
EDIT START Sun 26 Feb 21:33:55 CET 2017 :
Before you continue reading this very post, let me update. I have improved my method of posting diffs, and you are likely to get much more readable same content as this same post over at a later post:
( this same topic )
viewtopic.php?f=5&t=4675&p=16997#p16997
I'm leaving the below in case I have made mistakes in my new post linked above.
EDIT END
---
The command that I used:
BTW, I have finally fully understood and started applying PaX Team's advice that he gave me over at Gentoo Bugzilla:
https://bugs.gentoo.org/show_bug.cgi?id=597554#c24
(I'm just not very fast to learn )
And that command above got me:
---
I've been trying to deploy policies for libvirtd, qemu, virsh, virt-install and other virtualization programs and this is my third try, in which I finally think I'm getting it right.
I'd like to post how I did it, with lots of detail. Because just to get to the right learning settings it took me a lot of time, and while I might benefit if more advanced grsecurity users review my policies and correct me, it is also likely that newbies can benefit from the polices that I will eventually post, as I believe I'm finally doing it right.
It'll be a few posts.
First, this is how I arrived at the learning polices to set. I'll just diff, consecutively, /etc/grsec/policy files of the fime (I always back up policies, work on the copied back up, and only then substutute the new policy into /etc/grsec/policy.)
EDIT START Sun 26 Feb 21:33:55 CET 2017 :
Before you continue reading this very post, let me update. I have improved my method of posting diffs, and you are likely to get much more readable same content as this same post over at a later post:
( this same topic )
viewtopic.php?f=5&t=4675&p=16997#p16997
I'm leaving the below in case I have made mistakes in my new post linked above.
EDIT END
---
The command that I used:
- Code: Select all
# rm -pv j_TMP ; for i in $(ls -1 /mnt/H0214_g0n-r/root/ | grep grsec_170|grep -Ev 'grsec_1702\.d|\.tar|HERE'); do if [ -e "/mnt/H0214_g0n-r/root/$j" ]; then j=$(cat j_TMP); ls -ld /mnt/H0214_g0n-r/root/$j /mnt/H0214_g0n-r/root/$i ; echo diff /mnt/H0214_g0n-r/root/$j /mnt/H0214_g0n-r/root/$i ; echo diff /mnt/H0214_g0n-r/root/$j /mnt/H0214_g0n-r/root/$i ; echo >>/Cmn/m/B/Virt_170215/grsec_list_CMD.txt; diff -u35 /mnt/H0214_g0n-r/root/$j /mnt/H0214_g0n-r/root/$i >>/Cmn/m/B/Virt_170215/grsec_list_CMD.txt ; echo "--------------------" >> /Cmn/m/B/Virt_170215/grsec_list_CMD.txt ; fi; echo $i > j_TMP; cat j_TMP; read FAKE; done ;
BTW, I have finally fully understood and started applying PaX Team's advice that he gave me over at Gentoo Bugzilla:
https://bugs.gentoo.org/show_bug.cgi?id=597554#c24
(I'm just not very fast to learn )
And that command above got me:
- Code: Select all
--------------------
--- /mnt/H0214_g0n-r/root/grsec_170211_g0n_01 2017-02-11 12:15:13.245601630 +0100
+++ /mnt/H0214_g0n-r/root/grsec_170211_g0n_02 2017-02-11 12:20:29.643602579 +0100
@@ -3183,70 +3183,71 @@
/usr/bin/vim x
/usr/lib64 rx
/usr/local h
/usr/local/bin rwcd
/usr/portage rw
/usr/share r
/usr/src h
/var
/var/lib/portage
/var/lib/portage/world rw
/var/log rw
-CAP_ALL
+CAP_CHOWN
+CAP_DAC_OVERRIDE
+CAP_DAC_READ_SEARCH
+CAP_FOWNER
+CAP_FSETID
bind disabled
connect disabled
# Role: root
subject /usr/bin/virsh o
/ h
/dev h
/dev/urandom r
/etc r
/etc/grsec h
/etc/gshadow h
/etc/gshadow- h
/etc/libvirt r
/etc/shadow h
/etc/shadow- h
/etc/ssh h
/etc/ssl h
/etc/ssl/openssl.cnf r
+ /home/miro r
/lib64 rx
/lib64/modules h
/proc r
/proc/bus h
/proc/kallsyms h
/proc/kcore h
/proc/modules h
/proc/slabinfo h
/proc/sys h
/root rwcd
/run h
/run/libvirt rw
/usr h
/usr/bin h
/usr/bin/virsh rx
/usr/lib64 rx
/usr/share h
/usr/share/locale r
/usr/share/terminfo r
-CAP_ALL
+CAP_DAC_OVERRIDE
bind disabled
connect disabled
sock_allow_family unix inet ipv6
# Role: root
subject /usr/bin/wget o
/ h
/dev h
/dev/urandom r
/etc r
/etc/grsec h
/etc/gshadow h
/etc/gshadow- h
/etc/passwd h
--------------------
--- /mnt/H0214_g0n-r/root/grsec_170211_g0n_02 2017-02-11 12:20:29.643602579 +0100
+++ /mnt/H0214_g0n-r/root/grsec_170211_g0n_03 2017-02-11 12:39:48.523606053 +0100
@@ -3681,88 +3681,92 @@
/root r
/tmp rwcd
/usr/sbin/crond rx
/usr h
/usr/sbin/sendmail x
/var h
/var/spool/cron rwd
-CAP_ALL
+CAP_CHOWN
+CAP_DAC_OVERRIDE
+CAP_SETGID
+CAP_SETUID
+CAP_SYS_ADMIN
bind disabled
connect disabled
sock_allow_family unix inet
# Role: root
subject /usr/sbin/gpm o
/ h
/dev/input/mice rw
/dev h
/dev/tty* rw
-CAP_ALL
+CAP_SYS_ADMIN
+CAP_SYS_TTY_CONFIG
bind disabled
connect disabled
# Role: root
subject /usr/sbin/libvirtd o
/ h
/dev h
/dev/net/tun rw
/dev/null rw
+ /dev/urandom r
/etc h
/etc/group r
/etc/libvirt r
/etc/passwd r
/proc r
/proc/bus h
/proc/kallsyms h
/proc/kcore h
/proc/modules h
/proc/slabinfo h
/proc/sys h
/run h
/run/libvirt wd
/sbin h
/sbin/xtables-multi x
/sys h
/sys/devices/system/cpu/online r
/usr h
+ /usr/bin
+ /usr/bin/qemu-system-x86_64 x
+ /usr/sbin
/usr/sbin/libvirtd rx
-CAP_ALL
+CAP_DAC_READ_SEARCH
+CAP_KILL
+CAP_NET_ADMIN
+CAP_NET_RAW
bind disabled
connect disabled
sock_allow_family unix inet netlink packet
# Role: root
subject /usr/sbin/logrotate o
user_transition_allow nobody clamav root portage
group_transition_allow nobody clamav root portage
/ h
/bin h
/bin/bash x
/bin/gzip x
/etc r
/etc/grsec h
/etc/gshadow h
/etc/gshadow- h
/etc/shadow h
/etc/shadow- h
/etc/ssh h
/lib64 rx
/lib64/modules h
/root
/usr h
/usr/lib64 rx
/usr/sbin h
/usr/sbin/logrotate rx
/var h
/var/lib rwcd
/var/log rwcd
--------------------
--- /mnt/H0214_g0n-r/root/grsec_170211_g0n_03 2017-02-11 12:39:48.523606053 +0100
+++ /mnt/H0214_g0n-r/root/grsec_170211_g0n_04 2017-02-11 12:54:21.220608669 +0100
@@ -3704,70 +3704,71 @@
-CAP_ALL
+CAP_SYS_ADMIN
+CAP_SYS_TTY_CONFIG
bind disabled
connect disabled
# Role: root
subject /usr/sbin/libvirtd o
/ h
/dev h
/dev/net/tun rw
/dev/null rw
/dev/urandom r
/etc h
/etc/group r
/etc/libvirt r
/etc/passwd r
/proc r
/proc/bus h
/proc/kallsyms h
/proc/kcore h
/proc/modules h
/proc/slabinfo h
/proc/sys h
/run h
/run/libvirt wd
/sbin h
/sbin/xtables-multi x
/sys h
/sys/devices/system/cpu/online r
/usr h
/usr/bin
/usr/bin/qemu-system-x86_64 x
/usr/sbin
/usr/sbin/libvirtd rx
+ /var/cache/libvirt rwcd
-CAP_ALL
+CAP_DAC_READ_SEARCH
+CAP_KILL
+CAP_NET_ADMIN
+CAP_NET_RAW
bind disabled
connect disabled
sock_allow_family unix inet netlink packet
# Role: root
subject /usr/sbin/logrotate o
user_transition_allow nobody clamav root portage
group_transition_allow nobody clamav root portage
/ h
/bin h
/bin/bash x
/bin/gzip x
/etc r
/etc/grsec h
/etc/gshadow h
/etc/gshadow- h
/etc/shadow h
/etc/shadow- h
/etc/ssh h
/lib64 rx
/lib64/modules h
/root
/usr h
/usr/lib64 rx
/usr/sbin h
/usr/sbin/logrotate rx
/var h
/var/lib rwcd
/var/log rwcd
-CAP_ALL
--------------------
--- /mnt/H0214_g0n-r/root/grsec_170211_g0n_04 2017-02-11 12:54:21.220608669 +0100
+++ /mnt/H0214_g0n-r/root/grsec_170211_g0n_05-l 2017-02-11 14:11:20.533622517 +0100
@@ -3676,70 +3676,72 @@
/etc/group r
/etc/localtime r
/etc/passwd r
/proc h
/proc/sys/kernel/ngroups_max r
/root r
/tmp rwcd
/usr/sbin/crond rx
/usr h
/usr/sbin/sendmail x
/var h
/var/spool/cron rwd
-CAP_ALL
+CAP_CHOWN
+CAP_DAC_OVERRIDE
+CAP_SETGID
+CAP_SETUID
+CAP_SYS_ADMIN
bind disabled
connect disabled
sock_allow_family unix inet
# Role: root
subject /usr/sbin/gpm o
/ h
/dev/input/mice rw
/dev h
/dev/tty* rw
-CAP_ALL
+CAP_SYS_ADMIN
+CAP_SYS_TTY_CONFIG
bind disabled
connect disabled
# Role: root
+user_transition_allow root qemu
+group_transition_allow root kvm libvirt qemu
subject /usr/sbin/libvirtd o
/ h
/dev h
/dev/net/tun rw
/dev/null rw
/dev/urandom r
/etc h
/etc/group r
/etc/libvirt r
/etc/passwd r
/proc r
/proc/bus h
/proc/kallsyms h
/proc/kcore h
/proc/modules h
/proc/slabinfo h
/proc/sys h
/run h
/run/libvirt wd
/sbin h
/sbin/xtables-multi x
/sys h
/sys/devices/system/cpu/online r
/usr h
/usr/bin
/usr/bin/qemu-system-x86_64 x
/usr/sbin
/usr/sbin/libvirtd rx
/var/cache/libvirt rwcd
-CAP_ALL
+CAP_DAC_READ_SEARCH
+CAP_KILL
+CAP_NET_ADMIN
+CAP_NET_RAW
bind disabled
@@ -4518,70 +4520,74 @@
/etc/gai.conf r
/etc/hosts r
/etc/localtime r
/etc/resolv.conf r
/run h
/run/clamav/clamd.sock rw
/var h
/var/lib/clamav rwcd
/var/log/clamav rwc
-CAP_ALL
bind 0.0.0.0/32:0 dgram ip
connect 0.0.0.0/0:53 dgram udp
connect 127.0.0.1/32:53 dgram udp
connect 193.92.150.194/32:80 stream dgram tcp udp
connect 195.222.33.229/32:80 stream dgram tcp udp
connect 192.168.1.1/32:53 dgram udp
sock_allow_family netlink
# Role: clamav
subject /usr/sbin/clamd o
/ h
/proc r
/proc/bus h
/proc/kallsyms h
/proc/kcore h
/proc/modules h
/proc/slabinfo h
/proc/sys h
/var/lib/clamav r
/var/log/clamav
/var/log/clamav/clamd.log a
-CAP_ALL
bind disabled
connect disabled
+role kvm gl
+
+role libvirt gl
+
role mysql u
#role_allow_ip 0.0.0.0/32
user_transition_allow root
group_transition_allow root
# Role: mysql
subject /
/ h
-CAP_ALL
bind disabled
connect disabled
# Role: mysql
subject /usr/sbin/mysqld o
user_transition_allow root mysql nobody
group_transition_allow root mysql nobody
/ h
/sys/devices/system/cpu/online r
/tmp rwcd
/usr/sbin/mysqld rx
/var/lib/mysql rwcd
# /var/lib/mysql/performance_schema
# /var/lib/mysql/performance_schema/db.opt r
-CAP_ALL
bind 127.0.0.1/32:3306 stream tcp
connect disabled
role postfix u
role_allow_ip 0.0.0.0/32
user_transition_allow root
group_transition_allow root
# Role: postfix
subject /
/ h
/dev/urandom r
/etc/localtime
@@ -4618,70 +4624,74 @@
/proc h
/proc/sys/kernel/ngroups_max r
/root
/root/Maildir rwcdl
/sys h
/sys/devices/system/cpu/online r
/usr h
/usr/lib64 rx
/usr/libexec x
/var h
/var/lib/postfix rwcd
/var/spool/postfix rwcdl
/var/tmp
-CAP_ALL
+CAP_DAC_READ_SEARCH
+CAP_KILL
+CAP_SETGID
+CAP_SETUID
bind 0.0.0.0/32:0 ip dgram stream tcp udp
connect 127.0.0.1/32 ip dgram stream tcp udp
connect 192.168.1.1/32:53 dgram udp
connect 195.29.150.0/24 ip dgram stream tcp udp
connect 178.218.165.68/32 ip dgram stream tcp udp
sock_allow_family all
# Role: postfix
subject /usr/sbin/postsuper o
user_transition_allow root
group_transition_allow root
/ h
/var/spool/postfix wd
-CAP_ALL
bind disabled
connect disabled
+role qemu ul
+user_transition_allow root qemu
+group_transition_allow root kvm libvirt qemu
+
role tcpdump u
subject / o
/ h
-CAP_ALL
bind disabled
connect disabled
# Role: tcpdump
subject /usr/sbin/tcpdump o
user_transition_allow miro root nobody tcpdump
group_transition_allow miro root nobody tcpdump
/ h
/Cmn rwc
/etc h
/etc/host.conf r
/etc/hosts r
/etc/ld.so.cache r
/etc/resolv.conf r
/lib64 h
/lib64/libnss_dns-2.23.so rx
/lib64/libresolv-2.23.so rx
/lib64/libresolv.so.2 rx
/proc r
/proc/bus h
/proc/kallsyms h
/proc/kcore h
/proc/modules h
/proc/slabinfo h
/proc/sys h
/usr h
/usr/sbin/tcpdump rx
-CAP_ALL
+CAP_DAC_OVERRIDE
bind 0.0.0.0/32:0 dgram ip
connect 127.0.0.1/32:53 dgram udp
--------------------
--- /mnt/H0214_g0n-r/root/grsec_170211_g0n_05-l 2017-02-11 14:11:20.533622517 +0100
+++ /mnt/H0214_g0n-r/root/grsec_170211_g0n_06-l 2017-02-11 14:15:30.337623266 +0100
@@ -4521,72 +4521,76 @@
/etc/hosts r
/etc/localtime r
/etc/resolv.conf r
/run h
/run/clamav/clamd.sock rw
/var h
/var/lib/clamav rwcd
/var/log/clamav rwc
-CAP_ALL
bind 0.0.0.0/32:0 dgram ip
connect 0.0.0.0/0:53 dgram udp
connect 127.0.0.1/32:53 dgram udp
connect 193.92.150.194/32:80 stream dgram tcp udp
connect 195.222.33.229/32:80 stream dgram tcp udp
connect 192.168.1.1/32:53 dgram udp
sock_allow_family netlink
# Role: clamav
subject /usr/sbin/clamd o
/ h
/proc r
/proc/bus h
/proc/kallsyms h
/proc/kcore h
/proc/modules h
/proc/slabinfo h
/proc/sys h
/var/lib/clamav r
/var/log/clamav
/var/log/clamav/clamd.log a
-CAP_ALL
bind disabled
connect disabled
role kvm gl
+user_transition_allow root qemu
+group_transition_allow root kvm libvirt qemu
role libvirt gl
+user_transition_allow root qemu
+group_transition_allow root kvm libvirt qemu
role mysql u
#role_allow_ip 0.0.0.0/32
user_transition_allow root
group_transition_allow root
# Role: mysql
subject /
/ h
-CAP_ALL
bind disabled
connect disabled
# Role: mysql
subject /usr/sbin/mysqld o
user_transition_allow root mysql nobody
group_transition_allow root mysql nobody
/ h
/sys/devices/system/cpu/online r
/tmp rwcd
/usr/sbin/mysqld rx
/var/lib/mysql rwcd
# /var/lib/mysql/performance_schema
# /var/lib/mysql/performance_schema/db.opt r
-CAP_ALL
bind 127.0.0.1/32:3306 stream tcp
connect disabled
role postfix u
role_allow_ip 0.0.0.0/32
user_transition_allow root
group_transition_allow root
# Role: postfix
subject /
/ h
/dev/urandom r
--------------------
--- /mnt/H0214_g0n-r/root/grsec_170211_g0n_06-l 2017-02-11 14:15:30.337623266 +0100
+++ /mnt/H0214_g0n-r/root/grsec_170211_g0n_07-l 2017-02-11 15:35:09.099637592 +0100
@@ -578,72 +578,72 @@
/usr/lib64/locale/locale-archive r
/usr/portage wd
-CAP_ALL
bind disabled
connect disabled
# Role: portage
subject /usr/bin/wget o
/ h
/dev h
/dev/urandom r
/etc h
/etc/ld.so.cache r
/etc/localtime r
/etc/wgetrc r
/lib64 rx
/lib64/modules h
/usr h
/usr/bin h
/usr/bin/wget x
/usr/lib64 rx
/usr/portage wc
/var h
/var/log/portage_logs
/var/log/portage_logs/wget-fetch.log a
-CAP_ALL
bind disabled
connect 192.168.2.0/24:80 stream tcp
connect 192.168.3.0/24:80 stream tcp
role root uG
role_transitions admin shutdown
role_allow_ip 192.168.2.0/24
role_allow_ip 192.168.3.0/24
role_allow_ip 0.0.0.0/32
-user_transition_allow apache miro tcpdump
-group_transition_allow apache miro tcpdump
+user_transition_allow apache miro tcpdump qemu
+group_transition_allow apache miro tcpdump kvm libvirt qemu
# Role: root
subject /
/ h
/Cmn r
/Cmn/Kaff rwxcd
/Cmn/MyVideos rwxcd
/Cmn/dLo rwxcd
/Cmn/gX* rwxcd
/Cmn/m* rwxcd
/bin rx
/sbin rx
/dev
/dev/grsec h
/dev/kmem h
/dev/log h
/dev/mem h
/dev/null rw
/dev/port h
/dev/tty rw
/dev/urandom r
/etc rx
/etc/grsec h
/etc/gshadow h
/etc/gshadow- h
/etc/shadow h
/etc/shadow- h
/etc/ssh h
/export h
/export/data
/export/home
/home h
/home/miro rx
/lib64 rx
/lib64/firmware h
/lib64/firmware/radeon
--------------------
--- /mnt/H0214_g0n-r/root/grsec_170211_g0n_07-l 2017-02-11 15:35:09.099637592 +0100
+++ /mnt/H0214_g0n-r/root/grsec_170211_g0n_08-l 2017-02-11 15:43:59.647639183 +0100
@@ -3712,70 +3712,72 @@
group_transition_allow root kvm libvirt qemu
subject /usr/sbin/libvirtd o
/ h
/dev h
/dev/net/tun rw
/dev/null rw
/dev/urandom r
/etc h
/etc/group r
/etc/libvirt r
/etc/passwd r
/proc r
/proc/bus h
/proc/kallsyms h
/proc/kcore h
/proc/modules h
/proc/slabinfo h
/proc/sys h
/run h
/run/libvirt wd
/sbin h
/sbin/xtables-multi x
/sys h
/sys/devices/system/cpu/online r
/usr h
/usr/bin
/usr/bin/qemu-system-x86_64 x
/usr/sbin
/usr/sbin/libvirtd rx
/var/cache/libvirt rwcd
-CAP_ALL
+CAP_DAC_READ_SEARCH
+CAP_KILL
+CAP_NET_ADMIN
+CAP_NET_RAW
+ +CAP_SETGID
+ +CAP_DAC_OVERRIDE
bind disabled
connect disabled
sock_allow_family unix inet netlink packet
# Role: root
subject /usr/sbin/logrotate o
user_transition_allow nobody clamav root portage
group_transition_allow nobody clamav root portage
/ h
/bin h
/bin/bash x
/bin/gzip x
/etc r
/etc/grsec h
/etc/gshadow h
/etc/gshadow- h
/etc/shadow h
/etc/shadow- h
/etc/ssh h
/lib64 rx
/lib64/modules h
/root
/usr h
/usr/lib64 rx
/usr/sbin h
/usr/sbin/logrotate rx
/var h
/var/lib rwcd
/var/log rwcd
-CAP_ALL
+CAP_DAC_READ_SEARCH
+CAP_SETGID
+CAP_SETUID
bind disabled
connect disabled
--------------------
--- /mnt/H0214_g0n-r/root/grsec_170211_g0n_08-l 2017-02-11 15:43:59.647639183 +0100
+++ /mnt/H0214_g0n-r/root/grsec_170211_g0n_09-l 2017-02-11 15:50:22.619640331 +0100
@@ -3712,70 +3712,71 @@
group_transition_allow root kvm libvirt qemu
subject /usr/sbin/libvirtd o
/ h
/dev h
/dev/net/tun rw
/dev/null rw
/dev/urandom r
/etc h
/etc/group r
/etc/libvirt r
/etc/passwd r
/proc r
/proc/bus h
/proc/kallsyms h
/proc/kcore h
/proc/modules h
/proc/slabinfo h
/proc/sys h
/run h
/run/libvirt wd
/sbin h
/sbin/xtables-multi x
/sys h
/sys/devices/system/cpu/online r
/usr h
/usr/bin
/usr/bin/qemu-system-x86_64 x
/usr/sbin
/usr/sbin/libvirtd rx
/var/cache/libvirt rwcd
-CAP_ALL
+CAP_DAC_READ_SEARCH
+CAP_KILL
+CAP_NET_ADMIN
+CAP_NET_RAW
+ +CAP_SETUID
+CAP_SETGID
+CAP_DAC_OVERRIDE
bind disabled
connect disabled
sock_allow_family unix inet netlink packet
# Role: root
subject /usr/sbin/logrotate o
user_transition_allow nobody clamav root portage
group_transition_allow nobody clamav root portage
/ h
/bin h
/bin/bash x
/bin/gzip x
/etc r
/etc/grsec h
/etc/gshadow h
/etc/gshadow- h
/etc/shadow h
/etc/shadow- h
/etc/ssh h
/lib64 rx
/lib64/modules h
/root
/usr h
/usr/lib64 rx
/usr/sbin h
/usr/sbin/logrotate rx
/var h
/var/lib rwcd
/var/log rwcd
-CAP_ALL
+CAP_DAC_READ_SEARCH
+CAP_SETGID
+CAP_SETUID
--------------------
--- /mnt/H0214_g0n-r/root/grsec_170211_g0n_09-l 2017-02-11 15:50:22.619640331 +0100
+++ /mnt/H0214_g0n-r/root/grsec_170211_g0n_10-l 2017-02-11 16:15:47.772644903 +0100
@@ -3695,70 +3695,72 @@
connect disabled
sock_allow_family unix inet
# Role: root
subject /usr/sbin/gpm o
/ h
/dev/input/mice rw
/dev h
/dev/tty* rw
-CAP_ALL
+CAP_SYS_ADMIN
+CAP_SYS_TTY_CONFIG
bind disabled
connect disabled
# Role: root
user_transition_allow root qemu
group_transition_allow root kvm libvirt qemu
subject /usr/sbin/libvirtd o
/ h
/dev h
/dev/net/tun rw
/dev/null rw
/dev/urandom r
/etc h
/etc/group r
/etc/libvirt r
/etc/passwd r
/proc r
/proc/bus h
/proc/kallsyms h
/proc/kcore h
/proc/modules h
/proc/slabinfo h
/proc/sys h
+ /proc/sys/kernel r
+# /proc/sys/kernel/cap_last_cap r
/run h
/run/libvirt wd
/sbin h
/sbin/xtables-multi x
/sys h
/sys/devices/system/cpu/online r
/usr h
/usr/bin
/usr/bin/qemu-system-x86_64 x
/usr/sbin
/usr/sbin/libvirtd rx
/var/cache/libvirt rwcd
-CAP_ALL
+CAP_DAC_READ_SEARCH
+CAP_KILL
+CAP_NET_ADMIN
+CAP_NET_RAW
+CAP_SETUID
+CAP_SETGID
+CAP_DAC_OVERRIDE
bind disabled
connect disabled
sock_allow_family unix inet netlink packet
# Role: root
subject /usr/sbin/logrotate o
user_transition_allow nobody clamav root portage
group_transition_allow nobody clamav root portage
/ h
/bin h
/bin/bash x
/bin/gzip x
/etc r
/etc/grsec h
/etc/gshadow h
--------------------
--- /mnt/H0214_g0n-r/root/grsec_170211_g0n_10-l 2017-02-11 16:15:47.772644903 +0100
+++ /mnt/H0214_g0n-r/root/grsec_170211_g0n_11-l 2017-02-11 16:37:39.156648834 +0100
@@ -3686,71 +3686,71 @@
/var h
/var/spool/cron rwd
-CAP_ALL
+CAP_CHOWN
+CAP_DAC_OVERRIDE
+CAP_SETGID
+CAP_SETUID
+CAP_SYS_ADMIN
bind disabled
connect disabled
sock_allow_family unix inet
# Role: root
subject /usr/sbin/gpm o
/ h
/dev/input/mice rw
/dev h
/dev/tty* rw
-CAP_ALL
+CAP_SYS_ADMIN
+CAP_SYS_TTY_CONFIG
bind disabled
connect disabled
# Role: root
user_transition_allow root qemu
group_transition_allow root kvm libvirt qemu
subject /usr/sbin/libvirtd o
/ h
/dev h
/dev/net/tun rw
/dev/null rw
/dev/urandom r
/etc h
/etc/group r
- /etc/libvirt r
+ /etc/libvirt rwcdl
/etc/passwd r
/proc r
/proc/bus h
/proc/kallsyms h
/proc/kcore h
/proc/modules h
/proc/slabinfo h
/proc/sys h
/proc/sys/kernel r
# /proc/sys/kernel/cap_last_cap r
/run h
/run/libvirt wd
/sbin h
/sbin/xtables-multi x
/sys h
/sys/devices/system/cpu/online r
/usr h
/usr/bin
/usr/bin/qemu-system-x86_64 x
/usr/sbin
/usr/sbin/libvirtd rx
/var/cache/libvirt rwcd
-CAP_ALL
+CAP_DAC_READ_SEARCH
+CAP_KILL
+CAP_NET_ADMIN
+CAP_NET_RAW
+CAP_SETUID
+CAP_SETGID
+CAP_DAC_OVERRIDE
bind disabled
connect disabled
sock_allow_family unix inet netlink packet
# Role: root
--------------------
--- /mnt/H0214_g0n-r/root/grsec_170211_g0n_11-l 2017-02-11 16:37:39.156648834 +0100
+++ /mnt/H0214_g0n-r/root/grsec_170211_g0n_12-l 2017-02-11 18:19:35.056667169 +0100
@@ -3699,74 +3699,76 @@
subject /usr/sbin/gpm o
/ h
/dev/input/mice rw
/dev h
/dev/tty* rw
-CAP_ALL
+CAP_SYS_ADMIN
+CAP_SYS_TTY_CONFIG
bind disabled
connect disabled
# Role: root
user_transition_allow root qemu
group_transition_allow root kvm libvirt qemu
subject /usr/sbin/libvirtd o
/ h
/dev h
/dev/net/tun rw
/dev/null rw
/dev/urandom r
/etc h
/etc/group r
/etc/libvirt rwcdl
/etc/passwd r
/proc r
/proc/bus h
/proc/kallsyms h
/proc/kcore h
/proc/modules h
/proc/slabinfo h
/proc/sys h
/proc/sys/kernel r
# /proc/sys/kernel/cap_last_cap r
/run h
/run/libvirt wd
+ /run/xtables.lock wcd
/sbin h
/sbin/xtables-multi x
/sys h
/sys/devices/system/cpu/online r
+ /sys/devices/virtual/net/virbr1 r
/usr h
/usr/bin
/usr/bin/qemu-system-x86_64 x
/usr/sbin
/usr/sbin/libvirtd rx
/var/cache/libvirt rwcd
-CAP_ALL
+CAP_DAC_READ_SEARCH
+CAP_KILL
+CAP_NET_ADMIN
+CAP_NET_RAW
+CAP_SETUID
+CAP_SETGID
+CAP_DAC_OVERRIDE
bind disabled
connect disabled
sock_allow_family unix inet netlink packet
# Role: root
subject /usr/sbin/logrotate o
user_transition_allow nobody clamav root portage
group_transition_allow nobody clamav root portage
/ h
/bin h
/bin/bash x
/bin/gzip x
/etc r
/etc/grsec h
/etc/gshadow h
/etc/gshadow- h
/etc/shadow h
/etc/shadow- h
/etc/ssh h
/lib64 rx
/lib64/modules h
--------------------
--- /mnt/H0214_g0n-r/root/grsec_170211_g0n_12-l 2017-02-11 18:19:35.056667169 +0100
+++ /mnt/H0214_g0n-r/root/grsec_170211_g0n_13-l 2017-02-11 19:02:20.433674860 +0100
@@ -3681,70 +3681,71 @@
/root r
/tmp rwcd
/usr/sbin/crond rx
/usr h
/usr/sbin/sendmail x
/var h
/var/spool/cron rwd
-CAP_ALL
+CAP_CHOWN
+CAP_DAC_OVERRIDE
+CAP_SETGID
+CAP_SETUID
+CAP_SYS_ADMIN
bind disabled
connect disabled
sock_allow_family unix inet
# Role: root
subject /usr/sbin/gpm o
/ h
/dev/input/mice rw
/dev h
/dev/tty* rw
-CAP_ALL
+CAP_SYS_ADMIN
+CAP_SYS_TTY_CONFIG
bind disabled
connect disabled
# Role: root
user_transition_allow root qemu
group_transition_allow root kvm libvirt qemu
subject /usr/sbin/libvirtd o
/ h
/dev h
+ /dev/kvm rw
/dev/net/tun rw
/dev/null rw
/dev/urandom r
/etc h
/etc/group r
/etc/libvirt rwcdl
/etc/passwd r
/proc r
/proc/bus h
/proc/kallsyms h
/proc/kcore h
/proc/modules h
/proc/slabinfo h
/proc/sys h
/proc/sys/kernel r
# /proc/sys/kernel/cap_last_cap r
/run h
/run/libvirt wd
/run/xtables.lock wcd
/sbin h
/sbin/xtables-multi x
/sys h
/sys/devices/system/cpu/online r
/sys/devices/virtual/net/virbr1 r
/usr h
/usr/bin
/usr/bin/qemu-system-x86_64 x
/usr/sbin
/usr/sbin/libvirtd rx
/var/cache/libvirt rwcd
-CAP_ALL
+CAP_DAC_READ_SEARCH
+CAP_KILL
+CAP_NET_ADMIN
+CAP_NET_RAW
--------------------
--- /mnt/H0214_g0n-r/root/grsec_170211_g0n_13-l 2017-02-11 19:02:20.433674860 +0100
+++ /mnt/H0214_g0n-r/root/grsec_170211_g0n_14-l 2017-02-11 19:22:36.411678505 +0100
@@ -3722,71 +3722,71 @@
/etc/libvirt rwcdl
/etc/passwd r
/proc r
/proc/bus h
/proc/kallsyms h
/proc/kcore h
/proc/modules h
/proc/slabinfo h
/proc/sys h
/proc/sys/kernel r
# /proc/sys/kernel/cap_last_cap r
/run h
/run/libvirt wd
/run/xtables.lock wcd
/sbin h
/sbin/xtables-multi x
/sys h
/sys/devices/system/cpu/online r
/sys/devices/virtual/net/virbr1 r
/usr h
/usr/bin
/usr/bin/qemu-system-x86_64 x
/usr/sbin
/usr/sbin/libvirtd rx
/var/cache/libvirt rwcd
-CAP_ALL
+CAP_DAC_READ_SEARCH
+CAP_KILL
+CAP_NET_ADMIN
+CAP_NET_RAW
+CAP_SETUID
+CAP_SETGID
+CAP_DAC_OVERRIDE
bind disabled
connect disabled
- sock_allow_family unix inet netlink packet
+ sock_allow_family unix inet ipv6 netlink packet
# Role: root
subject /usr/sbin/logrotate o
user_transition_allow nobody clamav root portage
group_transition_allow nobody clamav root portage
/ h
/bin h
/bin/bash x
/bin/gzip x
/etc r
/etc/grsec h
/etc/gshadow h
/etc/gshadow- h
/etc/shadow h
/etc/shadow- h
/etc/ssh h
/lib64 rx
/lib64/modules h
/root
/usr h
/usr/lib64 rx
/usr/sbin h
/usr/sbin/logrotate rx
/var h
/var/lib rwcd
/var/log rwcd
-CAP_ALL
+CAP_DAC_READ_SEARCH
+CAP_SETGID
+CAP_SETUID
bind disabled
connect disabled
sock_allow_family unix inet
## Role: root
--------------------
--- /mnt/H0214_g0n-r/root/grsec_170211_g0n_14-l 2017-02-11 19:22:36.411678505 +0100
+++ /mnt/H0214_g0n-r/root/grsec_170211_g0n_15-l 2017-02-11 19:40:40.707681756 +0100
@@ -3722,71 +3722,71 @@
/etc/libvirt rwcdl
/etc/passwd r
/proc r
/proc/bus h
/proc/kallsyms h
/proc/kcore h
/proc/modules h
/proc/slabinfo h
/proc/sys h
/proc/sys/kernel r
# /proc/sys/kernel/cap_last_cap r
/run h
/run/libvirt wd
/run/xtables.lock wcd
/sbin h
/sbin/xtables-multi x
/sys h
/sys/devices/system/cpu/online r
/sys/devices/virtual/net/virbr1 r
/usr h
/usr/bin
/usr/bin/qemu-system-x86_64 x
/usr/sbin
/usr/sbin/libvirtd rx
/var/cache/libvirt rwcd
-CAP_ALL
+CAP_DAC_READ_SEARCH
+CAP_KILL
+CAP_NET_ADMIN
+CAP_NET_RAW
+CAP_SETUID
+CAP_SETGID
+CAP_DAC_OVERRIDE
bind disabled
connect disabled
- sock_allow_family unix inet ipv6 netlink packet
+ sock_allow_family all
# Role: root
subject /usr/sbin/logrotate o
user_transition_allow nobody clamav root portage
group_transition_allow nobody clamav root portage
/ h
/bin h
/bin/bash x
/bin/gzip x
/etc r
/etc/grsec h
/etc/gshadow h
/etc/gshadow- h
/etc/shadow h
/etc/shadow- h
/etc/ssh h
/lib64 rx
/lib64/modules h
/root
/usr h
/usr/lib64 rx
/usr/sbin h
/usr/sbin/logrotate rx
/var h
/var/lib rwcd
/var/log rwcd
-CAP_ALL
+CAP_DAC_READ_SEARCH
+CAP_SETGID
+CAP_SETUID
bind disabled
connect disabled
sock_allow_family unix inet
## Role: root
--------------------
--- /mnt/H0214_g0n-r/root/grsec_170211_g0n_15-l 2017-02-11 19:40:40.707681756 +0100
+++ /mnt/H0214_g0n-r/root/grsec_170211_g0n_16-l 2017-02-11 19:48:40.761683195 +0100
@@ -1853,70 +1853,71 @@
/etc/localtime r
/etc/nsswitch.conf r
/lib64 rx
/lib64/modules h
/run rw
/sbin h
/sbin/agetty x
/usr h
/usr/lib64/locale/locale-archive r
/usr/share/locale r
/var h
/var/log/wtmp w
-CAP_ALL
+CAP_CHOWN
+CAP_DAC_OVERRIDE
+CAP_FSETID
+CAP_SYS_ADMIN
+CAP_SYS_TTY_CONFIG
bind disabled
connect disabled
# Role: root
subject /sbin/init o
/ h
/bin
/bin/login x
/dev h
/dev/console rw
/dev/initctl rw
/dev/log rw
/run h
/run/utmp rw
/sbin h
/sbin/agetty x
/usr/sbin/conntrackd r
+ /usr/sbin/libvirtd r
/var h
/var/log/wtmp w
/var/lib/dhcpcd w
-CAP_ALL
bind disabled
connect disabled
# Role: root
subject /sbin/installkernel o
/ h
/bin x
/boot wc
/dev h
/dev/tty rw
/etc h
/etc/ld.so.cache r
/lib64 rx
/lib64/modules h
/proc h
/proc/meminfo r
/sbin h
/sbin/installkernel r
/usr h
/usr/lib64/gconv/gconv-modules.cache r
/usr/lib64/locale/locale-archive r
# /usr/src/linux-3.18.5-hardened-r1
-CAP_ALL
bind disabled
connect disabled
# Role: root
subject /sbin/macchanger o
/ h
/dev h
/dev/hwrng r
--------------------
--- /mnt/H0214_g0n-r/root/grsec_170211_g0n_16-l 2017-02-11 19:48:40.761683195 +0100
+++ /mnt/H0214_g0n-r/root/grsec_170212_g0n_00-l 2017-02-12 00:54:57.313738285 +0100
@@ -1853,71 +1853,70 @@
/etc/localtime r
/etc/nsswitch.conf r
/lib64 rx
/lib64/modules h
/run rw
/sbin h
/sbin/agetty x
/usr h
/usr/lib64/locale/locale-archive r
/usr/share/locale r
/var h
/var/log/wtmp w
-CAP_ALL
+CAP_CHOWN
+CAP_DAC_OVERRIDE
+CAP_FSETID
+CAP_SYS_ADMIN
+CAP_SYS_TTY_CONFIG
bind disabled
connect disabled
# Role: root
subject /sbin/init o
/ h
/bin
/bin/login x
/dev h
/dev/console rw
/dev/initctl rw
/dev/log rw
/run h
/run/utmp rw
/sbin h
/sbin/agetty x
/usr/sbin/conntrackd r
- /usr/sbin/libvirtd r
/var h
/var/log/wtmp w
/var/lib/dhcpcd w
-CAP_ALL
bind disabled
connect disabled
# Role: root
subject /sbin/installkernel o
/ h
/bin x
/boot wc
/dev h
/dev/tty rw
/etc h
/etc/ld.so.cache r
/lib64 rx
/lib64/modules h
/proc h
/proc/meminfo r
/sbin h
/sbin/installkernel r
/usr h
/usr/lib64/gconv/gconv-modules.cache r
/usr/lib64/locale/locale-archive r
# /usr/src/linux-3.18.5-hardened-r1
-CAP_ALL
bind disabled
connect disabled
# Role: root
subject /sbin/macchanger o
/ h
/dev h
/dev/hwrng r
@@ -7746,76 +7745,78 @@
/etc/gshadow- h
/etc/shadow h
/etc/shadow- h
/etc/ssh h
/etc/ssl h
/etc/ssl/openssl.cnf r
/home h
/home/miro rwcd
/lib/modules h
/lib64 rx
/lib64/modules h
/proc r
/proc/bus h
/proc/kallsyms h
/proc/kcore h
/proc/modules h
/proc/slabinfo h
/run h
/run/libvirt rw
/sys h
/usr h
/usr/bin h
/usr/bin/virsh rx
/usr/lib64 rx
/usr/sbin h
/usr/sbin/libvirtd x
/usr/share h
/usr/share/locale r
/usr/share/terminfo r
/var/log h
-CAP_ALL
bind disabled
connect disabled
sock_allow_family unix inet ipv6
-## Role: miro
-#subject /usr/bin/virt-install ol
-# / h
-# -CAP_ALL
-# bind disabled
-# connect disabled
+# Role: miro
+user_transition_allow root qemu
+group_transition_allow root kvm libvirt qemu
+subject /usr/bin/virt-install ol
+ / h
+ -CAP_ALL
+ bind disabled
+ connect disabled
# Role: miro
subject /usr/bin/wget o
/ h
/Cmn rwc
/Cmn/dLo rwcdl
/dev h
/dev/urandom r
/etc r
/etc/grsec h
/etc/gshadow h
/etc/gshadow- h
/etc/passwd h
/etc/shadow h
/etc/shadow- h
/etc/ssh h
/etc/ssl h
/etc/ssl/certs/ca-certificates.crt r
/home
/home/miro rwc
/lib64 rx
/lib64/modules h
/mnt wc
/proc
/proc/bus h
/proc/kallsyms h
/proc/kcore h
/proc/modules h
/proc/slabinfo h
/proc/sys h
/tmp rwcd
/usr h
/usr/bin h
/usr/bin/wget rx
/usr/lib64 rx
--------------------
--- /mnt/H0214_g0n-r/root/grsec_170212_g0n_00-l 2017-02-12 00:54:57.313738285 +0100
+++ /mnt/H0214_g0n-r/root/grsec_170212_g0n_01-l 2017-02-12 01:03:08.173739757 +0100
@@ -6991,70 +6991,71 @@
/lib64/modules h
/proc
/proc/bus h
/proc/kallsyms h
/proc/kcore h
/proc/meminfo r
/proc/modules h
/proc/slabinfo h
/proc/sys h
/usr h
/usr/bin h
/usr/bin/openssl rx
/usr/lib64 h
/usr/lib64/libcrypto.so.1.* rx
/usr/lib64/libssl.so.1.* rx
/usr/share r
-CAP_ALL
bind 0.0.0.0/32:0 dgram ip
# connect 192.168.3.0/24:443 stream tcp
connect 0.0.0.0/0:443 stream tcp
connect 0.0.0.0/0:993 stream tcp
connect 0.0.0.0/0:995 stream tcp
connect 192.168.1.1/32:53 dgram udp
# Role: miro
subject /usr/bin/python2.7 o
/ h
/etc h
/etc/ld.so.cache r
/lib64 rx
/lib64/modules h
/usr
/usr/bin
/usr/bin/python2.7 rx
/usr/lib64 rx
+ /usr/share/virt-manager/virt-install rx
/usr/src h
-CAP_ALL
bind disabled
connect disabled
sock_allow_family unix inet
# Role: miro
subject /usr/bin/python3.4m o
/ h
/Cmn h
/Cmn/Kaff rwcd
/bin h
/bin/bash x
/dev h
/dev/null rw
/dev/urandom r
/etc h
/etc/hosts r
/etc/ld.so.cache r
/etc/localtime r
/etc/mime.types r
/etc/resolv.conf
/lib64 rx
/lib64/modules h
/proc r
/proc/bus h
/proc/kallsyms h
/proc/kcore h
/proc/modules h
/proc/slabinfo h
/proc/sys h
/sbin h
/sbin/ldconfig x
/tmp rwcd
/usr
--------------------
--- /mnt/H0214_g0n-r/root/grsec_170212_g0n_01-l 2017-02-12 01:03:08.173739757 +0100
+++ /mnt/H0214_g0n-r/root/grsec_170212_g0n_02-l 2017-02-12 01:06:38.684740388 +0100
@@ -6985,70 +6985,71 @@
/etc/ssh h
/etc/ssl h
/etc/ssl/openssl.cnf r
/home h
/home/miro rw
/lib64 rx
/lib64/modules h
/proc
/proc/bus h
/proc/kallsyms h
/proc/kcore h
/proc/meminfo r
/proc/modules h
/proc/slabinfo h
/proc/sys h
/usr h
/usr/bin h
/usr/bin/openssl rx
/usr/lib64 h
/usr/lib64/libcrypto.so.1.* rx
/usr/lib64/libssl.so.1.* rx
/usr/share r
-CAP_ALL
bind 0.0.0.0/32:0 dgram ip
# connect 192.168.3.0/24:443 stream tcp
connect 0.0.0.0/0:443 stream tcp
connect 0.0.0.0/0:993 stream tcp
connect 0.0.0.0/0:995 stream tcp
connect 192.168.1.1/32:53 dgram udp
# Role: miro
subject /usr/bin/python2.7 o
/ h
/etc h
/etc/ld.so.cache r
+ /etc/localtime r
/lib64 rx
/lib64/modules h
/usr
/usr/bin
/usr/bin/python2.7 rx
/usr/lib64 rx
/usr/share/virt-manager/virt-install rx
/usr/src h
-CAP_ALL
bind disabled
connect disabled
sock_allow_family unix inet
# Role: miro
subject /usr/bin/python3.4m o
/ h
/Cmn h
/Cmn/Kaff rwcd
/bin h
/bin/bash x
/dev h
/dev/null rw
/dev/urandom r
/etc h
/etc/hosts r
/etc/ld.so.cache r
/etc/localtime r
/etc/mime.types r
/etc/resolv.conf
/lib64 rx
/lib64/modules h
/proc r
/proc/bus h
/proc/kallsyms h
/proc/kcore h
--------------------
--- /mnt/H0214_g0n-r/root/grsec_170212_g0n_02-l 2017-02-12 01:06:38.684740388 +0100
+++ /mnt/H0214_g0n-r/root/grsec_170212_g0n_03-l 2017-02-12 01:09:54.846740976 +0100
@@ -6981,87 +6981,75 @@
/etc/gshadow- h
/etc/passwd h
/etc/shadow h
/etc/shadow- h
/etc/ssh h
/etc/ssl h
/etc/ssl/openssl.cnf r
/home h
/home/miro rw
/lib64 rx
/lib64/modules h
/proc
/proc/bus h
/proc/kallsyms h
/proc/kcore h
/proc/meminfo r
/proc/modules h
/proc/slabinfo h
/proc/sys h
/usr h
/usr/bin h
/usr/bin/openssl rx
/usr/lib64 h
/usr/lib64/libcrypto.so.1.* rx
/usr/lib64/libssl.so.1.* rx
/usr/share r
-CAP_ALL
bind 0.0.0.0/32:0 dgram ip
# connect 192.168.3.0/24:443 stream tcp
connect 0.0.0.0/0:443 stream tcp
connect 0.0.0.0/0:993 stream tcp
connect 0.0.0.0/0:995 stream tcp
connect 192.168.1.1/32:53 dgram udp
# Role: miro
-subject /usr/bin/python2.7 o
+subject /usr/bin/python2.7 ol
/ h
- /etc h
- /etc/ld.so.cache r
- /etc/localtime r
- /lib64 rx
- /lib64/modules h
- /usr
- /usr/bin
- /usr/bin/python2.7 rx
- /usr/lib64 rx
- /usr/share/virt-manager/virt-install rx
- /usr/src h
-CAP_ALL
bind disabled
connect disabled
- sock_allow_family unix inet
# Role: miro
subject /usr/bin/python3.4m o
/ h
/Cmn h
/Cmn/Kaff rwcd
/bin h
/bin/bash x
/dev h
/dev/null rw
/dev/urandom r
/etc h
/etc/hosts r
/etc/ld.so.cache r
/etc/localtime r
/etc/mime.types r
/etc/resolv.conf
/lib64 rx
/lib64/modules h
/proc r
/proc/bus h
/proc/kallsyms h
/proc/kcore h
/proc/modules h
/proc/slabinfo h
/proc/sys h
/sbin h
/sbin/ldconfig x
/tmp rwcd
/usr
/usr/bin rx
/usr/lib64 rx
/usr/lib64/gconv h
/usr/lib64/gconv/gconv-modules.cache r
/usr/lib64/locale h
--------------------
--- /mnt/H0214_g0n-r/root/grsec_170212_g0n_03-l 2017-02-12 01:09:54.846740976 +0100
+++ /mnt/H0214_g0n-r/root/grsec_170212_g0n_04-l 2017-02-12 01:21:22.755743038 +0100
@@ -3720,70 +3720,71 @@
/etc h
/etc/group r
/etc/libvirt rwcdl
/etc/passwd r
/proc r
/proc/bus h
/proc/kallsyms h
/proc/kcore h
/proc/modules h
/proc/slabinfo h
/proc/sys h
/proc/sys/kernel r
# /proc/sys/kernel/cap_last_cap r
/run h
/run/libvirt wd
/run/xtables.lock wcd
/sbin h
/sbin/xtables-multi x
/sys h
/sys/devices/system/cpu/online r
/sys/devices/virtual/net/virbr1 r
/usr h
/usr/bin
/usr/bin/qemu-system-x86_64 x
/usr/sbin
/usr/sbin/libvirtd rx
/var/cache/libvirt rwcd
-CAP_ALL
+CAP_DAC_READ_SEARCH
+CAP_KILL
+CAP_NET_ADMIN
+CAP_NET_RAW
+CAP_SETUID
+CAP_SETGID
+CAP_DAC_OVERRIDE
+ +PAX_MPROTECT
bind disabled
connect disabled
sock_allow_family all
# Role: root
subject /usr/sbin/logrotate o
user_transition_allow nobody clamav root portage
group_transition_allow nobody clamav root portage
/ h
/bin h
/bin/bash x
/bin/gzip x
/etc r
/etc/grsec h
/etc/gshadow h
/etc/gshadow- h
/etc/shadow h
/etc/shadow- h
/etc/ssh h
/lib64 rx
/lib64/modules h
/root
/usr h
/usr/lib64 rx
/usr/sbin h
/usr/sbin/logrotate rx
/var h
/var/lib rwcd
/var/log rwcd
-CAP_ALL
+CAP_DAC_READ_SEARCH
+CAP_SETGID
+CAP_SETUID
bind disabled
connect disabled
--------------------
--- /mnt/H0214_g0n-r/root/grsec_170212_g0n_04-l 2017-02-12 01:21:22.755743038 +0100
+++ /mnt/H0214_g0n-r/root/grsec_170212_g0n_06-l 2017-02-12 01:35:49.066745635 +0100
@@ -3678,116 +3678,75 @@
/etc/passwd r
/proc h
/proc/sys/kernel/ngroups_max r
/root r
/tmp rwcd
/usr/sbin/crond rx
/usr h
/usr/sbin/sendmail x
/var h
/var/spool/cron rwd
-CAP_ALL
+CAP_CHOWN
+CAP_DAC_OVERRIDE
+CAP_SETGID
+CAP_SETUID
+CAP_SYS_ADMIN
bind disabled
connect disabled
sock_allow_family unix inet
# Role: root
subject /usr/sbin/gpm o
/ h
/dev/input/mice rw
/dev h
/dev/tty* rw
-CAP_ALL
+CAP_SYS_ADMIN
+CAP_SYS_TTY_CONFIG
bind disabled
connect disabled
# Role: root
user_transition_allow root qemu
group_transition_allow root kvm libvirt qemu
-subject /usr/sbin/libvirtd o
+subject /usr/sbin/libvirtd ol
/ h
- /dev h
- /dev/kvm rw
- /dev/net/tun rw
- /dev/null rw
- /dev/urandom r
- /etc h
- /etc/group r
- /etc/libvirt rwcdl
- /etc/passwd r
- /proc r
- /proc/bus h
- /proc/kallsyms h
- /proc/kcore h
- /proc/modules h
- /proc/slabinfo h
- /proc/sys h
- /proc/sys/kernel r
-# /proc/sys/kernel/cap_last_cap r
- /run h
- /run/libvirt wd
- /run/xtables.lock wcd
- /sbin h
- /sbin/xtables-multi x
- /sys h
- /sys/devices/system/cpu/online r
- /sys/devices/virtual/net/virbr1 r
- /usr h
- /usr/bin
- /usr/bin/qemu-system-x86_64 x
- /usr/sbin
- /usr/sbin/libvirtd rx
- /var/cache/libvirt rwcd
-CAP_ALL
- +CAP_DAC_READ_SEARCH
- +CAP_KILL
- +CAP_NET_ADMIN
- +CAP_NET_RAW
- +CAP_SETUID
- +CAP_SETGID
- +CAP_DAC_OVERRIDE
- +PAX_MPROTECT
bind disabled
connect disabled
- sock_allow_family all
# Role: root
subject /usr/sbin/logrotate o
user_transition_allow nobody clamav root portage
group_transition_allow nobody clamav root portage
/ h
/bin h
/bin/bash x
/bin/gzip x
/etc r
/etc/grsec h
/etc/gshadow h
/etc/gshadow- h
/etc/shadow h
/etc/shadow- h
/etc/ssh h
/lib64 rx
/lib64/modules h
/root
/usr h
/usr/lib64 rx
/usr/sbin h
/usr/sbin/logrotate rx
/var h
/var/lib rwcd
/var/log rwcd
-CAP_ALL
+CAP_DAC_READ_SEARCH
+CAP_SETGID
+CAP_SETUID
bind disabled
connect disabled
sock_allow_family unix inet
## Role: root
--------------------
--- /mnt/H0214_g0n-r/root/grsec_170212_g0n_06-l 2017-02-12 01:35:49.066745635 +0100
+++ /mnt/H0214_g0n-r/root/grsec_170212_g0n_07-l 2017-02-12 01:33:14.894745173 +0100
@@ -3676,72 +3676,72 @@
/etc/group r
/etc/localtime r
/etc/passwd r
/proc h
/proc/sys/kernel/ngroups_max r
/root r
/tmp rwcd
/usr/sbin/crond rx
/usr h
/usr/sbin/sendmail x
/var h
/var/spool/cron rwd
-CAP_ALL
+CAP_CHOWN
+CAP_DAC_OVERRIDE
+CAP_SETGID
+CAP_SETUID
+CAP_SYS_ADMIN
bind disabled
connect disabled
sock_allow_family unix inet
# Role: root
subject /usr/sbin/gpm o
/ h
/dev/input/mice rw
/dev h
/dev/tty* rw
-CAP_ALL
+CAP_SYS_ADMIN
+CAP_SYS_TTY_CONFIG
bind disabled
connect disabled
# Role: root
-user_transition_allow root qemu
-group_transition_allow root kvm libvirt qemu
+user_transition_allow root miro qemu
+group_transition_allow root miro kvm libvirt qemu
subject /usr/sbin/libvirtd ol
/ h
-CAP_ALL
bind disabled
connect disabled
# Role: root
subject /usr/sbin/logrotate o
user_transition_allow nobody clamav root portage
group_transition_allow nobody clamav root portage
/ h
/bin h
/bin/bash x
/bin/gzip x
/etc r
/etc/grsec h
/etc/gshadow h
/etc/gshadow- h
/etc/shadow h
/etc/shadow- h
/etc/ssh h
/lib64 rx
/lib64/modules h
/root
/usr h
/usr/lib64 rx
/usr/sbin h
/usr/sbin/logrotate rx
/var h
/var/lib rwcd
/var/log rwcd
-CAP_ALL
+CAP_DAC_READ_SEARCH
+CAP_SETGID
+CAP_SETUID
--------------------
--- /mnt/H0214_g0n-r/root/grsec_170212_g0n_07-l 2017-02-12 01:33:14.894745173 +0100
+++ /mnt/H0214_g0n-r/root/grsec_170212_g0n_08-l 2017-02-12 13:48:20.284877396 +0100
@@ -7651,113 +7651,75 @@
/etc/terminfo/r/rxvt-unicode r
/etc/vim
/etc/vim/vimrc r
/etc/vim/vimrc.local r
/home h
/home/miro rwcd
/lib64 rx
/lib64/modules h
/mnt r
/mnt/sd?1 rwcd
/mnt/g* rwxcd
/proc h
/proc/meminfo r
/sys h
/tmp rwcd
/usr
/usr/bin x
/usr/lib64 rx
/usr/local h
/usr/local/bin rw
/usr/share rwc
/usr/share/locale r
/usr/src h
/var h
/var/lib
/var/lib/lurker rwcdl
/var/tmp rwcd
/var/www
/var/www/localhost/htdocs rwcdl
/var/www/lurker* rwcd
-CAP_ALL
bind disabled
connect disabled
# Role: miro
-subject /usr/bin/virsh o
+subject /usr/bin/virsh ol
/ h
- /boot h
- /dev h
- /dev/null rw
- /dev/urandom r
- /etc r
- /etc/grsec h
- /etc/gshadow h
- /etc/gshadow- h
- /etc/shadow h
- /etc/shadow- h
- /etc/ssh h
- /etc/ssl h
- /etc/ssl/openssl.cnf r
- /home h
- /home/miro rwcd
- /lib/modules h
- /lib64 rx
- /lib64/modules h
- /proc r
- /proc/bus h
- /proc/kallsyms h
- /proc/kcore h
- /proc/modules h
- /proc/slabinfo h
- /run h
- /run/libvirt rw
- /sys h
- /usr h
- /usr/bin h
- /usr/bin/virsh rx
- /usr/lib64 rx
- /usr/sbin h
- /usr/sbin/libvirtd x
- /usr/share h
- /usr/share/locale r
- /usr/share/terminfo r
- /var/log h
-CAP_ALL
bind disabled
connect disabled
- sock_allow_family unix inet ipv6
# Role: miro
user_transition_allow root qemu
group_transition_allow root kvm libvirt qemu
subject /usr/bin/virt-install ol
/ h
-CAP_ALL
bind disabled
connect disabled
# Role: miro
subject /usr/bin/wget o
/ h
/Cmn rwc
/Cmn/dLo rwcdl
/dev h
/dev/urandom r
/etc r
/etc/grsec h
/etc/gshadow h
/etc/gshadow- h
/etc/passwd h
/etc/shadow h
/etc/shadow- h
/etc/ssh h
/etc/ssl h
/etc/ssl/certs/ca-certificates.crt r
/home
/home/miro rwc
/lib64 rx
/lib64/modules h
/mnt wc
/proc
/proc/bus h
/proc/kallsyms h
--------------------
--- /mnt/H0214_g0n-r/root/grsec_170212_g0n_08-l 2017-02-12 13:48:20.284877396 +0100
+++ /mnt/H0214_g0n-r/root/grsec_170212_g0n_09-l 2017-02-12 13:52:17.777878108 +0100
@@ -7651,70 +7651,72 @@
/etc/terminfo/r/rxvt-unicode r
/etc/vim
/etc/vim/vimrc r
/etc/vim/vimrc.local r
/home h
/home/miro rwcd
/lib64 rx
/lib64/modules h
/mnt r
/mnt/sd?1 rwcd
/mnt/g* rwxcd
/proc h
/proc/meminfo r
/sys h
/tmp rwcd
/usr
/usr/bin x
/usr/lib64 rx
/usr/local h
/usr/local/bin rw
/usr/share rwc
/usr/share/locale r
/usr/src h
/var h
/var/lib
/var/lib/lurker rwcdl
/var/tmp rwcd
/var/www
/var/www/localhost/htdocs rwcdl
/var/www/lurker* rwcd
-CAP_ALL
bind disabled
connect disabled
# Role: miro
+user_transition_allow root qemu
+group_transition_allow root kvm libvirt qemu
subject /usr/bin/virsh ol
/ h
-CAP_ALL
bind disabled
connect disabled
# Role: miro
user_transition_allow root qemu
group_transition_allow root kvm libvirt qemu
subject /usr/bin/virt-install ol
/ h
-CAP_ALL
bind disabled
connect disabled
# Role: miro
subject /usr/bin/wget o
/ h
/Cmn rwc
/Cmn/dLo rwcdl
/dev h
/dev/urandom r
/etc r
/etc/grsec h
/etc/gshadow h
/etc/gshadow- h
/etc/passwd h
/etc/shadow h
/etc/shadow- h
/etc/ssh h
/etc/ssl h
/etc/ssl/certs/ca-certificates.crt r
/home
/home/miro rwc
/lib64 rx
--------------------