1 |
On Tue, 2004-06-08 at 09:19, Alby Lash wrote: |
2 |
> Hello, |
3 |
> |
4 |
> I have compiled and installed the grsec-sources (2.4.26-grsec-2.0) on |
5 |
> x86 platform with ease, and now I am trying to configure my acls. Per |
6 |
> the document: |
7 |
> |
8 |
> http://www.gentoo.org/proj/en/hardened/grsecurity.xml |
9 |
|
10 |
All references to this document have been removed for a reason which you |
11 |
I'll explain in a sec. |
12 |
|
13 |
> In code listing 8.1, I was unable to emerge grsecurity-base-policy as |
14 |
> it has been deprecated. I found selinux-base-policy and emerged it |
15 |
> along with gradm and chpax with no problems but now cannot find the |
16 |
> init script for enabling the grsecurity service (which might be |
17 |
> entitled something different?). |
18 |
|
19 |
Ok slow down here guy.. selinux and grsecurity are not the same thing |
20 |
(almost not even close). Trying to intermix polices will get you nowhere |
21 |
fast. |
22 |
|
23 |
> Furthermore, when I gradm -E to start |
24 |
> the service, I always get an error, such as: |
25 |
|
26 |
Ok what your doing wrong is your trying to use 1.9.x policies with a 2.0 |
27 |
system which will never work. Forget the idea of 1.9.x or hand patch |
28 |
your own kernel to support it. Gentoo no longer supports 1.9.x in any of |
29 |
it's kernels that I'm aware of. |
30 |
|
31 |
grsec-2 however provides a powerful learning mode which you can and |
32 |
should use on your own system to build a set of policies thats right for |
33 |
your system vs some canned ones that we could waste our time and try to |
34 |
provide you with. |
35 |
|
36 |
I'm a slacker and writing docs is not something I enjoy doing for free. |
37 |
So... this is all you get from me for now on the subject of creating |
38 |
roles for your 2.x system |
39 |
http://dev.gentoo.org/~solar/xml/grsecurity2.html |
40 |
|
41 |
|
42 |
|
43 |
> Error on line 2 of /etc/grsec/acl. Attempt to add an object without a |
44 |
> subject declaration. |
45 |
> The RBAC system will not load until this error is fixed. |
46 |
> |
47 |
> With the ACL contents (default from earlier referenced page): |
48 |
> |
49 |
> / { |
50 |
> / |
51 |
> /opt rx |
52 |
> /home rwx |
53 |
> /mnt r |
54 |
> /dev |
55 |
> /dev/mem h |
56 |
> /dev/kmem h |
57 |
> /dev/port h |
58 |
> /dev/null rw |
59 |
> /dev/pts rw |
60 |
> /dev/ptmx rw |
61 |
> /dev/dsp rw |
62 |
> /dev/mixer rw |
63 |
> /dev/console rw |
64 |
> /dev/log h |
65 |
> /dev/zero rw |
66 |
> /dev/random r |
67 |
> /dev/urandom r |
68 |
> /dev/input rw |
69 |
> /dev/initctl rw |
70 |
> /dev/psaux rw |
71 |
> /dev/tty rw |
72 |
> /dev/tty? rw |
73 |
> /dev/tty1? rw |
74 |
> /dev/vc rw |
75 |
> /bin rx |
76 |
> /sbin rx |
77 |
> /lib rx |
78 |
> /lib/security rx |
79 |
> /usr rx |
80 |
> /usr/lib rx |
81 |
> /boot r |
82 |
> /etc/grsec h |
83 |
> /etc rx |
84 |
> /etc/init.d rx |
85 |
> /etc/shadow- h |
86 |
> /etc/shadow h |
87 |
> /etc/postfix r |
88 |
> /proc rwx |
89 |
> /proc/sys r |
90 |
> /proc/kcore h |
91 |
> /root r |
92 |
> /root/.bash_history ra |
93 |
> /root/.history ra |
94 |
> /tmp rw |
95 |
> /var rx |
96 |
> /var/cache rw |
97 |
> /var/run rw |
98 |
> /var/tmp rw |
99 |
> /var/log h |
100 |
> /var/log/wtmp a |
101 |
> /var/spool rw |
102 |
> /var/spool/postfix/lib rx |
103 |
> /etc/ld.so.preload rw |
104 |
> /mnt/.init.d rwx |
105 |
> |
106 |
> -CAP_ALL |
107 |
> } |
108 |
> |
109 |
> |
110 |
> Any idea what is going on with gradm? What is the difference between |
111 |
> selinux-base-policy and grsecurity-base-policy? |
112 |
> |
113 |
|
114 |
> Is grsec-sources being deprecated in lieu of hardened-sources? I chose |
115 |
> grsec-sources because they are used in Gentoo infrastructure servers. |
116 |
|
117 |
No not at all. Gentoo is about giving users options. IE install what |
118 |
ever the hell you want. |
119 |
grsec-sources is a pure vanilla sources with the grsec current patches |
120 |
(misc CAN patches if/when need be). |
121 |
|
122 |
hardened-sources offers a little more in it's base (selinux||grsec) |
123 |
depending on USE flags. It's not always quite as up2date as grsec |
124 |
sources on the grsec side of things due to the nature of both how large |
125 |
grsec patches are playing the offset game with patching (time becomes a |
126 |
limit factor). There should be a README in the patch tarball of the |
127 |
hardened-sources if you care to know whats provided by it. |
128 |
|
129 |
> |
130 |
> Would I be better off following documentation for hardened servers |
131 |
> instead of the grsecurity guide referenced above? |
132 |
|
133 |
|
134 |
|
135 |
|
136 |
> Anything I can do to help? |
137 |
|
138 |
Probably not right away. You have quite a few concepts to learn about it |
139 |
seems. You can write documentation, make a donation to the hardened |
140 |
project, submit patches, etc.. |
141 |
|
142 |
I'd suggest that leaning the concepts of everything would be the ideal |
143 |
route for you to go now. |
144 |
|
145 |
-- PaX -- |
146 |
http://pax.grsecurity.net/docs/index.html |
147 |
|
148 |
-- grsec2 -- |
149 |
http://grsecurity.net/quickstart.pdf |
150 |
http://grsecurity.net/researchpaper.pdf |
151 |
|
152 |
|
153 |
> |
154 |
> Thanks! |
155 |
> |
156 |
> Alby |
157 |
> |
158 |
> |
159 |
> -- |
160 |
> gentoo-hardened@g.o mailing list |
161 |
-- |
162 |
Ned Ludd <solar@g.o> |
163 |
Gentoo (hardened,security,infrastructure,embedded,toolchain) Developer |