- Code: Select all
root@beaker:~# gradm -L /tmp/learn.log -E
root@beaker:~# gradm -a admin
Password:
RBAC is enabled. I've got a few other subjects in learning mode, thus the -L. GrSec starts erroring on /home/muppet/muppet/muppet.conf~:
- Code: Select all
root@beaker:~# dmesg
grsec: From x.x.x.x: (root:U:/sbin/gradm) grsecurity 2.2.2 RBAC system loaded by /sbin/gradm[gradm:15215] uid/euid:0/0 gid/egid:0/0, parent /bin/bash[bash:15210] uid/euid:0/0 gid/egid:0/0
grsec: From x.x.x.x: (root:U:/sbin/gradm) successful change to special role admin (id 66) by /sbin/gradm[gradm:15218] uid/euid:0/0 gid/egid:0/0, parent /bin/bash[bash:15210] uid/euid:0/0 gid/egid:0/0
grsec: (muppet:U:/) denied bind() to 0.0.0.0 port 2001 sock type stream protocol tcp by /home/muppet/muppet/muppet.conf~[muppet.conf:1631] uid/euid:1014/1014 gid/egid:1014/1014, parent /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0
grsec: (muppet:U:/) denied bind() to 0.0.0.0 port 2001 sock type stream protocol tcp by /home/muppet/muppet/muppet.conf~[muppet.conf:1631] uid/euid:1014/1014 gid/egid:1014/1014, parent /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0
grsec: (muppet:U:/) denied bind() to 0.0.0.0 port 2001 sock type stream protocol tcp by /home/muppet/muppet/muppet.conf~[muppet.conf:1631] uid/euid:1014/1014 gid/egid:1014/1014, parent /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0
grsec: (muppet:U:/) denied bind() to 0.0.0.0 port 2001 sock type stream protocol tcp by /home/muppet/muppet/muppet.conf~[muppet.conf:1631] uid/euid:1014/1014 gid/egid:1014/1014, parent /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0
grsec: (muppet:U:/) denied bind() to 0.0.0.0 port 2001 sock type stream protocol tcp by /home/muppet/muppet/muppet.conf~[muppet.conf:1631] uid/euid:1014/1014 gid/egid:1014/1014, parent /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0
grsec: (muppet:U:/) denied bind() to 0.0.0.0 port 2001 sock type stream protocol tcp by /home/muppet/muppet/muppet.conf~[muppet.conf:1631] uid/euid:1014/1014 gid/egid:1014/1014, parent /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0
grsec: more alerts, logging disabled for 10 seconds
Disable RBAC system, examine erroring file:
- Code: Select all
root@beaker:~# gradm -D
Password:
root@beaker:~# ls -la /home/muppet/muppet/muppet.conf~
ls: cannot access /home/muppet/muppet/muppet.conf~: No such file or directory
But the file doesn't exist!
I do have a policy for
- Code: Select all
/home/muppet/muppet/muppet.conf
#role: muppet
subject /home/muppet/muppet/muppet.conf o {
/ h
/bin h
/bin/chmod x
/bin/cp x
/bin/ls x
/dev
/dev/grsec h
/dev/kmem h
/dev/log h
/dev/mem h
/dev/null rw
/dev/port h
/etc r
/etc/grsec h
/etc/gshadow h
/etc/gshadow- h
/etc/ppp h
/etc/samba/smbpasswd h
/etc/shadow h
/etc/shadow- h
/etc/ssh h
/home
/home/muppet rxwcd
/lib rx
/lib/modules h
/tmp rwcd
/usr
/usr/lib rx
/usr/local
/usr/share r
/usr/src h
-CAP_ALL
bind 0.0.0.0/32:2001 stream dgram ip tcp
bind 0.0.0.0/32:0 stream dgram ip tcp
connect 0.0.0.0/0:113 stream tcp
connect 0.0.0.0/0:1025-65535 stream tcp
connect 58.28.6.2/32:53 dgram udp
connect 58.28.4.2/32:53 dgram udp
}
which is what usually works. So I'm a little confused how grsec is getting hits from a file that no longer exists. I guess there would have been a muppet.conf~ when I was editing the file with vim, isn't ~ what vim appends to filenames when it's working with them? How can it be triggering now on the file that doesn't exist though?
I could probably work around this using a muppet.conf* in the policy, but I'd rather understand how I've got into this situation.
Thanks!
Kernel is
- Code: Select all
Linux beaker 3.0.8-grsec #1 SMP Wed Oct 26 10:50:36 NZDT 2011 i686 GNU/Linux
so the version of grsec would have been whatever one was the latest on the 26th Oct 2011.