| Master's Student: A Quick and Dirty Guide To Kernel Hardening with GrSecurity |
| Source: www.8ciphers.com - Posted by Ryan Berens | ||
|
The combination of the Linux kernel and GNU packages has always been regarded as a secure operating system, but can it be more secure? Kernel hardening is the answer to tightening up the Linux backbone. GrSecurity, a kernel patch for Linux, is one of the more popular approaches... One of the most significant feature is the addition of a role-based access control system (RBAC) that monitors what each user can execute based on their role and denies execution if they overstep their pre-defined rules. By: Gian G. Spicuzza ; www.8ciphers.com The combination of the Linux kernel and GNU packages has always been regarded as a secure operating system, but can it be more secure? Kernel hardening is the answer to tightening up the Linux backbone. GrSecurity, a kernel patch for Linux, is one of the more popular approaches. After applying this patch and compiling a fresh kernel, your system will have a plethora of new security features. The most significant feature is the addition of a role-based access control system (RBAC) that monitors what each user can execute based on their role and denies execution if they overstep their pre-defined rules. Other useful features include ip-based rules, extensive chroot restrictions, address space modification restrictions (PaX), auditing/logging features and /proc and dmesg anti-leak features. A full feature list can be found at the Grsecurity homepage. Installing Grsecurity: First we need to download the Linux kernel and Grsec patch. $ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.19.2.tar.gz $ wget http://grsecurity.net/grsecurity-2.1.10-2.6.19.2-200701222307.patch.gzFor your convenience, the PGP keys are located at: http://GRSecurity.net/spender-gpg-key.asc http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.19.2.tar.gz.sign Move the kernel and patch into the /usr/src directory. $ su -c “cp linux-2.6* /usr/src; cp grsec* /usr/src”Extract the kernel and patch (you need to be in root since you're working in /usr/src). $ suStart with the kernel configuration. # make clean # make mrproper # make menuconfigChoose all of the options that are required for your hardware, or use “make oldconfig” and se an old configuration file. When you arrive at the “GRSECURITY” section, enable it by hitting the spacebar. You are now prompted with an array of security features. Building a custom scheme is as easy as selecting a few features, or select a pre-defined security level based on your needs. Taylor Merry created a fantastic list that shows what each level of security provides. His table is listed below: Low Security:
Medium Security (includes all of the Low Security options):
High Security (includes all of the Low and Medium Security options):
Outside of the options in these categories are a few additional options that can be enabled manually:
For personal computers, I select “Low security” and enable all of the logging and auditing features. For servers and mission critical machines, I start with “Medium security” and add additional elements based on my own discretion. After you have selected all of the necessary options, lets compile the kernel. Check back soon because our next article will show you how to use the role based access control system and how to compile programs to take advantage of the PaX address space modification restrictions! References: *1 Merry, Taylor. Linux Kernel Hardening. 18 November 2003 GrSecurity Homepage PaX Homepage: Read this full article at www.8ciphers.com
Only registered users can write comments. Powered by AkoComment! |
||