public inbox for gentoo-user-de@lists.gentoo.org
 help / color / mirror / Atom feed
From: Andreas Baier <don.ande@gmx.de>
To: gentoo-user-de@lists.gentoo.org
Subject: [gentoo-user-de] gentoo-hardened: pax: Verständnisfrage zur Einrichtung
Date: Tue, 5 Feb 2008 22:11:40 +0100	[thread overview]
Message-ID: <200802052211.41008.don.ande@gmx.de> (raw)

Hallo,

ich lese mich gerade in Selinux ein und habe deshalb unseren Server auf das 
selinux/hardened-Profil umgestellt.

Als Basis habe ich zunächst einmal die Toolchain auf gcc 3.4.6 downgegraded, 
hardened-kernel installiert, sowie das ganze System neu kompiliert und von 
Altlasten bereinigt.

Leider scheint das quickstart-Tutorial auf der hardened-Projekt-Seite aber 
nicht mehr ganz auf dem Neuesten Stand zu sein, denn Optionen und Ausgaben 
entsprechen nicht den dort abgebildeten.

Daher kann mir jemand sagen, ob aus den unten abgebildeten Ausgaben 
ersichtlich ist, ob pax global im System aktiviert ist, oder nicht?
Mir scheint es so als wären Pax-Fähigkeiten vorhanden aber nicht in der 
installierten Software aktiviert.
Muss man dies nun manuell tun?
Wenn ich mich richtig erinnere hatte das früher einmal ein chpax-init-script 
getan, dass auch schon Standard-Ausnahmen (Xorg, wine) eingerichtet hat.

Zunächst das Essentielle:

# gzip -d < /proc/config.gz | grep -E 'PAX|_GR|_SELINUX'
# CONFIG_GRKERNSEC is not set
CONFIG_PAX=y
# CONFIG_PAX_SOFTMODE is not set
CONFIG_PAX_EI_PAX=y
CONFIG_PAX_PT_PAX_FLAGS=y
CONFIG_PAX_NO_ACL_FLAGS=y
# CONFIG_PAX_HAVE_ACL_FLAGS is not set
# CONFIG_PAX_HOOK_ACL_FLAGS is not set
CONFIG_PAX_NOEXEC=y
CONFIG_PAX_PAGEEXEC=y
CONFIG_PAX_SEGMEXEC=y
CONFIG_PAX_EMUTRAMP=y
CONFIG_PAX_MPROTECT=y
# CONFIG_PAX_NOELFRELOCS is not set
CONFIG_PAX_ASLR=y
CONFIG_PAX_RANDKSTACK=y
CONFIG_PAX_RANDUSTACK=y
CONFIG_PAX_RANDMMAP=y
# CONFIG_PAX_MEMORY_SANITIZE is not set
# CONFIG_PAX_MEMORY_UDEREF is not set
CONFIG_SECURITY_SELINUX=y
CONFIG_SECURITY_SELINUX_BOOTPARAM=y
CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=0
# CONFIG_SECURITY_SELINUX_DISABLE is not set
CONFIG_SECURITY_SELINUX_DEVELOP=y
# CONFIG_SECURITY_SELINUX_AVC_STATS is not set
CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set
# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set

Notiz: habe CONFIG_PAX_NO_ACL_FLAGS=y statt der Auswahl Hooks gewählt, da ich 
Selinux noch nicht aktiviert habe.

# paxtest blackhat
PaXtest - Copyright(c) 2003,2004 by Peter Busser <peter@adamantix.org>
Released under the GNU Public Licence version 2 or later

Writing output to paxtest.log
It may take a while for the tests to complete
Test results:
PaXtest - Copyright(c) 2003,2004 by Peter Busser <peter@adamantix.org>
Released under the GNU Public Licence version 2 or later

Mode: blackhat
Linux karla 2.6.23-hardened-r4 #4 SMP Mon Feb 4 15:55:41 CET 2008 i686 
Intel(R) Xeon(R) CPU 3060 @ 2.40GHz GenuineIntel GNU/Linux

Executable anonymous mapping             : Killed
Executable bss                           : Killed
Executable data                          : Killed
Executable heap                          : Killed
Executable stack                         : Killed
Executable anonymous mapping (mprotect)  : Killed
Executable bss (mprotect)                : Killed
Executable data (mprotect)               : Killed
Executable heap (mprotect)               : Killed
Executable stack (mprotect)              : Killed
Executable shared library bss (mprotect) : Killed
Executable shared library data (mprotect): Killed
Writable text segments                   : Killed
Anonymous mapping randomisation test     : 18 bits (guessed)
Heap randomisation test (ET_EXEC)        : 13 bits (guessed)
Heap randomisation test (ET_DYN)         : 24 bits (guessed)
Main executable randomisation (ET_EXEC)  : No randomisation
Main executable randomisation (ET_DYN)   : 16 bits (guessed)
Shared library randomisation test        : 18 bits (guessed)
Stack randomisation test (SEGMEXEC)      : 23 bits (guessed)
Stack randomisation test (PAGEEXEC)      : 24 bits (guessed)
Return to function (strcpy)              : Vulnerable
Return to function (memcpy)              : Vulnerable
Return to function (strcpy, RANDEXEC)    : Vulnerable
Return to function (memcpy, RANDEXEC)    : Vulnerable
Executable shared library bss            : Killed
Executable shared library data           : Killed


Jede Software gibt aber aus:

# paxctl -v /sbin/agetty
PaX control v0.5
Copyright 2004,2005,2006,2007 PaX Team <pageexec@freemail.hu>

- PaX flags: -------x-e-- [/sbin/agetty]
        RANDEXEC is disabled
        EMUTRAMP is disabled

Kurz: Ein Großteil der Flags scheint gar nicht aktiviert zu sein, RANDEXEC-, 
EMUTRAMP scheint überall deaktiviert zu sein

Hier noch meine Links:
http://www.gentoo.org/proj/en/hardened/pax-quickstart.xml
http://www.gentoo.org/proj/en/hardened/grsecurity.xml
http://www.gentoo.org/proj/en/hardened/hardenedfaq.xml#paxinformation
http://www.gentoo.org/proj/en/hardened/pax-utils.xml


Danke schon mal im Voraus
Gruß Andreas
--
gentoo-user-de@lists.gentoo.org mailing list



                 reply	other threads:[~2008-02-05 21:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200802052211.41008.don.ande@gmx.de \
    --to=don.ande@gmx.de \
    --cc=gentoo-user-de@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox