by Egonle » Tue Jul 22, 2003 6:54 am
I've setup my acl files with subject lines so that should be ok.
That's my base file:
role admin sA
subject /
/ rwcdmxi
role default G
role_transitions admin
subject / ol {
/ h
RES_FSIZE 0 0
RES_DATA 0 0
RES_RSS 0 0
RES_NOFILE 0 0
RES_MEMLOCK 0 0
RES_STACK 0 0
RES_AS 0 0
RES_NPROC 0 0
RES_LOCKS 0 0
-CAP_ALL
connect disabled
bind disabled
}
subject /usr/sbin/sshd ol {
/ h
RES_FSIZE 0 0
RES_DATA 0 0
RES_RSS 0 0
RES_NOFILE 0 0
RES_MEMLOCK 0 0
RES_STACK 0 0
RES_AS 0 0
RES_NPROC 0 0
RES_LOCKS 0 0
-CAP_ALL
connect disabled
bind disabled
}
### THE BELOW SUBJECT(S) SHOULD BE ADDED TO THE DEFAULT ROLE ###
subject /bin/login ol {
/ h
/bin h
/bin/bash x
/bin/login x
/etc r
/etc/ssh h
/etc/grsec h
/lib rx
/proc h
/usr h
/usr/lib/libcrack.so.2.7 rx
/usr/lib/libglib-1.2.so.0.0.10 rx
/var rw
/var/log/wtmp w
/var/run
/var/run/console
/var/run/console/josel rwc
/var/run/console.lock rwc
/var/run/utmp rw
/dev
/dev/console rw
/dev/fd0 w
/dev/fd0CompaQ w
/dev/fd0D360 w
/dev/fd0D720 w
/dev/fd0H1440 w
/dev/fd0H360 w
/dev/fd0H720 w
/dev/fd0d360 w
/dev/fd0h1200 w
/dev/fd0h1440 w
/dev/fd0h1476 w
/dev/fd0h1494 w
/dev/fd0h1660 w
/dev/fd0h360 w
/dev/fd0h410 w
/dev/fd0h420 w
/dev/fd0h720 w
/dev/log rw
/dev/radio0 w
/dev/radio1 w
/dev/radio2 w
/dev/radio3 w
/dev/tty2 rw
/dev/tty4 rw
/dev/video0 w
/dev/video1 w
/dev/video1394 w
/dev/video2 w
/dev/video3 w
/dev/vtx w
/dev/winradio0 w
/dev/winradio1 w
/dev/winradio2 w
/dev/winradio3 w
/dev/grsec h
/dev/mem h
/dev/kmem h
/dev/port h
/mnt
/root
-CAP_ALL
+CAP_CHOWN
+CAP_DAC_OVERRIDE
+CAP_FSETID
+CAP_SETGID
+CAP_SETUID
+CAP_SYS_TTY_CONFIG
bind disabled
connect disabled
}
After starting learning mode and running the system for some time I started building an acl off the logs. That's the result:
### THE BELOW SUBJECT(S) SHOULD BE ADDED TO THE DEFAULT ROLE ###
subject / o {
/
/sbin rx
/bin x
/dev
/dev/console rw
/dev/fd0 w
/dev/fd0CompaQ w
/dev/fd0D360 w
/dev/fd0D720 w
/dev/fd0H1440 w
/dev/fd0H360 w
/dev/fd0H720 w
/dev/fd0d360 w
/dev/fd0h1200 w
/dev/fd0h1440 w
/dev/fd0h1476 w
/dev/fd0h1494 w
/dev/fd0h1660 w
/dev/fd0h360 w
/dev/fd0h410 w
/dev/fd0h420 w
/dev/fd0h720 w
/dev/kmem h
/dev/log rw
/dev/mem h
/dev/null rw
/dev/port h
/dev/radio0 w
/dev/radio1 w
/dev/radio2 w
/dev/radio3 w
/dev/tty rw
/dev/tty2 rw
/dev/tty4 rw
/dev/urandom r
/dev/video0 w
/dev/video1 w
/dev/video1394 w
/dev/video2 w
/dev/video3 w
/dev/vtx w
/dev/winradio0 w
/dev/winradio1 w
/dev/winradio2 w
/dev/winradio3 w
/dev/grsec h
/etc rxwcd
/etc/grsec h
/etc/ssh h
/lib rx
/proc r
/proc/kcore h
/proc/sys h
/usr rx
/var rwc
-CAP_ALL
+CAP_CHOWN
+CAP_DAC_OVERRIDE
+CAP_FSETID
+CAP_SETGID
+CAP_SETUID
+CAP_NET_BIND_SERVICE
+CAP_IPC_LOCK
+CAP_SYS_MODULE
+CAP_SYS_TTY_CONFIG
RES_FSIZE 0 0
RES_DATA 0 0
RES_STACK 0 0
RES_RSS 0 0
RES_NPROC 0 0
RES_NOFILE 0 0
RES_MEMLOCK 0 0
RES_AS 0 0
RES_LOCKS 0 0
bind 0.0.0.0/32:22 stream tcp
connect disabled
}
subject /usr/sbin/sshd o {
/ h
/usr/sbin/sshd x
-CAP_ALL
RES_FSIZE 0 0
RES_DATA 0 0
RES_STACK 0 0
RES_RSS 0 0
RES_NPROC 0 0
RES_NOFILE 0 0
RES_MEMLOCK 0 0
RES_AS 0 0
RES_LOCKS 0 0
bind disabled
connect disabled
}
What I don't understand is why sshd doesn't get the real stuff like CONNECT and BIND entries. Why are those entries built on subject /?
Regards,
Josef