1 |
Hallo, |
2 |
|
3 |
ich lese mich gerade in Selinux ein und habe deshalb unseren Server auf das |
4 |
selinux/hardened-Profil umgestellt. |
5 |
|
6 |
Als Basis habe ich zunächst einmal die Toolchain auf gcc 3.4.6 downgegraded, |
7 |
hardened-kernel installiert, sowie das ganze System neu kompiliert und von |
8 |
Altlasten bereinigt. |
9 |
|
10 |
Leider scheint das quickstart-Tutorial auf der hardened-Projekt-Seite aber |
11 |
nicht mehr ganz auf dem Neuesten Stand zu sein, denn Optionen und Ausgaben |
12 |
entsprechen nicht den dort abgebildeten. |
13 |
|
14 |
Daher kann mir jemand sagen, ob aus den unten abgebildeten Ausgaben |
15 |
ersichtlich ist, ob pax global im System aktiviert ist, oder nicht? |
16 |
Mir scheint es so als wären Pax-Fähigkeiten vorhanden aber nicht in der |
17 |
installierten Software aktiviert. |
18 |
Muss man dies nun manuell tun? |
19 |
Wenn ich mich richtig erinnere hatte das früher einmal ein chpax-init-script |
20 |
getan, dass auch schon Standard-Ausnahmen (Xorg, wine) eingerichtet hat. |
21 |
|
22 |
Zunächst das Essentielle: |
23 |
|
24 |
# gzip -d < /proc/config.gz | grep -E 'PAX|_GR|_SELINUX' |
25 |
# CONFIG_GRKERNSEC is not set |
26 |
CONFIG_PAX=y |
27 |
# CONFIG_PAX_SOFTMODE is not set |
28 |
CONFIG_PAX_EI_PAX=y |
29 |
CONFIG_PAX_PT_PAX_FLAGS=y |
30 |
CONFIG_PAX_NO_ACL_FLAGS=y |
31 |
# CONFIG_PAX_HAVE_ACL_FLAGS is not set |
32 |
# CONFIG_PAX_HOOK_ACL_FLAGS is not set |
33 |
CONFIG_PAX_NOEXEC=y |
34 |
CONFIG_PAX_PAGEEXEC=y |
35 |
CONFIG_PAX_SEGMEXEC=y |
36 |
CONFIG_PAX_EMUTRAMP=y |
37 |
CONFIG_PAX_MPROTECT=y |
38 |
# CONFIG_PAX_NOELFRELOCS is not set |
39 |
CONFIG_PAX_ASLR=y |
40 |
CONFIG_PAX_RANDKSTACK=y |
41 |
CONFIG_PAX_RANDUSTACK=y |
42 |
CONFIG_PAX_RANDMMAP=y |
43 |
# CONFIG_PAX_MEMORY_SANITIZE is not set |
44 |
# CONFIG_PAX_MEMORY_UDEREF is not set |
45 |
CONFIG_SECURITY_SELINUX=y |
46 |
CONFIG_SECURITY_SELINUX_BOOTPARAM=y |
47 |
CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=0 |
48 |
# CONFIG_SECURITY_SELINUX_DISABLE is not set |
49 |
CONFIG_SECURITY_SELINUX_DEVELOP=y |
50 |
# CONFIG_SECURITY_SELINUX_AVC_STATS is not set |
51 |
CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 |
52 |
# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set |
53 |
# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set |
54 |
|
55 |
Notiz: habe CONFIG_PAX_NO_ACL_FLAGS=y statt der Auswahl Hooks gewählt, da ich |
56 |
Selinux noch nicht aktiviert habe. |
57 |
|
58 |
# paxtest blackhat |
59 |
PaXtest - Copyright(c) 2003,2004 by Peter Busser <peter@×××××××××.org> |
60 |
Released under the GNU Public Licence version 2 or later |
61 |
|
62 |
Writing output to paxtest.log |
63 |
It may take a while for the tests to complete |
64 |
Test results: |
65 |
PaXtest - Copyright(c) 2003,2004 by Peter Busser <peter@×××××××××.org> |
66 |
Released under the GNU Public Licence version 2 or later |
67 |
|
68 |
Mode: blackhat |
69 |
Linux karla 2.6.23-hardened-r4 #4 SMP Mon Feb 4 15:55:41 CET 2008 i686 |
70 |
Intel(R) Xeon(R) CPU 3060 @ 2.40GHz GenuineIntel GNU/Linux |
71 |
|
72 |
Executable anonymous mapping : Killed |
73 |
Executable bss : Killed |
74 |
Executable data : Killed |
75 |
Executable heap : Killed |
76 |
Executable stack : Killed |
77 |
Executable anonymous mapping (mprotect) : Killed |
78 |
Executable bss (mprotect) : Killed |
79 |
Executable data (mprotect) : Killed |
80 |
Executable heap (mprotect) : Killed |
81 |
Executable stack (mprotect) : Killed |
82 |
Executable shared library bss (mprotect) : Killed |
83 |
Executable shared library data (mprotect): Killed |
84 |
Writable text segments : Killed |
85 |
Anonymous mapping randomisation test : 18 bits (guessed) |
86 |
Heap randomisation test (ET_EXEC) : 13 bits (guessed) |
87 |
Heap randomisation test (ET_DYN) : 24 bits (guessed) |
88 |
Main executable randomisation (ET_EXEC) : No randomisation |
89 |
Main executable randomisation (ET_DYN) : 16 bits (guessed) |
90 |
Shared library randomisation test : 18 bits (guessed) |
91 |
Stack randomisation test (SEGMEXEC) : 23 bits (guessed) |
92 |
Stack randomisation test (PAGEEXEC) : 24 bits (guessed) |
93 |
Return to function (strcpy) : Vulnerable |
94 |
Return to function (memcpy) : Vulnerable |
95 |
Return to function (strcpy, RANDEXEC) : Vulnerable |
96 |
Return to function (memcpy, RANDEXEC) : Vulnerable |
97 |
Executable shared library bss : Killed |
98 |
Executable shared library data : Killed |
99 |
|
100 |
|
101 |
Jede Software gibt aber aus: |
102 |
|
103 |
# paxctl -v /sbin/agetty |
104 |
PaX control v0.5 |
105 |
Copyright 2004,2005,2006,2007 PaX Team <pageexec@××××××××.hu> |
106 |
|
107 |
- PaX flags: -------x-e-- [/sbin/agetty] |
108 |
RANDEXEC is disabled |
109 |
EMUTRAMP is disabled |
110 |
|
111 |
Kurz: Ein Großteil der Flags scheint gar nicht aktiviert zu sein, RANDEXEC-, |
112 |
EMUTRAMP scheint überall deaktiviert zu sein |
113 |
|
114 |
Hier noch meine Links: |
115 |
http://www.gentoo.org/proj/en/hardened/pax-quickstart.xml |
116 |
http://www.gentoo.org/proj/en/hardened/grsecurity.xml |
117 |
http://www.gentoo.org/proj/en/hardened/hardenedfaq.xml#paxinformation |
118 |
http://www.gentoo.org/proj/en/hardened/pax-utils.xml |
119 |
|
120 |
|
121 |
Danke schon mal im Voraus |
122 |
Gruß Andreas |
123 |
-- |
124 |
gentoo-user-de@l.g.o mailing list |