From f67557ba714fb5826240256ffc5eea3f29f6a3dc Mon Sep 17 00:00:00 2001
From: Seemant Kulleen
grSecurity also has better chroot restrictions, improved protection
against buffer exploits, a tight address space protection scheme (PaX),
-improved auditing possibilities, randomisation-improvements for the
+improved auditing possibilities, randomization-improvements for the
TCP/IP-stack and PIDs,
-Since grSecurity is a kernelpatch, you need to install, configure and
+Since grSecurity is a kernel patch, you need to install, configure and
use a Linux kernel with the grSecurity patch in it. On Gentoo, several
kernel-ebuilds provide grSecurity. You can choose between
Now wasn't that easy ? :)
-Make sure /usr/src/linux points to the correct sourcetree +Make sure /usr/src/linux points to the correct source tree # cd /usr/src/linux # make menuconfig
-You'll notice that there are 2 new sections in comparison with the +You will notice that there are two new sections in comparison with the vanilla kernel: Cryptography support (CryptoAPI) and Grsecurity. In this document, we will only talk about the latter section. @@ -210,19 +210,19 @@ step.
-Lots of exploits and known disfunctionalities are based on how the Linux -kernel handles memory. The Address Space is the first 3 Gb of the +Lots of exploits and known malfunctions are based on the Linux +kernel's memory handling. The Address Space is the first 3 GB of the virtual memory that Linux can address, and is solely used for applications. Protecting this area is one of the most important tasks of the grSecurity patches.
-Linux per default doesn't know about executables pages: if a page is
-readable, it is executable. Because of this flaw known exploits
+By default, Linux doesn't know about executable pages: if a page is
+readable, it is executable. Because of this flaw, known exploits
can inject executable code in memory regions which shouldn't really be
executable. If you select
-Some tools require to execute very small snippets of code from a
+Some applications need to execute small snippets of code from a
non-executable memory page; activating any of the above implementations
will break these tools (some parts of
If you select
@@ -283,12 +283,12 @@ Many exploits are only effective if they know the exact return addresses in
the attacked program. Activating
-To disable the possibility for tools to modify the running kernel (using
+To disable the possibility for applications to modify the running kernel (using
ioperm and iopl calls) you should select
-If you use one of the randomisation algorithms for address space layout,
+If you use one of the randomization algorithms for address space layout,
you
@@ -346,7 +346,7 @@ like the kernel image and
Here you can configure a small set of general ACL options, namely hiding -kernelprocesses, setting the maximum tries before (ACL) password lockout and +kernel processes, setting the maximum tries before (ACL) password lockout and the time to wait after the maximum (ACL) password failures.
@@ -364,7 +364,7 @@ a very important part.
The
If you use chroot-jails on your system, enabling the
-The default Linux TCP/IP-stack has some properties that makes it more
-vulnerable to prediction-based hacks. By randomizing several items
+The default Linux TCP/IP-stack has some properties that make it more
+vulnerable to prediction-based hacks. By randomizing several items,
predicting the behaviour will be a
-
-In this section you can limit how fast and how much messages the +In this section you can limit how fast and how many messages the kernel will generate in a certain timeframe.
@@ -564,14 +564,14 @@ kernel will generate in a certain timeframe.First of all, ACLs provide you with greater flexibility and more -control, even if you don't use the sysctl optoins. Perhaps you aren't -convinced now, but after reading the following sections, I'm sure you -will be :) +control, even if you do not use the sysctl options. You may not be +convinced now, but after reading the following sections, you just might +be. :)
@@ -581,7 +581,7 @@ Otherwise an attacker can simply deactivate all protections we provide.
If a subject has object restrictions which are also restricted by a -parent ACL structure, then the restriction of the first subject have +parent ACL structure, then the restriction of the first subject has a higher priority than the inherited restrictions on those objects.
@@ -678,7 +678,7 @@ PaX on this subjectMode | Description |
---|---|
-After the system resource you must define 2 values. The first one is the +After the system resource you must define two values. The first one is the "soft limit", meaning that the user running that process will receive a -warning that he has crossed the resource limit. The second one is the +warning that the resource limit has been crossed. The second one is the "hard limit", which is the actual enforced limit.
@@ -771,7 +771,7 @@ warning that he has crossed the resource limit. The second one is theYou have to define a default ACL for your system first. The following -can be used as default ACL: +can be used as a default ACL:
@@ -837,10 +837,10 @@ can be used as default ACL:
-The reason that a default ACL is needed is because of the forementioned
-inheritance. Note that permissions on an ACL system is controlled both
+The reason that a default ACL is needed is because of the aforementioned
+inheritance. Note that permissions on an ACL system are controlled both
by the ACL on an object
-We also allow
You can see that the subject mode is different from
In the learning mode grSecurity will audit everything a certain process does, and log it into a temporary ACL. Afterwards, you can dump it -into an ACL file and, if necessary, make further adjustements. +into an ACL file and, if necessary, make further adjustments.
@@ -1092,12 +1092,12 @@ single process while the rest of the system remains protected as usual.
-To enable process-base learning mode on a subject we would first need to -add it to our ACL system. +To enable process-base learning mode on a subject you first need to +add it to your ACL system.
-Now we reload the grSecurity ACL system with
@@ -1163,9 +1163,9 @@ Now we reload the grSecurity ACL system withgradmn .You should now use this application as thouroughly as possible, since the learning mode uses a threshold-based system to determine the ACLs. -If the application is something that uses authentification you should +If the application is something that uses authentication you should log on/off to that service which will cause it to do its necessary -authentification calls. +authentication calls.
@@ -1192,7 +1192,7 @@ repeated about 4 times.
When you think the tool has been run long enough, go in admin mode with
@@ -1202,7 +1202,7 @@ the ACLs into a file. The following will append the new learned ACLs togradm -a (or disable the ACL system withgradm -D ) and dump -the ACLs into a file. The following will append the new learned ACLs to +the ACLs into a file. The following will append the newly learned ACLs tooutput.acl .
-You should read the proposed ACL thouroughly and make changes if deemed +You should read the proposed ACL thoroughly and make the changes you deem necessary. If you know your service will be doing name service lookups you might want to add the following to the final ACLs result.
@@ -1226,7 +1226,7 @@ you might want to add the following to the final ACLs result.
With sysctl, you can "talk" to the kernel by inserting values in files
provided by
-As you read previously, several grSecurity options can be enabled/disabled -on the fly using sysctl. There are 4 ways in which you can change the -sysctl variables. +As has been mentioned previously, several grSecurity options can be +enabled and disabled on the fly using sysctl. There are four ways in which +you can change the sysctl variables.
-The first one is hardcoding the values in
-For instance, to deny using pivotroot in chrootjails, you would set +For instance, to deny using pivotroot in chroot jails, you would set the following:
@@ -1285,7 +1285,7 @@ you can use:
-The fourth way is by
-Now that you know how to write or change ACLs, it is time to install the +Now that you know how to write and change ACLs, it is time to install the Gentoo ACLs on your system. Don't forget to use a kernel with grSecurity compiled-in!
@@ -1378,7 +1378,7 @@ Password written in /etc/grsec/pw.
To lock the grSecurity options, you should set